# Expected Value Of Coin Flip Game

I am having a hard time getting comfortable with random variables and expected values.

Here is the question:

I flip two fair and indepedent coins. If the first coin comes up tails you loose $\$1$(ie. you win$-\$1$). If the second coin comes up heads you win $\$2$. For example: First coin comes up tails and second coin comes up heads your total winning is$\$1$ ($-\$1$+$\$2$ = $\$1$) Define the random variable X to be the amount of dollars that you win. What is the expected value of X? Here is what I think: Possibilities: •$\{T,T\}=-\$1$
• $\{T,H\}=\$1$•$\{H,T\}=\$0$
• $\{H,H\}=\$2$So I'll define$X$as$X= amount\ won$The probability of each winning amount is$\frac1 4$. So my expected value is calculated as:$E(X) = -1 * \frac1 4 + 1*\frac1 4+0*\frac1 4+2*\frac1 4=\frac1 2$Am I doing this correctly or is there a better way? Also what would happen in the case of if I flipped a fair coin n times, and after n times I stop with the same rules what would be the expected value? • Your way looks ok. Not sure what you mean by "better". (You could improve your notation by writing$X(T,T)=-1$instead of$\{T,T\}=-\$1$, etc.) – Oskar Limka Dec 20 '15 at 18:09
• (Tails you lose, heads I win. Wanna play? Just joking.) Yes your method is correct and I do not see a better way. – Jimmy R. Dec 20 '15 at 18:10

Your computation is correct. An easier way might be to compute the expected winning of each flip separately, and then add them.

First flip: $(-1) \cdot (1/2) + 0 \cdot (1/2) = -1/2$.

Second flip: $2 \cdot (1/2) + 0 \cdot (1/2) = 1$.

Total: $-1/2+1=1/2$.

Regarding generalizing to $n$ flips, it is not clear how you want to generalize, so you should be more specific.

You are doing fine, but you can do less cases if you use the linearity of expectation. You can consider the two flips indepently, as the return of each does not depend on the other flip. You can just add the expected value of each flip. Then the expectation of the first filp is $-\frac 12$ and the expectation of the second is $+1$, for a total $+\frac 12$. You can complain that I went through four cases as did you, but my cases were simpler. If there are $n$ flips, you would have to do $2^n$ cases, while I would have to do $2n$. If $n=10$, I am way ahead.

• Do you even need independence of events to use linearity of expectation? I thought that reasoning worked even with dependent events. – Arthur Dec 20 '15 at 18:13
• @Arthur:Good point. You need independence of results, not independence of events. If we change the game so that the payoff on the second flip depended on the result of the first, we would have to be more careful. We would get into the $2^n$ cases that OP went through. I reworded it a bit. Thanks. – Ross Millikan Dec 20 '15 at 18:15
• Right. But then it wouldn't really make sense to speak of "winnings from first coin" and "winnings from second coin" anymore anyways. – Arthur Dec 20 '15 at 18:17