Use indicator random variables to compute the expected value of the sum of n dice. Problem: Use indicator random variables to compute the expected value of the sum of n dice.
The solution I got from link
The solution is
Let X1, X2, . . . , X6 be the random variables which count number of times faces 1, 2, . . ., 6 come up. Let the X be the random variable corresponding to sum of n dice rolls. E[X] = 1E[X1] + 2E[X2] + . . . , +6E[X6].
Expected value E[Xi], is n/6.

*

*$ E[X] = \displaystyle\sum\limits_{i=1}^6 iE[X_i] $


*$ = \displaystyle\sum\limits_{i=1}^6 i(n/6) $


*$ = (n/6)\displaystyle\sum\limits_{i=1}^6 i$


*(21/6)n
I have doubts on this solution
Firstly, Expected value E[Xi], is n/6. for where it comes that E[Xi]= n/6?
Secondly, in the equation line 2 from where I get i(n/6).
Is it because, $E[X] = \displaystyle\sum\limits_{x=1}^n x Pr{(X =x)}$. Still it is not clear to me.
 A: 
Firstly, Expected value $E[X_i]$, is $n/6$. for where it comes that $E[X_i]= n/6$?

$X_i$ is the count of times face $i$ shows up among $n$ rolls of a fair 6-sided die.
$$X_i\sim\mathcal{Bin}(n,1/6)\implies \mathsf E(X_i)=n/6$$
Because: There are $n$ die, on each you expect the face to show with probability $1/6$, so the expected count of times the face shows among all of them is $n/6$.
By means of indicator random variables: Let $Y_{i,j}$ be the indicator random variable that die $j$ shows face $i$.  As an indicator random variable, $Y_{i,j}$ is Bernoulli distributed, and we have success rate $1/6$.  $$\begin{align}X_i&=\sum_{j=1}^n Y_{i,j}\\\mathsf E(X_i)&=\sum_{j=1}^n \mathsf E(Y_{i,j})\\&=n\times \dfrac 16\end{align}$$


Secondly, in the equation line 2 from where I get i(n/6).

The sum of faces showing on the die, equals the face-value weighted-sum of the counts of appearance of each face.
$$\begin{align}X&= X_1+2X_2+3X_3+4X_4+5X_5+6X_6\\&=\sum_{i=1}^6 i\, X_i\end{align}$$
Then we just take the expected value using the Linearity of Expectation
$$\begin{align}\mathsf E(X)&= \mathop{\mathsf E}\left(\sum_{i=1}^6 i\, X_i\right)\\&= \sum_{i=1}^6 i\,\mathsf E( X_i)\\&= \dfrac n6\sum_{i=1}^6 i\end{align}$$

The rest is just $1+2+3+4+5+6=\dfrac{6\cdot (6+1)}{2}=21$.
A: Let $W_{k,i}$ be an indicator for face $i$ coming up on die $k.$ Note that
$$E[W_{k,i}]=P(W_{k,i}=1)=1/6.$$
Thus, $$E[X_i]=E\left[\sum_{k=1}^n W_{k,i}\right]=E\left[\sum_{k=1}^n 1/6\right]=n/6.$$
As for step 2, it just replaces $n/6$ for $E[X_i]$ in step 1.
