# If $X_n \overset{a.s.}\to X$,$Y_n\overset{a.s.}\to Y$, when are $X$ and $Y$ independent?

Consider two sequences of r.v's $\{X_n\}$ and $\{Y_n\}$. Suppose $X_n$ and $Y_m$ are independent for any $m,n\in\mathbb{N}$. Suppose $X_n\overset{a.s.}\to X$ and $Y_n\overset{a.s.}\to Y$. Is it true that $X$ and $Y$ are independent? What if we weaken the condition from a.s. convergence to convergence in probability?

I can show that for any continuous bounded function $f$ and $g$, $\mathbb{E}\left[ f(X) g(Y)\right] = \mathbb{E}\left[f(X)\right] \mathbb{E}\left[g(Y)\right]$. But I don't know how to proceed from here (since identity function is not bounded).

• Alternatively, you can show that $\sigma(X_1, X_2, \cdots)$ and $\sigma(Y_1, Y_2,\cdots)$ are independent. Commented Jan 18, 2018 at 13:46
• @SangchulLee That is definitely not true in general. Consider $X_1,X_2$ which are iid Bernoulli(1/2) and $Y_1:=(X_1+X_2) \pmod 2$. Then each $X_i$ is independent of $Y_1$ but clearly $(X_1,X_2)$ is not independent of $Y_1$. If you want an example with infinite sequences then just define the remaining $X_i$ and $Y_j$ to be $0$. In order for your statement to be true, you need independence of finite-dimensional marginals of $(X_i)$ and $(Y_j)$, not just one-dimensional marginals. Commented Jan 19, 2018 at 5:38
• @Shalop, Oh I see, you are right. It is almost the same as the observation that pairwise independence does not upgrade to mutual independence in general. Commented Jan 19, 2018 at 5:42

Equality $$\tag{*}\mathbb{E}\left[ f(X) g(Y)\right] = \mathbb{E}\left[f(X)\right] \mathbb{E}\left[g(Y)\right]$$ for all continuous and bounded functions $f$ and $g$
is sufficient to guarantee independence between $X$ and $Y$. Indeed, fix real numbers $s$ and $t$ and consider for a fixed integer $n$ a continuous and bounded function $f_n$ defined by $f_n(x)=1$ if $x\leqslant t$, $0$ if $x\geqslant t+n^{-1}$ and affine interpolation between $t$ and $t+n^{-1}$. Let $g_n$ be defined similarly with $t$ replaced by $s$. Apply (*) with $f_n$ and $g_n$ instead of $f$ and $g$ respectively and use the monotone convergence theorem to get that $$\mathbb P\left(\left\{X\leqslant s\right\}\cap \left\{Y\leqslant t\right\}\right)=\mathbb P\left(\left\{X\leqslant s\right\}\right)\cdot \mathbb P\left(\left\{Y\leqslant t\right\}\right).$$
Find an increasing sequence $\left(n_j\right)_{j\geqslant 1}$ of integers such that the sequences $\left(X_{n_j}\right)_{j\geqslant 1}$ and $\left(Y_{n_j}\right)_{j\geqslant 1}$ converge to $X$ and $Y$ respectively.
• Just to clarify, $f$ and $g$ in the expression $(*)$ are continuous bounded functions, is that correct? Commented Jan 18, 2018 at 12:13
• I misunderstood that it suffices to show that $E(XY) = E(X)E(Y)$. In fact, we need to show that $E(f(X)g(Y)) = E(f(X))E(g(Y))$ for all bounded measurable functions, is that correct? I don't quite understand how we are approximating an arbitrary measurable function here... Commented Jan 18, 2018 at 13:08
• @iseliget, Although it depends on how independence is defined, in view of the usual definition it suffices to prove that $P(X \leq s, Y \leq y) = P(X \leq s)P(Y \leq t)$ for any $s, t \in \mathbb{R}$. This is what this answer is trying to demonstrate. Commented Jan 18, 2018 at 13:42