Caveats
In most illustrations of the gambler's fallacy and the reversed gambler's fallacy, the trial (e.g. flipping a coin) is assumed to be fair. In practice, this assumption may not hold.
For example, if one flips a fair coin 21 times, then the probability of 21 heads is 1 in 2,097,152 (above). If the coin is fair, then the probability of the next flip being heads is 1/2. However, because the odds of flipping 21 heads in a row is so slim, it may well be that the coin is somehow biased towards landing on heads, or that it is being controlled by hidden magnets, or similar. In this case, the smart bet is "heads" because the empirical evidence—21 "heads" in a row—suggests that the coin is likely to be biased toward "heads", contradicting the general assumption that the coin is fair.
Read more about this topic: Gambler's Fallacy