0:05

Welcome to our next module in an Intuitive Introduction to Probability

Â decision-making in an uncertain world.

Â In this module I want to show you a bunch of applications of probabilities.

Â As I said at the very beginning of this course,

Â many people tell me "I hate probability."

Â And I think that attitude comes from that many people don't really see

Â cool, real-world applications that are really relevant

Â in everyday decision-making, or relevant

Â to the well-being of our societies.

Â And here I really want to convince you that there are cool applications.

Â We want to start with some playful applications.

Â Today in the first lecture we're going to look at the Birthday Problem.

Â And then later on we get into some more serious stuff

Â from business or the law.

Â So, let's just dive into the Birthday Problem.

Â 1:12

Two people having birthday on January 18th

Â or March 22nd or July 1st.

Â And then the related question: How many people

Â do you have to have at this party, so that this probability

Â of at least one pair of birthday people in the room

Â is larger than a half, larger than 50%?

Â 1:36

These two questions together give us a Birthday Problem.

Â Before I tell you how to think about this

Â here's an in-class quiz question for you.

Â Let's go back to the second question: How many people do you need

Â to have in a room so that the probability of at least one pair

Â is larger than 50%?

Â Here I have a bunch of options of possible answers.

Â Exactly one of them is correct.

Â Please have a go at it, and then afterwards I will tell you

Â how we can calculate these probabilities.

Â 2:11

Welcome back from the in-class quiz question.

Â Now I want to show you how we can calculate these probabilities.

Â I've prepared an Excel sheet called Birthday Problems.

Â Now, before I show you the calculations in that sheet,

Â I want to tell you a little bit about the strategy

Â on how we calculate the probabilities that I mentioned before.

Â It's actually a really tricky question to think about

Â how many people may have birthday on the same day

Â because maybe there's one pair, maybe there are two pairs

Â maybe there are 3 or more pairs, maybe there are triplets.

Â There are so many possibilities that it quickly

Â gets totally overwhelming.

Â And I can tell you, I have no idea on how to calculate

Â those probabilities that way.

Â But I can show you much more elegant, much more simpler way.

Â Let's use the Complement Rule, remember this was one

Â of the key rules that we learned about in the every first module.

Â 3:14

What's the opposite of having at least one pair,

Â or 2 pairs or some more?

Â Ha! The opposite is very easy, very well defined.

Â All of us at this party, all the people in this room

Â having birthday on different days.

Â And it turns out, that probability can be calculated quite easily.

Â 3:35

So now, come with me to the Excel sheet and I'll show you

Â how we can calculate that probability.

Â Here we are now at the spreadsheet for the Birthday Problem

Â that I prepared

Â Before we get into the calculation, I need to state my assumptions

Â which are listed over here in column E.

Â First, we assume there's no February 29th so we assume

Â there are only 365 days in the given year.

Â All of those days are equally likely and we assume

Â all the people in the room are independent.

Â That means your birthday doesn't affect mine

Â our birthdays don't affect anyone else's and so on.

Â 4:37

It get's interesting with Person 2.

Â This person now has only 364 out of 365 days left, why?

Â The first person picked the day, Oh, that's my birthday

Â and now we want the second person to be different

Â well, that leaves only 364.

Â And so now I start calculating these probabilities here.

Â One, anything goes for the first person times 364 divided by 365.

Â So this number here, the .99726 is the probability that a pair

Â has birthday on different days.

Â Now the third person enters the party.

Â What's the probability that her birthday is different

Â than of the first 2 people?

Â Ah! Two days are taken in the year. That means 363 days are left.

Â So we multiply with 363 divided by 365 and get this probability

Â a little less that 99.2%.

Â You now see as more and more people enter the room

Â the probability of being different gets a little smaller, little smaller

Â and independence, we multiply all of them.

Â And so now what happens is that this product

Â gets smaller and smaller and smaller.

Â Now the amazing thing here is that the probability

Â drops below a half already at 23.

Â 6:05

So, as soon as there are 23 people in the room

Â and assuming our assumptions apply, then the probability of all of us

Â having birthday on a different day is already below a half.

Â That now means of 23 people, the probability of at least one pair

Â is larger than a half.

Â that's very counter-intuitive and quite surprising.

Â So often people tell me this can't be true, how can this be?

Â 6:37

Now, I calculated probabilities for many other numbers

Â including 45, 45 is under 6%

Â And now for 45, I also prepared a Monte Carlo simulation.

Â How does this work now? Let's go here to the second sheet.

Â Here now I randomly pick 45 numbers and that's very easy in Excel.

Â There's this cool function RANDBETWEEN and then I do 1 SIM

Â I call on 365 on this Swiss computer, in the United States it's 1 comma 365

Â whatever it is in your language, and this gives me

Â a random number between 1 and 365.

Â I do this for all 45 people.

Â And then I compare, look at all pairs.

Â So here I compare Person 2 to Person 1.

Â I compare Person 3 to Person 1 and 2.

