Proof of $\frac{(n-1)S^2}{\sigma^2} \sim \chi^2_{n-1}$ It's a standard result that given $X_1,\cdots ,X_n $ random sample from $N(\mu,\sigma^2)$, the random variable $$\frac{(n-1)S^2}{\sigma^2}$$ has a chi-square distribution with $(n-1)$ degrees of freedom, where $$S^2=\frac{1}{n-1}\sum^{n}_{i=1}(X_i-\bar{X})^2.$$
I would like help in proving the above result.
Thanks.  
 A: A standard proof goes something like this.  It assumes you already know the following. 


*

*$\bar{X}$ (the sample mean) and $S^2$ are independent.

*If $Z \sim N(0,1)$ then $Z^2 \sim \chi^2(1)$. 

*If $X_i \sim \chi^2(1)$ and the $X_i$ are independent then $\sum_{i=1}^n X_i \sim \chi^2(n)$.

*A $\chi^2(n)$ random variable has the moment generating function $(1-2t)^{-n/2}$.


With some algebra, you can show, by adding $-\bar{X} + \bar{X}$ inside the parentheses and grouping appropriately, that $\sum_{i=1}^n (X_i - \mu)^2 = \sum_{i=1}^n (X_i - \bar{X})^2 + n(\bar{X} - \mu)^2$.  Then, dividing through by $\sigma^2$ yields
$$ \sum_{i=1}^n \left(\frac{X_i - \mu}{\sigma}\right)^2 = \sum_{i=1}^n \left(\frac{X_i - \bar{X}}{\sigma}\right)^2 +  \left(\frac{\bar{X} - \mu}{\sigma/\sqrt{n}}\right)^2.$$
Denote these expressions by $U, V$, and $W$, respectively, so that the formula reads $U = V+W$. 
By facts (2) and (3) above, $U \sim \chi^2(n)$ and $W \sim \chi^2(1)$.  Also, $V = \frac{(n-1)S^2}{\sigma^2}$.
Since $\bar{X}$ and $S^2$ are independent, so are $V$ and $W$.  Thus $M_U(t) = M_V(t) M_W(t)$, where $M_X(t)$ denotes the moment generating function of the random variable $X$.  By fact (4) above, this says that $$\frac{1}{(1-2t)^{n/2}} = M_V(t) \frac{1}{(1-2t)^{1/2}}.$$ 
Thus $$M_V(t) = \frac{1}{(1-2t)^{(n-1)/2}},$$ and therefore $V \sim \chi^2(n-1)$.
A: A neat trick is to write $Y_i:=X_i-\mu$. Shifting each of the $X$'s by the same amount doesn't affect the sample variance, so compute the sample variance $S^2$ using the $Y$'s:
$$
(n-1)S^2 =\sum_1^n(Y_i-\bar Y)^2=\sum_1^n(Y_i^2 -2 \bar YY_i + \bar Y^2)=\sum_1^nY_i^2-2\bar Y\sum Y_i+n\bar Y^2=\sum_1^n Y_i^2 -n\bar Y^2
$$
where the last step uses $\sum_1^n Y_i = n\bar Y$. Substituting back $Y_i=X_i-\mu$, this establishes the familiar identity
$$(n-1)S^2
=\sum_1^n(X_i-\mu)^2-n(\bar X-\mu)^2.\tag1
$$
Divide (1) through by $\sigma^2$ and rearrange to the form
$$
\sum_1^n \left[\frac{X_i-\mu}\sigma\right]^2 = \frac{(n-1)S^2}{\sigma^2} + \left[\frac{\bar X-\mu}{\sigma/\sqrt n}\right]^2.\tag2
$$
We recognize that each of the bracketed terms in (2) has a standard normal distribution. In particular the LHS is the sum of squares of $n$ independent standard normals. Compare this observation to the RHS. If you accept that$^{\color{red}a}$ $S^2$ and $\bar X$ are independent, then the RHS is the sum of two independent variables, namely $(n-1)S^2/\sigma^2$ and the square of a single standard normal variable. It must follow that$^{\color{red}b}$ $(n-1)S^2/\sigma^2$ has the same distribution as the sum of squares of $n-1$ standard normals -- so by definition it has chi-squared($n-1$) distribution.

$\color{red}a$ You can in fact deduce independence from (2), which shows how the joint density of $(X_1,\ldots,X_n)$ can be factorized into
 a term involving $(X_1-\bar X, X_2-\bar X,\ldots, X_n-\bar X)$ and a term involving $\bar X$. This can be made rigorous with the (linear, invertible) change of variables $(W_1, W_2,\ldots,W_n):=(\bar X, X_2-\bar X,\ldots, X_n-\bar X)$.
