# Show that $R_{n}^{2}-n$ and $(-1)^{n} \cos(\pi R_{n})$ are $\mathcal F_{n}$-martingales

Let $X_{i}, i\ge 1$, be i.i.d. random variables defined on a probability space $(\Omega, \mathcal F,P)$ such that $P(X_{i}=1)=P(X_{i}=-1)=\frac{1}{2}$. Consider the filtration $\mathcal F_{n}=\sigma(X_{1},\dots,X_{n})$ on this space and the random walk $R_{i}=\sum_{i=1}^{n} X_{i}$.

Show that $R_{n}^{2}-n$ and $(-1)^{n} \cos(\pi R_{n})$ are $\mathcal F_{n}$-martingales.

Simply write $R_n=R_{n-1}+X_n$ and take the conditional expectations with respect to $\mathcal{F}_n$. Then exploit the fact that
$$E[g(X_n)f(R_{n-1})|\mathcal{F}_n]=f(R_{n-1})Eg(X_n),$$ for any measurable functions $f$ and $g$ (assuming that the expectations exist). Also recall the formula
$$\cos(\alpha+\beta)=\cos\alpha\cos\beta-\sin\alpha\sin\beta$$.
• @mpiktas.thank you for your help. I can solve $R_{n}^2-n$ but in $(-1)^{n}cos(\pi R_{n})$ I came to the conclusion that $$E[(-1)^{n+1}cos(\pi R_{n+1})|\mathcal F_{n}]=(-1)^{n+1}.cos(\pi R_{n})E[cos(\pi X_{1})]$$ if it possible for you help me to solve this part of question.thanks – pual ambagher Nov 6 '13 at 20:59
• Surely you mean $E\cos(\pi X_{n+1})$? Either way calculate it and show that it is equal to -1. Recall that for discrete random variables $Eg(X)=\sum g(x_i)P(X=x_i)$. In your case $x_i$ are $1$ and $-1$ and you have helpful $\pi$ to multiply. – mpiktas Nov 7 '13 at 7:35
• @mpiktas.means can I write $$E[cos(\pi X_{n+1})]=cos(\pi E(X_{n+1}))?$$ – pual ambagher Nov 7 '13 at 8:52
• No. You can write $E[cos\pi X_{n+1}]=\cos\pi/2+\cos(-\pi)/2$. – mpiktas Nov 7 '13 at 12:18