The distribution used for the hypothesis test is a new one. It is called the F distribution, named after Sir Ronald Fisher, an English statistician. The F statistic is a ratio (a fraction). There are two sets of degrees of freedom: one for the numerator and one for the denominator.
For example, if F follows an F distribution and the number of degrees of freedom for the numerator is 4, and the number of degrees of freedom for the denominator is 10, then F ~ F_{4,10}.
Note
The F distribution is derived from the Student’s tdistribution. The values of the F distribution are squares of the corresponding values of the tdistribution. Oneway ANOVA expands the ttest for comparing more than two groups. The scope of that derivation is beyond the level of this course. It is preferable to use ANOVA when there are more than two groups instead of performing pairwise ttests because performing multiple tests introduces the likelihood of making a Type 1 error.
To calculate the F ratio, two estimates of the variance are made.
 Variance between samples: an estimate of σ^{2} that is the variance of the sample means multiplied by n, when the sample sizes are the same. If the samples are different sizes, the variance between samples is weighted to account for the different sample sizes. The variance is also called variation due to treatment or explained variation.
 Variance within samples: an estimate of σ^{2} that is the average of the sample variances, also known as a pooled variance. When the sample sizes are different, the variance within samples is weighted. The variance is also called the variation due to error or unexplained variation.
 SS_{between} = the sum of squares that represents the variation among the different samples
 SS_{within} = the sum of squares that represents the variation within samples that is due to chance
To find a sum of squares mean, add together squared quantities which, in some cases, may be weighted. We used sum of squares to calculate the sample variance and the sample standard deviation in Descriptive Statistics.
MS means mean square. MS_{between} is the variance between groups, and MS_{within} is the variance within groups.
 k = the number of different groups
 n_{j} = the size of the j^{th} group
 s_{j} = the sum of the values in the j^{th} group
 n = total number of all the values combined (total sample size: ∑n_{j})
 x = one value: ∑x = ∑s_{j}
 Sum of squares of all values from every group combined: ∑x^{2}
 Between group variability: SS_{total} = ∑x^{2} – $\frac{\left({\displaystyle \sum {x}^{2}}\right)}{n}$
 Total sum of squares: ∑x^{2} – $\frac{{\left(\sum x\right)}^{2}}{n}$
 Explained variation: sum of squares representing variation among the different samples ${SS}_{(\text{between})}=\sum \left[\frac{{({s}_{j})}^{2}}{{n}_{j}}\right]\frac{{\left(\sum {s}_{j}\right)}^{2}}{n}$
 Unexplained variation: sum of squares representing variation within samples due to chance $S{S}_{\text{within}}=S{S}_{\text{total}}\u2013S{S}_{\text{between}}$
 dfs for different groups (dfs for the numerator): df = k – 1
 Equation for errors within samples (dfs for the denominator): df_{within} = n – k
 Mean square (variance estimate) explained by the different groups: MS_{between} = $\frac{S{S}_{\text{between}}}{d{f}_{\text{between}}}$
 Mean square (variance estimate) that is due to chance (unexplained): MS_{within} = $\frac{S{S}_{\text{within}}}{d{f}_{\text{within}}}$
MS_{between} and MS_{within} can be written as follows:
 $M{S}_{\text{between}}=\frac{S{S}_{\text{between}}}{d{f}_{\text{between}}}=\frac{S{S}_{\text{between}}}{k1}$
 $M{S}_{within}=\frac{S{S}_{within}}{d{f}_{within}}=\frac{S{S}_{within}}{nk}$
The oneway ANOVA test depends on the fact that MS_{between} can be influenced by population differences among means of the several groups. Since MS_{within} compares values of each group to its own group mean, the fact that group means might be different does not affect MS_{within}.
The null hypothesis says that all groups are samples from populations having the same normal distribution. The alternate hypothesis says that at least two of the sample groups come from populations with different normal distributions. If the null hypothesis is true, MS_{between} and MS_{within} should both estimate the same value.
Note
The null hypothesis says that all the group population means are equal. The hypothesis of equal means implies that the populations have the same normal distribution because it is assumed that the populations are normal and that they have equal variances.
F Ratio or F Statistic $F=\frac{M{S}_{\text{between}}}{M{S}_{\text{within}}}$
If MS_{between} and MS_{within} estimate the same value, following the belief that H_{0} is true, then the F ratio should be approximately equal to 1. Mostly, just sampling errors would contribute to variations away from 1. As it turns out, MS_{between} consists of the population variance plus a variance produced from the differences between the samples. MS_{within} is an estimate of the population variance. Since variances are always positive, if the null hypothesis is false, MS_{between} will generally be larger than MS_{within}. Then the F ratio will be larger than 1. However, if the population effect is small, it is not unlikely that MS_{within} will be larger in a given sample.
The previous calculations were done with groups of different sizes. If the groups are the same size, the calculations simplify somewhat and the F ratio can be written as follows:
F Ratio formula when the groups are the same size$F=\frac{n\cdot {s}_{\overline{x}}{}^{2}}{{s}^{2}{}_{\text{pooled}}}$
 n = the sample size
 df_{numerator} = k – 1
 df_{denominator} = n – k
 s^{2} pooled = the mean of the sample variances (pooled variance)
 ${s}_{\overline{x}}{}^{2}$ = the variance of the sample means
