Fourier analysis step in an example regarding concentration of measure. I am following Terrence Tao's notes on concentration of measures here, 
Tao defines
${S_n := X_1+\ldots+X_n}$ 
Then at a certain point he says: 
"suppose that ${n = 2^m-1}$, and that ${X_j := (-1)^{a_j \cdot Y}}$, where ${Y}$ is drawn uniformly at random from the cube ${\{0,1\}^m}$, and ${a_1,\ldots,a_n}$ are an enumeration of the non-zero elements of ${\{0,1\}^m}$. Then a little Fourier analysis shows that each ${X_j}$ for ${1 \leq j \leq n}$ has mean zero, variance ${1}$, and are pairwise independent in ${j}$; but ${S_n}$ is equal to ${(n+1) {\bf I}( Y = 0 ) - 1}$, which is equal to ${n}$ with probability ${1/(n+1)}$; this is despite the standard deviation of ${S}$ being just ${\sqrt{n}}$."
What is this little Fourier analysis that makes the facts stated obvious?
 A: Here is a direct way to see why those claims are true, which you may choose to interpret in terms of Fourier analysis if you like.
Note that $Y=(Y_1,\ldots,Y_m)$ is an i.i.d. sequence. For $1\leq j\leq n$ define the random variables $Z_{ij}=(-1)^{a_{ji}Y_i}$ and observe that $Z_{1j},\ldots,Z_{mj}$ is also an i.i.d. sequence. Moreover,
$$
X_j=\prod_{i=1}^m Z_{ij}.
$$
Mean 0. By independence,
$$
\mathbb E X_j=\prod_{i=1}^m \mathbb E Z_{ij}=0.
$$
Variance 1. Also by independence,
$$
\mathbb E X_j^2=\prod_{i=1}^m \mathbb E Z_{ij}^2 = 1,
$$
since each $Z_{ij}^2=1$ (with probability 1).
Pairwise independence.
We need to show that for all $1\leq j\not=j'\leq n$, the pair $(X_j,X_{j'})$ is distributed uniformly in $\{\pm 1,\pm 1\}$. Since we already know that $\mathbb E X_j=\mathbb E X_{j'}=0$, all that is left is to show that $\mathbb E X_jX_{j'}=0$. Observe that $Z_{1j}Z_{1j'},\ldots,Z_{mj}Z_{mz'}$ is a sequence of independent random variables, and therefore
$$
\mathbb E X_j X_{j'}=\prod_{i=1}^m\mathbb E Z_{ij}Z_{ij'}.
$$
Since $j\not=j'$, we can pick an index $i$ for which the elements of $\{0,1\}^m$ corresponding to $j$ and $j'$ differ. For such an $i$, either $Z_{ij}=1$ and $Z_{ij'}=\pm 1$ or vice versa - but in either case, $\mathbb E Z_{ij}Z_{ij'}=0$. Thus $\mathbb E X_j X_{j'}=0$ as well, from which pairwise independence follows.
