Flip a coin until you wish to stop. Your goal is to maximize the ratio number of heads/total number of flips. What is the expected value of this game? Additionally, how would one play this game?
2 Answers
This seems like a tricky problem. If you are ever below $1/2$, you should keep flipping because the fraction of heads will converge to $1/2$ with probability $1$ if you keep flipping. Also since the number of heads is a random walk, the fraction of heads will go above $1/2$ infinitely often with probability $1$ if you keep flipping, so even if you are at exactly $1/2$ you should keep flipping. If the first flip is heads you should obviously stop. If the first flip is tails and the second two flips are heads you should probably also stop. But as the number of flips increases, things get a bit tricky. The standard deviation of the ratio is proportional to $1/\sqrt{N}$ for $N$ flips, so if the number of flips is large and you keep flipping it seems like your ratio will stay close to $1/2$ with high probability, although occasionally you may get a ratio equal to or above $1/2 + k/\sqrt{N}$ for some small $k$ on the order of $1$ or $10$ or so. The question is what $k$ to stop at as a function of $N$. If you choose $k$ too large, then on average you'll have to wait for a larger $N$ until you hit the ratio, so the expected value of $k/\sqrt{N}$ maybe smaller than if you had chosen a smaller $k$ to wait for.
- 26,450
This is definitely a cool problem. On one hand, since you don't have any stopping rule, you will always be able to achieve an $x$ arbitrarily close to 1 as long as you wait around long enough. Therefore, lets pick a more realistic stopping rule:
Let $X_t$ be the number of heads after $t$ tosses, and $P_t:= \frac{X_t}{t}$. We can define a stopping time $\tau:=\{\min t: X_t>0.5\}$, so that we stop when we first cross the 0.5 threshold. What we want to know is the expected value of the stopped process $E[X_{\tau}]$.
Unfortunately, I do not know of a nice formula for this value. However, I was able to simulate it.
I tried several stopping rules calculated the expected value of the stopped process. Here's what I got:
- $\tau:=\{\min t: X_t>0.5\}\rightarrow E(X_{\tau})\approx 0.8$
- $\tau:=\{\min t: X_t>0.6\}\rightarrow E(X_{\tau})\approx 0.9$
- $\tau:=\{\min t: X_t>0.7\}\rightarrow E(X_{\tau})\approx 0.94$
- $\tau:=\{\min t: X_t>0.8\}\rightarrow E(X_{\tau})\approx 0.98$
In each case, there is about a 50% chance that you will need fewer than 1000 flips to hit your stopping time. However, the expected number of flips increases rapidly as your cutoff approaches 1, so the ideal is somewhere between $x\in[0.6,0.8]$.
link1
link2
– Mr.Spot Aug 23 '14 at 04:23