Put . For , the process is a nonnegative submartingale, by the conditional Jensen inequality. A crossing of by implies a crossing of by this squared process. Since , the Doob maximal inequality gives
For , differentiation of the last expression gives , so its minimum over occurs at . Substitution proves the one-sided martingale maximal inequality
If , then almost surely and for every , so the same conclusion holds. The constant is sharp: at one step take with probability and otherwise. This has mean zero, variance , and achieves equality.