TITLE: Probability of rolling a die
QUESTION [6 upvotes]: I roll a die until it comes up $6$ and add up the numbers of spots I see. 
For example, I roll $4,1,3,5,6$ and record the number $4+1+3+5+6=19$. Call this sum $S$. 
Find the standard deviation of $S$.

I have been looking for an easy way to do this because I know I can use the definitions here to calculate the variance of $S$ and then take the square root of it. But I am sure there is an easier way to do this.

REPLY [4 votes]: Let $Y$ be the number of rolls before a $6$ is rolled. Let $X$ be the sum of the dice rolled before a $6$. Straightforward calculation yields
$$
\mathsf{E}(X|Y=n)=n\;\mathsf{E}(X|Y=1)=3n
$$
and
$$
\mathsf{Var}(X|Y=n)=n\;\mathsf{Var}(X|Y=1)=2n
$$
and
$$
\mathsf{P}(Y=n)=\left(\frac{5}{6}\right)^n\frac{1}{6}
$$
Using the Law of Total Variance, we get
$$
\begin{align}
\mathsf{Var}(X)
&=\mathsf{E}(\mathsf{Var}(X|Y))+\mathsf{Var}(\mathsf{E}(X|Y))\\
&=\sum_{n=0}^\infty\;2n\left(\frac{5}{6}\right)^n\frac{1}{6}+\sum_{n=0}^\infty\;(3n)^2\left(\frac{5}{6}\right)^n\frac{1}{6}-\left(\sum_{n=0}^\infty\;3n\left(\frac{5}{6}\right)^n\frac{1}{6}\right)^2\\
&=\frac{2}{6}\frac{\frac{5}{6}}{(1-\frac{5}{6})^2}+\frac{3^2}{6}\left(\frac{2\left(\frac{5}{6}\right)^2}{(1-\frac{5}{6})^3}+\frac{\frac{5}{6}}{(1-\frac{5}{6})^2}\right)-\left(\frac{3}{6}\frac{\frac{5}{6}}{(1-\frac{5}{6})^2}\right)^2\\
&=10+495-225\\
&=280
\end{align}
$$
Therefore, the standard deviation is $\sqrt{280}$.
Afterword:
Although not requested in the question, the expected value of $S$ is simple to compute by the linearity of expectation. Since the probability of rolling a $6$ is $\frac{1}{6}$, the mean number of rolls is $6$. Since each non-$6$ roll has a mean of $3$ and on average there will be $5$ non-$6$ rolls, we get $\mathsf{E}(S)=5\cdot3+6=21$.
We can also compute this using the set-up for the variance above. Since $S=6+X$,
$$
\begin{align}
\mathsf{E}(S)
&=6+\mathsf{E}(X)\\
&=6+\mathsf{E}(\mathsf{E}(X|Y))\\
&=6+\sum_{n=0}^\infty3n\left(\frac{5}{6}\right)^n\frac{1}{6}\\
&=6+\frac{3}{6}\frac{\frac{5}{6}}{(1-\frac{5}{6})^2}\\
&=6+15\\
&=21
\end{align}
$$