# Condition for Interchange of expectation and summation

Let $$X_n$$ and $$Y_n$$ be two different and independent random variables for $$n = \{1,2, ...\}$$. We cannot say $$X_i$$ and $$Y_j$$ are independent if $$i \neq j$$. The values of $$X_n$$ is $$R$$ while the values of $$Y_n$$ are non-negative.

We want to calculate $$E[\sum\limits_{i=1}^{\infty} X_i Y_i]$$.

My question is:

Can we use $$E[\sum\limits_{i=1}^{\infty} X_i Y_j] = \sum\limits_{i=1}^{\infty} E[X_iY_i]$$ even $$X_i$$ is not non-negative? I am a little confused about the condition of interchanging expectation and summation.

I tried to understand the similar question(Interchange of expectation and summation) but failed.

## 1 Answer

No, it is not true. Suppose $$X_{2n}=1$$ and $$X_{2n+1}=-1$$ with probability $$1$$, and $$Y_i=1$$ with probability $$1$$. Then neither series converges.