10
$\begingroup$

My Answer: $1/2$
My Reasoning: Each coin flip is an independent event, outcome of which doesn't depend on preceding flips. So, even though the probability of $100000$ heads in a row is very low, the probability of next coin to be a head is $1/2$ itself.


An answer by a peer: $1$
Their reasoning: Its very naïve to say that the probability will be $1/2$ without considering the Bayesian approach which considers the information of both data as well as the prior distribution of parameter, here one can easily check the posterior probability to be $1$ with simple Bayesian analysis.



So, what is the correct acceptable answer? What is the correct reasoning here? If their answer is correct, please explain me how Bayesian approach is used here.

$\endgroup$
16
  • 7
    $\begingroup$ Well it's probably a "fair" coin with both sides heads, so there is equal likelihood of it coming up heads either way. $\endgroup$ Sep 12 at 5:26
  • 2
    $\begingroup$ No matter how you analyze it, the probability is not "exactly" 1. $\endgroup$
    – user619894
    Sep 12 at 6:01
  • 7
    $\begingroup$ If it is a fair coin then the probability is $\frac{1}{2}$. Each flip is independent. By the way, if you could flip a fair coin forever, not only would you eventually get a steak of $100000$ heads in a row, you would get streaks of numbers that are too big to write down. That is the nature of infinity and randomness. $\endgroup$
    – John Douma
    Sep 12 at 10:26
  • 7
    $\begingroup$ Many of the comments and answers below seem to be confusing a math problem with a real coin. We are given that the coin is fair so each flip is independent. Clearly, if we did that experiment we would suspect the validity of the claim that the coin was fair much sooner. But this is a math problem whose answer depends on what we are given, not our experience in the real world. $\endgroup$
    – John Douma
    Sep 12 at 15:48
  • 2
    $\begingroup$ We cannot show that a real coin is fair. Even if we could show that heads has probability $\frac{1}{2}$ as desired we could not check this independency because we would never reach $10^5$ heads in a row in reality even if heads has , say , probability $0.99$ (which would be a coin far from fair!) let alone with a fair coin. But that does not matter since we assume a fair coin and this is clearly defined as a memoryless coin, the answer is of course $\frac{1}{2}$. $\endgroup$
    – Peter
    Sep 12 at 17:29

6 Answers 6

27
$\begingroup$

If it's actually a fair coin, then the flips are independent and you would be correct.

However, there is pretty strong evidence that it isn't actually a fair coin

$\endgroup$
2
  • $\begingroup$ Agreed. So theoretically and considering assumptions of the questions, my reasoning isn't wrong. Just curious, which test would be used to test the fairness of coin based on the observations? $\endgroup$
    – Jinav Gala
    Sep 12 at 5:04
  • $\begingroup$ @JinavGala Depends a bit on the exact question you want to ask. If you just want to get a yes/no "Should I believe this is actually a fair coin?" then that's Hypothesis Testing, and there are both frequentist and Bayesian approaches to it. -- "What's the probability that this is a fair coin?" would probably require a more Bayesian approach. But once you manage to come up with what you think is a reasonable prior (which is far from trivial), you can compute the posterior with basic Bayesian methods (as in, methods taught in any "Intro to Bayesian Statistics" course). $\endgroup$
    – R.M.
    Sep 12 at 14:50
9
$\begingroup$

The assumption of a coin being fair is not a property of the coin but a feature of the whole coin flipping system. It is easy to flip a perfectly symmetrical and balanced coin with unequal chances of heads and tails. Theoretically speaking if you are sure that the whole coin flipping system is fair, it is true that the chances of heads in the next trial is 1/2. But how would you ensure that? I don't know.

Under a Bayesian perspective with, for instance, an uniform prior (Beta(1,1)) the posterior pdf for $p$, the probability of heads, will be a Beta$(100001,1)$, with $E(p)=0.99999$. An answer that appears closer to common sense in a situation like this.

I would be willing to bet a good deal of money on heads in the next flip.