$\color{red}b$ This follows from independence and the fact that the moment generating function $E[e^{tU}]$ (alternatively, the characteristic function $E[e^{itU}]$) uniquely defines the distribution of random variable $U$.
A: I disagree with the characterization of the proof in Mike Spivey's answer as the standard proof.  It's the proof for people who don't know about projections in linear algebra.
Notice that the mapping $(X_1,\dots,X_n) \mapsto (X_1-\overline{X},\dots,X_n - \overline{X})$ is a projection onto a space of dimension $n-1$.  Notice also that its expected value is $0$.  Then remember that the probability distribution of the vector $(X_1,\dots,X_n)$ is spherically symmetric.  Therefore so is the distribution of its projection onto a space of dimension one less.  Hence the square of the norm of that projection is just the square of the norm of a normal random vector with a spherically symmetric distribution centered at the origin.  The square of the norm therefore has a chi-square distribution with degrees of freedom equal to the dimension of that space.
A: The following proof comes from my previous college math instructor. It somewhat wraps up @hwiechers arguments and expands @Michael Hardy's arguments. It is extra long because I try to put all the details for those potential readers who are not familiar with random vectors and matrix algebra, usually most of which are omitted when writing proofs.

Consider the random vector $$\mathbf{X}:=[X_1,X_2,\ldots,X_n]^T,$$ which satisfies $\mathbb{E}(\mathbf{X})=\mu\mathbf{e}$ and $\operatorname{Var}(\mathbf{X})=\sigma^2\mathbf{I}_n$, in which $\mathbf{e}=[1,1,\ldots,1]^T$ is an all-one vector of length $n$ and $\mathbf{I}_n$ is the identity matrix of order $n$. Then observe that $$\bar{X}=\frac{1}{n}\sum_{i=1}^{n}{X_i}=\frac{1}{n}\mathbf{e}^T\mathbf{X}$$ and hence
\begin{align*}
\frac{(n-1)S^2}{\sigma^2}=\frac{1}{\sigma^2}\sum_{i=1}^{n}{(X_i-\bar{X})^2}&=\frac{1}{\sigma^2}\left(\sum_{i=1}^{n}{X_i^2}-n\bar{X}^2\right) \\
&=\frac{1}{\sigma^2}\left[\mathbf{X}^T\mathbf{X}-n\left(\frac{1}{n}\mathbf{e}^T\mathbf{X}\right)^2\right] \\
&=\frac{1}{\sigma^2}\left(\mathbf{X}^T\mathbf{X}-\frac{1}{n}\mathbf{X}^T\mathbf{e}\mathbf{e}^T\mathbf{X}\right) \\
&=\frac{1}{\sigma^2}\mathbf{X}^T\mathbf{A}\mathbf{X}, 
\end{align*}
where $$\mathbf{A}:=\mathbf{I}_n-\frac{1}{n}\mathbf{e}\mathbf{e}^T.$$

Fact. The matrix $\mathbf{A}$ is real symmetric, hence real orthogonally diagonalizable. In particular, the eigenvalues of $\mathbf{A}$ are $1$ of multiplicity $n-1$ and $0$ of multiplicity $1$. We may then let $\mathbf{Q}$ be an $n\times n$ real orthogonal matrix that diagonalizes $\mathbf{A}$. That is, $$\mathbf{A}=\mathbf{Q}\begin{bmatrix} 1 &  &  &  & \\  & 1 &  &  &  \\  &  & \ddots &  & \\  &  &  & 1 &  \\  &  &  &  &  0 \end{bmatrix}\mathbf{Q}^T=:\mathbf{Q}\mathbf{D}\mathbf{Q}^T.$$ In addition, if we partition $\mathbf{Q}$ by columns: $$\mathbf{Q}=\begin{bmatrix} \mathbf{q}_1 & \mathbf{q}_2 & \cdots & \mathbf{q}_{n-1} & \mathbf{q}_n \end{bmatrix},$$ then $\mathbf{q}_1,\mathbf{q}_2,\ldots,\mathbf{q}_{n-1}$ is an orthonormal basis of the eigenspace of $\mathbf{A}$ associated with $1$, and $\mathbf{q}_n$ is a unit eigenvector of $\mathbf{A}$ associated with $0$.

