Posted tagged ‘problem’

Problem Children

July 14, 2010

The title is perhaps a little misleading. This post will by no account help you deal with problem children (unless they enjoy quirky maths blogs, in which case you’re welcome). That is not the purpose of this blog, no sir. Very few issues involving problem children have mathematical solutions and that is something that just doesn’t sit right with me.

So now we know what this post is not about, I suppose it’s time to get cracking. The idea I’m covering today is conditional probability; what is the chance of one event given that another event has already occurred (more formally P(A|B)). For instance, while the probability of missing a leg or being a lion tamer may, individually, be quite low, the probability of missing a leg given that a person is a lion tamer is considerably higher (as well as an increased probability that everyone around them wishes they were lion tamers).

And you thought your first kiss was scary

Let me paint a scene for you. It’s a beautiful, warm night. The stars are out and the moon illuminates the night sky. The sound of music and laughter fills the air and you don’t notice any of this because you’re in the library idly browsing through the latest mathematical journals. It’s a typical Friday night (isn’t it?).

All of a sudden, the librarian appears out of nowhere and begins sorting some of the books nearby. After a few minutes in close proximity you decide to break the tension and talk. After exchanging pleasantries (“nice night, isn’t it?”) and a few arkwardries (“those glasses frame your face really well”) she mentions that she has two children, at least one of which is a boy. On this note she departs to organise another section, leaving you to ponder the implications of the conversation.

Unable to comprehend why she has been so cryptic about the gender of her children (a flirting technique, maybe?), you sit down and flick through a copy of ‘Macho Maths Weekly’ to calm your nerves.

So here’s the question: given that one of her children is a boy, what it the probability her other child is also a boy? All seems very simple, doesn’t it? If there’s a 50/50 chance a child is a boy or a girl, then the probability must be \frac{1}{2}. Thought I’d try and bluff you, didn’t I? All this talk of conditional probability used to distract you from the obvious answer. But as is usually the case with this blog, things aren’t quite that simple.

Pictured: the house of math

To work this out, we need to consider the different possibilities. With two children we have 4 combinations –

Girl Girl

Girl Boy

Boy Girl

Boy Boy

Since we’re given that one of them is a boy (ruling out ‘Girl Girl’), we are left with 3 equally likely possibilities of which only one includes another boy. we therefore conclude that the probability the other is a boy is \frac{1}{3}. Bet you didn’t see that coming.

What if she tells you she has a boy born on a Tuesday (ok, I really don’t know why she would do this, just run with it)? Surely it’s \frac{1}{3} again. How can the day he’s born have any effect on whether the other other child is a boy? Let’s have a look.

We have a few more combinations here, 27 to be precise. Again any possibilities not involving a boy born on tuesday are eliminated leaving –

Boy (Tues) Girl (Any) – 7 combinations (Girl (Mon), Girl (Tues), etc)

Girl (Any) Boy (Tues) – 7 combinations

Boy (Tues) Boy (Any) – 7 combinations

Boy (Any) Boy (Tues) – 6 combinations (As Boy (Tues) Boy (Tues) has already been accounted for)

We therefore have 27 equally likely outcomes, 13 of which involve another boy. The probability is therefore \frac{13}{26}! Oddly enough, the more detail she gives about her son, the closer the probability that her other child is a boy gets to \frac{1}{2}.

Who wouldn't want two boys?

Have children? Want to amaze your friends with simple probability tricks? Then please refrain from using the sentence “at least one of my children is a boy”. Only Social Services will take interest in statements like that.

Bookmark and Share

Birthdays

July 6, 2010

Ah yes, birthdays. That time of the year where we mark time’s relentless march onwards. Where the young are dragged kicking and screaming into responsibility and maturity and the old are led stumbling and murmuring from their ability to kick and scream. Still, they’re not all bad. Statistics show that those who have the most tend to live the longest.

There are 365 possible birth dates (366 if we’re being picky) and it was equally likely for you to be born on any one of those days (well, not quite, but it certainly isn’t this blog’s place to go into that). This means that the chance of having your birthday is \frac{1}{365} 0r about 0.27%. Makes you feel pretty special, doesn’t it?

So, if I asked you for the minimum number of people I’d need in a room to have a better than 50% chance that two of them shared the same birthday, you wouldn’t even blink, would you? I mean, it all seems very simple. It must be half the number of days in the year. This would give \frac{183}{385} which, as required, is over 50%. Feeling pretty confident about this, aren’t we?

Pictured: You

The answer, in fact, is only 23. That’s right, having just 23 people in your room gives a better than 50% chance that two of them share the same birthday. 23! That’s a small bus of people, or the entire population of “soccer” fans in the USA. And yet, surprisingly, that’s all it takes.

Not convinced? It’s understandable. You’ve been in groups of 23 or more many times and only very rarely have you discovered that someone shares your birthday. But that wasn’t the question, was it? If the question was how many people do you need to have a better than 50% chance they share a birthday with you, the answer is of course 183. With 23 people there’s only a 6.3% chance that one of them shares a birthday with you.

However, I didn’t specify which two people had to share a birthday, it’s not all about you, you know. What we are doing is comparing each person to every other person, giving us 253 distinct pairs of people. While this doesn’t help much with the calculation, it does make the answer seem slightly less surprising.

The comparison process

Want some proof? Lets first think about the probability that none of the 23 people share the same birthday, and think about each person in turn.

The probability person 1 has a different birthday than people we’ve previously analysed is 1 (as he haven’t analysed anyone else).

The probability  person 2 has a different birthday than person 1 is \frac{364}{365} (this is the same as saying there is only a \frac{1}{365} chance of them sharing a birthday).

The  probability person 3 has a different birthday from person 1 and 2 is \frac{363}{365}.

And so on and so on, you get the idea. This continues until we reach the 23rd person.

This means that the probability of no one in a room of 23 people sharing a birthday is

1*\frac{364}{365}*\frac{363}{365}*\ldots*\frac{343}{365}=0.49270276

The probability that two of group do share a birthday is therefore

1-0.49270276=0.507297 or 50.7297%

See, I told you so. Interestingly, you only need 57 people to give a 99% chance that two of them share a birthday. The percentage gets unbelievably close to 100% the closer you get to 366 (99.9999999999999999999999999998% at 200 people) at which point the pigeonhole principle dictates it reaches 100% (if 365 people all have different birthdays, what is the chance that a new member has a different birthday to all of them, excluding leap years?)

Like this, but with people

So there you have it. Want to amuse yourself and impress your friends at parties? Simply badger everyone for their birthday, neatly arrange all of your results and wave goodbye to your social life. Who wants to be popular anyway?

Bookmark and Share