TITLE: Doob's inequality in probability
QUESTION [6 upvotes]: In the book "Optimal Stopping and Free-Boundary Problems" there is given Doob's inequality of the following form. 

Let $X = (X_t,F_t)$ be a submartingale. Then for any $\varepsilon>0$ and each $T>0$
  $$
\mathsf P\left\{\sup\limits_{t\leq T}|X_t|\geq \varepsilon\right\}\leq \frac 1\varepsilon \sup\limits_{t\leq T}\,\,\,\mathsf E\,|X_t|.
$$

On the other hand, George Lowther presented the following example. Let $X_0 = 0$, 
$$
X_1 = \begin{cases}
1, &\quad p = 1/3;
\\
0, &\quad p = 1/3;
\\
-1,&\quad p =1/3.
\end{cases}
$$
and $X_2 = 1$ if $X_1 = 1$, $X_2 = 0$ if $X_1 = -1$ and
$$
X_2 = \begin{cases}
1, &\quad p = 1/2;
\
-1,&\quad p =1/2.
\end{cases}
$$
if $X_1 = 0$. Finally, $X_n = X_2$ for all $n\geq 2$.
It is easy to check that this is a submartingale. On the other hand, for $\varepsilon = 1$ we have
$$
\mathsf P\left\{\sup\limits_{n\leq 2}|X_n|\geq 1\right\} = 1
$$
but $\mathsf E[|X_0|] = 0$, $\mathsf E[|X_1|] = 2/3$ and $\mathsf E[|X_2|] = 2/3$ - so we have inequality $1\leq 2/3$. 
Could you help with finding a mistake since I am confused?
The reference can be seen here: 
http://books.google.com/books?id=UinZbLqpUDEC&pg=PA60&source=gbs_toc_r&cad=4#v=onepage&q&f=false page 62.
This question raised from the discussion here:
Bounds for submartingale

REPLY [4 votes]: Doob inequality is stated for nonnegative submartingales $X_t$:    
$$E\sup_{t\le T}X_t\le EX_T$$
Note, no modulus. In your case you have a submartingale $X_t$, which is not nonnegative. Furthermore $|X_t|$ is not actualy a submartingale, so you cannot apply this inequality here.
The probability space here is $\Omega=\{\omega_1,...,\omega_4\}$, with $P(\{\omega_1\})=1/3$, $P(\{\omega_2\})=1/3$, $P(\{\omega_3\})=1/6$ and $P(\{\omega_4\})=1/6$. 
We have $X_1(\omega_1,...,\omega_4)=(1,-1,0,0)$ and $X_2(\omega_1,...,\omega_4)=(1,0,1,-1)$. Now $Y_1=|X_1|=(1,1,0,0)$  and $Y_2=|X_2|=(1,0,1,1)$ and we have that 
$$E(Y_2|Y_1)=(1/3,1/3,1,1)$$
Update: I've finaly found the correct answer in another book of Shyriaev (page 492, Probability, second edition, 1995). The actual inequality for any submartingales is 
$$P(\sup_{t\le T}|X_t|>\varepsilon)\le \frac{3}{\varepsilon}\sup_{t\le T}E|X_t|$$
Note the missing constant 3. This means that there is an error in the book in the link.