![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
First, the Birthday Paradox, which is a great party trick (you can probably win yourself a beer or two on this one). In a room with 23 people in it, there's about a 50% chance that two of them will have the same birthday. In a room with 75 people, there's a 99.9% chance that two of them will have the same birthday. Whaaaaaat.
Everyone likes demonstrating this problem with 23 people because it's pretty easy to find yourself in a room with 23 other people, and knowing that there's a 50-50 chance of having two people in the room with the same birthday, well, that's just going to make your brain explode all over the punch bowl.
So! How are we going to look at this? Well, let's think in terms of pairs. How many possible pairs of people could there be in our room? Let's temporarily cut the problem down to four people just in case you don't remember your permutations and combinations:
Say we have Odo, Kira, Garak, and Bashir. The possible pairs of people with the same birthday (...or pairings!) are Odo/Kira, Odo/Garak, Odo/Bashir, Kira/Garak, Kira/Bashir, and Garak/Bashir. Four (total number of people) times three (total number of people minus one) divided by two (we're looking for pairs) - six pairings. And a whole lot of happy fic writers.
So with 23 people, there are 23*22/2 possible pairs, which is 253.
So let's think this through. What are the odds, just in general, of two random people having the same birthday? It's 1/365, ignoring leap-years. Makes sense, hey? But we don't really want to proceed in this direction for the whole problem, because you could also complicate matters by asking what the odds are of having three people having the same birthday, or twelve people, and wind up with some added complexity. This complexity is completely removed if we do the common statistical trick of coming at the problem from the opposite angle - what are the odds that any given pair of people don't have the same birthday?
The odds that two people don't have the same birthday is 364/365 (all other possible dates). So what are the odds that two of our pairs don't have the same birthday? If you remember your statistics, the odds are (364/365)*(364/365). (Think back to flipping a coin twice and asking what the odds are that you never get heads. (1/2)*(1/2) = 1/4, so a 25% chance.)
So let's flip the coin for each of our 253 pairs of people to find out what the odds are that none of those pairs has the same birthday. (364/365)*(364/365)*... (repeat 253 times) = 0.4995. So there's about a 50% chance that none of the pairs will have the same birthday, which means there's about a 50% chance that at least one of them will! If you repeat this problem for 75 people, you get a 0.1% chance that none of the pairs will have the same birthday, leaving you with a 99.9% chance that at least one of them will. Pretty awesome!
(This came up today because two of the people in the department celebrated their birthday, and someone made the mistake of saying "Man, what are the odds?" I piped up with "Well, if there are about 60 of us in the department, around 99%," and everyone looked at me like I'd grown a second head, so I had to walk them through the math to prove it. We now have a graph of the birthday paradox posted on our office door.)
And for something completely different but equally brain-breaky, the Monty Hall problem, named after the host of Let's Make a Deal. Let's say you're on a game show, and there are three doors in front of you. Behind one of them is a car, and behind the other two are, I dunno, goats or something. The host asks you which door you think the car is behind. You say "Door number one, please!" The host opens door number three to reveal a goat, and asks if you're still going to stand by your guess of door number one, or switch to door number two.
Seems like a silly question, right? You'd expect to win 50% of the time whether you switched your guess or not. Well, as it turns out, if you change your answer, your odds of winning go up to 67%.
This one makes people so angry, especially people with PhDs in statistics. It's absolutely 100% demonstrably true. Unfortunately, it's kinda hard to prove. Our brains just can't handle it. This isn't going to be so much a "this is how it works" explanation, as a "see, it happens!" explanation.
So! Let's summarize again: We have door number 1, door number 2, and door number 3, one of which has a car behind it, the other two of which have goats behind them. We think door number 1 is the winner. We are then shown that door number 3 has a goat behind it. We have the option to stick with door number 1, or switch to door number 2. If we switch doors, our odds of winning go up to 67%, even though we're just choosing between two doors. What gives?
Here's a way to look at it, courtesy of Marilyn vos Savant's solution presented in 1990. For these cases, let's assume we're always going to pick door number 1, and the host is (obviously) going to initially open a door with a goat behind it each time.
Let's say the arrangement is Car, Goat, Goat. We're always picking door number one, so if we stand by our choice, hey, we get a car! If we switch, we get a goat.
Now let's say the arrangement is Goat, Car, Goat. Again, the host is going to open a door with a goat behind it, which has to be door number 3 in this case, since we're picking door number 1. If we stand by our choice in this case, we get a goat. If we switch, we get a car. Okay! So far, looking at these two possible arrangements, standing by our choice gets us a car if the arrangement is Car, Goat, Goat, and switching gets us a car if the arrangement is Goat, Car, Goat. 50/50 chance so far. Makes sense, right?
Now we'll do the last possible arrangement: Goat, Goat, Car. We've picked door number one, so the host is forced to open door number two. If we stand by our decision, we get a goat. If we switch, we get a car.
Looking at all three possibilities, let's tally up the odds of getting a car:
Stand by initial choice: 1 (arrangement #1)
Switch: 2 (arrangement #2 and #3)
So for 2/3 possible arrangements, we win the car if we switch doors after the initial goat reveal. Awesome! There has seriously got to be some amazing application of this to gambling.
And that's your statistical brain-bogglery for today.
Edit: You can simulate the Monty Hall problem here!
Everyone likes demonstrating this problem with 23 people because it's pretty easy to find yourself in a room with 23 other people, and knowing that there's a 50-50 chance of having two people in the room with the same birthday, well, that's just going to make your brain explode all over the punch bowl.
So! How are we going to look at this? Well, let's think in terms of pairs. How many possible pairs of people could there be in our room? Let's temporarily cut the problem down to four people just in case you don't remember your permutations and combinations:
Say we have Odo, Kira, Garak, and Bashir. The possible pairs of people with the same birthday (...or pairings!) are Odo/Kira, Odo/Garak, Odo/Bashir, Kira/Garak, Kira/Bashir, and Garak/Bashir. Four (total number of people) times three (total number of people minus one) divided by two (we're looking for pairs) - six pairings. And a whole lot of happy fic writers.
So with 23 people, there are 23*22/2 possible pairs, which is 253.
So let's think this through. What are the odds, just in general, of two random people having the same birthday? It's 1/365, ignoring leap-years. Makes sense, hey? But we don't really want to proceed in this direction for the whole problem, because you could also complicate matters by asking what the odds are of having three people having the same birthday, or twelve people, and wind up with some added complexity. This complexity is completely removed if we do the common statistical trick of coming at the problem from the opposite angle - what are the odds that any given pair of people don't have the same birthday?
The odds that two people don't have the same birthday is 364/365 (all other possible dates). So what are the odds that two of our pairs don't have the same birthday? If you remember your statistics, the odds are (364/365)*(364/365). (Think back to flipping a coin twice and asking what the odds are that you never get heads. (1/2)*(1/2) = 1/4, so a 25% chance.)
So let's flip the coin for each of our 253 pairs of people to find out what the odds are that none of those pairs has the same birthday. (364/365)*(364/365)*... (repeat 253 times) = 0.4995. So there's about a 50% chance that none of the pairs will have the same birthday, which means there's about a 50% chance that at least one of them will! If you repeat this problem for 75 people, you get a 0.1% chance that none of the pairs will have the same birthday, leaving you with a 99.9% chance that at least one of them will. Pretty awesome!
(This came up today because two of the people in the department celebrated their birthday, and someone made the mistake of saying "Man, what are the odds?" I piped up with "Well, if there are about 60 of us in the department, around 99%," and everyone looked at me like I'd grown a second head, so I had to walk them through the math to prove it. We now have a graph of the birthday paradox posted on our office door.)
And for something completely different but equally brain-breaky, the Monty Hall problem, named after the host of Let's Make a Deal. Let's say you're on a game show, and there are three doors in front of you. Behind one of them is a car, and behind the other two are, I dunno, goats or something. The host asks you which door you think the car is behind. You say "Door number one, please!" The host opens door number three to reveal a goat, and asks if you're still going to stand by your guess of door number one, or switch to door number two.
Seems like a silly question, right? You'd expect to win 50% of the time whether you switched your guess or not. Well, as it turns out, if you change your answer, your odds of winning go up to 67%.
This one makes people so angry, especially people with PhDs in statistics. It's absolutely 100% demonstrably true. Unfortunately, it's kinda hard to prove. Our brains just can't handle it. This isn't going to be so much a "this is how it works" explanation, as a "see, it happens!" explanation.
So! Let's summarize again: We have door number 1, door number 2, and door number 3, one of which has a car behind it, the other two of which have goats behind them. We think door number 1 is the winner. We are then shown that door number 3 has a goat behind it. We have the option to stick with door number 1, or switch to door number 2. If we switch doors, our odds of winning go up to 67%, even though we're just choosing between two doors. What gives?
Here's a way to look at it, courtesy of Marilyn vos Savant's solution presented in 1990. For these cases, let's assume we're always going to pick door number 1, and the host is (obviously) going to initially open a door with a goat behind it each time.
Let's say the arrangement is Car, Goat, Goat. We're always picking door number one, so if we stand by our choice, hey, we get a car! If we switch, we get a goat.
Now let's say the arrangement is Goat, Car, Goat. Again, the host is going to open a door with a goat behind it, which has to be door number 3 in this case, since we're picking door number 1. If we stand by our choice in this case, we get a goat. If we switch, we get a car. Okay! So far, looking at these two possible arrangements, standing by our choice gets us a car if the arrangement is Car, Goat, Goat, and switching gets us a car if the arrangement is Goat, Car, Goat. 50/50 chance so far. Makes sense, right?
Now we'll do the last possible arrangement: Goat, Goat, Car. We've picked door number one, so the host is forced to open door number two. If we stand by our decision, we get a goat. If we switch, we get a car.
Looking at all three possibilities, let's tally up the odds of getting a car:
Stand by initial choice: 1 (arrangement #1)
Switch: 2 (arrangement #2 and #3)
So for 2/3 possible arrangements, we win the car if we switch doors after the initial goat reveal. Awesome! There has seriously got to be some amazing application of this to gambling.
And that's your statistical brain-bogglery for today.
Edit: You can simulate the Monty Hall problem here!
no subject
Date: 2011-12-15 11:30 am (UTC)Initially, the odds of picking the car is 33% for each door.
You pick door 1, and the host opens door 3, showing a goat.
People normally think that the odds then change to 50/50 between door 1 and door 2, but for some reason I couldn't grasp, the odds don't change for door 1, it's still 33% for door 1, and the remainder of the probability goes to door 2.
As I said, I couldn't grasp it; as you said, "our brains just can't handle it".
Let me think aloud here...
I think the significant part is that the host always opens a door with a goat. And that he won't open the door that you chose.
The host can pick door 2 or door 3.
1. Door 1 has the car. He can pick door 2 or 3; his choice is random.
2. Door 2 has the car. He MUST pick door 3, he has no choice.
3. Door 3 has the car. He MUST pick door 2, he has no choice.
So 2/3 of the time, he has no choice as to which door he opens. So 2/3 of the time, the door he didn't open is the one with the car.
Huh. I think that actually made sense.