# Convergence almost surely of Bernoulli distributed random varibles

I proved that given a sequence of Bernoulli distributed random variables $$X_n$$ with parameter $$1/n$$ they do NOT converge to $$X=0$$ a.s. using the Borel-Cantelli lemma.

My doubt is: If I have the space $$\Omega=[0,1]$$ with the Lebesgue measure and a sequence of random variables such that $$X_n(x)=\begin{cases}1 &~ x \in [0,1/n]\\ 0 &\textrm{otherwise}, \end{cases}$$ this is a sequence of Bernoulli random variables with parameter $$1/n$$ and they also converge to $$X=0$$ almost sure using the definition of convergence almost sure. But this is a contradiction to what I said above. Please help me to understand where i'm wrong.

• What is $x$ in your definition of $X_n(x)$? Apr 18, 2023 at 12:53
• If you proved the initial statement correctly, then you made some unstated assumptions about that sequence. Perhaps you are assuming the variables are independent? For otherwise the conclusion does not necessarily follow.
– whuber
Apr 18, 2023 at 12:59
• @SextusEmpiricus x is an element of [0,1] Apr 18, 2023 at 14:28
• @whuber Yes i assumed that they were independent. But in my example they are not. Right? Apr 18, 2023 at 14:30
• Well, let's check. Observe $\Pr(X_2=1)=1/2,$ $\Pr(X_3=1)=1/3,$ and $\Pr(X_2=1,X_3=1)=1/3\ne 1/2\times 1/3.$ Thus $(X_2,X_3)$ are not independent.
– whuber
Apr 18, 2023 at 15:00

If you take the Wikipedia article about the Borel–Cantelli lemma then it is actually made up of two different statements.

• The first lemma applies if "the sum of the probabilities of the events $$\{E_n\}$$ is finite". That is not the case here as the sum is infinite.

• The second lemma applies if "$$\sum\limits^{\infty}_{n = 1} \Pr(E_n) = \infty$$ and the events $$(E_n)^{\infty}_{n = 1}$$ are independent". In your example the events are not independent: as an illustration you have $$X_{n}=1 \implies x\le \frac1n \implies X_{n-k}=1$$ for $$0

So neither Borel–Cantelli lemma applies to your example and you need to resolve it another way, as you have done.

• Thank you so much for your answer! can you please explain better why they are not independent? Apr 18, 2023 at 11:56
• I thought my $X_{n}=1 \implies X_{n-k}=1$ did that. As another way of looking at it, suppose $n <m$: if they were independent then you would have $P(X_m=1 \mid X_n=1)=P(X_m=1)=\frac{1}{m}$ but in your example $P(X_m=1 \mid X_n=1)=P(X_m=1,X_n=1)/P(X_n=1)=\frac{1/m}{1/n}=\frac{n}{m}$ so they are not independent Apr 18, 2023 at 12:03
• Am I missing something in the question? While reading it I assumed that the sequence $X_1, X_2, X_3, \dots$ is just a sequence of independent Bernoulli distributed variables with a decreasing parameter. Apr 18, 2023 at 12:46
• @SextusEmpiricus My reading of the "my doubt is" example that that $x$ is a uniform random variable on $[0,1]$ but once chosen is then the same for all $X_n$ (making the $X_n$ dependent), and that gives the almost sure convergence. If $x$ was different (and independent) for each $X_n$ then the $X_n$ would be independent but you would not have almost sure convergence instead only having convergence in probability. This illustrates why the second lemma is not the simple complement of the first lemma. Apr 18, 2023 at 12:59
• I cannot make sense of that, because "iid" means they have identical distributions but in your question all the distributions have different parameters. If you want a sequence of independent Bernoulli$(1/n)$ variables for $n=1,2,3,\ldots$ that do not converge a.s., consider the binary variables $X_n$ that equal $1$ on all the intervals of length $1/n!$ originating at $0,$ $1/(n-1)!,$ $2/(n-1)!,$ $\ldots, ((n-1)!-1)/(n-1)!.$
– whuber
Apr 18, 2023 at 15:12