Example of Pairwise Independent but not Jointly Independent Random Variables?

I am asked to:

Find a joint probability distribution $P(X_1,\dots, X_n)$ such that $X_i , \, X_j$ are independent for all $i \neq j$, but $(X_1, \dots , X_n)$ are not jointly independent.

I have no idea where to start, please help.


I always remember this clear example from Probability Essentials, chapter 3, by J.Jacod & P.Protter.

Let $\Omega = \{1,2,3,4\}$, and $\mathscr{A} = 2^\Omega$. Let $P(i) = \frac{1}{4}$, where $i = 1,2,3,4$.

Let $A = \{1,2\}$, $B = \{1,3\}$, $C = \{2,3\}$. Then A,B,C are pairwise independent but are not independent.


See this link: http://faculty.washington.edu/fm1/394/Materials/2-3indep.pdf

Throw two fair dice.

Consider the events:

  • $A:=\{\text{the sum of the points is 7}\}$,
  • $B:=\{\text{the first die rolled a 3}\}$,
  • $C:=\{\text{the second die rolled a 4}\}$.

All three events have probability $\displaystyle\frac{1}{6}$.

Moreover, you can check that they are pairwise independent.

However, they are not jointly independent.

For your random variables, just take $1_A, 1_B,$ and $1_C$, the indicator functions of these events.


There's actually an even simpler example: Let X, Y, and Z be random variables, with X and Y independent Bernoulli(1/2) trials and Z equal to X xor Y. It's easy to verify that Z is pairwise independent with X: Once X has been decided, as long as Y remains unknown, Z has a 50% chance of being 1 or 0, regardless of what X is. Since X and Y are defined in the same way, Z must also be independent of Y. However, clearly they are not jointly independent, since Z can explicitly be determined by knowing X and Y.

One neat thing about this example is that, in addition to all variables being pairwise independent, the associativity of XOR means that they're also interchangeable. One could easily imagine extending this to more variables, with more complex distributions — say, a set of five of Binomial(n,1/2) distributions where the parity of the number of ith Bernoulli trials which are successes must be equal to the parity of i, based on the natural extension of the XOR relation — but I'll do the annoying thing all textbooks do and leave the proof of this as an exercise for the reader.