# Formation of the test statistic in one-way ANOVA

From nist for the test statistic in one-way ANOVA:

The mean squares are formed by dividing the sum of squares by the associated degrees of freedom.

Let $N = \sum_i n_i$. Then, the degrees of freedom for treatment, $DFT = k - 1$, and the degrees of freedom for error, $DFE = N - k$.

The corresponding mean squares are:

$MST = SST / DFT$

$MSE = SSE / DFE$

I was wondering why the degrees of freedom for the two sums are given as $k-1$ and $N-k$, where $N$ is the sample size and $k$ is the number of groups? For the definitions of the two sums $SST$ (sum of squares of treatments) and $SSE$ (sum of squares of errors), see another page.

So dividing a sum of squares by its degree of freedom isn't "mean square", isn't it? Why does it say "the mean squares are formed by dividing the sum of squares by the associated degrees of freedom"?

Thanks and regards!

We compute the squares (that we will sum) by subtracting a mean from the observations, then squaring. If we knew the true population mean(s) and subtracted those true means from the observations then the resulting squares would be independent and it would be appropriate to divide by $k$ and $N$. But if we knew the true means then we would not need to compute mean squares anyways. Instead we are subtracting a mean that was computed from the same observations that we are subtracting it from, so the squares are not fully independent. The degrees of freedom represent the amount of independent information available in the squares being summed, that is why we divide by the d.f.
{"ft_lang_label":"__label__en","ft_lang_prob":0.94454914,"math_prob":0.99923587,"size":854,"snap":"2020-45-2020-50","text_gpt3_token_len":227,"char_repetition_ratio":0.1835294,"word_repetition_ratio":0.15625,"special_character_ratio":0.26814988,"punctuation_ratio":0.09714286,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":1.0000018,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-10-20T06:17:05Z\",\"WARC-Record-ID\":\"<urn:uuid:7a86c711-6179-491b-868d-f8e500c6d69f>\",\"Content-Length\":\"149177\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:2f10811e-81b0-4942-92cd-2d9c3098b9d6>\",\"WARC-Concurrent-To\":\"<urn:uuid:0b45d26c-e542-454e-84e6-0eee4f742f40>\",\"WARC-IP-Address\":\"151.101.193.69\",\"WARC-Target-URI\":\"https://stats.stackexchange.com/questions/60444/formation-of-the-test-statistic-in-one-way-anova\",\"WARC-Payload-Digest\":\"sha1:LJGSOOFUNNFFJCM7W6P7BNWVJUACV5HY\",\"WARC-Block-Digest\":\"sha1:535VG4PZ67PHSGO2DSGIFDYGUVTP4QYC\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-45/CC-MAIN-2020-45_segments_1603107869933.16_warc_CC-MAIN-20201020050920-20201020080920-00185.warc.gz\"}"}