Probability – Escaping Prisoner Probability Question

probabilitystatistics

Question: A prisoner is trapped in a cell containing three doors. The first door leads to a tunnel which
returns him to his cell after two days travel. The second door leads to a tunnel that returns
him to his cell after three days travel. The third door leads immediately to freedom.

(a) Assuming the prisoner will always select doors 1, 2 and 3 with probabilities 0.5, 0.3 and
0.2 respectively, what is the expected number of days until he reaches freedom?

(b) Calculate the variance of the number of days until the prisoner reaches freedom.

My Attempt so far: I've used first step decomposition to get an answer of $9.5$ days to the first part of the question, but I have no idea how to find the variance for part (b). I've tried using the Law of Total Variance but got nowhere. I don't know whether you're supposed to use $Var(X) = E(X^2) – (E(X))^2$, where $X$ is the number of days taken to reach freedom. If so, how do you go about finding $E(X^2)$? Any help would be greatly appreciated.

Best Answer

To calculate $E[X]$ you presumably did $$E[X] = 0.5 E[X+2]+ 0.3 E[X+3]+0.2 E[0]$$ i.e. $$E[X] = 0.5 E[X] + 0.5 \times 2+ 0.3 E[X] +0.3 \times 3$$ and then solved to find $E[X]$.

Similarly you can do $$E[X^2] = 0.5 E[(X+2)^2]+ 0.3 E[(X+3)^2]+0.2 E[0^2]$$ i.e. $$E[X^2] = 0.5 E[X^2] +0.5 \times 4 E[X] +0.5 \times 4 + 0.3 E[X^2] +0.3 \times 6 E[X]+0.3 \times 9$$ and you already know $E[X]$. Then use $Var(X) = E[X^2] - (E[X])^2$

Related Question