Odds concerning monkeys and the lottery

I am really awful when it comes to statistics and tend to stay away from rather than try to understand it. But this, of course, doesn’t work and now I’m plagued with this annoying curiousity about everyday topics dealing with the topic I can’t seem to ignore.

For instance, are the odds of a lottery machine popping out the numbers (in order) 1 2 3 4 5 6 the same as any other number sequence? Surely, “1” has an equal chance coming out for the first slot as any number, and “2” the second slot, and so on. Unless each slot has some sort of dependency on another slot to determine which number comes out, but I don’t see how this can be. Or I am just ignorant of what’s happening. I remember vaguely about “mutual exclusiveness” from high school but I still haven’t made sense of it. I ask because my philosophy teacher told the class a lottery ticket with an ordered sequence is just as likely as a ticket with a seemingly random one to win (or lose, if you prefer).

If that is true, then won’t the assertion that a roomful of monkeys typing away on typewriters will eventually produce Hamlet also hold? Each letter has an even chance of being struck (assuming nonbiased monkeys with no developed preference for certains key combinations, of course). Can we then say that event will just as likely happen as any other? That seems sort of…wrong, at least non-intuitive, to me.

ACK, deliver me!

Any sequence of numbers is just as likely(unlikely) as another. It’s we, not the bin the balls are in, who place significance on the outcome.

Yep, and welcome to the boards.

Yep, given an infinite number of monkeys or one monkey with an infinite amount of time.

Each of these questions seems to be trying to come to terms with some of the non-intuitive properties of very large numbers or very remote possibilities. When dealing with an infinite number of possibilities, things that appear unlikely become - not just likely - but certain.

This was actually attempted (to a small degree) - see the results here. Back story here.

Concerning the monkeys, in “theory” it can happen, but in reality, no. I jumped on this question because I just recently worked a problem with monkeys and Hamlet in my statistics class.
(Note for the following: Yes I know typing out lots of zeros is not good scientific practice, but sometimes it helps get the idea across the magnitude of larger numbers.)
According the my statistics book, the chances of Hamlet being typed out by 10,000,000,000 monkey, hitting 10 keys per second, for the age of the universe, which is 1,000,000,000,000,000,000 seconds, would be:

1 against 10^164345

10^164345 is an awesomely hugely unfathomable number (Over 164,300 digits long!!). My books proceeds to state that the whole monkeys and Hamlet business is complete and utter “nonsense.”

hands OP the Heart of Gold :smiley:

As others have already said, the odds against randomly producing something as long as Hamlet are too big to be pictured in any practical way. Try thinking of it this way: a monkey hitting a typewriter (or a computer spewing out random letters, same thing) once every second will eventually produce your first name. If your name is Ed, the chance of a perfect match is 1 in 26[sup]2[/sup], or 676, which means you’ll probably see your name come out in only 10 minutes or so. If it’s Bob, the chance is 1 in 26[sup]3[/sup], or 17576, which will take a few hours. Dave (26[sup]4[/sup], or 456976) will have to wait about 5 days. If your name is Yoshitsune, the chances are 1 in 26[sup]10[/sup], or 141167095653376, which means you’ll have to wait roughly 4 million years for it to come up, but eventualy it will.

Your books are categorically wrong. The premise is an infinite amount of monkeys, with infinite time. Your example uses finite numbers of monkey a finite time limit, completely different.

Also note that even in your example, the monkeys did produce Hamlet, it just took a very very long time.

What’s the old saying? “There’s lies, damn lies, and statistics”. Any time you deal with statistics, you have to qualify your realm as either “practical” or “theory”. For instance, the monkey example is so unlikely that in all practicality the probability is zero, but in theory, it can be done. In the classroom and academia, some results can be shown to be highly unlikely, but statistically possible. In engineering and the “real-world” most of those highly unlikely probabilities are “rounded” to zero.

But wouldn’t an infinite number of monkeys immediately produce not only “Hamlet”, but all the works of Shakespeare, and every other work of literature, past and future? :slight_smile:

http://www.brunching.com/randommonkeys.html

In fact, an infinite number of monkeys would not only produce every work of literature, past, present, and future, but they would produce an infinite number of copies of each.

Project Gutenberg’s full text of Hamlet weighs in at 206 KB, at one byte per character. Assuming, for simplicity, that the only characters are the 26 letters of the alphabet, that means that the odds of a given 206,000 character sequence being Hamlet are 1 in 26[sup]206000[/sup], which is approximately 10[sup]291484[/sup]. So if you had that many monkeys, you’d expect to get one copy of Hamlet out.

The probability that the monkeys will produce Hamlet is 1, but they are not guaranteed to do so. It’s a feature of standard probability theory that, when there is an infinite number of possible outcomes, some events may have probability 0 and still occur.

There has been work in a non-standard probability theory where this doesn’t happen, but it hasn’t reached widespread acceptance yet.

I always thought it was more of a commentary on infinity, so lay people could wrap their head around the immensity of it.

Either that, or it was a knock against Willy S.

See now, the question of monkeys and typewriters can be greatly simplified with a little bit of editing. Every time a monkey types a letter, check to see if the letter is the corrent next letter from Hamlet. If not, make the monkey erase the letter and type another.

Actually, you could create Hamlet pretty fast with just one monkey and a computer to erase incorrect characters.

And, you wouldn’t need a monkey–a random number generator would work better. It wouldn’t be that hard to write a simple script to test this theory.

Anyone know how many letters (include punctuation) in Hamlet?

Let’s say there are 10,000 letters in Hamlet (a number I pulled from thin air). Each letter would need an average of 47 guesses (there are 94 characters on my keyboard) to guess it. So, that’s about a half million guesses. My computer could do that in a day or so.

So we can expect to get Hamlet merely by providing a copy of Hamlet?

Impressive, sure, but perhaps not a miracle of modern technology.

I’m very bad at judging these things, but I wonder if it must necessarily come up in the given timeframe. Isn’t this just and average and couldn’t Yoshitsune be unlucky and have to wait much longer than the 4 million years?

Even more interesting is the question of whether the name Yoshitsune MUST come up given an eternity of random generating. Is it in the nature of what eternity is that this HAS to happen? Or is there a really really incredibly slim chance that “Yoshitsune” never comes up?

Hereis a link to a monkey shakespeare simulator …

If you’re going to change the rules, why stop there? Let’s postulate a copy of Hamlet and and a xerox machine. Or a computer that has Hamlet as a word document… look, all I do is hit print!