# Does there exist random variables such that any strict subset of $\{ X_1, X_2, ... X_n\}$ is independent but $X_1, X_2, ... X_n$ are not independent?

Let $n$ be any positive integer larger than $1$. I want to construct random variables $X_1, X_2, ... X_n$such that any strict subset of $\{ X_1, X_2, ... X_n\}$ is independent but $X_1, X_2, ... X_n$ are not independent. Any hints or reference are appreciated.

• The case $n=2$ is trivial.
– J.G.
Commented Sep 16, 2018 at 8:28

Let $$X_1$$, ... , $$X_{n-1}$$ be i.i.d random variable taking values in $$\lbrace -1, 1 \rbrace$$ uniformly and let $$X_n = \prod_{i=1}^{n-1} X_i$$ Clearly they are not independent but if you take any subset of those of size at most $$n-1$$, they are independent:
Let $$A\subsetneq \lbrace 1, \dots , n\rbrace$$, if $$n\notin A$$ then independence is trivial so suppose $$n\in A$$. In that case there is $$i\in[1:n-1]$$ such that $$i\notin A$$ but the distribution of all the variables can be rewritten, by symmetry, as $$\lbrace X_j \rbrace_{j\neq i}$$ are i.i.d random variable uniformly distributed in $$\lbrace -1, 1 \rbrace$$ and $$X_i=\prod\limits_{j\neq i} X_j$$ and so the subset is independent.
• Slight quibble. If the values are in $\{-1,1\}$ rather than $\{0,1\}$ they are not Bernoulli. If you wish, $X_j = 2 Y_j - 1$ where $Y_j$ is Bernoulli. Commented Sep 16, 2018 at 8:03
• I guess something is not clear here.. How $X_i$ takes values in $\{-1,1\}$ and later you say it takes values in $\{0,1\}$? Commented Feb 2, 2019 at 19:12