Let us assume, for the sake of calculation, that the monkey uses the pencil to write legible characters chosen completely at random, rather than drawing squiggles or eating the lead.
The Variables:
- The Text: Shakespeare’s Hamlet contains approximately 130,000 characters (including letters, punctuation, and spaces).
- The Character Set: To write English, you need at least 26 letters, a space, and basic punctuation. Let’s be generous and assume a "keyboard" of only 30 possibilities to simplify the math.
The Equation: The probability of getting the first character right is 1 in 30.