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. 



Are all variables in a set of random variables independent if all pairs are independent?
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.


