Thursday, August 2, 2012

Pascal's Triangle and Probability


To discover this hidden link between Pascal's triangle and probability, we can begin by looking at the different combinations that can be made from tossing 1,2 and 3 coins.


When just one coin is tossed, there are clearly just two outcomes, each with an equal chance of occurring. These can be represented as H and T. However, when two coins are tossed, there are four outcomes: TT, TH, HT and HH. It is important to distinguish between HT and TH - we must class a head from Coin 1 and a tail from coin 2 as a different combination to a tail from coin 2 and a head from coin 1. (Incidentally, this is where a lot of the mathematicians in Pascal's time went wrong - they treated HT the same as TH, and so ended up with incorrect probabilities).

With three coins, there are 8 different outcomes. They are HHH, HHT, HTH, THH, TTH, THT, HTT and TTT. This is summarised below:

3 Head: HHH - 1 way

2 Heads: HHT, HTH or THH - 3 ways

1 Head: HTT, THT or TTH - 3 ways

0 Heads: TTT - 1 way

As each time a fair coin is tossed, there is an equal chance of both heads and tails, each combination listed above is equally likely. This gives us a total of 8 equal outcomes. Therefore, to calculate the probability, all we need to do it divide the number of combinations by 8, giving the probabilities 1/8 = 12.5% for 0 and 3 heads, and 3/8 = 37.5% for 1 and 2 heads.

If you look at the information above, you can also see that there is only 1 way of getting 0 or 3 heads, but 3 ways of getting 1 or 2 heads. It should not be too surprising that there are more ways of getting 1 or 2 heads, resulting in a higher probability of these totals, as you would expect to get heads roughly half of the time. Obviously with 3 coin tosses, you can't get half of them heads, but it makes sense that the closer you get to this halfway mark, the higher the probability of that outcome occurring.

That's enough chatter now. Let's get on with the interesting stuff. How does all this link in with Pascal's triangle?! Well, the numbers in the table above (in the "number of ways" column) are 1,3,3,1. This is the third row of Pascal's triangle! If you create similar tables for one and two coin tosses, you should get 1,1 and 1,2,1, which are the first and second rows of Pascal's triangle.

This is very exciting! What it means is that we can use Pascal's triangle to calculate probabilities in seconds that would have otherwise taken hours. For example, consider this question: If I toss 10 coins, what is the chance that exactly 6 of them will be heads?

We need to look at the 6th number in on the 10th row of Pascal's triangle. It is 210. And a quick calculation tells us that the total of all the numbers in row 10 is 1024. Before you can blink, we have calculated that the probability is 210/1024, or about 21%. Now, you've got to admit that was much quicker than writing out all 1024 combinations wasn't it?