[Math] Help with finding expected value of probability mass function

probabilityprobability distributions

The question is as follows:

In a popular tale of wizards and witches, a group of them finds themselves in a room with doors which change position, making it impossible to determine which door is which when the room is entered or reentered. Suppose that there are $4$ doors in the room. One door leads out of the building after $4$ hours of travel. The second and third doors return to the room after $3$ and $5$ hours of travel, respectively. The fourth door leads to a dead end, the end of which is a $1.5$ hour trip from the door.

If the probabilities with which the group selects the four doors are $0.2$, $0.1$, $0.2$, and $0.5$, respectively, what is the expected number of hours before the group exits the building?

This is my working thus far:

Let $X =$ number of hours

$X(4) = 0.2$; $X(3) = 0.1$; $X(5) = 0.2$; $X(1.5) = 0.5$;

Expected value $= 4\cdot0.2 + 3\cdot0.1 + 5\cdot0.2 + (1.5+1.5)\cdot0.5 = 3.6$

I doubled the time of door number $44$ as you reach a dead end and have to walk back.

This answer is apparently incorrect and I have no idea what else to try.

Help would be appreciated!

Best Answer

Let $x$ be the expected value.

We can condition on the first move.

Hence,

$$x=4(0.2)+(3+x)(0.1)+(5+x)(0.2)+(0.5)(3+x)$$

$$x=0.8+0.3+0.1x+1+0.2x+1.5+0.5x$$

$$0.2x=0.8+0.3+1+1.5=3.6$$

$$x=18$$

Related Question