One-sided martingale maximal inequality (source code)

= One-sided martingale maximal inequality
{title2=$\mathbb P(\max_{k\leq n}M_k\geq x)\leq V/(V+x^2)$}

For a <square-integrable> <martingale> with $M_0=0$ and $V=\mathbb EM_n^2$, apply the <Doob maximal inequality> to $(M_k+c)^2$ for $c\geq0$. An upper crossing of $x$ implies a square crossing of $(x+c)^2$, giving $(V+c^2)/(x+c)^2$. Minimization at $c=V/x$ gives the displayed bound. A one-step <martingale> taking $x$ with probability $V/(V+x^2)$ and $-V/x$ otherwise attains equality when $V>0$.