# Simple example wanted: $X_n$ converges to $X$ in probability but not almost surely

I'm looking for a simple example sequence $\{X_n\}$ that converges in probability but not almost surely.

The example I have right now is Exercise 47 (1.116) from Shao:

$X_n(w) = \begin{cases}1 &k/2^m \leq w \leq k+ 1/2^m \\ 0 &o.w. \end{cases}$

for $w \in [0,1]$ and integer $m$. In this case, since $m$ is arbitrary, you can find an infinite sequence $\{n_m\}$ where $X_{n_m} (w) = 1$.

Can you provide a simpler example? Thanks!

Define a sequence of independent rv's $X_n$ where: $$P(X_n=1)=\frac{1}{n}, \;P(X_n = 0) = 1-\frac{1}{n}$$

Let $X= 0, a.s.$

Define the event $E_n:= \{X_n=1\}$, then we get:

$$\sum_{n=1}^{\infty} P(E_n) = \sum_{n=1}^{\infty} \frac{1}{n} = \infty$$

By the "converse" Borel-Cantelli Lemma: if we have a sequence of independent events and their probabilities sum to $\infty$, then the event happens infinitely often.

So, in this case, $X_n=1$ happens infinitely often, and so $X_n$ does not converge almost surely to $X$.

However,

$$\lim_{n\to\infty} P(|X_n-X|>\epsilon) =\lim_{n\to\infty} P(X_n>0) = 0 \;\;\forall \epsilon>0$$

So $X_n \xrightarrow{p} X$

• Thank you Bey, this is definitely simpler! I am also interested in a "statistically meaningful" example, a case where this property comes up while making (asymptotic) inference. – nooreen Apr 26 '16 at 14:02
• @nooreen well, the model I provided is applicable to a wide array of actual phenomena. Basically, any process that decays as $\frac{1}{n}$. Whether something is "meaningful" is quite application specific. – user75138 Apr 26 '16 at 14:28
• @nooreen also, the definition of a "consistent" estimator only requires convergence in probability. Are there cases where you've seen an estimator require convergence almost surely? – user75138 Apr 26 '16 at 14:29
• @nooreen see this post as well. It specifically discusses when, if ever, strong consistency is relevant to inference: stats.stackexchange.com/questions/2230/… – user75138 Apr 26 '16 at 14:33