Question: By considering the set $\{1,2,3,4\}$, one can easily come up with an [example](https://en.wikipedia.org/wiki/Pairwise_independence) (attributed to S. Bernstein) of pairwise independent but not independent random variables. 

Counld anybody give an example with [continuous random variables](https://en.wikipedia.org/wiki/Probability_distribution#Continuous_probability_distribution)?

Answer: 
Let $x,y,z'$ be normally distributed, with $0$ mean. Define $$z=\begin{cases} z' & xyz'\ge 0\\ -z' & xyz'<0\end{cases}$$
The resulting $x,y,z$ will always satisfy $xyz\ge 0$, but be pairwise independent.
The continuous analog of the Bernstein example: Divide up the unit cube into eight congruent subcubes of side length $1/2$. Select four of these cubes: Subcube #1 has one vertex at $(x,y,z)=(1,0,0)$, subcube #2 has one vertex at $(0,1,0)$, subcube #3 has one vertex at $(0,0,1)$, and subcube #4 has one vertex at $(1,1,1)$. (To visualize this, you have two layers of cubes: the bottom layer has two cubes in a diagonal formation, and the top layer has two cubes in the opposite diagonal formation.)

Now let $(X,Y,Z)$ be uniform over these four cubes. Clearly $X, Y, Z$ are not mutually independent, but every pair of variables $(X,Y)$, $(X,Z)$, $(Y,Z)$ is uniform over the unit square (and hence independent).