Forum Home

Master Index of Archived Threads


Math Quiz

Frayed Knot
Jan 06 2008 09:05 PM

Well it's not really a math quiz as the math it would take to actually compute this one is more complicated than most could do, but it's one of those questions where perception and the correct answer differ wildly for most people.


Set-up: A room starts to fill up with people one by one;

Question(s):
- How many people have to enter the room before [u:931471d7ab]it's more likely than not[/u:931471d7ab] that at least two of them will share a birhday?
- At what point do the odds grow to 90% of a shared b-day?

AG/DC
Jan 06 2008 09:39 PM

20 and 27.

Gwreck
Jan 07 2008 12:35 AM

There isn't enough information to give a correct answer. Perhaps if we were to assume an even distribution of the population being born on each day of the year.

Nymr83
Jan 07 2008 01:13 AM

]Question(s):
- How many people have to enter the room before it's more likely than not that at least two of them will share a birhday?
- At what point do the odds grow to 90% of a shared b-day?


i'll take 25 and 45.

Willets Point
Jan 07 2008 01:14 AM

Gwreck wrote:
There isn't enough information to give a correct answer. Perhaps if we were to assume an even distribution of the population being born on each day of the year.


You probably reprogrammed the Kobayashi Maru as well.

Frayed Knot
Jan 07 2008 01:27 PM

Gwreck wrote:
There isn't enough information to give a correct answer. Perhaps if we were to assume an even distribution of the population being born on each day of the year.


Well yeah, I think the assumption that birthdays are more or less randomly distributed is implied here. There's no hidden trick like the room that these theoretical people are walking into being reserved for a meeting of Capricorns only.
I was mainly just interested in seeing the range of responses.

Now seeing as how there weren't many responses the experiment is pretty much a dud, but the ones that were given were extremely close. Most people tend to guess at numbers a whole lot higher than the actual answers, but the number at which the odds tilt over the 50/50 mark is just 23, and by the time the 41st person walks into the room the odds that all 41 have unique birthdays in already under 10% even though it won't get to certainty until #365 strolls in.

AG/DC
Jan 07 2008 01:31 PM

Or 366, just in case one of the 365 is a leaper.

RealityChuck
Jan 07 2008 04:31 PM

Known as the birthday paradox (though it's not really a paradox). Everyone thinks that due to the 366 possibilities, the odds are much less then they are.

Take a look at any 40-man roster, though. You'll nearly always find two players born on the same day.

A similar effect is the elevator paradox:

You're on the third floor of a 20-story building. You press "down" on the "elevator"; someone else presses "UP." What are the odds your elevator comes first?

Nymr83
Jan 07 2008 04:38 PM

RealityChuck wrote:

You're on the third floor of a 20-story building. You press "down" on the "elevator"; someone else presses "UP." What are the odds your elevator comes first?


zero. because the other guy has already punched you in the face for trying to take the elevator DOWN from the third floor.

metsmarathon
Jan 07 2008 05:10 PM

RealityChuck wrote:
You're on the third floor of a 20-story building. You press "down" on the "elevator"; someone else presses "UP." What are the odds your elevator comes first?


i think it depends on what priority a vacant ♦elevator has - does it give the priority to the person going up, or the person going down?

Mendoza Line
Jan 07 2008 06:17 PM

I'll assume that if the elevator has to go up to the third floor from wherever it is now, it will continue going up, and vice versa. So if it's on the 1st or 2nd floor, the UP elevator comes first. If it's on the 4th through 20th floor, the DOWN elevator comes first.

At any given time assume that people are just as likely to be entering the building as exiting it.

People who enter the building are equally likely to go to any floor.

Then -

50% chance that the elevator is on the first floor, because everyone who leaves the building has to leave from the first floor.

There are 18 other possible floors (it's not on the third floor, or you wouldn't be waiting for it), so a 2.8% chance that it's on any other given floor.

So 52.8% chance that the UP elevator comes first?

soupcan
Jan 08 2008 08:10 AM

Nymr83 wrote:
zero. because the other guy has already punched you in the face for trying to take the elevator DOWN from the third floor.


ZING!

Gwreck
Jan 08 2008 11:53 AM

Frayed Knot wrote:
="Gwreck"]There isn't enough information to give a correct answer. Perhaps if we were to assume an even distribution of the population being born on each day of the year.


Well yeah, I think the assumption that birthdays are more or less randomly distributed is implied here. There's no hidden trick like the room that these theoretical people are walking into being reserved for a meeting of Capricorns only.
I was mainly just interested in seeing the range of responses.

Now seeing as how there weren't many responses the experiment is pretty much a dud, but the ones that were given were extremely close. Most people tend to guess at numbers a whole lot higher than the actual answers, but the number at which the odds tilt over the 50/50 mark is just 23, and by the time the 41st person walks into the room the odds that all 41 have unique birthdays in already under 10% even though it won't get to certainty until #365 strolls in.


I'd like to see the math on that. If we randomly select a person to enter the room, isn't there a 1/365 probability that they have a birthday on a particular date? And the same probability for the next person?

TheOldMole
Jan 08 2008 01:08 PM

On the current KC Royals roster, Tony Pena and Joel Perralta both born March 23, Jorge De La Rosa and Ross Gload April 5, Mark Grudzielanek and Mitch Maier June 30.

Only one Royal was born in October, only one in November. Are those bad months for ballplayers?

