Proof: $T \sim \chi^2(N-1)$ I'm a maths student, this is my first statics class and I'm studying Confidence Intervals. When it's time to estimate the CI for the mean of $\{X_i\}_{i=1..N}$ - gaussian random variables i.i.d. with unknown standard deviation - we use the estimator $\hat{\sigma}$ to compute the quantity
$$T:=\frac{\overline{X}_N - \mu}{\frac{\hat{\sigma}}{\sqrt{N}}}$$
where $\overline{X}_N$ is the sample mean, $\mu$ the mean and
$$\hat{\sigma}:=\sqrt{\frac{1}{N-1}\sum^N (X_i-\overline{X}_N)^2}$$
I would prove that $T \sim t(N-1)$, so:
$$T=\frac{\sigma}{\sigma} \frac{\overline{X}_N - \mu}{\frac{\hat{\sigma}}{\sqrt{N}}}=\frac{\frac{(\overline{X}_N - \mu)\sqrt{N}}{\sigma}}{\frac{\hat{\sigma}}{\sigma}}$$
Now the numerator is a standard gaussian and I'll call it $\tilde{Z}$. Hence,
$$T=\frac{\tilde{Z}\sqrt{N-1}}{\frac{\hat{\sigma}}{\sigma}\sqrt{N-1}}$$
In order to have a Student t-distribution I have to prove $(\frac{\hat{\sigma}}{\sigma}\sqrt{N-1})^2\sim\chi^2(N-1)$.
Solution:
There's a clear proof of that here.
 A: Let  $V=\sum_{i=1}^n(\frac{X_i-\mu}{\sigma})^2$, you know for each $\frac{X_i-\mu}{\sigma} $it has a $N(0,1)$ distribution because the $X_i$ are $N(\mu, \sigma)$, and you should know that square of a normal distribution has a $\chi^2(1)$ distribution.
Therefore, $V=\chi^2(1)+...+\chi^2(1)=\chi^2(n)$
$V=\sum_{i=1}^n(\frac{X_i-\mu}{\sigma})^2=\sum_{i=1}^n(\frac{(X_i-\bar{X})+(\bar{X}-\mu)}{\sigma})^2=\sum_{i=1}^{n}(\frac{X_i-\bar{X}}{\sigma})^2+2*\sum_{i=1}^n(X_i-\bar{X})(\bar{X}-\mu)/\sigma+(\frac{n(\bar{X}-\mu)}{\sigma})^2$
Let $W:= \sum_{i=1}^{n}(\frac{X_i-\bar{X}}{\sigma})^2$, which is our quantity of interest.
The term $2*\sum_{i=1}^n(X_i-\bar{X})(\bar{X}-\mu)/\sigma$ is equal to 0.
Let $U:= (\frac{n(\bar{X}-\mu)}{\sigma})^2$. $U$ is  is another $\chi^2(1)$, using that the square of a $N(0,1)$ is $\chi^2(1)$ and that  $\frac{n(\bar{X}-\mu)}{\sigma}$ has a $N(0,1)$ distribution because $X_i$ are $N(\mu, \sigma)$.
Now you have $V=W+U$, with $V$ following a $\chi^2(n)$ distribution and $U$ following a $\chi^2(1)$ distribution.
Therefore, $\sum_{i=1}^{n}(\frac{X_i-\bar{X}}{\sigma})^2$ has a $\chi^2(n-1)$ distribution.
So $W = \frac{\sum_{i=1}^{n}(X_i-\bar{X})^2}{\sigma^2}$ has a $\chi^2(n-1)$
Usually people define sample variance as $s^2=\frac{\sum_{i=1}^{n}(X_i-\bar{X})^2}{n-1}$ which is an unbiased estimator of $\sigma^2$
Therefore, it should be $\frac{(n-1)s^2}{\sigma^2}$ has a $\chi^2(n-1)$ distribution.
Therefore your question has a problem there, you should be very careful.
