Thursday, May 21, 2009

Rolling Sevens

What's the probability of rolling a 7 on one roll of two standard six-sided dice? To make it easier to visualize, here's a listing of all of the different outcomes of rolling two six-sided dice.


If you look at the long diagonal starting in the bottom left, you can see that there are six ways out of a possible thirty-six to reach a total of exactly 7.

So for two six-sided dice the probability of rolling a seven is

P(7) = 6/36 = 0.1667

Or about one in every six tries.

That question was too easy, so let's make it a little bit tougher. What's the probability of rolling seven 7s in a row? Okay, it's not that hard if you know how to calculate the probability of independent events. You just need to multiply the probabilities of each event. In this case we want to multiply 0.1667 by itself seven times,

0.1667 * 0.1667 * 0.1667 * 0.1667 * 0.1667 * 0.1667 * 0.1667

or we can just raise it to the 7th power.

(0.1667)7 = 0.0000036

You can see that rolling seven 7s in a row has some pretty long odds. That will only happen about 36 times in 10 million tries!

But what if you've already rolled six 7s in a row? What's the probability of rolling a seventh 7? Before we do any calculations, would you say that the odds are pretty good or pretty bad of getting a seventh 7?

If you think the probability is extremely bad, you're falling for a very common cognitive bias called the Gambler's fallacy. This fallacy accounts for the belief that a streak of good or bad luck is "due" to change. A gambler who has had a long streak of losing hands in blackjack might decide to increase his bet, banking on the feeling that his luck is about to change.

The Gambler's fallacy arises from out intuitive sense that things have a way of "evening out" in the long run. The truth is that over the very long run, things do even out. This is called the Law of large numbers. If I flip a coin a million times, I can expect to get reasonably close to half-a-million heads. But if I flip the same coin only ten times and get ten heads in a row, the probability of seeing a head on the next flip is still exactly one-half. The Law of large numbers only applies to the average of a large sample, not to individual coin flips, hands of blackjack, or rolls of the dice. The coin (or the cards, or the dice, or the universe for that matter) doesn't remember the result of the previous trials, and therefore cannot be influenced by them.

Oh, I almost forgot, the probability of getting that seventh 7 after rolling six in a row is 0.1667, exactly the same odds as getting a 7 on any other roll. The dice have no memory.


William Sandoval said...

Good post,you're always great man.

Bill the Lizard said...

Thank you. I hope to have another post done this weekend.

Mu said...

The probability that the dice are in fact broken or weighted, rather than being fair, is still quite large in the case where you have just rolled six '7's in a row. Consequently, the chance they will roll it again is actually higher. It's the chance of rolling it naturally (i.e. independent rolls) modified by the extra information that these dice did indeed roll '7' six times before.

Laplace's law of succession is worth reading up on.

LOVED your list of computing laws. Keep up the good work.

Bill the Lizard said...

That's a valid point. I should have stipulated from the beginning that we were rolling fair dice just to remove any uncertainty. Thanks for pointing that out, and for the URL.

Ragnar Danneskjold said...

I have always found it interesting that logic accepts that one part of the mathematical model says the distribution of results will approach the theoretical distribution curve over time, but rejects the other part of the mathematical model that says the probability of an event occurring remains constant in a game of independent trials.

It’s not like we can pick and choose which math to accept and which not to accept. It seems that “it depends” is rather silly. Either dice rolled over a period of time have a predictive distribution trend, or it doesn’t. If “dice have no memory” then how can one build a distribution curve over a finite amount of rolls (we are certainly not talking infinite)? I guess the same could be said of a coin flip.

My personal belief is to accept BOTH realizations, rather to reject one or another.

I would certainly bet against a series of 50 consecutive coin flips in a row (depending on odds),thus betting on the large of law numbers, rather than betting on a single coin flip where it had no memory.

It would stand to reason that if you are making a bet over a period of consecutive occurrences one has to embrace LLN and ignore the No Memory, since you are not betting on a single event.

Most punters in Vegas bet on individual outcomes and most games are setup and played that way – thus one never gets to truly bet on LLN.

However, I once meet a craps players (who seemed to be “rain man”) who was building a probability distribution in his head. He said he could keep track of 200 rolls. I don’t know whether to believe him or not – but his bank roll as I watched only grew.

I tend to listen to those that have put their money where their mouth is, especially ever since a Nobel Prize winner who wrote the pricing model for options managed to lose a trillion dollars. How does that saying go, there is a lie, a damn lie, and then there is statistics.

For now – I’ll play with some small scratch for fun – but I think the smartest people in the room have missed something – because something’s a miss.

There was a time in history when people didn’t even know the probability of rolling two die, yet they played with them for centuries. Just like there was a time when the smartest mathematicians didn’t even know that a negative number could exist. I wouldn’t be surprised is something in the future is realized that changes the face of gambling.

Just my long winded two cents.

Evan Browns said...

This games is only for Math lover???

Kate Willson said...

Most days I was on my own but than, One day, i found a perfect play to pass time Everything is fair and according to the rules!