- 02 Apr '11 19:55I'm asking because I saw a number being given for the odds in typing out the

name "Shakespeare" thinking about all the things required for the uppercase

letter "S" then forcing all the other letters to be lowercase. Is this guys numbers

correct? I'm only interested in the odds for the name, I know more than a few

people here are much better with numbers than I am.

Thank you if for you help if you deside to. I'm not going to argue any poings in

this thread I just want to look at the odds and how we come up with them.

Kelly

http://www.probabilitytheory.info/content/item/7-monkeys-typing-shakespeare-or-even-just-the-word-hamlet

"If there are 50 keys on the typewriter, the probability of the monkey getting Shakespeare correct is raised to the power of the number of characters, letters and spaces, in Shakespeare plus the adjustments of the typewriter needed for capitals and punctuation. On this basis the chance of the monkey typing the word 'Hamlet' correctly is one in 15,625,000,000," - 02 Apr '11 20:12 / 3 edits

As your quote says, it could be as simple as 'number of keys' to the power 'number of characters' except for the complication of the capital letter.*Originally posted by KellyJay***I'm asking because I saw a number being given for the odds in typing out the**

name "Shakespeare" thinking about all the things required for the uppercase

letter "S" then forcing all the other letters to be lowercase. Is this guys numbers

correct?

However, the word Shakespeare could be typed by typing a string of 12 key strokes:

SHIFT, S, h, a, k, e, s, p, e, a, r, e.

so, on a 50 key typewriter the probability is lower than or equal to:1 in 50 to the power 12.

If there are two SHIFT keys, then you can divide that by 2. (the 50 to the power 12 part)

