The question:
Suppose we roll a fair 6 sided die with the number [1,6] written on them. After the first die roll we roll the die $k$ times where $k$ is the number on the first die roll. The number of points you score is the sum of the face-values on all die rolls (including the first). What is the expected number of points you will score?
Attempt:
There are six different cases for the first roll
Case 1: Roll 1
- $P(D_1=1) =\frac{1}{6}$
The expected number on the next roll is $E(D_2)=\frac{1}{6}\times(1+2+3+4+5+6)=3.5$
$E(S_1) = 3.5+1=4.5$ points
Case 2: Roll 2
We know what the expected value of one roll is, and since rolling the die is independent we can use the previous expected value for the next roll.
$E(S_2) = (3.5\times 2)+2=9$ points
Case 3: Roll 3
- $E(S_3) = (3.5\times 3)+3=13.5$ points
Case 4: Roll 4
- $E(S_4) = (3.5\times 4)+4=18$ points
Case 5: Roll 5
- $E(S_5) = (3.5\times 5)+5=22.5$ points
Case 6: Roll 6
- $E(S_6) = (3.5\times 6)+6=27$ points
Therefore, the expected number of points scored is
$=\frac{1}{6}\times(4.5+9+13.5+18+22.5+27)=15.75$ points
The expected value of a sum of random number $N$ of iid random variables $X_i$ is $$E\left[\sum_{i=1}^N X_i\right]=E[N]E[X_i]$$ In your case you add $E[N]$, so the answer is $$E[N]E[X_i]+E[N]=3.5\cdot 3.5+3.5 =4.5\cdot 3.5 = 15.75$$