There is a fair dice being tossed four times. Let $X_i$ for $1 \leq i \leq 6$ takes value of $1$ if there is at least one occurrence of $i$ and $0$ otherwise. Let $X$ be the number of different outcomes (if the four tosses are $4,4,6,1$, then $X$ equals $3$ since there are $3$ different outcomes.) What is the expectation of $X$?
I understand $X_i$ is Bernoulli variable with $\Pr(X_i=1) = 1-(5/6)^4$. But the answer says $X=\sum_1^6 X_i$ so $\mathbb E [X] = \mathbb E \left[\sum_1^6 X_i \right] = \sum_1^6 \mathbb E[X_i]$. I only do not understand why $X=\sum_1^6 X_i$? What prevents $X$ from equalling to $5$ or 6? Maybe $X_i$'s are not independent of each other but that shouldn't prevent their sum from adding up to $5$ or $6$?
You are summing what's called indicator variables, thus $$X_i,1\leq i\leq 6$$ are either one or zero.
This sum is maximized when all the tosses are distinct, but there are only 4 tosses, thus the maximum possible values of this sum is 4. Stated another way, there are at least two zeroes among the 6 variables $X_i$ since you cannot have more than 4 distinct numbers appear in 4 tosses.