F Distribution and OneWay ANOVA
65 The F Distribution and the FRatio
The distribution used for the hypothesis test is a new one. It is called the F distribution, invented by George Snedecor but named in honor of 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 four, and the number of degrees of freedom for the denominator is ten, then F ~ F_{4,10}.
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” means to add together squared quantities that, in some cases, may be weighted. We used sum of squares to calculate the sample variance and the sample standard deviation in (Figure).
MS means “mean square.” MS_{between} is the variance between groups, and MS_{within} is the variance within groups.
Calculation of Sum of Squares and Mean Square
 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} –
 Total sum of squares: ∑x^{2} –
 Explained variation: sum of squares representing variation among the different samples:
SS_{between} =  Unexplained variation: sum of squares representing variation within samples due to chance:
 df‘s for different groups (df‘s for the numerator): df = k – 1
 Equation for errors within samples (df‘s for the denominator): df_{within} = n – k
 Mean square (variance estimate) explained by the different groups: MS_{between} =
 Mean square (variance estimate) that is due to chance (unexplained): MS_{within} =
MS_{between} and MS_{within} can be written as follows:
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.
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.
FRatio or F Statistic
If MS_{between} and MS_{within} estimate the same value (following the belief that H_{0} is true), then the Fratio should be approximately equal to one. Mostly, just sampling errors would contribute to variations away from one. 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 Fratio will be larger than one. However, if the population effect is small, it is not unlikely that MS_{within} will be larger in a given sample.
The foregoing calculations were done with groups of different sizes. If the groups are the same size, the calculations simplify somewhat and the Fratio can be written as:
FRatio Formula when the groups are the same size
 n = the sample size
 df_{numerator} = k – 1
 df_{denominator} = n – k
 s^{2} pooled = the mean of the sample variances (pooled variance)
 = the variance of the sample means
Data are 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 
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 (Figure).
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
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 
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:
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.
Enter the data into lists L1, L2, L3, L4 and L5. Press STAT and arrow over to TESTS. Arrow down to ANOVA. Press ENTER and enter L1, L2, L3, L4, L5). Press ENTER. The table was filled in with the results from the calculator.
OneWay ANOVA table:
Source of variation  Sum of squares (SS)  Degrees of freedom (df)  Mean square (MS)  F 

Factor (Between)  36,648,561  5 – 1 = 4  
Error (Within)  20,446,726  15 – 5 = 10  
Total  57,095,287  15 – 1 = 14 
The oneway ANOVA hypothesis test is always righttailed because larger Fvalues are way out in the right tail of the Fdistribution curve and tend to make us reject H_{0}.
Let’s return to the slicing tomato exercise in (Figure). The means of the tomato yields under the five mulching conditions are represented by μ_{1}, μ_{2}, μ_{3}, μ_{4}, μ_{5}. We will conduct a hypothesis test to determine if all means are the same or at least one is different. Using a significance level of 5%, test the null hypothesis that there is no difference in mean yields among the five groups against the alternative hypothesis that at least one mean is different from the rest.
The null and alternative hypotheses are:
H_{0}: μ_{1} = μ_{2} = μ_{3} = μ_{4} = μ_{5}
H_{a}: μ_{i} ≠ μ_{j} some i ≠ j
The oneway ANOVA results are shown in (Figure)
Source of variation  Sum of squares (SS)  Degrees of freedom (df)  Mean square (MS)  F 

Factor (Between)  36,648,561  5 – 1 = 4  
Error (Within)  20,446,726  15 – 5 = 10  
Total  57,095,287  15 – 1 = 14 
Distribution for the test: F_{4,10}
df(num) = 5 – 1 = 4
df(denom) = 15 – 5 = 10
Test statistic:F = 4.4810
Probability Statement:pvalue = P(F > 4.481) = 0.0248.
Compare α and the pvalue:α = 0.05, pvalue = 0.0248
Make a decision: Since α > pvalue, we cannot accept H_{0}.
Conclusion: At the 5% significance level, we have reasonably strong evidence that differences in mean yields for slicing tomato plants grown under different mulching conditions are unlikely to be due to chance alone. We may conclude that at least some of mulches led to different mean yields.
MRSA, or Staphylococcus aureus, can cause a serious bacterial infections in hospital patients. (Figure) shows various colony counts from different patients who may or may not have MRSA. The data from the table is plotted in (Figure).
Conc = 0.6  Conc = 0.8  Conc = 1.0  Conc = 1.2  Conc = 1.4 

