An example of a Doob martingale. Suppose that we throw balls into bins independently and uniformly at random. This is one of the most-studied random experiments and we usually ask questions about the expected maximum load or the expected number of empty bins.
Here we consider the expected number of empty bins. Let be the random variable representing the bin into which the -th ball falls. Let be a random variable representing the number of empty bins. Then the sequence of random variables
is a martingale. Clearly is a function of the ’s and has bounded expectation. Furthermore
We can view as an estimate of after having observed the outcomes . At the beginning is a crude estimate, simply the expectation of . As we add more balls to the bins, ’s give improved estimates of , and at the end we get the exact value .