Adopting the notations above, we have $$\frac{(n-1)S^2}{\sigma^2}=\frac{1}{\sigma^2}\mathbf{X}^T\mathbf{A}\mathbf{X}=\frac{1}{\sigma^2}\mathbf{X}^T\mathbf{Q}\mathbf{D}\mathbf{Q}^T\mathbf{X}=:\mathbf{Y}^T\mathbf{D}\mathbf{Y},$$ where $$\mathbf{Y}=[Y_1,Y_2,\ldots,Y_n]^T:=\frac{1}{\sigma}\mathbf{Q}^T\mathbf{X}$$ Based on the structure of $\mathbf{D}$, we can see that $$\frac{(n-1)S^2}{\sigma^2}=\mathbf{Y}^T\mathbf{D}\mathbf{Y}=\sum_{i=1}^{n-1}{Y_i^2}.\tag{$*$}$$ It then suffices to show that $Y_1,Y_2,\ldots,Y_{n-1}$ are i.i.d. standard normal r.v.s.

To see this, first observe that
$$\mathbb{E}(\mathbf{Y})=\mathbb{E}\left(\frac{1}{\sigma}\mathbf{Q}^T\mathbf{X}\right)=\frac{1}{\sigma}\mathbf{Q}^T\mathbb{E}(\mathbf{X})=\frac{1}{\sigma}\mathbf{Q}^T(\mu\mathbf{e})=\frac{\mu}{\sigma}\mathbf{Q}^T\mathbf{e}.$$
Consider now the matrix form $$\mathbf{Q}^T\mathbf{e}=\begin{bmatrix} \mathbf{q}_1^T \\ \mathbf{q}_2^T \\ \vdots \\ \mathbf{q}_{n-1}^T \\ \mathbf{q}_n^T \end{bmatrix}\mathbf{e}=\begin{bmatrix} \mathbf{q}_1^T\mathbf{e} \\ \mathbf{q}_2^T\mathbf{e} \\ \vdots \\ \mathbf{q}_{n-1}^T\mathbf{e} \\ \mathbf{q}_n^T\mathbf{e} \end{bmatrix}.$$
Note that for $i=1,2,\ldots,n-1$, we have $$\mathbf{q}_i=1\cdot\mathbf{q}_i=\mathbf{Aq}_i=\left(\mathbf{I}_n-\frac{1}{n}\mathbf{e}\mathbf{e}^T\right)\mathbf{q}_i=\mathbf{q}_i-\frac{1}{n}\mathbf{e}\mathbf{e}^T\mathbf{q}_i,$$ which implies that $$\mathbf{0}=\frac{1}{n}\mathbf{e}\mathbf{e}^T\mathbf{q}_i=\frac{\mathbf{e}^T\mathbf{q}_i}{n}\mathbf{e}\implies \mathbf{q}_i^T\mathbf{e}=\mathbf{e}^T\mathbf{q}_i=0.$$ Thus $$\mathbb{E}(\mathbf{Y})=\frac{\mu}{\sigma}\mathbf{Q}^T\mathbf{e}=\frac{\mu}{\sigma}\begin{bmatrix} 0 \\ 0 \\ \vdots \\ 0 \\ \mathbf{q}_n^T\mathbf{e} \end{bmatrix}=\begin{bmatrix} 0 \\ 0 \\ \vdots \\ 0 \\ \frac{\mu}{\sigma}\mathbf{q}_n^T\mathbf{e} \end{bmatrix}.$$ That is, $$\mathbb{E}(Y_1)=\mathbb{E}(Y_2)=\cdots=\mathbb{E}(Y_{n-1})=0.\tag{$**$}$$
Note that each $Y_i$ is a linear combination of normal r.v.s, so itself must be a normal r.v. and furthermore their independence is equivalent to zero covariance. Now consider the variance-covariance matrix:
\begin{align*}
\operatorname{Var}(\mathbf{Y})=\operatorname{Var}\left(\frac{1}{\sigma}\mathbf{Q}^T\mathbf{X}\right)=\frac{1}{\sigma^2}\mathbf{Q}^T\operatorname{Var}(\mathbf{X})\mathbf{Q}=\frac{1}{\sigma^2}\mathbf{Q}^T(\sigma^2\mathbf{I}_n)\mathbf{Q}=\mathbf{Q}^T\mathbf{Q}=\mathbf{I}_n.
\end{align*}
That is, $$\operatorname{Var}(Y_i)=1~\text{for $i=1,2,\ldots,n$}\quad\text{and}\quad\operatorname{Cov}(Y_i,Y_j)=0~\text{if $i\ne j$}.  \tag{$*$$*$$*$}$$

Additional Question. What is $\mathbb{E}(Y_n)$?

 Here $\mathbf{q}_n=\mathbf{e}/\sqrt{n}$ whence $\mathbb{E}(Y_n)=\sqrt{n}\mu/\sigma$. But it makes no contributions at all! :)