9  16  22  30  27 
66  93  147  199  168 
98  82  120  148  132 
Plot of the data for the different concentrations:
Test whether the mean number of colonies are the same or are different. Construct the ANOVA table, find the pvalue, and state your conclusion. Use a 5% significance level.
While there are differences in the spreads between the groups (see (Figure)), the differences do not appear to be big enough to cause concern.
We test for the equality of mean number of colonies:
H_{a}: μ^{i} ≠ μ^{j} some i ≠ j
The oneway ANOVA table results are shown in (Figure).
Source of variation  Sum of squares (SS)  Degrees of freedom (df)  Mean square (MS)  F 

Factor (Between)  10,233  5 – 1 = 4  
Error (Within)  41,949  15 – 5 = 10  
Total  52,182  15 – 1 = 14 
Distribution for the test:F_{4,10}
Probability Statement:pvalue = P(F > 0.6099) = 0.6649.
Compare α and the pvalue:α = 0.05, pvalue = 0.669, α > pvalue
Make a decision: Since α > pvalue, we do not reject H_{0}.
Conclusion: At the 5% significance level, there is insufficient evidence from these data that different levels of tryptone will cause a significant difference in the mean number of bacterial colonies formed.
Four sororities took a random sample of sisters regarding their grade means for the past term. The results are shown in (Figure).
Sorority 1  Sorority 2  Sorority 3  Sorority 4 

2.17  2.63  2.63  3.79 
1.85  1.77  3.78  3.45 
2.83  3.25  4.00  3.08 
1.69  1.86  2.55  2.26 
3.33  2.21  2.45  3.18 
Using a significance level of 1%, is there a difference in mean grades among the sororities?
Let μ_{1}, μ_{2}, μ_{3}, μ_{4} be the population means of the sororities. Remember that the null hypothesis claims that the sorority groups are from the same normal distribution. The alternate hypothesis says that at least two of the sorority groups come from populations with different normal distributions. Notice that the four sample sizes are each five.
This is an example of a balanced design, because each factor (i.e., sorority) has the same number of observations.
H_{0}:
H_{a}: Not all of the means are equal.
Distribution for the test:F_{3,16}
where k = 4 groups and n = 20 samples in total
df(num)= k – 1 = 4 – 1 = 3
df(denom) = n – k = 20 – 4 = 16
Calculate the test statistic:F = 2.23
Graph:
Probability statement:pvalue = P(F > 2.23) = 0.1241
Compare α and the pvalue:α = 0.01
pvalue = 0.1241
α < pvalue
Make a decision: Since α < pvalue, you cannot reject H_{0}.
Conclusion: There is not sufficient evidence to conclude that there is a difference among the mean grades for the sororities.
Four sports teams took a random sample of players regarding their GPAs for the last year. The results are shown in (Figure).
Basketball  Baseball  Hockey  Lacrosse 

3.6  2.1  4.0  2.0 
2.9  2.6  2.0  3.6 
2.5  3.9  2.6  3.9 
3.3  3.1  3.2  2.7 
3.8  3.4  3.2  2.5 
Use a significance level of 5%, and determine if there is a difference in GPA among the teams.
With a pvalue of 0.9271, we decline to reject the null hypothesis. There is not sufficient evidence to conclude that there is a difference among the GPAs for the sports teams.
A fourth grade class is studying the environment. One of the assignments is to grow bean plants in different soils. Tommy chose to grow his bean plants in soil found outside his classroom mixed with dryer lint. Tara chose to grow her bean plants in potting soil bought at the local nursery. Nick chose to grow his bean plants in soil from his mother’s garden. No chemicals were used on the plants, only water. They were grown inside the classroom next to a large window. Each child grew five plants. At the end of the growing period, each plant was measured, producing the data (in inches) in (Figure).
Tommy’s plants  Tara’s plants  Nick’s plants 

24  25  23 
21  31  27 
23  23  22 
30  20  30 
23  28  20 
Does it appear that the three media in which the bean plants were grown produce the same mean height? Test at a 3% level of significance.
This time, we will perform the calculations that lead to the F’ statistic. Notice that each group has the same number of plants, so we will use the formula F’ = .
First, calculate the sample mean and sample variance of each group.
Tommy’s plants  Tara’s plants  Nick’s plants  

