For a centered square-integrable martingale with and , apply the Doob maximal inequality for a nonnegative submartingale to for . Conditional Jensen inequality gives the submartingale property, and crossing forces its square above . The bound is minimized by . This extends the Cantelli inequality from one random variable to a martingale maximum, without requiring independent increments.
Put . For , conditional Jensen inequality applied to the convex function shows that
is a nonnegative submartingale. Its integrability follows from the square integrability of . If , then , since . The Doob maximal inequality for a nonnegative submartingale yields
where zero mean removes the cross term. For completeness, the maximal inequality follows by stopping at the first crossing: on the event of a crossing at , the submartingale property gives . Sum over , and use nonnegativity on the event of no crossing.
The derivative of the last ratio is
For , the minimum over is attained at . Substitution gives the one-sided maximal inequality for a centered square-integrable martingale:
If , almost surely and almost surely for every , so the bound also holds. The optimization is the same one underlying the Cantelli inequality, but the submartingale argument controls the entire finite-time maximum.
For a nonnegative random variable with finite expected value, and , Markov's inequality states . Indeed , and taking expected values proves the bound. For a random variable with mean and finite variance , apply Markov's inequality to at threshold . This proves Chebyshev's inequality:
For independent and identically distributed random variables with finite mean and variance , the sample mean has expected value and variance . Thus
This is the weak law: , with the finite-variance hypotheses used in this direct deduction.
The more general weak law of large numbers needs only . To obtain that version, truncate . For fixed the bounded variables obey the result just proved. Their means tend to , while Markov's inequality bounds the probability that the two sample means differ by more than by . First take and then ; the integrable tail vanishes, proving the full integrable i.i.d. version as well.
Finally assume and . For every , implies , so Markov's inequality gives
If , the derivative of the right-hand side is , so its minimum is at . The Cantelli inequality follows:
If , almost surely and the same bound is immediate. The bound is sharp: put mass at and the remaining mass at ; this has exactly the prescribed mean and variance.