# Calculating expected value

Here is the problem.

In a game(shown below) with the marker in the center on each turn the marker moves to a neighbouring region with all positions equally likely and the player collects the cash there(the cash is not replaced after that). The game is over once the marker returns to the center. On average how much cash does the player collect.

Here is what I have tried:

$\mathrm{Average} = \sum_{i=1}^4 P(i)i$, where $i$ is the number of dollars won.

$P(1) = 1/3$ and $P(2) = 1/3$ (after taking care of the case where the player cycles between empty positions)

But $P(3)$ and $P(4)$ are getting more difficult with all empty positions.

Is there any other way to solve this?

-
"on each turn the marker moves equally likely" whereto? With equal probability to any of the $5$ fields? If so, including or excluding the one it's currently on? – joriki Dec 7 '12 at 11:09
sorry for the typo..updated the question. The player can move to the neighboring positions. – Kamal Dec 7 '12 at 11:12

With probability $1/3$, you collect a third dollar and are then on the field next to the remaining dollar. Let $p$ be the probability of reaching the centre before taking the last dollar when starting next to the last dollar, and let $q$ be that probability when starting opposite the last dollar. Then

$$p=\frac13+\frac13q\;,\\ q=\frac13+\frac23p\;.$$

Substituting the first equation into the second yields

$$q=\frac13+\frac23\left(\frac13+\frac13q\right)=\frac59+\frac29q$$

and thus $q=5/7$ and $p=4/7$. Since we start out next to the last dollar, we have

\begin{align} P(3)&=\frac13p=\frac4{21}\;,\\ P(4)&=\frac13(1-p)=\frac3{21}=\frac17\;. \end{align}

Thus the expected gain is

$$\frac13\cdot1+\frac13\cdot2+\frac4{21}\cdot3+\frac17\cdot4=\frac{15}7\;.$$

-
Awesome explanation. Thanks! – Kamal Dec 7 '12 at 11:36