# ANOVA - why are the mean squares chi-squared distributed?

I recently came across Analysis of Variance (ANOVA), and it seems that the total sum of squares of the residuals (or "within groups / treatments") divided by the degrees of freedom is Chi-squared distributed. I've also been told that this is the case for "between groups / treatments" under the null hypothesis.

I was wondering why this is the case, and roughly how we might go about showing this (I'm not after a rigorous proof, though).

One thing I'm wondering behind this question is are they both genuinely Chi-squared distributed, or is it an asymptotic result? (i.e. it holds in the limit as our sample size tends to infinity).

Thanks

After several hours of trying to figure this out, I think I've got it to a decent extent. I don't have the time or LaTeX skills (or whatever is used to type equations etc. here) to provide a full answer. Here's what is hopefully a useful sketch of an answer to anyone else asking the same question, though:

Firstly, you don't quite get Chi-squared distributions as described in the question. The sums of squares before they're divided by the degrees of freedom are proportional to a random variable with Chi-squared distribution, where the constant of proportionality is the variance of the observations (assumed to be constant for all treatments / subgroups). This constant will cancel when dividing the M.S, still giving an F-distribution.

Secondly, the distributions are exact (assuming that our observations are perfectly normally distributed to begin with, which may be a stretch), so they're not just (proportional to) Chi-squared in a limit or anything.

Lastly, I was able to figure out why they're (proportional to) Chi-squared for the case of equal replication (slightly non-rigorously, but good enough for me), and this was a super-useful result / link. en.wikipedia.org/wiki/Cochran%27s_theorem#Sample_mean_and_sample_variance