Here is a construction that I find worth knowing.
Let $n\geqslant2$ and $K_n=\{0,1\}^n$ denote a discrete hypercube of dimension $n$. Assume that the random vector $Y^{(n)}=(Y_i)_{1\leqslant i\leqslant n}$ is uniformly distributed on $K_n$, hence $(Y_i)_{1\leqslant i\leqslant n}$ is a family of i.i.d. uniform Bernoulli random variables. For any proper subset $I$ of $\{1,2,\ldots,n\}$, let $Y^I=(Y_i)_{i\in I}$ and $K_I=\{0,1\}^I$. And now, the key part:
Let $L_n\subset K_n$ denote the set of points $(x_i)_{1\leqslant i\leqslant n}$ in $K_n$ such that $\sum\limits_{i=1}^nx_i$ is even.
Assume first that $n=3$.
- Show that, conditionally on $[Y^{(3)}\in L_3]$, $Y^{(3)}$ is distributed like $(X_1,X_2,X_3)$ in your homework.
For every $n\geqslant2$, show the following:
- The random vector $Y^I$ is uniformly distributed on $K_I$. Equivalently, $Y^I$ is i.i.d. uniform Bernoulli.
- Conditionally on $[Y^{(n)}\in L_n]$, $Y^{(n)}$ is not independent.
- Conditionally on $[Y^{(n)}\in L_n]$, $Y^I$ is uniformly distributed on $K_I$. Equivalently, conditionally on $[Y^{(n)}\in L_n]$, $Y^I$ is i.i.d. uniform Bernoulli.
For example:
Conditionally on $[Y^{(n)}\in L_n]$, $Y^{(n)}$ is not independent but any $n-1$ of its coordinates are independent (and distributed uniformly on $K_{n-1}$).