Transcription
Consider the following story: Bob is in a room, and he has two coins: one fair coin and one double-sided coin. He picks one at random, flips it, and shouts the result: heads. Now, what is the probability that he flipped the fair coin?
To answer this question, we need only rewind and grow a tree. The first event: he picks one of two coins, so our tree grows two branches leading to two equally likely outcomes: fair or unfair. The next event: he flips the coin. We grow again. If he had the fair coin, we know this flip can result in two equally likely outcomes: heads and tails. While the unfair coin results in two outcomes, both heads. Our tree is finished, and we see it has four leaves representing four equally likely outcomes.
The final step: new evidence—he says heads. Whenever we gain evidence, we must trim our tree. We cut any branch leading to tails because we know tails did not occur. And that is it. So, the probability that he chose the fair coin is the one fair outcome leading to heads divided by the three possible outcomes leading to heads, or 1/3.
What happens if he flips again and reports heads? Remember, after each event, our tree grows. The fair coin leaves result in two equally likely outcomes: heads and tails. The unfair coin leaves result in two equally likely outcomes: heads and heads. After we hear the second heads, we cut any branches leading to tails. Therefore, the probability the coin is fair after two heads in a row is the one fair outcome leading to heads divided by all possible outcomes leading to heads, or 1/5.
Notice our confidence in the fair coin is dropping as more heads occur, though realize it will never reach zero. No matter how many flips occur, we can never be 100% certain the coin is unfair. In fact, all conditional probability questions can be solved by growing trees. Let's do one more to be sure.
Bob has three coins: two are fair, one is biased, which is weighted to land heads 2/3 of the time and tails 1/3. He chooses a coin at random and flips it: heads. Now, what is the probability he chose the biased coin?
Let's rewind and build a tree. The first event: choosing the coin can lead to three equally likely outcomes: fair coin, fair coin, and unfair coin. The next event: the coin is flipped. Each fair coin leads to two equally likely leaves: heads and tails. The biased coin leads to three equally likely leaves: two representing heads and one representing tails. Now, the trick is to always make sure our tree is balanced, meaning an equal amount of leaves growing out of each branch. To do this, we simply scale up the number of branches to the least common multiple for 2 and 3; this is 6. And finally, we label our leaves. The fair coin now splits into six equally likely leaves: three heads and three tails. For the biased coin, we now have two tail leaves and four head leaves. And that is it.
When Bob shows the result heads, this new evidence allows us to trim all branches leading to tails, since tails did not occur. So, the probability that he chose the biased coin given heads occur: well, four leaves can come from the biased coin divided by all possible leaves: 4/10 or 40%.
When in doubt, it's always possible to answer conditional probability questions by Bayes' theorem. It tells us the probability of event A given some new evidence B. Though if you forgot it, no worries; you need only know how to grow stories with trimmed trees.