## 27 June 2010

### Odds of Winning the Lottery

I received a newsletter from a prominent financial and risk services firm where it was stated that the odds of winning the lotto are:

1. 0,0000072 % with an average pay-out of R2,25 million

2. The chances of picking five correct balls and one correct bonus ball are only slightly better at 0,000429 %, with an average payout of R173 130,22

3. Not playing could make you R804 000 better off over your lifetime

This seemed a bit optimistic to me so I investigated the odds of winning the lottery while listening to Cryptopsy and Origin on the Jewtube Relapse Records channel.

## How does probability work?

You divide the amount of desired outcomes by the total amount of possible outcomes. If you are casting a dice, you want one number out of six possible numbers. Thus, your odds of getting any one number of a dice are 1/6 or 0,166666667, times 100 to give you 16,6666667 %. For more on probability, see my Bayesian analysis post.

## What are the chances of winning the lottery?

This problem could be sub-divided into a few smaller, easier problems using the infamous divide and conquer technique. These sub-problems are:

1. How many balls are there in total?

2. How many numbers are there?

3. How do the combinations work?

## How many balls are there in total?

In the South African lottery, or Lotto, there are 49 balls in total. That is, you start off with 49 balls.

## How many numbers are there?

The South African lottery has six numbers, plus a bonus ball. Someone who guesses the first six numbers correctly wins over someone who has six numbers correct that includes the bonus ball. For our purposes, I shall exclude the bonus ball because we definitely want the jackpot.

