# Martingale oscillating between three values

I'm self-studying Martingales. I came accross the following exercise (exercise 4.3.1.) in Durrett's Probability Theory and Examples (5th Edition).

Exercise. Give an example of a martingale $$X_n$$ with $$\sup_n|X_n|<\infty$$ and $$\mathbb P(X_n = a \text{ i. o. } )=1$$ for $$a=-1,0,1$$.

Attempt 1.

I think that something in the following lines works.

Fix the probability space $$(\Omega,\mathcal F,\mathbb P)$$. Define the independent sequence of random variables $$\xi_k$$ such that

$$\mathbb P(\xi_k= 0) = \frac 1{k^2}, \ \ \ \ \mathbb P(\xi_k = 1) = 1-\frac{1}{k^2}$$ Then I set \begin{align*} X_n = \sum_{k=1}^n (-1)^k (\xi_k-\mathbb E[\xi_k]) \end{align*} This $$X_n$$ is a martingale with respect to its natural filtration. I know from the First Borel Cantelli that for $$\mathbb P$$-a.s. $$\omega \in \Omega$$ after some index $$K$$ we have $$\xi_k(\omega)=1$$ for all $$k>K$$. So I guess that I can say that $$X_k$$ is almost surely oscillating. I think it is very clear that this does not mean that it oscillates between the three values $$-1,0$$ and $$1$$.

I think that something like that works, but I am at the same time skeptic about that because $$|X_{n+1}-X_n| = |\xi_{n+1}-\mathbb E[\xi_{n+1}]| \leq 2$$ But then from a previous theorem (in the same book) I know that $$X_n$$ either converges or oscillates between $$-\infty$$ and $$\infty$$ which makes the confusion only worse.

This means that if I take $$X_n= \sum_{k=1}^n \eta_k$$ with $$\eta_k$$ independent random variables, then we should have that $$|\eta_k|$$ is not bounded by a real number.

Attempt 2.

I thought maybe three values for $$a$$ is a little difficult. I tried to construct one martingale oscillating between two values. Let $$U_n$$ and $$V_n$$ be two Martingales w.r.t. some filtration $$\mathcal F_n$$ that converge to $$0$$ and $$1$$ respectively. Let $$A_n$$ be a Bernouilli random variable that is predictable. Then I take $$X_n$$ as $$X_n = A_n U_n + (1-A_n)V_n$$ This $$X_n$$ is clearly a Martingale, but I don't know how to proceed rigorously or if it even works. How can I make sure that for almost surely $$\omega\in\Omega$$ the sequence $$A_n(\omega)$$ is oscillating?

Let $$(Y_n)_{n \in \mathbb{N}}$$ be a sequence of independent random variables such that

$$\mathbb{P}(Y_n = 1) = \mathbb{P}(Y_n=-1) = \frac{1}{2n} \qquad \mathbb{P}(Y_n=0) = 1- \frac{1}{n}.$$

If we define

$$X_n := \begin{cases} Y_n, & X_{n-1} = 0, \\ n X_{n-1} |Y_n|, & X_{n-1} \neq 0 \end{cases} \qquad X_0 := 0$$

then the process $$(X_n)_{n \in \mathbb{N}_0}$$ is a martingale with respect to $$\mathcal{F}_n := \sigma(Y_k; k \leq n)$$. Indeed:

\begin{align*} \mathbb{E}(X_n \mid \mathcal{F}_{n-1}) &= 1_{\{X_{n-1}=0\}} \underbrace{\mathbb{E}(Y_n \mid \mathcal{F}_{n-1})}_{=\mathbb{E}(Y_n)=0} + n 1_{\{X_{n-1} \neq 0\}} X_{n-1} \underbrace{\mathbb{E}(|Y_n| \mid \mathcal{F}_{n-1})}_{=\mathbb{E}(|Y_n|) = 1/n} \\ &= 0 \cdot 1_{\{X_{n-1}=0\}} + 1_{\{X_{n-1} \neq 0\}} X_{n-1} = X_{n-1}. \end{align*}

For any fixed $$a \in \{-1,0,1\}$$ we have

\begin{align*} \sum_{n \geq 1} \mathbb{P}(Y_{2n}=0, Y_{2n+1}=a) &= \sum_{n \geq 1} \mathbb{P}(Y_{2n}=0) \mathbb{P}(Y_{2n+1}=a) \\ &\geq \sum_{n \geq 1} \left(1-\frac{1}{2n} \right) \frac{1}{2(2n+1)} = \infty, \end{align*}

and therefore the Borel-Cantelli lemma shows that for almost all $$\omega$$ it happens for infinitely many $$n \in \mathbb{N}$$ that $$Y_{2n}(\omega)=0$$, $$Y_{2n+1}(\omega)=a$$. By the very definition, this implies that $$X_{2n}(\omega)=0$$ and $$X_{2n+1}(\omega)=Y_{2n+1}(\omega)=a$$ for any such $$n \in \mathbb{N}$$. Consequently, we have shown that $$\mathbb{P}(X_k = a \, \, \text{infinitely often})=1$$ for any $$a \in \{-1,0,1\}$$. It remains to prove that $$\sup_{n \in \mathbb{N}} |X_n(\omega)| < \infty \quad \text{a.s.}$$ To this end, we note that $$\sum_{n \geq 1} \mathbb{P}(Y_n \neq 0, Y_{n+1} \neq 0) = \sum_{n \geq 1} \mathbb{P}(Y_n \neq 0) \mathbb{P}(Y_{n+1} \neq 0) \leq \sum_{n \geq 1} \frac{1}{n^2} < \infty,$$ applying the Borel-Cantelli lemma we find that for almost all $$\omega$$ we can choose $$N=N(\omega)$$ such that $$Y_{n}(\omega) \neq 0 \implies Y_{n+1}(\omega)=0 \quad \text{for all n \geq N.}$$ As $$X_n(\omega) \neq 0 \implies Y_n(\omega) \neq 0 \quad \text{and} \quad Y_{n+1}(\omega) = 0 \implies X_{n+1}(\omega)=0$$ this means that $$X_n(\omega) \neq 0 \implies X_{n+1}(\omega)=0 \quad \text{for all n \geq N.}$$ By the definition of $$X_n$$, this implies that $$|X_n(\omega)| \leq |Y_n(\omega)| \leq 1$$ for all $$n \geq N$$. Thus, $$\sup_{n \in \mathbb{N}} |X_n(\omega)| \leq \sup_{n \leq N} |X_n(\omega)| + 1<\infty.$$

• I liked it! Many thanks! I would never construct such martingale. So I have one last question, is it just experience or is this example based on something one could easily think of? Commented Oct 22, 2018 at 17:20
• @Shashi With increasing experience/practice with martingales it certainly becomes easier to construct counterexamples to certain statements, but this particular (counter)example took me quite a while to figure out. Roughly, the idea is that $(Y_n)_{n \in \mathbb{N}}$ has all the desired properties except that it is not a martingale... so we have to "perturb" it a bit to get a martingale.
– saz
Commented Oct 22, 2018 at 17:31
• yes thanks again!! Commented Oct 22, 2018 at 18:03
• it's worth mentioning that this is an example of a martingale that converges to zero in probability, but not almost surely.
– Alan
Commented Jul 3, 2021 at 21:51