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: 
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).
Here's a potentially very simple construction for $k$-wise independent random variables, uniformly distributed on $[0, 1]$ (though admittedly I didn't work it out very carefully so hopefully the condition checks out)? There is a standard way of constructing discrete $k$-wise independent random variables: let $X\_1,\ldots, X\_{k}$ be uniform independent rvs drawn from $F$, $F$ a finite field of order $q$ ($q$ sufficiently larger than $k$, of course). Then, for $u\in F$, let $Y\_u = X\_1 + uX\_2+\cdots + u^{k-1}X\_k$. Then, the random variables $\{Y\_u : u\in F\}$ are $k$-wise independent.

Now, just divide $[0, 1]$ into $q$ evenly spaced subintervals. Let $Z\_u$ be uniform from the $Y\_u$th subinterval. The rvs $\{Z\_u : u\in F\}$ are $k$-wise independent (their joint CDF would decompose as the product of the individual CDFs, since the $\{Y\_u\}$ are $k$-wise independent), and are uniform over $[0, 1]$ since each $Y\_u$ is uniform over $F$.