Upon drawing the first ball (or number), there are 49 balls in the pool. You desire one ball out of 49 possible balls (though most guys prefer having two balls, but that's another story). Your odds of drawing this number are 1/49 or 0,020408163.

After the first ball is drawn, there is one less ball in the pool. This means that your odds of drawing the second ball are 1/(49 – 1) , which is 1/48 or 0,020833333.

When drawing the third ball, there are 47 balls left in the pool. This means that your odds of drawing the third ball are 1/47 or 0,021276596.

You get the picture. We can work out the chances of drawing all six balls in a similar way. Since drawing each ball does not depend on drawing a previous ball and we already compensated for having less balls at each round, the event of drawing any ball is discrete. Having discrete balls is awesome because we can multiply each ball event with each other to get the total chances of drawing 6 correct balls. The result is:

1/49 x 1/48 x 1/47 x 1/46 x 1/45 x 1/44 = 1/10068347520

Or one in 10068347520 possible numbers that can be constructed from six numbers each consisting of a number between one and 49.

## How do the combinations work?

In order to win the South African Lotto, you do not need to guess the numbers in the correct order. This means any combination of the six numbers could win you the Lotto. In order to work out the number of combinations, we need to work with factorials.

Since there six possible numbers, we need to know how many combinations of six numbers we can possibly have. In other words, in how many different ways may you choose six numbers? This is the factorial of six, or 6!. The answer is 720.

## What are the chances of winning the lotto?

The chances or odds of winning the South African lottery or Lotto are one over the total number of possible numbers divided by the total number of combinations of six numbers.

This means your chances of winning the lotto are not even a snowball's hope in hell, but a snowflake's hope in hell. You really want the number? Ok, the answer is 1/13 983 816 or one in roughly fourteen million. Another way to express this is 0,000000072, times 100 to yield 0,0000072 %.

1. The chances of winning the lottery are not 0,0000072 % but 0,000000072. Update: which of course you have to multiply by 100 to get the percentage, so that's where the 0,0000072 % comes from. Mystery solved!

2. Using the same method above, the chances of picking five correct numbers out of a possible five are 0,000000524, times 100 to give 0,0000524 %. I'm not sure how the bonus ball would impact this but it seems to me that picking 5 + 1 numbers amounts to picking six correct numbers, since the possible number of numbers and the possible number of combinations remain the same. Thus, provided that I am right, your chances of picking five numbers plus a bonus number are equal to the chances of picking six correct numbers, so that remains 0,0000072 %.

If I am wrong and the correct answer is 5 correct numbers out of 6, then this becomes the combinations of 6 taken as 5. In other words, 6!/(5!), which is 720/120 or 6. Thus, your chances of picking 5 correct numbers out of a possible 6 are 0,000000429, times 100 to yield 0,0000429 %. Which has one more digit than their number, but it's closer so I guess this is the method that they used.

I might also be wrong in that 6 combinations plus a bonus ball out of 7 balls were chosen for the original odds. In this case, the answer is the amount of combinations made with 7 numbers, divided by the factorial of 7 taken as 6. The answer is a 0,000000039 or 0,0000039 % chance of winning the Lotto with six correct numbers out of a possible seven, one of which is a bonus.

This is a bit far from their estimate, so I guess they used the same method I used, except they got a few digits wrong. This might be due to the accuracy of the calculator or spreadsheet application that they used.

3. The not playing figure assumes that ticket prices remain at R3,50. The playing time is 35 years (between the ages of 25 and 60). Interest is calculated annually at 10 %. This means that not playing Lotto and saving your change, if you played twice a week, yields the handsome sum of roughly R98 991,65 (I am uncertain if this is calculated at simple interest or at compound interest), which is nowhere near R804 000.

I used a financial calculator, with the values as indicated. I assumed that one ticket is bought for each draw, meaning two draws per week. I multiplied this R7 with the amount of weeks in a year (roughly 52,178571429 weeks) which gave me a yearly investment of R365,25.

In order to reach their amount of R804 000, you'd have to invest roughly R83 366,52 per year over a period of 35 years at 10 % interest. This amounts to spending roughly R1597,98 per week on the Lotto, which is about R800 per draw or 228 tickets per draw.

Apparently this is a miraculous financial and risk services firm because they can turn R96 552.43 into R804 000 over the same period and using the same interest. Guess I should consider investing with them.

## Where do their numbers come from?

Their numbers and my numbers differ by a factor of 100. This is very peculiar, so I found this page on lottery maths that explains the difference.

In the first case, despite their statement that you only play twice per week, they must've bought a total of 100 tickets per lottery draw. This would increase the odds from 1 in nearly 14 million to 100 in nearly 14 million to win a six number lottery, without any bonus. Update: unless of course they were working in percentages, in which case their number is correct.

In the second case, they must've bought a total of 100 tickets per lottery draw. This would increase the odds a thousand times for a five ball plus bonus draw, which gives the ratio between our different numbers.

To put this in perspective, an ordinary calculator cannot even display the minute numbers in question. Regardless of whose method you use, you're likely to end up with 0. In other words, your odds of winning the lotto are as good as 0. The only way to have a noteworthy chance of winning the lotto is to buy a couple of million tickets per draw. But if you could buy a couple of million tickets per draw, you wouldn't need to win the lotto.

Lastly, I multiplied my weekly amount by 100 and worked out the future value of such an investment. This means instead of not spending R365,25 per year on the lottery, you don't spend 100 tickets per week x R3,50 per ticket x weeks in a year per year on the lottery. In other words, you invest this R18 262,5 per year for 35 years at a 10 % interest rate. This investment would be worth about R4 949 582.53 at the end of 35 years. This is again a far cry from R804 000, only this time I am missing about R4 145 582,53.

It appears that this financial and risk services firm does business like FIFA.

## 25 June 2010

### The Demon of Descartes

South African author Joan De La Haye offers Demon Friday. Surprisingly, it's each Friday and it involves a demon from one grimoire or another. She also greets us as 'freaky darlings', similar to Vampira. Top class!

This is my own take on Demon Friday, except it's not always on Fridays and it doesn't feature real demons or pictures of real demons. Sorry.

These are all my posts on demons:

1. The demon of Laplace, regarding probability.

2. The demon of Maxwell, regarding thermodynamics.

3. The demon of Descartes, designed to invoke skepticism.

4. The demon of Morton, designed to make one aware of confirmation bias.

René Descartes invented the evil genius, or evil demon, to illustrate how far his skepticism stretched. The evil genius of Descartes presents a complete illusion of the outside world to the senses. In addition, Descartes's demon presents an illusion of a physical body to the senses. Similar to the Truman Show scenario, this demon keeps us captive in a simulated reality where we have no way of determining what is real or unreal based on sensory input. We also have no way of knowing that the demon is manipulating us.

This evil genius must have convinced Joel Schumacher to cast Val Kilmer as Batman. Or even to go anywhere near the Batman franchise.

Batman Forever, a film that underperformed due to its violent content. Really? No, I think it underperformed because it was crap. If Uma Thurman can't save a movie, nothing can.

## Cartesianism

Descartes held that there are three realms:

1. The realm of the body, which is the physical world.

2. The realm of the mind, which is our internal mental world.

3. The realm of God, which is something that only Lemmy Kilmister of Motörhead knows anything about.

Similar to the religious conviction that people are souls that inhabit bodies, Descartes held that people are thoughts that somehow think themselves without the need for a body. The body is thus part of the physical realm. This physical realm is easily manipulated by the evil genius.

Lemmy of Motörhead. A real evil genius.

## Different Versions of Descartes's Demon

Some interpretations of the evil genius grant the demon different powers. To some interpretors, there are things that do not rely on the senses for their validity. Among these are mathematics and logic. The evil demon would not be able to fabricate mathematics and logic, thus these are your weapons against Descartes's demon.

Other interpretations hold that the demon is omnipotent and can even manipulate our thoughts, or mathematics and logic itself, to convince us that our world is real. We are thus helpless against Descartes's demon.

## BP stock holders might like Descartes's demon

If this world is simulated, it means that BP stock holders did not really lose a fortune after the tragic oil spill. Which would be a more comforting thought if the demon did not fabricate money in our realm in the first place.

## 21 June 2010

### The Demon of Maxwell

South African author Joan De La Haye offers Demon Friday. Surprisingly, it's each Friday and it involves a demon from one grimoire or another. She also greets us as 'freaky darlings', similar to Vampira. Top class!

This is my own take on Demon Friday, except it's not always on Fridays and it doesn't feature real demons or pictures of real demons. Sorry.

These are all my posts on demons:

1. The demon of Laplace, regarding probability.

2. The demon of Maxwell, regarding thermodynamics.

3. The demon of Descartes, designed to invoke skepticism.

4. The demon of Morton, designed to make one aware of confirmation bias.

Maxwell's demon is a thought experiment proposed by James Clerk Maxwell. Maxwell invented the demon to attempt to show that the second law of thermodynamics is only a statistical anomaly and not a rigid, unbreakable law. Like the law that prevents Ozzy Osbourne from taking a slash on the Alamo cenotaph.

### The Second Law of Thermodynamics Revisited

Remember that the second law of thermodynamics states that the entropy of the universe tends to a maximum, or stated differently: you can not win.

Megan Fox. Like a young Angelina Jolie with gimp feet.

Thus, the second law of thermodynamics states that the universe is in a state of universal decay. That's right, Lady Gaga and Megan Fox are not going to be sex symbols for all eternity. An almost famous Spinal Tap quote has it that:

“Well, Nigel and Dave are two extremes, like fire and ice. I see my role in the band is to be somewhere in between... like lukewarm water.”

Which illustrates the second law of thermodynamics perfectly. The second law requires that there is an energy flow between bodies until an equilibrium is reached. This means that fire, which is in a more chaotic state than ice, would cause ice to take on a more chaotic state. By the same token, ice would cause fire to take on a slightly less chaotic state, until the luke warm water somewhere in between becomes apparent.

### Maxwell's Demon and the Luke Warm Water Somewhere in Between

Suggest that we have a container with blue coloured ice water. We pour a cup of red coloured scolding water into this container. According to the second law of thermodynamics, we ought to end up with luke warm purple water, but not if Maxwell's demon has his way.

Maxwell's demon is a hypothetical creature that can discern between the molecules of the ice water and those of the boiling water by sensing its energy levels. Maxwell claims that his demon would thus be able to separate the blue ice water molecules from the red scolding water molecules. His demon would do so by means of a trap door.

This means that, if such a demon existed, the second law of thermodynamics would be broken, as it is hypothetically possible to move from a currently more chaotic purple state to a previously less chaotic red and blue state. If entropy is symmetrically reversible, it means that there are ways to overcome the problem that the universe tends to maximum entropy. It also means that Megan Fox and Lady Gaga can stay hot for ever. Great...

More importantly, it means that perpetual motion is possible. Which would be nice considering that loads of our oil has been spilt in the Gulf of Mexico by BP. I'm not sure if Maxwell's demon would be a convincing argument for mortgage refinancing, but it's worth a shot.

## 19 June 2010

### The Demon of Laplace

South African author Joan De La Haye offers Demon Friday. Surprisingly, it's each Friday and it involves a demon from one grimoire or another. She also greets us as 'freaky darlings', similar to Vampira. Top class!

This is my own take on Demon Friday, except it's not always on Fridays and it doesn't feature real demons or pictures of real demons. Sorry.

These are all my posts on demons:

1. The demon of Laplace, regarding probability.

2. The demon of Maxwell, regarding thermodynamics.

3. The demon of Descartes, designed to invoke skepticism.

4. The demon of Morton, designed to make one aware of confirmation bias.

Inspired by this medieval motley crew, I decided to offer a grimoire of demons closer to my heart. Or perhaps closer to my head.

Pierre-Simon Laplace as captured by the Wikipedia paparazzi.

### Laplace's Demon

Pierre-Simon Laplace is famous for being both French and smart simultaneously. In this rare combination, he managed to contribute to the development of mathematics and statistics. His contributions to statistics include an early version of Bayesian analysis.

Laplace was so impressed with the success of statistics and probability to determine guesstimates of the occurrences of events that he proposed the notion of Laplace's demon.

### What is Laplace's Demon?

Laplace's demon is a hypothetical creature that - instead of hiding in your broom closet or underneath your bed - knows the exact location and momentum of each atom of the universe. Armed with this knowledge, Laplace claimed that his friendly demon would be able to predict the exact future location and momentum of each atom of the universe. In effect, Laplace's demon would know the past, the present and the future from analysis.

Pierre-Simon Laplace's demon as captured by the Wikipedia paparazzi.

### Should we believe in Laplace's Demon?

Heisenberg's uncertainty principle states that there are difficulties with knowing both position and momentum of a body simultaneously. This means that we're stuck with at best half a demon at any given time. Perhaps Laplace's demon may give us the odds, but it can't give us certainty as to the causal outcome of a given event. Laplace's demon may fail due to interpretations of quantum mechanics. A more accurate description of Laplace's demon may then perhaps be Laplace's bookmaker of the universe.

## 16 June 2010

### Mortal Kombat Finish H.I.M

I love retro games.

## 14 June 2010

### Five reasons why Prince of Persia is awesome

This is a guest post by Sally Partridge. I'm a little confused because the last Prince of Persia I played consisted of a little pixelated Persian running zig-zag up and down stairs, hanging from floors and breaking through ceilings. Those were the days. Now apparently there's a film out: Prince of Persia: The Sands of Time.

### 1. Jake Gyllenhaal

Jake has left gay cowboy territory far behind and stepped into the realm of hot skirt wearing men ala Brad Pitt and Eric Bana in Troy, the fellas from 300 and even, although to a far lesser extent, Russell Crowe in Gladiator.

I felt a small twinge of guilt admiring Taylor Lautner's naked, bronzed chest in New Moon but that adolescent fantasy got swept through the door when Jake entered the scene. His burnished Persian bod is most definitely PG-rated, and at my age, totally achievable.

Gemma Arterton. Seems like they rounded up every thespian with a hook nose for this film.

### 2. Jerry Bruckheimer

One website dubbed legendary producer Jerry Bruckheimer as a saner version of Michael Bay. While good old Micky Bay can be relied upon to deliver bangs and explosions aplenty, Jerry B delivers good old fashion action and adventure topped with lots of CG. Think Armageddon, Pirates of the Caribbean, King Arthur, National Treasure. If it’s got crumbling temples, epic fight scenes and video game style chases, then Jerry probably produced it.

### 3. The game

The game was awesome, full stop. The music, the setting, the action - all of it! Prince of Persia The Two Thrones was the first game I managed to clock by myself (okay with some help), without losing interest half-way through. First they made a graphic novel of the game and now a movie and while it can be said that Hollywood makes films out of everything, this time it was the right thing to do.

### 4. The stunts

The first time Prince Dastan (Jake) runs up a wall, jumps across a roof and manages to capture a walled city all by himself I spilled my Coke in my neighbour's lap. The film features some of the most incredible stunt work (CGI?) I've ever seen, and yes I have seen Ninja Assassin (twice).

### 5. The Hashshashin

Think Nazgul crossed with the Sith crossed with dark wizards. These guys are mean, gross looking; speak to snakes and the toughest son's of bitches ever to cross your screen. They travel in their dust devils for god’s sake. Remember those mystical guys in 300 that threw the flaming grenades at the Spartans? That’s them. Needless to say, the fight scenes are awesome.

It’s close but its not the perfect film. My one issue with the movie (and I blame Disney entirely for this) is the token action movie one-liners and soft-core humour. Ostrich racing? C’mon.

And yes, Jake gets the girl in the end, but doesn’t he always?

### Private property is theft, personal property is fine

That awkward moment when reality meets your ideology. Some anarcho-communist is having a fanny wobble because informal settlers got evicted ...