Clarification on the gamblers fallacy I recently learned about the gamblers fallacy and I understand the idea that past independent events have no bearing on the odds of the next coin flip. Specifically what cleared this up for me is that
The probability of 20 heads, then 1 tail is $0.5^{20} \times 0.5 = 0.5^{21}$
The probability of 20 heads, then 1 head is $0.5^{20} \times 0.5 = 0.5^{21}$.
The above example was helpful to make it more intuitive why this is a fallacy but this raised a new question for me. Often, if people are too lucky, professionals use those numbers from above to "prove" that the person was cheating or that the game was rigged. How can professionals use these numbers to make such claims when there was simply a 50% chance of the coin being flipped in that order every time? Are they not falling victim to the gamblers fallacy when they do this? Could someone clarify this for me or help explain where I am going wrong?
 A: Here's an example to encourage intuition about 'too lucky': If a person flips a 'fair' coin 20 times, and it comes up heads each time, a statistician might say something like "A 'fair coin' my foot!". Why so? Because we have a model of collections of fair coin flips—and generally, collections of probabilities of independent events with known individual probability—in the binomial distribution. If we know the size of the collection (i..e number of coin flips), and the probability of a single independent event (0.5 for a fair coin), then we can use the binomial distribution to answer questions like "What is the probability of observing $x=20$ 'successes' (i.e. 'heads') out of $n=20$ coin flips, on a fair coin where the probability of heads = $0.5$?"
It turns out the answer to that specific question is, in the immortal words of Oliver Wendel Jones, "Diddly $\div$ squat" (more precisely, this specific probability is $Pr(X=20|n=20,p=0.5)=0.5^{20} = 0.000000953674$, or less than 1 in a million). The expected value of observed heads out of 20 flips is 10 (probability 0.176), and the probability of observing a number of heads in the range 7–13 is >0.95… 20 heads is just too unlikely.
So the 'too lucky' is not in the 21st head: it's in a string of wins that gets too improbable. Of course the actual calculations performed by a gambling house will also take into account the number of gamblers one observes playing a game, a history of play on previous occasions, etc.
