CHAPTER 7
Hypothesis Testing
• Purpose of ANOVA
• Post hoc multiple comparison
• Software examples using Excel & SAS
• Interpretation of Excel and SAS outputs
TAXONOMY OF HYPOTHESIS TESTING
ONE-WAY ANOVA
A one-way ANOVA is a hypothesis test that allows you to compare more group means. Like all
hypothesis tests, one-way ANOVA uses sample data to make inference about the properties of
an entire population.
Assumptions for one-way ANOVA
1. Data in each group is randomly selected from a normal distributed population.
2. Data/sample points/observations must be independent to the others.
3. Equal population variances can be assumed.
F-TEST
The F test
We use F test for one-way ANOVA. F test is used to determine whether two samples
are from populations having equal variances. An F-statistic is the ratio of two
variances, and it was named after Sir Ronald Fisher. Variances measure the
dispersal of the data points around the mean. Higher variances occur when the
individual data points tend to fall further from the mean.
Further used of F test
F test for equality of two population variances
ANOVA (F test for equality of k population means)
F test for regression model
CHARACTERISTICS OF F DISTRIBUTION
• F distribution is continuous. It can assume an infinite number of values between
zero and positive infinity.
• It depends on two degrees of freedom, i.e. for numerator and denominator.
• It is positively skewed.
• It is asymptotic. As the values of X increase, the F curve approaches the X-axis but
never touches it.
IDENTIFY THE COMPONENTS OF STUDY
Example: Mr. Lion teaches introduction to philosophy to the Major
first-year students. He would like to know whether the effect
of the students’ score variation might be from the major of
the students or not.
Independent variables (x) = students’ major
Dependent variables (y) = scores in introduction to philosophy
IDENTIFY THE COMPONENTS OF STUDY
Example: Mr. Lion teaches introduction to philosophy to the
first-year students. He would like to know whether the effect Major
of the students’ score variation might be from the major of
the students or not.
score
20 25 30 32
45 50 55 65
70 72 74 76 72 74 50 55 20 25
37 42 54 60 76 54 65 70 30 32
75 77 60 75 42 37 45
77
Independent variables (x) = students’ major
Dependent variables (y) = scores in introduction to philosophy
SET UP HYPOTHESIS
Null hypothesis (Ho)
Symbolic form
𝑯𝟎 ∶ 𝜇1 = 𝜇2 = 𝜇3 =. . . = 𝜇𝑘
Alternative hypothesis (Ha)
Symbolic form
𝑯𝒂 : 𝑎𝑡 𝑙𝑒𝑎𝑠𝑡 𝑜𝑛𝑒 𝑜𝑓 𝑡ℎ𝑒 𝑝𝑜𝑝𝑢𝑙𝑎𝑡𝑖𝑜𝑛 𝑚𝑒𝑎𝑛𝑠 𝑎𝑟𝑒 𝑑𝑖𝑓𝑓𝑒𝑟𝑒𝑛𝑡
or
𝑯𝒂 : 𝑛𝑜𝑡 𝑎𝑙𝑙 𝑝𝑜𝑝𝑢𝑙𝑎𝑡𝑖𝑜𝑛 𝑚𝑒𝑎𝑛𝑠 𝑎𝑟𝑒 𝑒𝑞𝑢𝑎𝑙
F TEST FOR EQUALITY OF K POPULATION MEANS
Source of Sum
df Mean Squares F ratio
Variation Squares
𝑆𝑆𝐵
Between Groups 𝑆𝑆𝐵 𝑘−1 𝑀𝑆𝐵 =
𝑘−1 𝑀𝑆𝐵
𝐹=
𝑀𝑆𝑊
𝑆𝑆𝑊
Within Groups 𝑆𝑆𝑊 𝑁−𝑘 𝑀𝑆𝑊 =
𝑁−𝑘
Total 𝑆𝑆𝑇 𝑁−1
Total variation (SST) = The sum of the squared differences between each observation and the overall mean.
Between-group variation (SSB) = The sum of the squared differences between each treatment mean and the overall mean.
Within-group variation (SSW) = The sum of the squared differences between each observation and its treatment mean.
TESTING HYPOTHESIS BY ONE-WAY ANOVA
1. Between-group variation (SSB) is the sum of
squared differences between each treatment
mean and the overall mean. In the textbook, it is
called treatment variation that is the variation
due to the treatments.
2. Within-group variation (SSW) is the sum of
the squared differences between each
observation and its treatment mean. In the Testing these hypotheses by using one-way ANOVA is accomplished by partitioning the total variance of the data into the following two variances.
textbook, it is called random variation that is
the variation due to the random errors.
ANOVA TABLE [EXCEL]
Major
BBA SCI MUSIC
72 50 20
76 65 30
60 42 45
77 55 25
74 70 32
54 37
75
ANOVA TABLE [EXCEL]
Major
BBA SCI MUSIC
72 50 20
76 65 30
60 42 45
77 55 25
74 70 32
54 37
75
ANOVA
Example: Mr. Lion teaches introduction to philosophy to the first-year students. He would like to
know whether the effect of the students’ score variation might be from the major of the students
or not. “There is no difference in the average scores
of the 1st year students on the basis of their
Step 1: Set up hypothesis major.”
𝑯𝟎 ∶ 𝜇1 = 𝜇2 = 𝜇3 “At least one of the majors average scores is
different from the others.”
𝑯𝒂 ∶ at least one of the population means are different
Step 2: ANOVA table
ANOVA
Example: Mr. Lion teaches introduction to philosophy to the first-year students. He would like to
know whether the effect of the students’ score variation might be from the major of the students
or not. “There is no difference in the average scores
of the 1st year students on the basis of their
Step 1: Set up hypothesis major.”
𝑯𝟎 ∶ 𝜇1 = 𝜇2 = 𝜇3 “At least one of the majors average scores is
different from the others.”
𝑯𝒂 ∶ at least one of the population means are different
=[Link](0.05,2,15)
Step 2: ANOVA table
=[Link](20.3502223,2,15)
ANOVA
Example: Mr. Lion teaches introduction to philosophy to the first-year students. He would like to
know whether the effect of the students’ score variation might be from the major of the students
or not. “There is no difference in the average scores
of the 1st year students on the basis of their
Step 1: Set up hypothesis major.”
𝑯𝟎 ∶ 𝜇1 = 𝜇2 = 𝜇3 “At least one of the majors average scores is
different from the others.”
𝑯𝒂 ∶ at least one of the population means are different
Step 3: Define the decision rule
Test statistics vs Critical value P-value vs Alpha
5.33021E-05 0.05
Step 4: Making decision & conclusion
The null hypothesis is rejected, and the conclusion would be
that at least one of the majors average scores is different
from the others
vs
“There is no difference in the average scores “At least one of the majors average scores
of the 1st year students on the basis of their is different from the others.”
major.”
The null hypothesis is rejected, and the conclusion would be that at least one of the majors
average scores is different from the others
MULTIPLE COMPARISON TEST (POST-HOC)
If our test of the null hypothesis is rejected, we conclude that not all the means
are equal.
At least one mean is different from the other means
The ANOVA test itself provides only statistical evidence of a difference, but not
any statistical evidence as to which mean or means are statistically different.
“At least one of the majors average scores
is different from the others.”
MULTIPLE COMPARISON TEST (POST-HOC)
Multiple comparisons conducts an analysis of all possible pairwise means. For
example, with three majors of the students, BBA, SCI, and MUSIC, if the
ANOVA test was significant, then multiple comparison methods would compare
the three possible pairwise comparisons:
GLOSSARY
Null hypothesis The hypothesis tentatively assumed true in the hypothesis testing procedure.
Alternative hypothesis The hypothesis concluded to be true if the null hypothesis is rejected.
Type I error The error of rejecting 𝑯𝟎 when it is true.
Type II error The error of accepting 𝑯𝟎 when it is false.
One-tailed test A hypothesis test in which rejection of the null hypothesis occurs for values of the
test statistic in one tail of its sampling distribution.
Test statistic A statistic whose value helps determine whether a null hypothesis should be rejected.
Critical value A value that is compared with the test statistic to determine whether 𝑯𝟎 should be
rejected.
Two-tailed test A hypothesis test in which rejection of the null hypothesis occurs for values of the
test statistic in either tail of its sampling distribution
GLOSSARY
Level of significance The probability of making a Type I error when the null hypothesis is true as an
equality.
p-value A probability that provides a measure of the evidence against the null hypothesis given by
the sample. Smaller p-values indicate more evidence against 𝑯𝟎 . For a lower tail test, the p-value
is the probability of obtaining a value for the test statistic as small as or smaller than that provided
by the sample. For an upper tail test, the p-value is the probability of obtaining a value for the test
statistic as large as or larger than that provided by the sample. For a two-tailed test, the p-value is
the probability of obtaining a value for the test statistic at least as unlikely as or more unlikely than
that provided by the sample.