Skip to content

Instantly share code, notes, and snippets.

@JasonGoemaat
Created July 15, 2022 20:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JasonGoemaat/8da5447ec7ffa2736ea9c63e14bca790 to your computer and use it in GitHub Desktop.
Save JasonGoemaat/8da5447ec7ffa2736ea9c63e14bca790 to your computer and use it in GitHub Desktop.

Split the example. Say you are conducting an experiment and your friend walks in in the middle of it. Explain the setup (bag of 10 coins, 9 are fair and 1 has two heads) and that you've taken one coin at random from the bag. Ask what the odds are that heads will come up if you toss it. The answer is what your friend gave: $(\frac{9}{10})(\frac{1}{2}) + (\frac{1}{10})(1)$ = $\frac{11}{20}$

Now ask what the odds are if you tell him that you've already tossed the coin once? If he's smart, he'll ask you what the result of the toss was. If you answer 'tails', would that affect the odds of the next toss of that coin being heads? Yes, with the new information you know that the coin is one of the 9 fair coins so the probability is now $\frac{1}{2}$. He's right that it would not be $\frac{1}{4}$ for getting two heads in a row because each toss is independent, but you know it cannot be the double-headed coin so the odds change from $\frac{11}{20}$ to $\frac{1}{2}$.

The odds change if you know what coin you picked from the bag. The problem with his reasoning is that the 5th toss is dependent on which coin you have and if you can come up with a probability for that based on previous tosses, then the odds of the next flip being heads must change.

If you tell him 'heads', it is now slightly more likely that you pulled the two-headed coin from the bag because your first toss was heads. Don't ask immediately what odds are of the next toss, but what are the odds that you pulled the double-headed coin from the bag. With the new information, you have to alter the $\frac{9}{10}$ and $\frac{1}{10}$ in the formula. Think of each of the heads as a separate possibility. There are 20 coin faces and 11 of them are heads. Nine of the heads are on fair coins and two of the heads are on the other. By rolling a heads, you have a 9/11 chance of it being one of the fair coins and a 2/11 chance of it being the double-headed coin.

Extreme scenarios can help understand why this is true:

  1. You flipped the coin 1000 times and it came up heads every time - the odds of the coin being fair are extremely low
  2. The bag had 5 coins with two heads and 5 coins with two tails - there is no option for flipping tails if you've already flipped heads at least once
  3. The bag had 4 coins with two tails, 4 coins with two heads, and two fair coins - you can rule out the 4 coins with two tails.

I think an interesting example would be a bag that has 6 6-sided dice, each one has one of the numbers missing and another number doubled (i.e. 112345, 223456, 133456, 124456, 123556, and 123466). Imagine picking a die at random and rolling a '1'. What are the odds you have each of the dice? You can rule out one of the dice because it doesn't have a '1' on it at all. The odds of picking the die with two '1's is twice as likely because the '1' you rolled could be either of the '1's on that die.

So the odds of rolling a '1' on your next throw would be 2/6 chance of the double 1 die times 2/6 chance of rolling a one with that die plus 4/6 chance of it being the other 4 dice with a '1' times 1/6 chance of rolling a '1' on those dice: $(\frac{2}{6})(\frac{2}{6}) + (\frac{4}{6})(\frac{1}{6})$ or $\frac{8}{36}$.

The odds of rolling a '2' have gone down because you can exclude the die with two '2's that is missing a '1' ($\frac{5}{36}$):

  • $(\frac{2}{6})(\frac{1}{6})$ = $\frac{2}{36}$ having 112345 and getting '2'
  • $(\frac{0}{6})(\frac{2}{6})$ = $\frac{0}{36}$ having 223456 and getting '2'
  • $(\frac{1}{6})(\frac{0}{6})$ = $\frac{0}{36}$ having 133456 and getting '2'
  • $(\frac{1}{6})(\frac{1}{6})$ = $\frac{1}{36}$ having 124456 and getting '2'
  • $(\frac{1}{6})(\frac{1}{6})$ = $\frac{1}{36}$ having 123556 and getting '2'
  • $(\frac{1}{6})(\frac{1}{6})$ = $\frac{1}{36}$ having 123466 and getting '2'

The odds of rolling a '6' have gone down because the double '1' die is missing a six and is twice as likely as any other to be the one you chose ($\frac{5}{36}$).

  • $(\frac{2}{6})(\frac{0}{6})$ = $\frac{0}{36}$ having 112345 and getting '6'
  • $(\frac{0}{6})(\frac{1}{6})$ = $\frac{0}{36}$ having 223456 and getting '6'
  • $(\frac{1}{6})(\frac{1}{6})$ = $\frac{1}{36}$ having 133456 and getting '6'
  • $(\frac{1}{6})(\frac{1}{6})$ = $\frac{1}{36}$ having 124456 and getting '6'
  • $(\frac{1}{6})(\frac{1}{6})$ = $\frac{1}{36}$ having 123556 and getting '6'
  • $(\frac{1}{6})(\frac{2}{6})$ = $\frac{2}{36}$ having 123466 and getting '6'

The odds of each of the other numbers is the same. There is one of (2,3,4,5) on the double-'1' die which is twice as likely ($\frac{2}{36}$), another possible die with two of (2,3,4,5) ($\frac{2}{36}$), and two dice that have a single of (2,3,4,5,6) ($\frac{2}{36}$), so the total is $frac{6}{36}$:

  • $\frac{8}{36}$ -> Rolling a '1' (higher because double '1' is twice as likely and excluding die with no '1')
  • $\frac{5}{36}$ -> Rolling a '2' (lower because excluding double '2')
  • $\frac{5}{36}$ -> Rolling a '6' (lower because double '1' is twice as likely)
  • $\frac{6}{36}$ -> Rolling a '3', '4', or '5' (twice as likely to get one on the double '1' die, plus extra chance to get that on a die that has it as a double, plus 2 die with it as a single)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment