Hypothesis Testing Part 3
Hypothesis Testing Part 3
Testing Part 3
Analysis of Variance
Analysis of Variance (ANOVA), sometimes also referred to as F-test is applicable in comparing three or more independent
sample means. This test is an extension of t-test for independent samples. ANOVA tests the hypothesis that all means are equal,
against the alternative that at least one mean is significantly different from others.
The null hypothesis is rejected if F computed is greater than F critical value in the ANOVA table or if p-value is less than
0.05. The computation can be done manually or by using a software like Microsoft Excel.
Assumptions:
1. The population from which the samples were drawn are normally distributed.
2. The samples are independent from each other.
3. The variances of the different samples are homogeneous
Below is the data lay out for ANOVA.
Samples Group 1 Group 2 ... Group p
1 X1 Y1 . Z1
2 X2 Y2 . Z2
3 . . . .
. . . .
Xn1 Yn2 . Znp
TOTALS T1 T2 . Tp
The source of variation is divided into two: between groups and within groups. The degrees of freedom (df) for between
groups is always the number of groups minus 1 (p-1). On the other hand, the df of within groups is equal to the total number
of observations minus number of groups to be tested (N-p). The total df is always equal to the total number of observations
minus 1 (N-1). Refer to the table below.
Sources of Mean
df Sum of Square Fc P-value
Variation Square
Between
p-1 SSB MSB Fc ____
Groups
Within
N-p SSW MSW
Groups
Total N-1 SST
The sum of squares has 3 components. The Sum of Square Between (SSB), Sum of Squares Within (SSW), and the Total Sum
of Squares (SST). The Mean Square has 2 components. The Mean Square Between (MSB) and Mean Square Within (MSW).
The F-computed (Fc) is the ratio of the mean squares. The formulas are presented below.
Formula:
Example 1. Rosenbaum Restaurants specialize in meals for families. Katy Polsby, President, recently developed a new meat
loaf dinner. Before making it a part of the regular menu she decides to test it in several of her restaurants. She would like to
know if there is a difference in the mean number of dinners sold per day at the Anyor, Loris, and Lander restaurants. Use the
0.05 significance level. Can Katy conclude that there is a difference in the mean number of dinners sold between the
restaurants?
1. Null hypothesis: There is no significant difference in the mean number of dinners sold between the
three restaurants.
Alternative hypothesis: There is a significant difference in the mean number of dinners sold between
the three restaurants.
2.
3. Test Statistic: Analysis of Variance (ANOVA)
4. Decision Rule: Reject the null hypothesis if F computed is greater than F-critical or if the p-value is
less than 0.05. Otherwise, fail to reject the null hypothesis.
5. Computation
The value that corresponds to the degrees of freedom for within and between groups given the alpha level of significance (0.05) is the critical
value. In this case, the intersection of (2,10) = 4.10.
ANOVA TABLE:
Source of Variation SS df MS F F crit
Total 86 12
Using Microsoft Excel:
• Follow the same procedure as the t-test. But instead of choosing t-test in the data analysis tab, select
“Anova: Single Factor” then click “ok”.
MODULE 4
Hypothesis Testing
• In the dialogue box, highlight the data set for the “input range”, check the “labels” box and find a place to display
the result in the “output range” then click “ok”.
MODULE 4
Hypothesis Testing
that the three restaurants differ in the mean number of dinners sold. Thus, Ms. Katy can now
include the new meat loaf dinner as part of the regular menu.
Example 2. A chemist is studying the effect of the level of a catalyst on the concentration of a component in a liquid solution.
The data are given below. Is there a difference in the mean level of concentration?
Data:
Level 1 Level 2 Level 3 Level 4
70.6 70.3 67.7 62.4
68.4 67.6 68.9 63.0
71.8 68.4 63.8 64.3
71.4 69.4 65.1
67.0
Solution:
1. Null hypothesis: There is no significant difference in the mean level of concentration.
2. Alternative hypothesis: There is a significant difference in the mean level of concentration.
3.
4. Test Statistic: Analysis of Variance (ANOVA)
5. Decision Rule: Reject the null hypothesis if F computed is greater than F-critical or if the p-value is less than 0.05.
Otherwise, fail to reject the null hypothesis.
5. Computation
ANOVA
Source of
Variation SS df MS F P-value F crit
Total 134.59 15
6. Decision/Conclusion: Since the F computed (9.51) is greater than the F critical value (3.49) and the p-value (0.001) is less
than 0.05, the null hypothesis was rejected. This implies that there is a significant difference in the mean level of
concentration.
Mr. Jerome L. Buhay
M O D U L E 4 H y p o t h e s i s Te s t i n g
PRACTICE EXERCISE
PRACTICE EXERCISE 4.5
1. A paint manufacturer is studying the reflective properties of four different kinds of paint. The data gathered follow. The
reflective indices of the paints have been scaled here:
Paint
1 2 3 4
195 45 230 110
150 40 115 55
205 195 235 120
120 65 225 50
160 145 80
195
Is there a significant difference in the reflective properties of the different kinds of paint? Use 0.01
level of significance.
PRACTICE EXERCISE 4.5
2. An underwriting laboratory has tested the flammability of fabric, using identical methods in five different laboratories.
The measurements are the length of the burned portion of a piece of fabric held over flame for a fixed amount of time.
Laboratories
1 2 3 4 5
2.9 2.7 3.3 3.3 4.1
3.1 3.4 3.3 3.2 4.1
3.1 3.6 3.5 3.4 3.7
3.7 3.2 3.5 2.7 4.2
3.1 4.0 2.8 2.7 3.1
4.2 4.1 2.8 3.3 3.5
3.7 3.8 3.2 2.9 2.8
3.9 3.8 2.8 3.2 3.5
3.1 4.3 3.8 2.9 3.7
3.0 3.4 3.5 2.6 3.5
2.9 3.3 3.8 2.8 3.9
Do the laboratories differ with respect to their measurement of the amount of burned fabric?
SUPPLEMENTAL VIDEO IN ANOVA
ANOVA in excel
https://youtu.be/0V5scynrVjY
ANSWERS TO PRACTICE EXERCISE 4.5
1.
a. Null hypothesis: There is no significant difference in the reflective properties of the different kinds of paint.
Alternative hypothesis: There is a significant difference in the reflective properties of the different kinds of paint.
b.
c. Test Statistic: Analysis of Variance (ANOVA)
d. Decision Rule: Reject the null hypothesis if F computed is greater than F-critical or if the p-value is less than 0.01.
Otherwise, fail to reject the null hypothesis.
e. Computation:
f. Decision/Conclusion: Since the F computed (4.51) is less than the F critical value (5.29) and the p-value (0.018) is greater
than 0.01, the null hypothesis was not rejected. This implies that there is no significant difference in the reflective properties of
the different kinds of paint.
ANSWERS TO PRACTICE EXERCISE 4.5
2.
a. Null hypothesis: There is no significant difference in the measurement of the amount of burned fabric in five laboratories.
Alternative hypothesis: There is a significant difference in the in the measurement of the amount of burned fabric in five
laboratories.
b.
c. Test Statistic: Analysis of Variance (ANOVA)
d. Decision Rule: Reject the null hypothesis if F computed is greater than F-critical or if the p-value is less than 0.05. Otherwise, fail
to reject the null hypothesis.
e. Computation:
f. Decision/Conclusion: Since the F computed (4.53) is greater than the F critical value (2.56) and the p-value (0.0033) is less
than 0.05, the null hypothesis was rejected. This implies that there is a significant difference in the measurement of the amount
of burned fabric in five laboratories.