# What should a player flipping a coin "expect"?

Earlier today, I asked this question on the Math StackExchange:

https://math.stackexchange.com/questions/3307837/do-i-break-even-in-a-fair-game

If someone were to run a computer simulation of the coin-tossing game, what would the score be for the player choosing heads every time? And why? What should we interpret as the "expected" value - the average, or the standard deviation?

Thanks!!!

• It's all a matter of how specific you want to get. Because $(X+1)/2$ has a Bernoulli$(1/2)$ distribution, after $n$ tosses the average of $n$ and the first player's winnings has a Binomial$(n,1/2)$ distribution. That says everything about the situation at that point (ignoring how you got there) and enjoys a simple formula.
– whuber
Jul 29, 2019 at 22:29
• @whuber I edited my question on math stack exchange, can you take another look? Thanks! Jul 29, 2019 at 22:34
• The book Statistics by Freeman, Pisani, and Purves has a nice account of these issues, using John Kerrich's coin-flipping data for motivation. It appears in all four editions. The book is well worth reading. A plot of some of Kerrich's data appears in the answer at stats.stackexchange.com/a/77044/919.
– whuber
Jul 29, 2019 at 22:44
• @whuber that's literally the best thing you could've commented, that book looks awesome! Thanks!!!! Jul 29, 2019 at 22:58

The process you have described is a simple one-dimensional random walk. Let $$X_n$$ be the score of the player who always guesses heads (so $$-X_n$$ is the corresponding score of the player who always guesses tails). After $$n$$ tosses of the coin, the score has the distribution:

$$X_n \sim n - 2 \cdot\text{Bin}(n, \tfrac{1}{2}).$$

The expected score is $$\mathbb{E}(X_n) = 0$$ and the standard deviation of the score is $$\mathbb{S}(X_n) = \sqrt{n/2}$$. Thus, the score will be distributed with an "expected value" of zero, but with increasing variability. For large $$n$$ the distribution of the score can be approximated by the normal distribution:

$$X_n \overset{\text{Approx}}{\sim} \text{N}(0, \tfrac{n}{2}).$$

(I am being a bit rough here, since this is a continuous approximation to a discrete distribution with expanding variability. If you round the approximating value to an integer then it will be a reasonable approximation.) Now, you have asked what score the player should "expect", but that is a little ambiguous. The "expected value" here is zero, as is the mode. So, on average, the player's score will be zero, and this is also the most likely score to occur. If you are willing to say that this is what the player will "expect" then that is the answer.

• Ben, thanks for your answer, +1!!! That's what I thought! However, I'm super confused on how to interpret the standard deviation of $Y$ (I'm referring to the Math StackExchange question.) And it's been driving me nuts for the last hour and a half!! Jul 29, 2019 at 22:30
• I edited the original question ALOT...how should I interpret $\sqrt{n}$?!?! Jul 29, 2019 at 22:39
• The standard deviation of the score is $\mathbb{S}(X_n) = \sqrt{n/2}$ so $\sqrt{n}$ gives you a measure of scale of the variability of the score.
– Ben
Jul 29, 2019 at 22:50
• Got you - just a comment to myself for when I look at this. Let $i$ be a random variable that on each toss, outputs $+1$ if the guy wins and $-1$ if the guy loses the bet, with $\frac{1}{2}$ probability of each. Let $X_n$ correspond to a random-varaible that outputs the sum of the guy's score after $n$ tosses. In other words, $X_n$ is the sum of the $i_s$. Then, the variance of $X_n$ is $\mathrm{Var}(X_n)=n*([(\frac{1}{2})(-1)]^2 + [(\frac{1}{2})(1)]^2) = \frac{n}{2}$, and its standard deviation is $\sqrt{\frac{n}{2}}$. Aug 16, 2019 at 18:35