Square-minus-time martingale of a simple symmetric random walk (source code)

= Square-minus-time martingale of a simple symmetric random walk
{title2=$S_n^2-n$}

For a simple symmetric random walk, $S_n^2-n$ is a martingale because the next increment has conditional mean zero and conditional square one.