$\endgroup$
5
  • $\begingroup$ "But how would you ensure that?" By flipping the coin an infinite number of times, doing this twice as fast on each new flip :) $\endgroup$
    – lisyarus
    Sep 12 at 10:29
  • $\begingroup$ Exactly, the coin may be fair, but the flip may not be. By the way, what method do you know for making the flip unfair? The one I know if the one that Mark Rober shared, where you tilt the coin so that it precesses instead of actually "flipping." $\endgroup$ Sep 12 at 14:04
  • 2
    $\begingroup$ Why Beta(1;1)? After one coin flip, would you update it to Beta(2;1) and be willing to bet more than even money on head on 2nd flip? Why not start with Beta(50;50) or Beta (1,000,000,000;1,000,000,000)? $\endgroup$
    – Rad80
    Sep 12 at 14:05
  • 1
    $\begingroup$ @AndrewHolmgren I know people who can reliably flip a coin in an unfair manner. It's just a matter of very careful practice - starting with the coin the same way up each time, and putting the same amount of force in your flip. Much easier with a machine of course, but certainly possible with your hands if you're good enough at it. (The same type of people who are good at close up stage magic or cardistry tend to have the skills necessary.) $\endgroup$ Sep 12 at 15:09
  • 1
    $\begingroup$ In the context of elementary probability theory, stating that "a fair coin is flipped" means that the coin and the entire flipping system are fair. $\endgroup$
    – Xander Henderson
    Sep 12 at 15:52
5
$\begingroup$

The problem states that a fair coin is flipped a hundred thousand times, and comes up heads each time. By definition, a fair coin is a coin such that every toss is independent from every other toss, and the probability of coming up heads on any particular toss is exactly $\frac{1}{2}$. If the problem states that this coin is fair, then the fact that the first hundred thousand tosses are all heads is completely irrelevant.

Therefore, as the problem is stated, I would argue that the correct answer is "The next toss will be heads with probability $1/2$."

