Predicting the next letter

Any text is a chain of next-symbol predictions. Markov counted them by hand in a poem, Shannon built fake English from them, and then he measured how predictable real English is by making people guess.

45 min

After this lesson you can

  • Write the probability of a text as a product of next-symbol predictions (the chain rule) and state the Markov assumption
  • Explain Shannon's series of approximations to English and generate them with a character n-gram model
  • Describe Shannon's 1951 guessing experiment and how guess counts bound the entropy of English
  • Estimate next-symbol probabilities from counts in NumPy and sample from them

In this lesson

  1. A poem, counted by hand
  2. Every text is a chain of predictions
  3. Shannon’s fake English
  4. The guessing game
  5. Is there a limit? What’s still unknown
  6. The code
  7. In the papers

This lesson is part of Descent Pro

Descent Pro unlocks every lesson on the route, from base camp to the summit. Every plan starts with a free trial.

Descent Pro

Start your free trial to keep reading

This lesson, and every other lesson on the route, is part of Descent Pro. Every plan starts with a free trial, and students with a .edu email get longer. Cancel before the trial ends and you pay nothing.