Let $T_{1},T_{2},\ldots$ be an iid sequence with distribution function $F$; fix a number $x$. Define $$X_{i}=\textbf{1}_{\{T_{i}\leq x\}}-F(x),\phantom{x} i=1,2,\ldots, $$ and
$$M_{0}=0,$$
$$M_{n}=\sum_{i=1}^{n}X_{i}, \phantom{x} n\geq 1$$
a) Show that $\{M_{n},n\geq 0\}$ is a martingale and $\{M_{n}^{2},n\geq 0\}$ a submartingale.
b) Show that $\{Z_{n},n\geq 0\}$ defined by
$$Z_{n}=M_{n}^{2}-n\sigma^{2}, \phantom{x}n\geq 0,$$ where $\sigma^{2}=F(x)(1-F(x)),$ is a martingale.
I have a number of questions about solving this problem. Most of the questions are related to the way $X_{i}$ is defined.
What I have so far, updated version using the tremendous help provided by Did:
a) According to my notes a stochastic process $\{M_{n},n\geq 1\}$ is said to be a martingale process if, for all $n$
$$(i) \phantom{x} \mathbb{E}\left[\left|M_{n}\right|\right] < \infty, \\ (ii) \phantom{x} \mathbb{E}\left[M_{n+1}|M_{1},\ldots,M_{n}\right] = M_{n}.$$
And it is a submartingale if
$$(i) \phantom{x} \mathbb{E}\left[\left|M_{n}\right|\right] < \infty, \\ (ii) \phantom{x} \mathbb{E}\left[M_{n+1}|M_{1},\ldots,M_{n}\right] \geq M_{n}.$$
First we will proof that $\{M_{n},n\geq0\}$ is a martingale.
We know that $\left|X_{i}\right|\leq 1$, since $0\leq F(x)\leq 1$ and $\textbf{1}_{\{T_{i}\leq x\}}$ is an indicator function taking the value 1 when $T_{i}\leq x$ and taking the value 0 when $T_{i}> x$. So we have
$$\mathbb{E}\left[\left|M_{n}\right|\right]=\mathbb{E}\left[\left|\sum_{i=1}^{n} X_{i}\right|\right]\leq \mathbb{E}\left[\sum_{i=1}^{n}\left| X_{i}\right|\right] =\sum_{i=1}^{n}\mathbb{E}\left[\left| X_{i}\right|\right]\leq \sum_{i=1}^{n}1=n<\infty$$
Question 1: Is what I am doing here correct?
Now what remains to be shown is the martingale property. We have:
\begin{align*} \mathbb{E}\left[M_{n+1}|M_{0},\ldots,M_{n}\right] &= \mathbb{E}\left[M_{n}+X_{n+1}|M_{0},\ldots,M_{n}\right] \\ & =\mathbb{E}\left[M_{n}|M_{0},\ldots,M_{n}\right] +\mathbb{E}\left[X_{n+1}|M_{0},\ldots,M_{n}\right] \\ &= M_{n} + \mathbb{E}[X_{n+1}] \\ &= M_{n} + \mathbb{E}[\textbf{1}_{\{T_{n+1}\leq x\}}-F(x)] \\ &= M_{n} + \mathbb{E}[\textbf{1}_{\{T_{n+1}\leq x\}}]-F(x) \\ &= M_{n} + \mathbb{P}(T_{n+1}\leq x)-F(x) \\ &= M_{n} + F(x)-F(x) \\ &= M_{n}. \end{align*}
Where in the 3rd step we made use of taken out what is known and independence.
Thus indeed $\{M_{n},n\geq 0\}$ is a martingale.
Question 2: Is this correct?
Now the submartingale case. Same as before we know $\left|X_{i}\right|\leq 1$. So we have
$$\mathbb{E}\left[\left|M_{n}^{2}\right|\right]=\mathbb{E}\left[\left|\left(\sum_{i=1}^{n} X_{i}\right)^{2}\right|\right]=\mathbb{E}\left[\left|\sum_{i=1}^{n} X_{i}\cdot\sum_{i=1}^{n} X_{i}\right|\right]\leq \mathbb{E}\left[\sum_{i=1}^{n}\left| X_{i}\right|\cdot\sum_{i=1}^{n}\left| X_{i}\right|\right] = \\ \sum_{i=1}^{n}\mathbb{E}\left[\left| X_{i}\right|\right] \cdot \sum_{i=1}^{n}\mathbb{E}\left[\left| X_{i}\right|\right] \leq \sum_{i=1}^{n} 1 \cdot \sum_{i=1}^{n} 1 = n^{2} < \infty.$$
Question 3: Is this correct?
For the submartingale property we have:
\begin{align*} \mathbb{E}\left[M_{n+1}^{2}|M_{0}^{2},\ldots,M_{n}^{2}\right] &= \mathbb{E}\left[(M_{n}+X_{n+1})^{2}|M_{0}^{2},\ldots,M_{n}^{2}\right] \\ &= \mathbb{E}\left[M_{n}^{2}+2M_{n}X_{n+1}+X_{n+1}^{2}|M_{0},\ldots,M_{n}\right] \\ & =\mathbb{E}\left[M_{n}^{2}|M_{0},\ldots,M_{n}\right] +\mathbb{E}\left[2M_{n}X_{n+1}|M_{0},\ldots,M_{n}\right] +\mathbb{E}\left[X_{n+1}^{2}|M_{0},\ldots,M_{n}\right] \\ &= M_{n}^{2}+2M_{n} \mathbb{E}\left[X_{n+1}\right] +\mathbb{E}\left[X_{n+1}^{2}\right] \\ &= M_{n}^{2} +2M_{n}\cdot 0+ \mathbb{E}\left[\left(\textbf{1}_{\{T_{n+1\leq x}\}}-F(x)\right)^{2}\right] \\ &= M_{n}^{2} + (1-F(x))^{2}\mathbb{P}\left(T_{n+1}\leq x\right)+(-F(x))^{2}\mathbb{P}\left(T_{n+1}>x\right) \\ &= M_{n}^{2} + (1-F(x))^{2}F(x)+F(x)^{2}(1-F(x)) \\ &= M_{n}^{2} + (1-F(x))[(1-F(x))F(x)+F(x)^{2}] \\ &= M_{n}^{2} + (1-F(x))[F(x)-F(x)^{2}+F(x)^{2}] \\ &= M_{n}^{2} + F(x)(1-F(x)) \\ &\geq M_{n}^{2}. \end{align*}
Thus indeed $\{M_{n}^{2},n\geq 0\}$ is a submartingale.
Question 4: Is it correct?
b) Now we have
$$\mathbb{E}[ \left|Z_{n}\right|]=\mathbb{E}\left[\left|M_{n}^{2}-n\sigma^{2}\right|\right]\leq \mathbb{E}\left[\left|M_{n}^{2}\right|\right]+n\sigma^{2}<\infty,$$
since in part a) we have seen for the submartingale case that $\mathbb{E}\left[\left|M_{n}^{2}\right|\right]<\infty$, furthermore $x$ is a fixed number for function $\sigma^{2}$.
Question 5: Is this correct, what I have done here?
What is left to prove is the martingale property. First we note that
$$\mathbb{E}[Z_{n+1}|Z_{1},\ldots,Z_{n}]=\mathbb{E}[Z_{n+1}|Z_{1},\ldots,Z_{n},M_{1},\dots M_{n}].$$
We can write
\begin{align*} Z_{n+1} &= (M_{n}+X_{n+1})^{2}-(n+1)\sigma^{2} \\ &= M_{n}^{2}-n\sigma^{2}+2M_{n}X_{n+1}+X_{n+1}^{2}-\sigma^{2} \\ &= Z_{n}+2M_{n}X_{n+1}+X_{n+1}^{2}-\sigma^{2}. \end{align*}
So we get
\begin{align*} \mathbb{E}\left[Z_{n+1}|M_{1},\dots M_{n}\right] &= \mathbb{E}\left[Z_{n}+2M_{n}X_{n+1}+X_{n+1}^{2}-\sigma^{2}|M_{1},\dots M_{n}\right] \\ &= Z_{n}+2M_{n}\mathbb{E}\left[X_{n+1}|M_{1},\dots M_{n}\right]+\mathbb{E}\left[X_{n+1}^{2}|M_{1},\dots M_{n}\right]-\sigma^{2} \\ &= Z_{n}+2M_{n}\mathbb{E}\left[X_{n+1}\right]+\mathbb{E}\left[X_{n+1}^{2}\right]-\sigma^{2} \\ &= Z_{n}+2M_{n}\cdot 0 + \sigma^{2}-\sigma^{2} \\ &= Z_{n}. \end{align*}
Question 6: Is this correct?