In statistics, expected mean squares (EMS) are the expected values of certain statistics arising in partitions of sums of squares in the analysis of variance (ANOVA).
They can be used for ascertaining which statistic should appear in the denominator in an F-test for testing a null hypothesis that a particular effect is absent.
When the total corrected sum of squares in an ANOVA is partitioned into several components, each attributed to the effect of a particular predictor variable, each of the sums of squares in that partition is a random variable that has an expected value.
That expected value divided by the corresponding number of degrees of freedom is the expected mean square for that predictor variable.
The following example is from Longitudinal Data Analysis by Donald Hedeker and Robert D.
[1] Each of s treatments (one of which may be a placebo) is administered to a sample of (capital) N randomly chosen patients, on whom certain measurements
are observed at each of (lower-case) n specified times, for
We assume the sets of patients receiving different treatments are disjoint, so patients are nested within treatments and not crossed with treatments.
We have where The total corrected sum of squares is The ANOVA table below partitions the sum of squares (where
Under this null hypothesis, the expected mean square for effects of treatments is
The numerator in the F-statistic for testing this hypothesis is the mean square due to differences among treatments, i.e. it is
The reason is that the random variable below, although under the null hypothesis it has an F-distribution, is not observable—it is not a statistic—because its value depends on the unobservable parameters
Instead, one uses as the test statistic the following random variable that is not defined in terms of