Â Here I compare Person 10 to the first 9.

Â If I see a match between Person 8 and 5 as I indicate here

Â then I get a 1, otherwise the spreadsheet shows me a zero.

Â 7:51

Now at the top here, I count the number of matches we have in our spreadsheet.

Â And now I can recalculate the sheet, either by clicking a button here

Â or in a Windows computer, easily F9 and I create 45 new birthdays

Â a new party, 45 new people, and I check is there a pair?

Â Look at this, right now I have 2 pairs

Â and so I guess there's at least 1 match.

Â I do it again, 3 pairs. I do it again, another 2 pairs.

Â Two pairs, 4 pairs, wow! Look at this, 3 pairs, 1 pair.

Â Now, you see, it's hard to hit a zero.

Â Do it for a while, and eventually you will also occasionally

Â hit a zero, I can tell you in less than 6% of all times.

Â 9:22

This is a fundamentally different problem. Why?

Â I fix the day. I said let's look at birthdays today.

Â This now rules out you and me having birthdays

Â on the same day of the year that's different than today.

Â That's in the previous version of the problem that was a hit

Â that was a match, that was a pair.

Â And there are so many days, 365, where you and I

Â could have a birthday together.

Â Here now, that birthday has to be today.

Â Now the probability calculation changes.

Â 9:58

Here now, notice the different definition.

Â Now we are looking at the probability that all of us

Â do not have a birthday today.

Â Now, for each of us, the probability of not having a birthday today

Â is 364 divided by 365, it doesn't decrease.

Â You and I can have both birthday yesterday.

Â That's still not a match here, so now the probability

Â as you see here in my spreadsheet

Â is 364 divided by 365 to the power of the number of people in the room.

Â Independence, your probability not today

Â 364 divided by 365 times my birthday, not being today

Â 364 times 365 times and so on for all of them.

Â And now you may think, oh I need 183 people for this to be 50/50.

Â Why do people think this? Oh, that's

Â 365 divided by a half is 182.5, so if a 183 people

Â this will be about a half. Wrong.

Â 11:02

Because from those 183 people, quite a few

Â will have birthdays on the same days.

Â And therefore, it's not that we have covered half a year

Â for sure with 183 people, actually less.

Â You can now play with this, and the surprising result is that

Â you need 253 people at your party to have a probability

Â of more than a half, that at least one of them has a birthday today.

Â That's a very different calculation.

Â So let me sum this up one more time.

Â In this last instance of the problem, the question was

Â what's the probability that you have someone having

Â a birthday today, so today and a person's birthday matches.

Â That's very different than in the original Birthday Problem

Â at the beginning here, where it can be any day of the year.

Â 11:59

And so I think this helps a lot of people to get over

Â this counter-intuitive result that you only need 23 people

Â to have a match on some day of the year.

Â Not today, but some day of the year.

Â This wraps up the Excel spreadsheet discussion.

Â Play around with it a little bit more if you want.

Â And now let's summarize everything in these slides and return there.

Â Here we are back from our Excel sheet.

Â Let me briefly summarize our calculations.

Â We made the following assumptions: there are 365 days in a year.

Â So we are ignoring February 29th.

Â 12:37

We assume that all days are equally likely

Â and finally, that we are all independent of each other.

Â Your birthday doesn't affect mine, nor anyone else's in the room.

Â And then we just saw the probability now of the complement

Â of the original event, namely all of us having birthday on different days

Â is one big long multiplication.

Â The first person can have birthday on any given day.

Â The second person now needs to be different

Â as the first person has taken a day, for example January 1st.

Â So the second person has 364 out of 365 days left.

Â So I multiply 1 times 364 divided by 365.

Â Now the second person comes along

Â in addition to the first, so in total the third person.

Â Now this person cannot have birthday on the first 2 days

Â that Person 1 and Person 2 had a birthday on.

Â So that's 363 out of 365 which we multiply

Â with the previous product and so on.

Â And now you go on until however many people are in this room.

Â To summarize, here are the results.

Â On the one hand with 10 people, there's more than 88% chance

Â that all of us that are in the room, if there are only 10 of us

Â have birthday on a different day.

Â With 23 people, that already drops below a half.

Â Put differently, for the original event that we talked about

Â what's the probability of having at least one pair?

Â With only 23 people, that probability already exceeds a half.

Â So the answer to that quiz question was 23,

Â the smallest of the choices given.

Â Now, notice once you have 60 or more people in the room,

Â the probability of all of them having different birthdays

Â drops below 1%.

Â So, that means next time you are at at a party

Â you may want to offer that bet.

Â Yeah, I think you will be able to surprise some people.

Â And that already brings us to the takeaways.

Â In addition to this rather surprising,

Â perhaps counter-intuitive result of the Birthday Problem

Â we also have seen an application of the Complement Rule.

Â The Complement Rule sometimes can be very, very helpful

Â when the calculation of the probability of an event

Â is very, very tedious, or we think maybe

Â the Complement Rule allows me easier calculation.

Â