# How to show $M_n = X_n^2-n$ is a martingale?

Let $X_n, n = 0, 1, 2, . . .$ denote an unbiased Normal Random Walk. $X_0 = 10$, and $X_{n+1} = X_n + Y_{n+1}$, with $\{Y_n\}$ are i.i.d. $N(0, 1)$.

Then how can I show that:

A) $M_n = X_n^2-n$ is a martingale

Find the value of:

B) $\mathbb{E}M_{20}$

Does the answer lie in reformulation $X_n = X_{n+1} - Y_{n+1}$ ?

And then:

$$X_n = X_{n+1} - Y_{n+1} \implies X_n^2 = (X_{n+1})^2 - 2X_{n+1}Y_{n+1} + (Y_{n+1})^2$$

And then we proceed with

$$\mathbb{E}[(X_{n+1})^2 - 2X_{n+1}Y_{n+1} + (Y_{n+1})^2 -n| \mathcal{F}_s], s \leq n+1$$

$$\mathbb{E}[(X_{n+1})^2 | \mathcal{F}_s] - 2\mathbb{E}[X_{n+1}Y_{n+1}|\mathcal{F}_s] + \mathbb{E}[(Y_{n+1})^2|\mathcal{F}_s] - \mathbb{E}[n | \mathcal{F}_s]$$

Is this right so far? if not, where I have I made a mistake, and how should I proceed?

• It seems that you are trying to calculate $\mathbb{E}(M_n \mid \mathcal{F}_s)$, $s \leq n+1$. However, in order to prove $(M_n)_n$ are martingale, you have to calculate $\mathbb{E}(M_n \mid \mathcal{F}_s)$ for $s \leq n-1$. In particular, instead of writing $X_n = X_{n+1}-Y_{n-1}$ you should use the relation $$X_n = X_{n-1}+Y_n.$$ – saz May 17 '15 at 11:30
• Thanks @saz. I am sure I have asked you this before, but would you be able to recommend any textbooks for undergrads on martingales, brownian motion and stochastic differentials? – elbarto May 17 '15 at 11:34
• A book that I found to be very good for undergrads with detailed explanation on martingales, brownian motion etc is the two volumes of stochastic processes by Samuel Karlin. The link has reference only to the first volume though. – Samrat Mukhopadhyay May 17 '15 at 11:42
• Thanks @SamratMukhopadhyay I will check it out – elbarto May 17 '15 at 11:46
• Samrat this book is epic!! thank you man!! ~_~ – elbarto May 17 '15 at 12:13

For $s\le n$, $$\mathbb{E}(M_{n+1}\mid \mathcal{F}_s)=\mathbb{E}((X_n+Y_{n+1})^2-(n+1)\mid \mathcal{F}_s)\\=X_n^2+2X_n\mathbb{E}(Y_{n+1})+\mathbb{E}(Y_{n+1}^2)-(n+1)\\=X_n^2-n=M_n$$ the steps have used the fact that $Y_n$ is an i.i.d. $\mathcal{N}(0,1)$ sequence. The possible mistake that you are making in your approach is the one rightly pointed out by @saz in the comments.

For part (B) $$\mathbb{E}M_n=\mathbb{E}X_n^2-n$$ Note that $X_n=\sum_{i=1}^n Y_i+X_0\implies \mathbb{E}X_n^2=n+X_0^2\implies \mathbb{E}M_n=X_0^2$

• What is it about $X_n^2$ which lets us determine it isn't random? It is just because $X_n$ is a martingale, but is there a proof for it? – elbarto May 17 '15 at 11:37
• Note that we are conditioning on $X_0,\cdots,\ X_n$. – Samrat Mukhopadhyay May 17 '15 at 11:38
• Intuitively it makes sense I guess. Thanks! To find $\mathbb{E}M_{20}$ How would I determine $X_{20} ^2$ ? Additionally, (and sorry to bother you), but what motivated you to attempt the problem by considering $M_{n+1}$ ? I would not figured to think of approaching the problem this way – elbarto May 17 '15 at 11:39
• I think you have to use the optional sampling theorem – Samrat Mukhopadhyay May 17 '15 at 11:45
• Thanks for that, it's in my notes although I had not covered it yet! :) – elbarto May 17 '15 at 11:47

Let's look at $\mathbb{E}[X_{n+1}^2-(n+1)|F_n]$ (take $s=n$). We need show it equals to $X_n^2-n$. Since $X_{n+1}=X_n+ Y_{n+1}$ It should be $$\mathbb{E}[X_{n}^2|F_n]+2\mathbb{E}[X_{n}Y_{n+1}|F_n]+\mathbb{E}[Y_{n+1}^2|F_n]-\mathbb{E}[n+1|F_n]$$, Since $X_{n}$ is measurable w.r.t. $F_n$, and $Y_{n+1}$ is independent of $F_n$ (for which we can "take out what is known, and by the assumption $Y_n$ is $\mathcal{N}(0,1)$ distributed, we get above equals

$$X_{n}^2+2X_{n}\mathbb{E}[Y_{n+1}|F_n]+\mathbb{E}[Y_{n+1}^2]-(n+1),$$

$$=X_{n}^2+2X_{n}\mathbb{E}[Y_{n+1}]+\mathbb{E}[Y_{n+1}^2]-(n+1).$$ Since $\mathbb{E}[Y_{n+1}]=0$, it's easy to see $\mathbb{E}[Y_{n+1}^2]=1$. Hence we reach $$=X_{n}^2-n.$$

• thanks for your help andy :) – elbarto May 17 '15 at 13:02