Data is typically put into a table for easy viewing. Oneway ANOVA results are often displayed in this manner by computer software.
Source of Variation  Sum of Squares (SS)  Degrees of Freedom (df)  Mean Square (MS)  F 

Factor (Between) 
SS(Factor)  k – 1  MS(Factor) = SS(Factor)/(k – 1)  F = MS(Factor)/MS(Error) 
Error (Within) 
SS(Error)  n – k  MS(Error) = SS(Error)/(n – k)  
Total  SS(Total)  n – 1 
Example 13.1
Three different diet plans are to be tested for mean weight loss. The entries in the table are the weight losses for the different plans. The oneway ANOVA results are shown in Table 13.2.
Plan 1: n_{1} = 4  Plan 2: n_{2} = 3  Plan 3: n_{3} = 3 

5  3.5  8 
4.5  7  4 
4  3.5  
3  4.5 
s_{1} = 16.5, s_{2} = 15, s_{3} = 15.5
Following are the calculations needed to fill in the oneway ANOVA table. The table is used to conduct a hypothesis test.
where n_{1} = 4, n_{2} = 3, n_{3} = 3, and n = n_{1} + n_{2} + n_{3} = 10
Using the TI83, 83+, 84, 84+ Calculator
Oneway ANOVA Table: The formulas for SS(Total), SS(Factor) = SS(Between), and SS(Error) = SS(Within) as shown previously. The same information is provided by the TI calculator hypothesis test function ANOVA
in STAT TESTS
(syntax is ANOVA[L1, L2, L3]
where L1, L2, L3 have the data from Plan 1, Plan 2, Plan 3, respectively).
Source of Variation  Sum of Squares (SS)  Degrees of Freedom (df)  Mean Square (MS)  F 

Factor (Between) 
SS(Factor) = SS(Between) = 2.2458 
k – 1 = 3 groups – 1 = 2 
MS(Factor) = SS(Factor)/(k – 1) = 2.2458/2 = 1.1229 
F = MS(Factor)/MS(Error) = 1.1229/2.9792 = 0.3769 
Error (Within) 
SS(Error) = SS(Within) = 20.8542 
n – k = 10 total data – 3 groups = 7 
MS(Error) = SS(Error)/(n – k) = 20.8542/7 = 2.9792 

Total  SS(Total) = 2.2458 + 20.8542 = 23.1 
n – 1 = 10 total data – 1 = 9 
Try It 13.1
As part of an experiment to see how different types of soil cover would affect slicing tomato production, Marist College students grew tomato plants under different soil cover conditions. Groups of three plants each had one of the following treatments:
 Bare soil
 A commercial ground cover
 Black plastic
 Straw
 Compost
All plants grew under the same conditions and were the same variety. Students recorded the weight in grams of tomatoes produced by each of the n = 15 plants, as seen in Table 13.4.
Bare: n_{1} = 3  Ground Cover: n_{2} = 3  Plastic: n_{3} = 3  Straw: n_{4} = 3  Compost: n_{5} = 3 

2,625  5,348  6,583  7,285  6,277 
2,997  5,682  8,560  6,897  7,818 
4,915  5,482  3,830  9,230  8,677 
Create the oneway ANOVA table.
The oneway ANOVA hypothesis test is always righttailed because larger F values are way out in the right tail of the F distribution curve and tend to make us reject H_{0}.
Notation
The notation for the F distribution is F ~ F_{df(num),df(denom)},
where df(num) = df_{between} and df(denom) = df_{within}.
The mean for the F distribution is $\mu =\frac{df(\text{denom})}{df(\text{denom})\u20132}.$