Martingales huh? I am a bit confused in my reading of martingales. I am using Breiman's book and there is an example that doesn't quite make sense to me. Let us define a sequence of random variables in this way: 
Let $Y_0=0$  and $Y_1,Y_2,\ldots$  i.i.d. with distribution $P[Y_i=1]=p$  and $P[Y_i=-1]=1-p$  for some $p\in(0,1)$ . Define $X_n:=\sum_{i=0}^n Y_i$. Then he says: If $p=\frac{1}{2}$ , then $(X_n)_{n\in\mathbb{N}}$  is a martingale with respect to its natural filtration $\mathcal{F}_n^X:=\sigma(X_0,\ldots,X_n)$. I dont really understand this statement, because I have to show that $E[X_{n}\mid\mathcal{F}_{s}]=X_{s}$  whenever $n\geq s$ , and I have no idea why this has to be true. By definition of conditional expectation, for any $A\in\mathcal{F}_{s}$  , we have $\int_{A}E[X_{n}\mid\mathcal{F}_{s}]=\int_{A}X_{n}\, dP=\int_{A}\, X_{s}\, dP$ . For some reason, $p=\frac{1}{2}$  should play a role here. I don't really see it. 
 A: The trick here is to write recursively. You want to show that $E[X_{n+1}\mid\mathcal{F}_{n}]=X_{n}$ . To see this, write $X_{n+1}=X_{n}+Y_{n+1}$ . Then, by the linearity of conditional expectation (which follows from the linearity of the Lebesgue integral), one has $E[X_{n+1}\mid\mathcal{F}_{n}]=E[X_{n}+Y_{n+1}\mid\mathcal{F}_{n}]=E[X_{n}\mid\mathcal{F}_{n}]+E[Y_{n+1}\mid\mathcal{F}_{n}]$ . By defintion of a martingale, $X_{n}$  is $\mathcal{F}_{n}$ -measurable, and so by another property of conditional expectations, $E[X_{n}\mid\mathcal{F}_{n}]=X_{n}$ . It remains to show that $E[Y_{n+1}\mid\mathcal{F}_{n}]=0$  almost surely (with respect to the probability measure $P$  ) , and this is where $p=\frac{1}{2}$  comes into play. Note by the definition of conditional expectation that for any $A\in\mathcal{F}_{n}$ , $\int_{A}E[Y_{n+1}\mid\mathcal{F}_{n}]\, dP=\int_{A}Y_{n+1}\, dP$ . Note that $\int_{A}Y_{n+1}\, dP=0$ , since we are given that $P[Y_{n+1}=1]=\frac{1}{2}$  and $P[Y_{n+1}=-1]=\frac{1}{2}$ . Now note that if it were that case for $p<\frac{1}{2}$ , then it is easy to see that $\int_{A}\, Y_{n+1}\, dP<0$ , and in fact, $E[X_{n+1}\mid\mathcal{F}_{n}]<X_{n}$ , which makes the stochastic process $(X_{n})_{n\in\mathbb{N}}$  a submartingale. Analogously, when $p>\frac{1}{2}$ , then we have a supermartingale. 
