Prove Martingale Property I want to show that $M_n = (X_n)^2 -2nX_n +n(n-1)$ is a Martingale.
I know that $\{X_n\}_{n\in\mathbb N}$ is a random walk process such that $X_{n+1} = X_n +Y_n$ and $\{Y_n\}$ is a sequence of i.i.d Random Variables such that $Y_n \sim \mathcal N(0,1)\quad \forall n$
I'm not 100% sure how to prove the properties required to show this is a martingale. For example, how do I show $E|M_n| < \infty$.
 A: Please check the below?

Property 1: $\mathbb E [|M_n|] < \infty$
\begin{align*}
M_n &= (X_n)^2 -2nX_n +n(n-1)\\
\mathbb E [|M_n|] &= \mathbb E [|(X_n)^2 -2nX_n +n(n-1)|]\\
&\leq \mathbb E [|(X_n)^2| + |2nX_n| +|n(n-1)|]\\
&\leq \mathbb E [|(X_n)^2|] + \mathbb E [|2nX_n|] +\mathbb E [|n(n-1)|]\\
&\leq \mathbb E [|(X_n)^2|] + 2n\mathbb E [|X_n|] + n(n-1)
\end{align*}
This is finite for finite time as $\mathbb E [|(X_n)^2|]$ and $\mathbb E [|X_n|]$ are finite (and so is $n(n-1)$ for finite $n$).
Property 2: $\mathbb E [M_{n+1}|\mathcal F_n] = M_n$
Now we are given $X_{n+1} = X_n + \xi_n$ where
\begin{align*}
\mathbb E [\xi_n] &= 0\\
\mathbb E [\xi_n^2] &= 1
\end{align*}
we can get this from mean 0, variance 1, as given in the comments
\begin{align*}
\mathbb E [M_{n+1}|\mathcal F_n] 
&= \mathbb E [X_{n+1}^2 -2(n+1)X_{n+1} + n(n+1)|\mathcal F_n]\\
&= \mathbb E [(X_{n}+\xi_{n+1})^2 -2(n+1)(X_{n}+\xi_{n+1}) + n(n+1)|\mathcal F_n]\\
&= \mathbb E [(X_{n}^2+\xi_{n+1}^2+2X_n\xi_{n+1}) -2(n+1)(X_{n}+\xi_{n+1}) + n(n+1)|\mathcal F_n]\\
\end{align*}
But the filtration contains $X_n$. Therefore
\begin{align*}
\mathbb E [M_{n+1}|\mathcal F_n] 
&= X_{n}^2+\mathbb E [\xi_{n+1}^2|\mathcal F_n]+2X_n\mathbb E [\xi_{n+1}|\mathcal F_n] -2(n+1)X_{n}-2(n+1)\mathbb E [\xi_{n+1}|\mathcal F_n] + n(n+1)\\
&= X_{n}^2+\mathbb E [\xi_{n+1}^2]+2X_n\mathbb E [\xi_{n+1}] -2(n+1)X_{n}-2(n+1)\mathbb E [\xi_{n+1}] + n(n+1)\\
\end{align*}
But $\mathbb E [\xi_{n+1}^2]=1$ and $\mathbb E [\xi_{n+1}]=0$
\begin{align*}
\mathbb E [M_{n+1}|\mathcal F_n] 
&= X_{n}^2+1+2X_n\times 0 -2(n+1)X_{n}-2n\times 0 + n(n+1)\\
&= X_{n}^2+1 -2(n+1)X_{n} + n(n+1)\\
&= (X_{n}^2 -2nX_{n} + n(n-1))+(2n+1)-2X_n\\
&= M_n+(2n+1)-2X_n\\
&\neq M_n\\
\end{align*}

Therefore it doesn't satisfy properties required to show this is a martingale.