Sample mean  24.2  25.4  24.4 
Sample variance  11.7  18.3  16.3 
Next, calculate the variance of the three group means (Calculate the variance of 24.2, 25.4, and 24.4). Variance of the group means = 0.413 =
Then MS_{between} = = (5)(0.413) where n = 5 is the sample size (number of plants each child grew).
Calculate the mean of the three sample variances (Calculate the mean of 11.7, 18.3, and 16.3). Mean of the sample variances = 15.433 = s^{2}pooled
Then MS_{within} = s^{2}_{pooled} = 15.433.
The F statistic (or F ratio) is
The dfs for the numerator = the number of groups – 1 = 3 – 1 = 2.
The dfs for the denominator = the total number of samples – the number of groups = 15 – 3 = 12
The distribution for the test is F_{2,12} and the F statistic is F = 0.134
The pvalue is P(F > 0.134) = 0.8759.
Decision: Since α = 0.03 and the pvalue = 0.8759, then you cannot reject H_{0}. (Why?)
Conclusion: With a 3% level of significance, from the sample data, the evidence is not sufficient to conclude that the mean heights of the bean plants are different.
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
References
Tomato Data, Marist College School of Science (unpublished student research)
Chapter Review
Analysis of variance compares the means of a response variable for several groups. ANOVA compares the variation within each group to the variation of the mean of each group. The ratio of these two is the F statistic from an F distribution with (number of groups – 1) as the numerator degrees of freedom and (number of observations – number of groups) as the denominator degrees of freedom. These statistics are summarized in the ANOVA table.
Formula Review
df_{between} = df(num) = k – 1
df_{within} = df(denom) = n – k
MS_{between} =
MS_{within} =
F =
 k = the number of groups
 n_{j} = the size of the j^{th} group
 s_{j} = the sum of the values in the j^{th} group
 n = the total number of all values (observations) combined
 x = one value (one observation) from the data
 = the variance of the sample means
 = the mean of the sample variances (pooled variance)
Use the following information to answer the next eight exercises. Groups of men from three different areas of the country are to be tested for mean weight. The entries in (Figure) are the weights for the different groups.
Group 1  Group 2  Group 3 

216  202  170 
198  213  165 
240  284  182 
187  228  197 
176  210  201 
What is the Sum of Squares Factor?
4,939.2
What is the Sum of Squares Error?
What is the df for the numerator?
2
What is the df for the denominator?
What is the Mean Square Factor?
2,469.6
What is the Mean Square Error?
What is the F statistic?
3.7416
Use the following information to answer the next eight exercises. Girls from four different soccer teams are to be tested for mean goals scored per game. The entries in (Figure) are the goals per game for the different teams.
Team 1  Team 2  Team 3  Team 4 

1  2  0  3 
2  3  1  4 
0  2  1  4 
3  4  0  3 
2  4  0  2 
What is SS_{between}?
What is the df for the numerator?
3
What is MS_{between}?
What is SS_{within}?
13.2
What is the df for the denominator?
What is MS_{within}?
0.825
What is the F statistic?
Judging by the F statistic, do you think it is likely or unlikely that you will reject the null hypothesis?
Because a oneway ANOVA test is always righttailed, a high F statistic corresponds to a low pvalue, so it is likely that we cannot accept the null hypothesis.
Homework
Use the following information to answer the next three exercises. Suppose a group is interested in determining whether teenagers obtain their drivers licenses at approximately the same average age across the country. Suppose that the following data are randomly collected from five teenagers in each region of the country. The numbers represent the age at which teenagers obtained their drivers licenses.
Northeast  South  West  Central  East  

16.3  16.9  16.4  16.2  17.1  
16.1  16.5  16.5  16.6  17.2  
16.4  16.4  16.6  16.5  16.6  
16.5  16.2  16.1  16.4  16.8  
________  ________  ________  ________  ________  
________  ________  ________  ________  ________ 
H_{0}: µ_{1} = µ_{2} = µ_{3} = µ_{4} = µ_{5}
Hα: At least any two of the group means µ_{1}, µ_{2}, …, µ_{5} are not equal.
degrees of freedom – numerator: df(num) = _________
degrees of freedom – denominator: df(denom) = ________
df(denom) = 15
F statistic = ________