If there is a CAPS LOCK function, then you can reduce it even further (I won't bother to calculate it, but since it is another possible way of typing it, the probability of getting the desired result is higher.

For 'Hamlet' I get an upper bound of 15,625,000,000 so it appears he assumed only one SHIFT key and ignored caps lock functionality. So my monkeys with a more advanced keyboard than his (two SHIFT KEYS), can finish their work in less than half the time!

And don't get me started on the 'Backspace' key. - 02 Apr '11 22:04

As always you’re a gentleman and scholar thank you for your effort.*Originally posted by twhitehead***As your quote says, it could be as simple as 'number of keys' to the power 'number of characters' except for the complication of the capital letter.**

However, the word Shakespeare could be typed by typing a string of 12 key strokes:

SHIFT, S, h, a, k, e, s, p, e, a, r, e.

so, on a 50 key typewriter the probability is lower than or equal to:1 in 50 to ...[text shortened]... r work in less than half the time!

And don't get me started on the 'Backspace' key.

I think with each letter typed it is possible that another key stroke could cause the

wrong or right case, how to work that in for each letter seems hard to do.

Kelly - 02 Apr '11 22:20

"If there is a CAPS LOCK function..."*Originally posted by twhitehead***As your quote says, it could be as simple as 'number of keys' to the power 'number of characters' except for the complication of the capital letter.**

However, the word Shakespeare could be typed by typing a string of 12 key strokes:

SHIFT, S, h, a, k, e, s, p, e, a, r, e.

so, on a 50 key typewriter the probability is lower than or equal to:1 in 50 to ...[text shortened]... r work in less than half the time!

And don't get me started on the 'Backspace' key.

Would not reduce but increase the odds against it, since you'd have to hit it once

to get an uppoer case letter than hit it again to remove it.

Kelly - 03 Apr '11 10:49

An additional complication is that the probability of typing Shift + s is also dependent on the behaviour of the monkey - does he only press one button at a time or is he mashing the keyboard?*Originally posted by twhitehead***As your quote says, it could be as simple as 'number of keys' to the power 'number of characters' except for the complication of the capital letter.**

However, the word Shakespeare could be typed by typing a string of 12 key strokes:

SHIFT, S, h, a, k, e, s, p, e, a, r, e.

so, on a 50 key typewriter the probability is lower than or equal to:1 in 50 to ...[text shortened]... r work in less than half the time!

And don't get me started on the 'Backspace' key.

In other words, you can't really calculate this probability without having some more specific information about the monkey. - 03 Apr '11 13:25 / 2 edits

Having thought about what KazetNagorra said regarding the SHIFT having to be held down at the same time as another key, I see that that is more complicated than I realized.*Originally posted by KellyJay***I think with each letter typed it is possible that another key stroke could cause the**

wrong or right case, how to work that in for each letter seems hard to do.

Kelly

However, if we assume for simplicities sake that the monkeys only hit one key at a time, then the shift key becomes worthless, and only the CAPS LOCK key matters.

Now the formula for correct typing is:

CAPS LOCK, S, CAPS LOCK, h, a, k, e, s, p, e, a, r, e.

or

1 in 50 to the power 13. (assuming 50 keys other than SHIFT keys).

You are incorrect about extra CAPS LOCK presses affecting the case later on reducing the chance of a correct output, as that calculation is already part of the above.

ie suppose the monkey has already typed "Shake". Now the probability of him typing the correct next letter (an 's' is 1 in 50. If he presses the CAPSLOCK, then that is just one of the other 49 keys he could have pressed and is considered an incorrect guess. There is no need to worry about the implication that any further key presses are now Capitals as it is already considered a failed run.

The same would actually apply to any other special key. If the electronic typewriter had a key that turned off its power thus stopping all further input, it would not affect the probability. Even a key that killed the monkey would have no effect.

If you throw a die 6 times, the probability that you will get 6 sixes in a row is not affected if we add the rule that throwing a 1 means you have to stop. - 03 Apr '11 14:55

However, the monkey might also press caps lock twice in a row. So the monkey may hit caps lock 2n (where n is a positive integer or zero) times before entering the correct letter. So the probability of getting the correct letter (assuming 50 buttons of which 1 caps lock) is actually 1/50 + (1/50)^3 + (1/50)^5 + ... which is approximately 0.02008 (slightly more than 1/50).*Originally posted by twhitehead***Having thought about what KazetNagorra said regarding the SHIFT having to be held down at the same time as another key, I see that that is more complicated than I realized.**

However, if we assume for simplicities sake that the monkeys only hit one key at a time, then the shift key becomes worthless, and only the CAPS LOCK key matters.

Now the formula for ...[text shortened]... sixes in a row is not affected if we add the rule that throwing a 1 means you have to stop. - 03 Apr '11 15:32

We're just being geeks.*Originally posted by Palynka***It's just a metaphor for explaining probabilities, you guys are aware of this, right?**

A lot of focus on the particular shape of the typewriter, the number of shift keys and talking about the behaviour of the monkey is missing the point, IMO. - 03 Apr '11 18:09 / 2 edits

My calculation was an upper bound. As I said, don't get me started on that back space key!*Originally posted by KazetNagorra***However, the monkey might also press caps lock twice in a row. So the monkey may hit caps lock 2n (where n is a positive integer or zero) times before entering the correct letter. So the probability of getting the correct letter (assuming 50 buttons of which 1 caps lock) is actually 1/50 + (1/50)^3 + (1/50)^5 + ... which is approximately 0.02008 (slightly more than 1/50).**

And if I mention that F2 does an automatic spell check, it might introduce an interesting analogy to Natural Selection. - 03 Apr '11 18:19

The important question Kelly was asking, was whether or not such complications reduce or increase the probability. The answer is : it depends on the complication.*Originally posted by Palynka***It's just a metaphor for explaining probabilities, you guys are aware of this, right?**

A lot of focus on the particular shape of the typewriter, the number of shift keys and talking about the behaviour of the monkey is missing the point, IMO.

The important things to know are:

1. What is the probability of a monkey making a correct action.

2. How many correct actions in sequence are required to achieve the result.

3. All actions that do not stop the result from being obtained can be ignored.

4. All actions that do stop the result from being obtained must be considered in 1. - 03 Apr '11 20:20 / 1 edit

I just think those considerations make the example pointless and may end up confusing Kelly more than help him understand probabilities. But I agree with just about everything you guys said so fair.*Originally posted by twhitehead***The important question Kelly was asking, was whether or not such complications reduce or increase the probability. The answer is : it depends on the complication.**

The important things to know are:

1. What is the probability of a monkey making a correct action.

2. How many correct actions in sequence are required to achieve the result.

3. All actions ...[text shortened]... be ignored.

4. All actions that do stop the result from being obtained must be considered in 1. - 03 Apr '11 23:40

Yea there is not earth shattering result waiting on our agreement on the answer.*Originally posted by KazetNagorra***We're just being geeks.**

I just thought it a good question, I like simplifying the keyboard as much as

possible too. Tying to limit this to something we can monitor verse lose track of.

Kelly