Scaled sample variance as sum of squares of normal variables I want to prove that $(n-1)S^2 = \sum_{i=1}^{n} (X_i - \bar{X})^2$ can be written as $\sum_{i=2}^{n} Y_i^2$, with $Y_i = N(0,\sigma^2)$, $X_i$ and $Y_i$ $i.i.d$.
I managed to do it by taking a big detour. I used the fact that $S^2$ and $\bar{X}$ are independent (Basu's lemma), then showed that the moment generating function for $(n-1)S^2/\sigma^2$ is that of a Chi square with $n-1$ degrees of freedom, so it must be written as a sum of squares of $Z_i$ variables.
But isn't there a more direct approach where you can actually compute/figure out each of those $Y_i$'s?
 A: You could look at your problem from a slightly different perspective.
Theorem.  Let $y\sim N_n(0,\sigma^2 I_n)$ and let $Q=\sigma^{-2}y′Ay$ for a symmetric matrix $A$ of rank $r$. Then if $A$ is idempotent, $Q$ has a $\chi^2(r)$ distribution.
Proof. See Mathai & Provost, Quadratic forms in random variables, New York: Marcel Dekker, 1992, p.~196, or Distribution of a quadratic form, non-central chi-squared distribution, accepted answer.
Now:
$$\sum_{i=1}^n\frac{(X_i-\overline{X}_n)^2}{\sigma^2}=\sum_{i=1}^n\frac{((X_i-\mu)-(\overline{X}_n-\mu))^2}{\sigma^2}=\sum_{i=1}^n(Y_i-\overline{Y}_n)^2$$
where $Y_i=(X_i-\mu)/\sigma\sim N(0,1)$.
Let $\mathbf{1}=(1,1,\dots,1)'$, $\mathbf{J}=\mathbf{11}'$.
\begin{align*}
\sum_{i=1}^n(Y_i-\overline{Y}_n)^2&=\sum_{i=1}^n Y_i^2-\frac1n\left(\sum_{i=1}^nY_i\right)^2\\
&=\mathbf{Y}'\mathbf{IY}-\frac1n \mathbf{Y}'\mathbf{JY}=\mathbf{Y}'\left(\mathbf{I}-\frac1n \mathbf{J}\right)\mathbf{Y}
\end{align*}
$\mathbf{D}=\mathbf{I}-\frac1n \mathbf{J}$ is a symmetric and idempotent matrix, and its diagonal elements are $(n-1)/n$, for example:
sage: One = matrix([[1],[1],[1]]); One                                                                                              
[1]
[1]
[1]
sage: J = One * One.transpose(); J                                                                                                  
[1 1 1]
[1 1 1]
[1 1 1]
sage: I = identity_matrix(3)                                                                                                        
sage: D = I - J/3; D                                                                                                                
[ 2/3 -1/3 -1/3]
[-1/3  2/3 -1/3]
[-1/3 -1/3  2/3]
sage: D * D                                                                                                                         
[ 2/3 -1/3 -1/3]
[-1/3  2/3 -1/3]
[-1/3 -1/3  2/3]

therefore $\text{rank}(\mathbf{D})=\text{trace}(\mathbf{D})=n-1$, and
$\sum_i(Y_i-\overline{Y}_n)^2=\sigma^{-2}\sum_i(X_i-\overline{X}_n)^2\sim\chi^2(n-1)$.
