Example 4: A miner is trapped in a mine containing 3 doors. The first door leads to a tunnel that will take him to safety after 3 hours of travel. The second door leads to a tunnel that will return him to the mine after 5 hours of travel. The third door leads to a tunnel that will return him to the mine after 7 hours. If we assume that the miner is at at all times equally likely to choose any one of the doors, what is the variance of the length of time until he reaches safety?


The answer is 218. I know that E[X]=15 and I know how that part was computed, namely...

E(X given Y=1)P(Y=1)+...Y=3 (... as the same terms for Y=2 and Y=3)

I don't know how they get E(X^2) here.

Thanks.