Finding Expected Value : Escaping Prisoner Question

expected valuestatistics

Question: Prisoner locked in a cell with $n$ doors. Only one door leads to freedom, and all the other doors lead to a dungeon where the prisoner is forced to stay $a_{i} $ days for $i=2,….n$ when $i$ is the selected door (the first door can be set as the door that leads to freedom, so that $a_{1}=0$). The prisoner chooses a random door with equal probability to all doors and passes through it. If he did not choose the door that leads to freedom, after staying in the dungeon $i$ (when $i \neq 1$) he returns to the cell and picks again a random door. Suppose the prisoner does not remember which doors he has already checked. Let $X$ be the number of days till the prisoner gets to freedom:
A. Calculate $E[x]$.
B. Calculate $Var(x)$.

My Solution: For A:
I know that:
$E[X]=E[X|Y=i]=\sum_{i=2}^{n}E[X|Y=i]\cdot P(Y=i)$
$E[X]=\sum_{i=2}^{n} (E[x]+a_{i})\cdot \frac{1}{n-1} $
$E[X]=\frac{E[X]}{n-1}\sum_{i=2}^{n} a_{i} $
$E[X]=\frac{E[X]}{n-1}\cdot (\frac{n-1}{2}\cdot (a_{2}+a_{n})) $

But how can I find the expected value from here?

Best Answer

You've made some mistakes.

The equation $E[X]=E[X|Y=i]$ is meaningless, since $i$ is not defined. $i$ is a dummy variable in the summation, and and has no meaning outside it. This isn't so important, as it happens, because the next expression is correct, but you don't want to write this.

The equation $$E[X]=\sum_{i=2}^{n} (E[x]+a_{i})\cdot \frac{1}{n-1}$$ is wrong. $\Pr(Y=i)=\frac1n$, not $\frac1{n-1}.$ It's okay to ignore the case $i=1$ in the sum, since the prisoner escapes immediately, but that doesn't change the probabilities.

The third equation is also wrong, even if we ignore the mistake in the second one. From $$E[X]=\sum_{i=2}^{n} (E[x]+a_{i})\cdot \frac{1}{n-1},$$ you should get $$E[X] = \frac1{n-1}\sum_{i=2}^nE[X] + \frac1{n-1}\sum_{i=2}^n a_i=E[X]+\frac1{n-1}\sum_{i=2}^n a_i$$

In the fourth equation, you seem to be assuming that the $a_i$ form an arithmetic progression, but this is not given in the problem. There is no way to simplify the sum of the $a_i$.

Try it again.

Related Question