# Coin flips and prediction - Is this a paradox?

Let's say a coin is given to you which is shown to have two sides (head and tail). I threw the coin 10 times and I got the sequence HHHHHHHHHH (all heads). Now, I am about to throw it the eleventh time. You lose a large bet if you predict the next toss wrongly. How will you predict the outcome of next toss?

Here are some of my answers:

1. It is rare to see 10 heads together unless the coin is biased. Hence, the probability that the coin is biased (the hyperparameter, theta) is very high. So, I should bet that the next outcome will also be a head.
2. 10 flips are too small a number to conclude that the coin is biased. Getting 11 heads is extremely rare and hence I must bet on a tail for eleventh toss.
3. Coin flips are IID and hence it does not depend on the previous tosses. You can bet on anything and your chances of winning is the same.

Am extremely confused on which of these is a good answer if any of them is a good answer at all. What do you think?

Well, I'd say the coin is biased or not. If it isn't biased, the probability of each outcome (H or T) is 1/2 (disregarding the possibility of the coin landing on its side and remaining in that position). In this case it doesn't matter what you choose.

If the coin is biased, it'll be biased towards H or T. Considering the outcome of the first ten flips, the probability of the coin being biased towards T is smaller than it being biased towards H. Choosing H will be the better choice in this case.

In short: choose H.

• I agree with your first case. In the second case, where we assume it to be biased, would you still call "H" even if this is just the second flip (and the last evidence ie., the first flip was H)? Or, is your answer biased since there were 10 flips? – Venkatesh Vinayakarao Dec 5 '14 at 9:52
• If the coin is biased towards H, the probability of flipping H is larger than the probability of flipping T. Obvious. Though a single occurrence isn't too much to rely on, flipping H will be "easier" with a coin biased towards H than with a coin biased towards T. So even after a single coin flip (H) I'd choose H. (But I wouldn't bet too high ;) – Ronald Dec 5 '14 at 10:30
• The coin could be telecontrolled. The assumption that any coin has its $H$-probability somewhere between $0$ and $1$ is too simple. – Christian Blatter Dec 2 '15 at 18:46

Read this article. There, you will find information on how to determine whether a coin is biased or fair, and you can find multiple approaches on how to estimate the coin's probability for heads and tails.

Specifically, taking the (simpler) frequentist approach the estimated probability that the next flip will show H is 1. It is, based on the observation of ten Hs in a row, the best guess from a frequentist point-of-view.

Similar reasoning will give you an estimate optimal from a Bayesian perspective.

if you use a Bayesian approach with a binomial likelihood and assume a uniform prior then i found that the probability that the coin is unbiased (>0.45 and <0.55) is about 0.1%

there is a nice example on wikipedia (see link in above post) which shows you how to do this. To perform the integral, simulation is an easy way to get the answer.

So in summary, if I knew the coin was unbiased then either H or T is equally likely. But, given the string of heads it does seem that it is likely biased and so i would pick H

here is some R code to help, remember that with a binomial likelihood and a beta prior, the posterior is also beta.

x=rbeta(100000,11,1)
sum(x>=0.45 & x<=0.55)/length(x)

1. This is fine. As Sam Bhatt says, this kind of reasoning can be formalized using Bayes' theorem, and it leads to Laplace's rule of succession, which suggests that you should assign probability $\frac{11}{12}$ to the next flip being heads.

2. This is gambler's fallacy.

3. Here you're assuming that the coin is definitely unbiased. If someone actually did this to you in real life, then I bet at some point you'd start at least suspecting that the coin was biased, right? (Maybe after 100 heads, or 1000...) Once you start suspecting that the coin is biased, the coin flips are only conditionally IID after conditioning on the bias of the coin, but they're no longer IID because they're correlated to each other (since they're correlated to the bias of the coin).