Frayed Knot
Jan 08 2008 01:56 PM

]I'd like to see the math on that. If we randomly select a person to enter the room, isn't there a 1/365 probability that they have a birthday on a particular date? And the same probability for the next person?


Sure, but these odds increase as each person enters and not just arithmetically.
Person B has only a 1/365 of matching A, but when C enters you've got the odds that he'll match B compounded by the odds that he'll match A on top of the chance that B already matched A. Then you can see the odds start to multiply as D enters, then E, then F, etc.

Remember, we're not trying to match your specific birthday (assuming you're person 'A') but just get any match on any date from any two persons in the room.

RealityChuck
Jan 08 2008 02:17 PM

Mendoza Line wrote:
I'll assume that if the elevator has to go up to the third floor from wherever it is now, it will continue going up, and vice versa. So if it's on the 1st or 2nd floor, the UP elevator comes first. If it's on the 4th through 20th floor, the DOWN elevator comes first.

At any given time assume that people are just as likely to be entering the building as exiting it.

People who enter the building are equally likely to go to any floor.

Then -

50% chance that the elevator is on the first floor, because everyone who leaves the building has to leave from the first floor.

There are 18 other possible floors (it's not on the third floor, or you wouldn't be waiting for it), so a 2.8% chance that it's on any other given floor.

So 52.8% chance that the UP elevator comes first?


You're on the track, but overthinking it. Assume a steady stream of people using the elevators in a relatively random pattern, and that the elevators do not return to the lobby until called (which is standard behavior). An elevator heading up will stop if you press up and and elevator doing down will stop if you press down (standard behavior).

Also assuming the elevator is not on the third floor, there are 17 floors above you, and 2 floors below you (I'm assuming there's no basement). There are 19 possible places the elevator can be, and the odds are 17 to 2 that the elevator is above you. You are much more likely to find an elevator headed down than one headed up.

John Cougar Lunchbucket
Jan 08 2008 02:36 PM

/*brain explodes/

metsmarathon
Jan 08 2008 03:22 PM

are there multiple elevators?

smg58
Jan 08 2008 04:14 PM

I'll say 22 and 30, but I'm tempted to do the math on this.

opens Excel spreadsheet...

On edit: I was almost right on one of them.

smg58
Jan 08 2008 05:00 PM
Edited 4 time(s), most recently on Jan 08 2008 08:43 PM

Ok, now I see everybody else has moved on, but I'll at least try to explain the math. Start with two people in the room. The probability of a shared birthday (assuming, for the sake of simplicity and with all due respect to a particular friend of mine, no February 29) is 1/365. Expressing that as 1-364/365 will help the math make more sense further on. Mathematically, that's P(2)=1-364/365.

Another person enters the room. The probability of the third person sharing a birthday with one of the other two, who don't share a birthday with each other, is one minus (364/365)*(363/365)
Mathematically, that's P(3)=1-(364/365)*(363/365).

The math continues along similar lines:
P(N)=1-(364/365)*...*((366-N)/365)

This is something than can be done out for as many steps as you want on a spreadsheet.

on further edit: A couple of typos needed to be corrected, and I realized there was a simpler way to write the formula. Hope this makes a bit more sense.

Frayed Knot
Jan 08 2008 05:36 PM

From doing a little reading, it seems that the easier way to calculate this is to determine the odds of NOT having a shared birthday. The odds then of having a shared day is simply (1 - that number)


So the total number of possible bdays in a group of size n = 365^n
That's your denominator

Then the total number of non-shared days as each new person walks in are 365 (for the 1st guy since there's no one to match) multiplied by 364 (remaining possible bdays for person #2) x 363 x 362 ... down to however many people.
Or: 365 * 364 * 363 * 362 * ... (365 - n+1)
That's your numerator

So with just 2 people it's:
(365*364)/(365^2) = 132,860/133,225 = 0.9972602
IOW, a 99.73% chance of NOT sharing a bday or a 0.27% chance of sharing one
That one is actually easy as it's the same as 1/365 (1 chance in 365)


The numbers start to skyrocket after that.

With just 5 people there are roughly 6.478 trillion different possible combinations (365^5); 6.302 trillion of which share a day, or almost 3% (NOT sharing = .9729)

By n=10 your numbers are up to 25 figures each and an 11.7% chance of a double cake

By n=15 (and 38 digit numbers) there's 1 chance in 4

And reaching n=23 shows the first time where the 'Not Shared' figure falls under 50%

By n=29 your odds are better than 2 to 1

And with 50 people there's less than a 3% chance of NOT having hit the daily double

Mendoza Line
Jan 08 2008 09:45 PM

I'd seen the problem before, so I stayed out of it. But Frayed's got it.

smg58 wrote:
The probability now of at least one shared birthday is equal to the probability with two people in the room, plus the probability of no shared birthday with two people multiplied by one minus (364/365)^2.


Close - it's one minus (363/365) - or just 2/365. If there are two people in the room whose birthdays are, say, December 5 and November 17, the probability that a random person who walks into the room shares a birthday with one of them is 2/365.

The two ways really are equivalent

P(2) = 1 - 364/365 either way
P(3) = 1 - (364)(363)/(365)(365) = 0.008204 or 1/365 + (364/365)*2/365 = 0.008204
etc.

="RealityChuck"]There are 19 possible places the elevator can be, and the odds are 17 to 2 that the elevator is above you.


I see the point -if the elevator is in constant use, this is probably right. I still think it might be more likely that the elevator is waiting on the first floor than on any other floor, though, just because the first floor is the only floor that everyone in the building uses.

Fun problem, either way.