# Are all variables in a set of random variables independent if all pairs are independent?

If I have a sequence of random variables $X_1, X_2, \ldots, X_n$ (possibly infinite) such that all pairwise cdf's are factorized:

$$F(X_i, X_j) = F_i(X_i) F_j(X_j)$$

for all pairs $(X_i, X_j)$, does it mean that the joint cdf is also factorized? That is:

$$F(X_1, \ldots, X_n) = \prod_{i=1}^{n} F_i(X_i)$$

In other words, if I prove that each pair in the sequence is statistically independent of each other, can longer sequences still be non-independent?

It seems to me that they can, but I can't come up with a counter example.

-

The simplest of the many standard counterexamples is when $(X_1,X_2,X_3)$ takes the values $(1,1,1)$, $(1,0,0)$, $(0,1,0)$ and $(0,0,1)$ all equiprobably.

-
hummmm! I see. Pairwise they are all independent, but knowing any two of them completely determines the third. Neat! Thanks. –  Rorsa Feb 8 '13 at 13:38
–  Terry Tao Feb 8 '13 at 16:58

Steven's example is indeed the simplest. See chapter 3 of this book for counterexamples to lots of similar possibilities.

-
The link is for: J. M. Stoyanov, Counterexamples in Probability. (With the copyright page ommitted.) I don't know whether this is an authorized on-ine version, or a pirated copy. –  Gerald Edgar Feb 8 '13 at 15:21