# Almost surely in definition of Martingale

$(X_n), n \in \mathbb{N}$ is a stochastic process.

I saw in one definition of Martingale that $$E [X_{n+1} |X_0 , X_1 , . . . , X_n ] = X_n \quad a.s., \forall n \geq 0.$$

1. I understand what "almost surely" itself means. But I was wondering how to interpret the above usage of "almost surely" in the definition of Martingale? Are $X_0 , X_1 , . . . , X_n$ seen as random variables or their given deterministic values?
2. Plus, I don't see the definition of Martingale on its Wikipedia article relies on "almost surely". Is it really required?

Thanks and regards!

-
Keywords: conditional expectation with respect to a $\sigma$-algebra. See, for example, math.uwaterloo.ca/~dlmcleis/book/appendixa2.pdf, in particular Theorem A25. – Shai Covo Feb 15 '11 at 19:06
– Shai Covo Feb 15 '11 at 19:36

This is because conditional expectations can only be defined up to almost sure events.

Recall that $Z=E[X|Y]$ is defined as any random variable $Z$ such that (1) $Z$ is $\sigma(Y)$-measurable, and (2) $E[Z\varphi(Y)]=E[X\varphi(Y)]$ for every bounded measurable function $\varphi$. Hence, if $Z$ fulfills (1) and (2) and $P(Z'=Z)=1$, then $Z'$ fulfills (1) and (2) as well and $Z$ and $Z'$ have an equal right to be called $E[X|Y]$.

To sum up, $E[X|Y]$ may be seen as a whole class of random variables, each one equal to any other up to a null event.

-

A careful look at the definition of $E [X_{n+1} |X_0 , X_1 , . . . , X_n ]$ on the left hand side of the equation shows that conditional expectation is defined only almost surely. This is true for any conditional expectation $E[X | {\cal F}]$, whether conditioned on a $\sigma$-algebra or a set of random variables. This has nothing to do with martingales, per se.

Generally, the martingale equation only makes sense almost surely, even though the random variable $X_n$ on the right hand side is defined everywhere on the probability space.

On the other hand, if the $\sigma$-algebra generated by $X_0,X_1,\dots,X_n$ contains no non-trivial $P$-null sets, then the left hand side is also defined everywhere on the probability space, and the martingale identity must hold identically.

-