TITLE: Proof of the independence of the sample mean and sample variance
QUESTION [24 upvotes]: I've been trying to establish that the sample
mean and the sample variance are independent. One motivation is to
try and write the sample variance, $S^{2}$ as a function
of $\left\{ X_{2}-\bar{X},X_{3}-\bar{X},\cdots,X_{n}-\bar{X}\right\} =A$
only. Then we proceed by showing that $A$ and $\bar{X}$ are independent (which I'm unable to show),
which then implies the independence of $S^{2}$ and $\bar{X}.$  
I would appreciate it if the good people of M.SE would help guide me in the right direction.
Thanks.
Edit:
The random samples $X_1,\cdots,X_n$ are from an $N(\mu, \sigma)$ distribution.

REPLY [4 votes]: Here is an alternative matrix approach. By replacing each $X_i$ by $(X_i - \mu)/\sigma$, we can assume wlog that the $X$'s are independent standard normal variables. 
Pack $X_1,\ldots,X_n$ into an $n\times 1$ column vector $X$. The idea is to express $\sum X$ and $(X_1-\bar X,\ldots,X_n-\bar X)^T$ as matrix transformations of $X$. This is achieved by taking $U=(1,\ldots,1)$, a $1\times n$ row vector of ones (so that $UX=\sum X_i$), and defining the $n\times n$ matrix
$$C:=I_n - \frac1n U^TU$$
(so that $CX$ has $i$th member $X_i-\bar X$). Check that $UX$ and $CX$ each have zero mean. Their covariance is
$$E[(UX)(CX)^T]=E(UXX^TC^T)=UC^T=UC=U-\frac1nUU^TU.$$
But $UU^T=n$, so the covariance matrix is zero. Since $UX$ are $CX$ are jointly normal, this implies that they are independent, hence so are $\bar X$ and $S^2$, which are functions respectively of $UX$ and $CX$.

Why are $UX$ and $CX$ jointly normal? The product of a partitioned matrix with $X$:
$$\begin{pmatrix}U\\\hdashline C\end{pmatrix}X
$$ yields a $(n+1)\times 1$ multivariate normal vector; $UX$ is the first member, and $CX$ is the remaining subvector.