Where is the gambler's fallacy in this coin flipping binomial distribution? Suppose we have a biased coin where:
$p(Heads) = 0.6$
$p(Tails) = 0.4$
If $X$ is the number of heads obtained in 10 flips, the binomial distribution says:
$p(X = 9) = 0.04$
$p(X = 10) = 0.006$
Suppose we are now flipping this biased coin, and we have flipped it 9 times so far. On all 9 flips, the coin landed on heads. Is heads or tails more likely on the next flip?
Answer 1: Since $p(X = 9) > p(X = 10)$, $X = 9$ is the more likely outcome. Therefore, the next flip is more likely to be tails.
Answer 2: Since $p(Heads) > p(Tails)$, the next flip is more likely to be heads.
I think the first answer is wrong because it looks like the gambler's fallacy, but I can't explain it in mathematical terms. Can someone explain how the reasoning in the first answer is faulty? How do I refute the reasoning given in the first answer?
 A: Answer 1 is wrong. Suppose the coin is fair (the intuition here will be clearer).
Still, answer 1 would say that the probability of $X=9$ is greater. The reason is that each series of H and T has the same probability, and there are 10 series which give 9H1T compared to only a single series giving 10H.
BUT! Since you already tossed the coin 9 times, you ruled out 9 of the possible 9H1T series, which means that you either in a series of 10H or a series of 9H followed by 1T. Both are equality probable.
A: The term you are looking for is independence.
In probability, independent events are ones where the occurrence of one event does not affect the probability of occurrence of the other.  For example, flipping heads on a coin does not make it more or less likely to roll a $6$ on a die.  We say that these events are independent.
To refute the first answer, we want to rephrase the question to "is the next flip more likely to be Heads or Tails [given the first nine flips were Heads]?"  We can now apply what we know about conditional probability.
A: Independence is of course important, but there is also dependence here that one should make note of. Once you know the result of the first $9$ coin flips, your probability distribution for $X$ gets skewed. For example, the likeliest value for $X$ is $6$, given no prior information. But once you see that the first 9 coins have been heads, you cannot still possibly hope that $X$ will be $6$ at the end. Similarly, even though $X=9$ is likelier than $X=10$, given no prior information, if you know that the first $9$ coins landed heads, the probability that $X=9$ and $X=10$ becomes equal.
A: $Pr(9 heads)$ includes $THHHHHHHHH,  HTHHHHHHH$ and so on.  But the only one left that is possible is $HHHHHHHHHT$
