Probability of an event (two random variables are independent) Let $n\ge 1$ and $X_1, ...,X_n$ be i.i.d. $N(0,1)$ random variables.
Let $S_n=\sum_{i=1}^n X_i$.
Let $\varepsilon=(\varepsilon_1, ..., \varepsilon_n)$, where all $\varepsilon_i$ are i.i.d and $\varepsilon_1=+1$ or $-1$ with equal probability of $\frac{1}{2}$.
Define $S_{n,\epsilon}=\sum_{i=1}^n \varepsilon_i X_i$.
My question is how do we calculate $P[S_n \mbox{ and } S_{n,\varepsilon} \mbox{ are independent}]$ with respect to the distribution of $\varepsilon$? i.e. What is $\frac{\text{the numbers of $\varepsilon$ making $S_n$ and $S_{n,\varepsilon}$ independent}}{\text{the numbers of all possible $\varepsilon$}}?$ Thanks.

I can imagine in some situations $S_n$ and $S_{n,\varepsilon}$ are dependent (cf. here), but I cannot even think of a concrete situation where $S_n$ and $S_{n,\varepsilon}$ are independent. Any help will be appreciated.
 A: Fix $\varepsilon\in\{\pm 1\}^n$.

Let $A=\{i:\varepsilon_i=1\}$, and let $B=\{i:\varepsilon_i=-1\}$.

If $B={\large{\varnothing}}$ then $S_{n,\varepsilon}=S_n$, and if $A={\large{\varnothing}}$ then $S_{n,\varepsilon}=-S_n$, so in both of those cases, the random variables $S_{n,\varepsilon},S_n$ are dependent.

Next assume $A,B$ are both nonempty.

Let random variables $Y,Z$ be given by
$$
\left\{
\begin{align*}
Y&=\sum_{i\in A}\varepsilon_iX_i\\[4pt]
Z&=\sum_{i\in B}\varepsilon_iX_i\\[4pt]
\end{align*}
\right.
$$
Since $X_1,...,X_n$ are i.i.d. $\mathcal{N}(0,1)$ random variables, we get that

*

*$Y,Z$ are independent.$\\[4pt]$

*$(Y,Z)$ are jointly normal.$\\[4pt]$

*$Y\sim\mathcal{N}(0,|A|)$ and $Z\sim\mathcal{N}(0,|B|)$.

It follows that $(Y+Z,Y-Z)$ are also jointly normal.

Noting that $S_{n,\varepsilon}=Y+Z$ and $S_n=Y-Z$, we get that 
\begin{align*}
&
S_{n,\varepsilon},S_n\;\,\text{are independent}
\\[4pt]
\iff\;&
Y+Z,Y-Z\;\,\text{are independent}
\\[4pt]
\iff\;&
\text{Cov}(Y+Z,Y-Z)=0
\\[4pt]
\iff\;&
E\Bigl((Y+Z)(Y-Z)\Bigr)
=
E(Y+Z)E(Y-Z)
\\[4pt]
\iff\;&
E\Bigl((Y+Z)(Y-Z)\Bigr)
=
0
\\[4pt]
\iff\;&
E(Y^2-Z^2)
=
0
\\[4pt]
\iff\;&
E(Y^2)=E(Z^2)
\\[4pt]
\iff\;&
|A|=|B|
\\[4pt]
\end{align*}
Note that $|A|+|B|=n$, hence $|A|=|B|$ implies $n$ is even and
$|A|=|B|={\large{\frac{n}{2}}}$.

Hence for a random choice of $\varepsilon$ from $\{\pm 1\}^n$, the probability that $S_{n,\varepsilon},S_n$
are independent is equal to zero if $n$ is odd, and is equal to
$$
\frac
{
\large{
n\choose{m}
}
}
{2^n}
$$
if $n$ is even, where $m={\large{\frac{n}{2}}}$.
