** You are viewing content which is not in your chosen language.**

Could a monkey type one of Shakespeare's plays?

As bizarre as it sounds, this question helps us to explore what is impossible and what is merely improbable.

**Infinite Monkey Theorem**

According to the Infinite Monkey Theorem, if a monkey continues to type at random for an infinite period, it will eventually type a complicated and skilled piece of work, like a Shakespeare play.

**Prof David Spiegelhalter University of Cambridge, UK** – "If we imagine this monkey, all it's doing is thumping away at the keys completely at random. The monkeys don't have to evolve; they don't have to be able to read Shakespeare. They do have to be able to carry on typing, but that's all – just typing at random."

**Probability of Independent Events**

The likelihood of this seemingly impossible event occurring depends on the probability of independent events.

For a monkey to type the word 'banana' on a typewriter with 50 keys, the chance the first letter they type will be 'b' is 1/50.

The chance the second letter will be 'a' is also 1/50, and so on.

These are independent events: the first does not affect the outcome of the second.

To calculate the probability of two or more independent events happening together, multiply their probabilities.

So the chance that the first six letters typed would read 'banana' is 1/50^{6}.

This is a very small number, as a percentage it represents a probability of less than 1%.

This means that it is incredibly unlikely that 'banana' would be typed at random.

**Increasing Probability**

It takes many, many iterations for the probability to increase above 1%.

Even for a million different monkeys typing at random, the probability that one will type banana is still less than 1%.

But by 10 billion monkeys, the probability increases to 47%.

At 100 billion monkeys, the probability is over 99%.

As the number of monkeys increases towards infinity, the probability of any one monkey typing the word "banana" increases towards 100%.

It becomes a certainty.

So although it may seem impossible, in theory, it's only improbable that a monkey could type any given sequence of words.

Even something as extensive and complex as the complete works of Shakespeare.