TITLE: martingale and expectation
QUESTION [5 upvotes]: The following is an old exam problem:
Let $\{X_n\}$, $n\geq0$, be a process adapted to a filtration $F_n$. Prove that $(X_n,F_n)$ is a martingale, if and only if for all bounded $F_n$-stopping time $\tau$, $EX_{\tau}=EX_0$ holds.
I know if $X_n$ is a martingale, then $X_{\tau}$ is a martingale by optional stopping theorem. Hence $E(X_{\tau})=E(E(X_{\tau}|F_{0}))=E(X_0)$. However I have trouble connecting the expectation to the conditional expectation for the other direction. It seems like it needs some smart way to define $\tau$ while I haven't thought of one. Thanks for any help.

REPLY [5 votes]: Let $A \in F_{n-1}$ and define $\tau =n-1$ on $A$,$\tau =n$ on $A^c$. Check that this is a stopping time.
Now
$$
E(X_{n-1} 1_A) +E(X_n 1_{A^c}) =E X_\tau= EX_0 = E X_n = E(X_n 1_A) + E(X_n 1_{A^c}),
$$
which shows what you want (why?).