[Math] Probability Question relating prison break

probabilitypuzzlestatistics

I am stuck in a question regarding a prisoner trapped in a cell with 3 doors that actually has a probability associated with each door chosen(say $.5$ for door $A$, $.3$ for door $B$ and $.2$ for door $C$). The first door leads to his own cell after traveling $2$ days, whereas the second door leads to his own cell after $3$ days and the third to freedom after $1$ day.

"A prisoner is trapped in a cell containig three doors. The first door leads to a tunnel that returns him to his cell after two days of travel. The second leads to a tunnel that returns him to his cell after three days of travel. The third door leads immediately to freedom.
a) Assuming that the prisoner will always select doors 1,2,and 3 with probability 0.5, 0.3, 0.2 what is teh expected number of days until he reaches freedom?
b) Assuming that the prisoner is always equally likely to choose among those doors that he not used, what is the expected number of days until he reaches freedom? (In this version, for instance, if the prisoner initially tries door1, then when he returns to the cell, he will now select only from doors 2 and 3)
c) For parts (a) and (b) find the variance of the number of days until the prisoner reaches freedom.
"

In the problem I was able to find the $E[X]$ (Expected number of days until prisoner is free where X is # of days to be free). Where I get stuck is how to find the variances for this problem. I do not know how to find $E[X^2$ given door $1$ (or $2$ or $3$) chosen$]$. My understanding is that he does not learn from choosing the wrong door. Could anyone help me out? Thank you very much

Best Answer

Let's go through it for part (a) first. Let $X$ denote the number of days until this prisoner gains freedom. I think you already have $E[X|D=1], E[X|D=2], E[X|D=3]$:

$E[X|D=1] = E[X + 2]$

$E[X|D=2] = E[X + 3]$

$E[X|D=3] = E[0]$

So we have

$E[X^2|D=1] = E[(X + 2)^2] = E[X^2] + 4E[X] + 4$

$E[X^2|D=2] = E[(X + 3)^2]= E[X^2] + 6E[X] + 9$

$E[X^2|D=3] = E[0^2] = 0 $

and now you can solve it b/c you have $E[X]$ already?

Related Question