$\endgroup$
2
  • 5
    $\begingroup$ Every other answer to this question gets into the question of whether or not this coin is fair---this is a distraction. I agree that, in the real world, we would be suspicious of a coin which came up heads 100,000 times in a row. But this is not a real world problem. This is an abstraction in which it is given that the coin is fair. Even so, the peer is likely wrong---a Bayesian approach to this coin is not going to come up with a 100% chance of heads on the next toss (though you'll likely get something very close to 100%). $\endgroup$
    – Xander Henderson
    Sep 12 at 16:02
  • $\begingroup$ Agreed @Xander ! $\endgroup$
    – Jinav Gala
    Sep 12 at 16:08
1
$\begingroup$

If you start with the definition of a fair coin as IID yielding heads or tails with 50% probability each time you throw it, then obviously the answer is that the probability is still 50% after 100 000 throws, regardless of what the outcome of those throws was. It's literally just there in the definition.

However, if this actually happened to you then you could at this point be perfectly certain that whoever gave you the coin did not mean the above by “fair coin”. In practice in such a situation you might well assume they just lied to you. One way of modelling this Bayesianically is to assign prior probabilities regarding whether the provider of the coin was an honest person.

But with a result that crass, the concrete explanation to go with is as Suzu Hirose and gnasher729 wrote: the coin appears to have heads on both sides.

How can we pin that to a statistical computation? Well, so we admit that it's not god-given that every coin has heads on one side and tails on the other. We do still have a heavy prior on this being the case. To formulate that precisely: the images on both sides of the coin are random variables, but side A showing heads is highly correlated with side B showing tails, vice versa. Say, 99.99%, i.e. initially we're basically sure that this is a bog-standard fair heads&tails coin.

Side A is heads Side A is tails
Side B is heads $P(HH) = 0.01\%$ $P(TH) = 99.99\%$
Side B is tails $P(HT) = 99.99\%$ $P(TT) = 0.01\%$

But then we have we have this 100000-heads result. We still assume that the coin lands with equal probability on either side, but we can now compute posterior probabilities for the actual images on the coin: the conditionals are $$\begin{align} P(100000H | HH) =& 1 \\ P(100000H | TH) =& 2^{-100000} \\ P(100000H | HT) =& 2^{-100000} \\ P(100000H | TT) =& 0. \end{align}$$ We have $$\begin{align} P(100000H) =& \sum_{c\in\{HH,TH,HT,TT\}}\!\!\!\!\!P(c)\cdot P(100000H | c) \\=& 0.0001 + 2\cdot 0.9999\cdot 2^{-100000} + 0 \\\approx& 0.0001 + 2^{-99999}. \end{align}$$ Then $$\begin{align} P(HH | 100000H) =& \frac{P(100000H | HH)\cdot P(HH)}{P(100000H)} \\=& \frac{0.0001}{0.0001 + 2^{-99999}} \\\approx& \frac{10^{-4}}{10^{-4} + 10^{-30102}} \\\approx& 1 - \frac{10^{-30102}}{10^{-4}} \\\approx& 1 - 10^{-30998} \end{align}$$ IOW, we can at this point be almost completely sure that the coin has heads on both sides.

(Feel free to repeat the calculation with as many 9-digits appended to the $HT$-prior as you fancy, it won't change the result meaningfully.)

$\endgroup$
3
  • 1
    $\begingroup$ Your analysis seems like it would be very appropriate to a question similar to this one, but it doesn't actually seem relevant to this question. In this question, the problem statement declares that the coin is fair. The task is to determine the probability that the next toss is heads given that the coin is fair. Typically, the whole point of an example like this is to beat into student's heads what "independence" means. $\endgroup$
    – Xander Henderson
    Sep 12 at 18:13
  • 1
    $\begingroup$ If the problem were, instead, "Given that the last 100,000 tosses were all heads, what is the probability that the next toss is also heads?", then everything after the first paragraph of your answer might be relevant. $\endgroup$
    – Xander Henderson
    Sep 12 at 18:14
  • 1
    $\begingroup$ @XanderHenderson but the question is not about a situation where the coin is fair in the mathematical sense. It's about a situation where somebody threw a coin presuming it was fair, but got a result that would not have happened with a fair coin. So it's all about what is the correct mathematical description, not what would be the outcome of the (wrong) given mathematical description. Of course it may be that the problem was originally phrased with a different intent, but then it's just written wrong. 100000 heads in a row with a true fair coin cannot happen. $\endgroup$ Sep 12 at 19:38
0
$\begingroup$

"A fair coin is flipped 100,000 times in a row and you get 100,000 Heads in a row".

Clearly you have a fair coin with "Heads" on both sides, so the probability is 1.

$\endgroup$
7
  • 2
    $\begingroup$ You are absolutely wrong. The probability is small, $\frac{1}{2^{100000}}$, but it is possible. We are given that the coin is fair so it doesn't have two heads. $\endgroup$
    – John Douma
    Sep 12 at 15:33
  • $\begingroup$ @JohnDouma well – what is the definition of a fair coin, though? Certainly a coin that has the same probability of landing on either side, but less clear that it also specifies what image each side of the coin displays. Ok, perhaps you start with a prior assumption of 99% chance that the specification meant “equal probability of yielding heads or tails”, but then by now the evidence has amply squelched that interpretation. $\endgroup$ Sep 12 at 15:53
  • 2
    $\begingroup$ @leftaroundabout This is standard terminology in probability. A fair coin is one with equal probability of coming up heads or tails. $\endgroup$
    – John Douma
    Sep 12 at 16:12
  • 2
    $\begingroup$ @leftaroundabout This isn't a "real world" problem. In the "real world", you are never told "this is a fair coin". $\endgroup$
    – Xander Henderson
    Sep 12 at 16:21
  • 1
    $\begingroup$ @leftaroundabout Have you ever seen a problem that says one person always tells the truth and one person always lies? This is like that. $\endgroup$
    – John Douma
    Sep 12 at 16:35
0
$\begingroup$

You are correct, the answer is 1/2.

Ask your friend this question: If $2^n$ people were flipping a fair coin $n$ times each, then the probability $p(n)$ of at least one of them getting $n$ heads in a row is

$$p(n) = 1 - \left(1-\frac{1}{2^n}\right)^{2^n}$$

Observe that $$\lim_{n\rightarrow\infty}p(n) = 1-\frac{1}{e}>63\%$$ In fact $p(100,000)>63\%$ thus it is more likely than not that someone, say it was Alice, actually did flip 100,000 heads in a row with a fair coin. Would your friend still conclude that the probability is 1 that Alice's next coin flip is heads?

$\endgroup$
4
  • 1
    $\begingroup$ Good luck finding $2^{100\,000}$ people. $\endgroup$ Sep 12 at 16:05
  • $\begingroup$ The technical term would be a statistical ensemble. $\endgroup$
    – Matt
    Sep 12 at 16:55
  • 2
    $\begingroup$ This seems like the wrong computation for this problem. The question is, "If $n$ people each toss a fair coin 100,000 times, what is the probability that at least one of them will throw all heads?" Thus, assuming that each person is independent, $$\begin{align} P(\text{at least one person throws all heads}) &= 1 - P(\text{nobody throws all heads}) \\ &= 1 - P(\text{an individual does not throw all heads})^n \\ &= 1 - \left( 1 - \frac{1}{2^{100000}} \right)^n. \end{align}$$ This tends to $1$ as $n\to \infty$. $\endgroup$
    – Xander Henderson
    Sep 12 at 18:06
  • $\begingroup$ @XanderHenderson Indeed that also makes the point. I wanted to choose an explicit value for $n$ and explicit lower bound on the probability. Using your formula, one might pick $n=2^{100 000}$ and use the convenient approximation $1-e^{-1}=0.63...$. Another way to arrive at the same result. $\endgroup$
    – Matt
    Sep 12 at 19:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.