## Friday, November 2, 2007

### Happy Birthday to BOTH of you! The Statistics teacher asked me the other day what the probability of two people in a group having the same birthday. I answered that it was more likely than two people being the same person and much less likely than either of them actually liking their gift. This was not the answer she was looking for, but the comment allowed me to admit that I didn't know the answer off-hand in an epigrammatic way.

But it got me thinking about the problem.

Assuming I wasn't born on Leap Day, if I asked you guess my birthday, you'd deliberate for a while, then come up with a total random shot-in-the-dark. You'd probably be incorrect (unless I was wearing my favorite T-shirt that reads, "My birthday is _______________, but the chances of that shirt existing, much less me even wearing it if it DID exist are slimmer than you guessing correctly to begin with, but I digress.) Since there are 365 days in a non-leap year, your actual probability of guessing correctly would be 1 out of 365: 1/365 or 0.0027, about a 0.3% likelihood--very improbable.

Okay, different scenario now. Let's suppose that now you actually KNOW when my birthday is (maybe I'm wearing that T-shirt, or maybe you stole my birth certificate, or maybe my mom told you, or maybe I told you in hopes of you getting me a really nice gift.) What are the odds that the next person you encounter will share my birthday? That is share my birthDAY, not my birthday CAKE! Well, the odds are again 1 out of 365--fat chance!

This would intuitively lend evidence to the fact that it seems highly unlikely that you will find two people with a shared birthday, right?!?

Not so fast there Mr. Knee Jerk Reaction . . . .

Suppose you're in group of 5 people. How likely is it that any two of them have the same birthday? Our perceptions indicate that it is highly unlikely. What if the group increases to 10 people? 20 people? 50 people? 100? people? Does the probability of shared birthdays between any two individuals increase with the increasing size of the group? If so, how large does the group need to be so that it actually becomes probable (> 50%) that there IS a pair of shared birthdays? At this point, do we get one large cake or two smaller ones?

To better understand the answers to these questions, we must first review some basic methods of probability theory. To do this, we will look at something most of us have an experience with: shame and regret. Just kidding, we'll look at dice. Two of them.

The dice equivalent of two shared birthdays is rolling a matching pair. So, what are the odds of rolling two dice and getting the same number on each?

Very often in probability, we look at things from a more pessimistic, or realistic, point of view. In this case, we would calculate the odds of NOT rolling a matching pair since it is more likely. This is called the COMPLEMENT (opposite) of the EVENT (matching pair) we are interested in. We can then subtract the complement from one to obtain the probability of the event (since all probabilities add to one, or 100%.)

To illustrate this, we'll look at flipping a coin (to help understand the dice example, which will help us understand the birthday problem.) For instance, if you wanted to the know the probability of flipping a heads on a coin, you can find the probability of NOT flipping a heads (or a tails in this case.) This would be the complement, and it would be 1/2. The probability of our original event (head flip) would then be 1-1/2 = 1/2. Easy! In this case, there was only one way NOT to flip a heads, but we can extend this idea back to the dice example. Let's throw those dice!

How many ways can our dice come up when we throw them? We will list all the possible outcomes:

11 12 13 14 15 16
21 22 23 24 25 26
31 32 33 34 35 36

41 42 43 44 45 46

51 52 53 54 55 56

61 62 63 64 65 66

This gives us 36 total combinations. We could have determined this number without the list simply be multiplying 6 ways for the first dice to land TIMES 6 ways for the second dice to land: 6 x 6 = 36. The list, however, is more useful for finding the complement of our event. How many of the 36 combinations do NOT give us a matching pair?

xx 12 13 14 15 16
21 xx 23 24 25 26

31 32 xx 34 35 36

41 42 43 xx 45 46

51 52 53 54 xx 56

61 62 63 64 65 xx

Every pair that is not on the main diagonal is NOT a matching pair. These total 30. The first dice could have landed on any one of the six possibilities, but that leaves only 5 ways for the second dice to land if we do not want a pair, so we could also obtain this result by multiplying 6 x 5 = 30.

This means that there are 30 out of 36 possible ways to roll a pair of dice WITHOUT a match: 30/36 = 5/6, a probability of about 0.83 or 83%--pretty good odds. But remember that this is the complement or opposite of the event we want: the probability of rolling a matching pair. This becomes 1 - 5/6 = 1/6, a probability of 0.167 or about 17%.

Now if you've been following all this, you're probably realizing that we didn't have to go through the complement for this problem. We could have counted the total number occurrences of matching pairs from our list above and divided by the total number of combinations (6/36 = 1/6 or about 17%.) VERY GOOD! You're correct, but the method of going through the complement will be much easier to use for our original birthday problem.

So what is the probability that we have a pair of shared birthdays in a group of people?

Let's imagine a classroom full of young, eager, students--30 to be exact.
We proceed the same way we did with the dice, counting the total possible combinations. For the dice, it was 6 x 6, so for the birthdays, it is 365 x 365 x 365 x 365 x . . . (30 times.) We write this mathematically as 36530. This HUGE number will become our denominator.

Now we'll determine the number of possibilities in our complement, that is those that do NOT have the same birthday. The first person's can land on any one of 365 days. For the second person's to be different, he now has to be on one of the remaining 364 days. The third persons must fall on one of the remaining 363 days if it is to be different from the first two. This pattern continues for the entire class. Again, as we did with the dice, this becomes 365 x 364 x 363 x 362 x . . . . (on down the line 30 times) or

365 x 364 x 363 x . . . x 338 x 337 x 336

This can be written mathematically for any group of size n as:

365 x 364 x 363 x . . . x (365 - n +1)

or

365!/(365-n)! where ! is the factorial symbol (and IS very exciting)

If we calculate this for our class size, n = 30, we will have our numerator for our complement.

So the probability of two people in a group of 30 NOT sharing a birthday is:

(365 x 364 x 363 x . . . x 338 x 337 x 336)/36530 = about 0.3 or 30%

This means that there is about a 30% chance that you will NOT have two students with a shared birthday, which means that there is approximately a 100% - 30% = 70% (that's an INCREDULOUS seventy percent!!!!!) This is very counter-intuitive. In fact, even in a group as small as 23 students, your chances of finding matching birthdays is still better than 50%.

And there you go! Who knew the odds could be so favorable in such a small group? Go forth and use this knowledge to your advantage. Amaze your friends at your next large birthday party, and chances are, you'll find someone there to help you blow out the candles.

#### 2 comments: Anonymous said...

Is this real or is this fuzzy math?

kwkorpi said...

It's REAL FUZZY, but real nonetheless.