## Archive for the ‘Everyday Maths’ category

### 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.

### Toast

July 10, 2010

Toast – the champion of breakfast foods, the bastion of simple nutrition. A perfect blend of bread (toasted impeccably), butter, and your choice of favourite preserve combine to provide wheat based motivation. To start your day with a toast filled stomach is to march forth into the days beginning unafraid, undaunted. With its solid, wholesome support anything is possible.

Ok, so toast isn’t particularly interesting. It’s crispy bread with a bit of butter on it, it was never going to light up the world. It does have one interesting property, though. It seems to provide a perfect example of Murphy’s law: anything that can go wrong, will go wrong. This is because when dropped, as everybody knows, toast always lands butter side down. If it doesn’t, you must have buttered the wrong side.*

It must be a myth though, mustn’t it? After all, it’s a similar situation to flipping a coin and no one’s claiming that always has one outcome. The claim seemed to be debunked when the BBC show ‘QED’ tossed 300 pieces of toast into the air and found that only 152 of them landed butter side down, obviously proving that it’s all a load of nonsense. We only believe it favours one outcome because of our very selective memories. Job done.

Time to put your feet up

But that wasn’t the end of it. Many people pointed out that the experiment wasn’t really an accurate reflection of dropping a piece of toast in your kitchen. After all, who tosses their toast in the air? If you do, how can you grumble about it landing on the floor? Surely this would only serve to highlight your own ineptitude. Are there hundreds of clumsy and disgruntled toast jugglers out there? I digress.

The stage was set for a mathematician to seize the initiative. Robert Matthews, apparently having nothing better to do, spent a bit of time analysing the dynamics of falling toast (a mathematician’s ability to procrastinate in this manner is, I believe, what truly distinguishes them from other people). He found that the main factor determining which side the toast lands on is the height from which it’s dropped. I’ll explain.

Most dropped toast is the result of it slipping off the plate or tumbling out of your hand. This is where it gets interesting. As the centre of gravity moves outside the support (plate or hand), the toast pivots on the edge and falls off, rotating slowly as it does so. The size and weight of your average piece of toast mean that, in the time it takes to fall from your hand or table, it will have completed half of a rotation. This all amounts to a nicely buttered kitchen floor.

This is a prime example of gravity and drag forces combining to ruin your morning (aside from making getting out of bed even harder). While you’ll struggle to alter the gravity problem (it’s pretty constant on the Earth’s surface, and the Martians only do cereal) you can change a few other factors.

Extremely thick slices (probably about loaf size), for instance, won’t rotate as quickly. You could also limit the amount of rotation by pushing the toast off the table with force or dropping it evenly. Alternatively, Matthews predicted that toast falling from a height of about 8ft should undergo one full rotation, landing acrobatically on its non-buttered side. As you can tell, mathematician’s are only interested in highly practical solutions.

Not content with the theory (and perhaps not satisfied with his demonstration of the fact mathematicians have far too much time on their hands), he enlisted the help of 1,000 schoolchildren to drop over 20,000 pieces of toast. The results? 62% of the toast landed face down. When the toast was dropped from a height of 8ft, however, it landed face up 53% of the time. Hurray for maths!

Huzzah!

So, looking to keep the dog hair off your beautifully crafted meal? Simply butter your loaf, take it to your 8 foot table and give it a good whack. You’ll never have to worry about spoilt toast again.

*Full credit to Ian Steward in his ‘Hoard of Mathematical Treasures’, I loved that joke.

### 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?

### Winning The Lottery

July 3, 2010

I thought I’d start my blogging career with a bang, a desperate push for immediate attention if you will. And what better way than by explaining how to win the freaking lottery.

Wait, don’t click away! It’s not a scam (or even a particularly practical guide to winning the lottery, but we’ll get to that). We’ve all seen the scams, either claiming you have already mysteriously won huge sums of money or asking for you to pay for their foolproof technique for picking the right numbers. I am definitely not claiming to have millions of pounds to give you and I am not asking for any payment whatsoever. Being a student I will obviously accept any donations (monetary or alcoholic), but I’m not demanding anything. I’m nice like that.

Incidentally, one of my favourite lottery ‘techniques’ is to pick your numbers based on what kind of streak they’re on, presumably because some lottery balls are better at wiggling their way out of the machine than others (although, there’s likely to be some differences in probability given the minute discrepancies in the size and weight of the balls. While I’m confident the differences in probability are negligible, the thought is worth a little digression) . Do not pick numbers based on hot streaks. Please, it makes statisticians cry.

Pictured: Mario's 'hot' balls

Of course, there are ways to maximise your potential winnings. These include  keeping your numbers secret from friends and family and avoiding popular choices of numbers. The latter requires avoiding sequences played by thousands of other people, like 1 2 3 4 5 6 (the former requires a sociopathic dislike of everyone close to you). This rules out the terrifying prospect of winning the lottery but having to split it with thousands of less deserving people. Because when it comes to winning millions, nobody likes to share.

Unfortunately, none of this actually increases your chances of winning that jackpot. There is, however, an unbelievably simple, nay foolproof, way to double your chances every time you play. All you have to do is buy another ticket. Triple your chances? Buy a third! In fact, you can increase your chances of winning by whatever factor you wish by buying more and more tickets. I think you can see where I’m going with this.

So many chances!

All you have to do to guarantee you win is buy every combination of ticket (I did warn you it wasn’t a terribly practical guide). Simple, eh? Not quite. There are nearly 14 million combinations in the UK lottery and each one is going to cost you a pound. That’s a fairly massive investment. Still, it’s still worth it, right? If the jackpot is at £15 million that’s still a £1 million profit, not a bad weeks work if you ask me.

Unless someone else also wins, then you’re in trouble. That £7.5 million return isn’t looking great compared to your original investment, and that’s if only one other person wins. It’s looking less and less worth the risk with every additional leach on your prize money. But at what point does it become worth it? What size does the jackpot have to be for it to be profitable to buy every ticket?

Let x be the jackpot. If 40% of the time no one wins, 35% of the time there’s one winner, 15% of the time there’s two winners and 10% of the time there’s three winners, then the expected value of the investment would be (0.4 *x) + (0.35*½x) + (0.15*x) + (0.1*¼x) = 0.65x. This means that you would expect a profit when your investment is 65% or less of the jackpot. In the example of the UK lottery, buying every ticket would become profitable when the jackpot reached about £21.5 million (although even in this case you lose money if there’s another winner).

Ok, so the theory is pretty solid, but realistically its impossible. There’s no way anyone could raise millions and get all the tickets required to win. Unless you’re the Australian syndicate who won \$27 million in the 1992 Virginia State Lottery in the USA. That’s right, these guys chucked a few quid together and literally bought as many lottery tickets as possible. Even then they only managed to buy about 70% of the combinations, resulting in what must have been the most tense lottery draw in history.

So, looking for something to do this summer? Grab some friends, find a few thousand investors and wait for a big rollover. You’ll be rolling in cash in no time.