Hypothesis Testing - II
PROFESSOR TAMALIKA KOLEY
DECISION SCIENCES AREA
Recall
Statistical Decision
Choose
Approach
P-value Critical value
▪ Compare scores
▪ Compare statistic
▪ Compare areas value to critical
▪ Compare p-value value.
to 𝛼 ▪ Reject null if test
▪ If p-value ≤ 𝛼, statistic value
reject null falls in the
rejection region.
Recall - One sample
Types of Samples
Scenario:
A national retail chain wants to understand its sales performance and how different strategies or changes might be
influencing store revenue.
Case – I: The management takes a sample of 30 stores and wants to compare their average monthly sales with the
company’s expected target of ₹10 lakh → one group of stores and comparing their performance to a known
standard or target.
Case – II: The company experiments with two different marketing approaches —Group A stores use social media ads,
Group B stores use local newspaper promotions → two separate, unrelated groups of stores being compared to see
which performs better.
Case – III: The company introduces a sales training program for all store managers and records each store’s sales
before and after the training → same stores are measured twice — once before the change and once after — forming
pairs of related observations.
TYPES OF SAMPLES
SOME EXAMPLES OF TWO
SAMPLE CASES
❑ Is there a difference in the mean number of days absent between young workers (under 21
years of age) and older workers (more than 60 years of age) in the fast-food industry?
❑ Is there an increase in the production rate if music is piped into the production area?
❑ It is frequently stated that on average, men are significantly taller than women. Less well-
known that variability in men's height is greater than that in women's height. Is the difference
significant?
Comparison of Means
Two sample test:
Population Mean
Compare Population Compare Population
Means : Independent Means : Paired
Samples Samples
Group - I vs Same Group
Group - II Before vs After Treatment
Comparing Two Population
Means: Paired observations
Compare two population means where you have two samples in which observations in one
sample can be paired with observations in the other sample.
Examples:
❑ Before-and-after observations on the same subjects (e.g. students’ diagnostic test results
before and after a particular module or course).
❑ A comparison of two different methods of measurement or two different treatments where
the measurements/treatments are applied to the same subjects (e.g. blood pressure
measurements using a stethoscope and a dynamap).
Data
Subjects (i) Observations - I Observations - II Combined
1 𝑋1 𝑌1 (𝑋1 , 𝑌1 )
2 𝑋2 𝑌2 (𝑋2 , 𝑌2 )
n 𝑋𝑛 𝑌𝑛 (𝑋𝑛 , 𝑌𝑛 )
Introduction
❑ The n pairs of random sample is (𝑋1 , 𝑌1 ), (𝑋2 , 𝑌2 ), . . . , (𝑋𝑛 , 𝑌𝑛 ).
❑ The data is taken from subjects who have been measured twice.
❑ Assumption: 𝑋𝑖 ~ 𝑁(𝜇1 , 𝜎12 ) and 𝑌𝑖 ~ 𝑁(𝜇2 , 𝜎22 ), 𝑖 = 1,2, . . . , 𝑛.
❑ For a given observation i, 𝑋𝑖 and 𝑌𝑖 may be dependent.
❑ n pairs (or observations) are independent of each other.
Example
A clinic provides a program to help their clients lose weight and asks a consumer agency to
investigate the effectiveness of the program. The agency takes a sample of 5 people, weighing
each person in the sample before the program begins and 3 months later to produce the
following data :
Person (i) 𝑿𝒊 𝒀𝒊 (𝑿𝒊 , 𝒀𝒊 )
1 210 197 (210,197)
X = Measurement before the
2 195 200 (195,200)
program begins. 3 193 191 (193,191)
Y = Measurement after 3 months 4 182 174 (182,174)
5 259 236 (259,236)
HYPOTHESES
Interested to test if the population means of the measurements before (𝜇1 ) and after the start
of the program (𝜇2 ) are equal that is, if the weight loss program has any effect on the weight
measurements.
Null Hypothesis: 𝐻0 : 𝜇1 = 𝜇2 ( 𝜇1 − 𝜇2 = 0) → No effect
Alternative Hypothesis:
𝐻𝐴 : 𝜇1 > 𝜇2 𝜇1 − 𝜇2 > 0 → weight has decreased
𝐻𝐴 : 𝜇1 < 𝜇2 ( 𝜇1 − 𝜇2 < 0) → weight has increased
𝐻𝐴 : 𝜇1 ≠ 𝜇2 𝜇1 − 𝜇2 ≠ 0 → weights are unequal
Test Statistic
❑ Define the differences 𝐷𝑖 = 𝑋𝑖 − 𝑌𝑖 , 𝑖 = 1,2, . . . , 𝑛.
What is the distribution of 𝐷𝑖 ?
❑ 𝐷𝑖 = 𝑋𝑖 − 𝑌𝑖 ~ 𝑁 (𝜇1 − 𝜇2 , 𝜎𝐷2 ) , using the property of normal distribution (linear
combination of normal random variables is also normally distributed).
2
𝜎𝐷 ∶ Unknown
Recall
2
𝜎𝐷
ഥ ~ 𝑁 (𝜇1 −
❑𝐷 𝜇2 , ).
𝑛
❑ Estimate 𝜎𝐷2 by the sample variance:
𝑛
1
𝑆𝐷2 = ഥ )2
(𝐷𝑖 − 𝐷
𝑛−1
𝑖=1
Test Statistics & Distribution
ഥ −(𝜇1 − 𝜇2 )
𝐷
𝑡 = 𝑆𝐷 ~ 𝑡𝑛−1 .
𝑛
Under 𝐻0 : 𝜇1 = 𝜇2 ( 𝜇1 − 𝜇2 = 0),
ഥ
𝐷
𝑡 = 𝑆𝐷 ~ 𝑡𝑛−1 .
𝑛
Test Statistic
Decision Rule
For a given sample and at 𝛼 level of significance, reject 𝐻0 in favor of
❑ 𝐻𝐴 : 𝜇1 > 𝜇2 ( 𝜇1 − 𝜇2 > 0), if 𝑡 > 𝑡𝑛−1;𝛼
❑ 𝐻𝐴 : 𝜇1 < 𝜇2 ( 𝜇1 − 𝜇2 < 0), if 𝑡 < −𝑡𝑛−1;𝛼
❑ 𝐻𝐴 : 𝜇1 ≠ 𝜇2 ( 𝜇1 − 𝜇2 ≠ 0), if |𝑡| > 𝑡𝑛−1;𝛼/2
Example
Blood samples from 10 patients were sent to each of two labs for cholesterol determination.
Par ticipants Lab I Lab II
Is there a statistically difference 1 296 318
2 268 287
at 𝛼 = 0.05 in the cholesterol 3 244 260
4 272 279
levels reported by Labs I and 5 240 245
6 244 249
Labs II? 7 282 294
8 254 271
9 244 262
10 262 285
Solution
Step - I: The null and alternative hypotheses are
𝐻0 : 𝜇1 = 𝜇2 ( 𝜇1 − 𝜇2 = 0)
𝐻𝐴 : 𝜇1 ≠ 𝜇2 ( 𝜇1 − 𝜇2 ≠ 0).
Step - II: The level of significance is 𝛼 = 0.05.
ഥ
𝐷
Step - III : The suitable test statistic is 𝑡 = 𝑆𝐷 ~ 𝑡𝑛−1 , under H0
𝑛
Solution
Par ticipants Lab I Lab II 𝑫𝒊
1 296 318 -2 2
2 268 287 -1 9
3 244 260 -1 6
4 272 279 -7
5 240 245 -5
6 244 249 -5
7 282 294 -1 2
8 254 271 -1 7
9 244 262 -1 8
10 262 285 -2 3
From the table, 𝑑ҧ = −14.4 and 𝑠𝐷 = 6.769211.
Continues...
Step IV: The critical value is 𝑡𝑛−1;𝛼/2 = 𝑡9; 0.025 = 2.262.
Step V: The test statistic value from the given sample is
𝑑ҧ −14.4
𝑡 = 𝑠 = = −6.727.
𝐷 6.767
𝑛 10
Step VI: Here, |t| = 6.727 > 2.262 = 𝑡9; 0.025 . On the basis of the given data and at 5% level of
significance, we reject the null hypothesis.
We have sufficient evidence to conclude that results from both the labs are different from each other.
Exercise
A company has developed a training program for its entering employees because management
has become concerned with the results of the six-month employee review. They hope that the
training program can result in better six-month reviews. Each trainee constitutes a “pair”, the
entering score the employee received when first entering the firm and the score given at the six-
month review. The difference in the two scores were calculated for each employee and the
means for before and after the training program was calculated. The sample mean before the
training program was 20.4 and the sample mean after the training program was 23.9. The
standard deviation of the differences in the two scores across the 20 employees was 3.8 points.
Test at the 10% significance level the null hypothesis that the two population means are equal
against the alternative that the training program helps improve the employees’ scores.
Comparing Two Population
Means: Independent
❑ Compare differences between separate groups.
❑ For example, one might be interested in differences of emotional intelligence between males
and females.
❑ Also called two-sample t test/ independent samples t test/ student's t test.
Data and Hypotheses
❑ 𝑋 ∶ 𝑋1 , 𝑋2 , . . . , 𝑋𝑛1 ~ 𝑁(𝜇1 , 𝜎12 ).
❑ 𝑌 ∶ 𝑌1 , 𝑌2 , . . . , 𝑌𝑛2 ~ 𝑁(𝜇2 , 𝜎22 ).
❑ X and Y are independent.
❑ Null Hypothesis: 𝐻0 : 𝜇1 = 𝜇2 ( 𝜇1 − 𝜇2 = 0).
❑ Alternative Hypothesis:
𝐻𝐴 : 𝜇1 > 𝜇2 ( 𝜇1 − 𝜇2 > 0).
𝐻𝐴 : 𝜇1 < 𝜇2 ( 𝜇1 − 𝜇2 < 0).
𝐻𝐴 : 𝜇1 ≠ 𝜇2 ( 𝜇1 − 𝜇2 ≠ 0).
Different Cases
Independent t - test
𝜎12 and 𝜎22 are 𝜎12 = 𝜎22 = 𝜎 2
𝜎12 ≠ 𝜎22 (unknown)
known (unknown)
2 2
Case - I: 𝜎1 and 𝜎2 are known
Recall
𝜎2 𝜎 2
❑ ഥ𝑋 ~ 𝑁 (𝜇1 , 1 ) and 𝑌ത ~ 𝑁 (𝜇2 , 2 ), independently.
𝑛1 𝑛2
𝜎12 𝜎22
❑𝑋ത − 𝑌ത ~ 𝑁 (𝜇1 − 𝜇2 , + ).
𝑛1 𝑛2
𝑋ത −𝑌ത
❑Test statistic : 𝑍 = ~ 𝑁(0,1), under H0.
𝜎2 2
1 + 𝜎2
𝑛1 𝑛2
Decision Rule
For a given sample and at 𝛼 level of significance, reject 𝐻0 in favour of
❑ 𝐻𝐴 : 𝜇1 > 𝜇2 ( 𝜇1 − 𝜇2 > 0), if 𝑧 > 𝑍𝛼
❑ 𝐻𝐴 : 𝜇1 < 𝜇2 ( 𝜇1 − 𝜇2 < 0), if 𝑧 < −𝑍𝛼
❑ 𝐻𝐴 : 𝜇1 ≠ 𝜇2 ( 𝜇1 − 𝜇2 ≠ 0), if |𝑧| > 𝑍𝛼/2
Example
One way to measure a person’s fitness is to measure their body fat percentage. Average body fat
percentages vary by age, and according to some studies, the standard deviation of body fat
percentages for men is 7 and women is 5.
A sample data is from a group of men and women who did workouts at a gym three times a
week for a year. Test whether gender affects the body fat percentages.
Group Body Fat Percentages
Men 13.3, 6.0, 20.0, 8.0, 14.0, 19.0, 18.0, 25.0, 16.0, 24.0, 15.0, 1.0, 15.0
Women 22.0, 16.0, 21.7, 21.0, 30.0, 26.0, 12.0, 23.2, 28.0, 23.0
Solution
Step - I: The null and alternative hypotheses are
𝐻0 : 𝜇1 = 𝜇2 ( 𝜇1 − 𝜇2 = 0)
𝐻𝐴 : 𝜇1 ≠ 𝜇2 ( 𝜇1 − 𝜇2 ≠ 0).
Step - II: The level of significance is 𝛼 = 0.05.
𝑋ത −𝑌ത
Step - III : The suitable test statistic is 𝑍 = ~ 𝑁(0,1), under H0.
𝜎2 2
1 +𝜎2
𝑛1 𝑛2
Solution
Step IV: The critical value is 𝑍0.025 = 1.96.
Step V: The test statistic value from the given sample is
𝑥ҧ −𝑦ത 22.29−14.95
𝑍 = = = −2.931
2 49 25
𝜎2
1 +𝜎 2 +
13 10
𝑛1 𝑛2
Step VI: Here, |Z| = > 2.931 = 𝑍0.025 . On the basis of the given data and at 5% level of significance,
we reject the null hypothesis.
We have sufficient evidence to conclude that average body percentages for men and women are
significantly different from each other.
Exercise
USA Today reports that the average expenditure on Valentine’s day is $100.89. The average
expenditure in a sample survey of 40 male consumers was $135.67, and the average
expenditure in a survey of 30 female consumers was $68.64.
Based on past surveys, the standard deviation for male consumers is assumed to be $35 and the
standard deviation for female consumers is $20.
Do male and female consumers differ in the amount they spend?
2 2
Case - II: 𝜎1 = 𝜎2 = 𝜎 (unknown)
2
2
𝜎 2
𝜎
❑ ഥ𝑋 ~ 𝑁 (𝜇1 , ) and 𝑌ത ~ 𝑁 (𝜇2 , ), independently.
𝑛1 𝑛2
❑ What is an estimate of unknown 𝜎 2 ?
❑ An estimate of 𝜎 2 is the pooled sample variance
2 (𝑛1 − 1)𝑆12 + (𝑛2 − 1)𝑆22
𝑆𝑝𝑜𝑜𝑙 =
𝑛1 + 𝑛2 − 2
𝑆𝑗 is the sample variance of the jth sample.
Test Statistic and Decision Rule
❑ Test statistic:
𝑋ത −𝑌ത
𝑡 = 1 1
~ 𝑡𝑛1 +𝑛2 −2 , under H0.
𝑆𝑝𝑜𝑜𝑙 𝑛 +𝑛
1 2
❑ For a given sample and at 𝛼 level of significance, reject 𝐻0 in favor of
𝐻𝐴 : 𝜇1 > 𝜇2 ( 𝜇1 − 𝜇2 > 0), if 𝑡 > 𝑡𝑛1 +𝑛2 −2;𝛼
𝐻𝐴 : 𝜇1 < 𝜇2 ( 𝜇1 − 𝜇2 < 0), if 𝑡 < −𝑡𝑛1 +𝑛2 −2;𝛼
𝐻𝐴 : 𝜇1 ≠ 𝜇2 ( 𝜇1 − 𝜇2 ≠ 0), if |𝑡| > 𝑡𝑛1 +𝑛2 −2;𝛼/2
Example
A researcher wants to know if there is a difference in how busy someone is based on whether
that person identifies as an early bird or a night owl. The researcher gathers data from people in
each group, coding the data so that higher scores represent higher levels of being busy, and tests
for a difference between the two at the 0.05 level of significance.
Early Bird : 23, 28, 27, 33, 26, 30, 22, 25,26.
Night Owl : 26, 20, 20, 19, 26, 18, 22, 25.
Solution
Step - I: The null and alternative hypotheses are
𝐻0 : 𝜇1 = 𝜇2 ( 𝜇1 − 𝜇2 = 0)
𝐻𝐴 : 𝜇1 ≠ 𝜇2 ( 𝜇1 − 𝜇2 ≠ 0).
Step - II: The level of significance is 𝛼 = 0.05.
𝑋ത −𝑌ത
Step - III: The suitable test statistic is 𝑡 = 1 1
~ 𝑡𝑛1 +𝑛2 −2 , under H0
𝑆𝑝𝑜𝑜𝑙 𝑛 +𝑛
1 2
Solution
Step IV: The critical value is 𝑡15; 0.025 = 2.131.
Step V: The test statistic value from the given sample is
𝑥ҧ −𝑦ത 26.67 −22
𝑡 = 1 1
= = 2.892.
1 1
𝑠𝑝𝑜𝑜𝑙 + 3.32 +
𝑛1 𝑛2 9 8
Step VI: Here, |t| > 𝑡15; 0.025 . On the basis of the given data and at 5% level of significance, we
reject the null hypothesis.
We have sufficient evidence to conclude that there is significant difference in how busy
someone is based on whether that person identifies as an early bird or a night owl.
Exercise
In a packing plant, a machine packs cartons with jars. It is supposed that a new machine will
pack faster on the average than the machine currently used. To test that hypothesis, the times it
takes each machine to pack ten cartons are recorded. The results, in seconds, are shown in the
following.
New Machine : 42.1, 41.3, 42.4, 43.2, 41.8, 41.0, 41.8, 42.8, 42.3, 42.7.
Old Machine : 42.7, 43.8, 42.5, 43.1, 44.0, 43.6, 43.3, 43.5, 41.7, 44.1.
Do the data provide sufficient evidence to conclude that, on the average, the new machine
packs faster?
2 2
Case - III: 𝜎1 ≠ 𝜎2 (unknown)
𝜎12 𝜎22
❑ Recall 𝑋ത ~ 𝑁 (𝜇1 , ) and 𝑌ത ~ 𝑁 (𝜇2 , ), independently.
𝑛1 𝑛2
❑ Both 𝜎12 and 𝜎22 are unknown.
1 1
❑ Estimate 𝜎12 by 𝑆12 = σ𝑛𝑖=1
1 ത 2 and 𝜎22 by 𝑆22 =
(𝑋𝑖 − 𝑋) σ𝑛𝑖=1
2 ത 2
(𝑌𝑖 − 𝑌)
𝑛1 −1 𝑛2 −1
Test Statistic
❑ Test Statistic:
𝑋ത −𝑌ത
𝑡 = ~ 𝑡𝑣, under H0.
𝑆2 2
1 + 𝑆2
𝑛1 𝑛2
𝑆2 𝑆 2 2
1+ 2
𝑛1 𝑛2
𝑣 = 2 2
𝑆2
1 1 𝑆2
2 1
𝑛1 𝑛1 −1
+ 𝑛 𝑛
2 2 −1
Decision Rule
❑For a given sample and at 𝛼 level of significance, reject 𝐻0 in favour of
𝐻𝐴 : 𝜇1 > 𝜇2 ( 𝜇1 − 𝜇2 > 0), if 𝑡 > 𝑡𝑣;𝛼
𝐻𝐴 : 𝜇1 < 𝜇2 ( 𝜇1 − 𝜇2 < 0), if 𝑡 < −𝑡𝑣;𝛼
𝐻𝐴 : 𝜇1 ≠ 𝜇2 ( 𝜇1 − 𝜇2 ≠ 0), if |𝑡| > 𝑡𝑣;𝛼/2
Example
A psychologist was interested in exploring whether or not male and female college students
have different driving behaviors. She opted to focus on the fastest speed ever driven by an
individual. The particular statistical question she framed was as follows:
Is the mean fastest speed driven by male college students different than the mean fastest speed
driven by female college students?
She conducted a survey of a random 34 male college students 𝑥ҧ = 105.5, 𝑠1 = 20.1 and a
random 29 female college students 𝑦ത = 90.9, 𝑠2 = 12.2.
Solution
Step - I: The null and alternative hypotheses are
𝐻0 : 𝜇1 = 𝜇2 ( 𝜇1 − 𝜇2 = 0)
𝐻𝐴 : 𝜇1 ≠ 𝜇2 ( 𝜇1 − 𝜇2 ≠ 0).
Step - II: The level of significance is 𝛼 = 0.05.
𝑋ത −𝑌ത
Step - III : The suitable test statistic is 𝑡 = ~ 𝑡𝑉 , under H0
𝑆2 2
1 + 𝑆2
𝑛1 𝑛2
Solution
Step IV: The critical value is 𝑡55; 0.025 ≈ 1.96.
Step V: The test statistic value from the given sample is
𝑋ത −𝑌ത 105.5−90.9
𝑡 = = = 3.54.
2 20.12 12.22
𝑆2
1 + 𝑆2 +
34 29
𝑛1 𝑛2
Step VI: Here, |t| = 3.54 > 𝑡55; 0.025 . On the basis of the given data and at 5% level of significance, we
reject the null hypothesis.
We have sufficient evidence to conclude that the average fastest speed driven by the population of
male college students differs from the average fastest speed driven by the population of female
college students.
Comparing Population
Proportions
Hypotheses
Null Hypothesis: 𝐻0 : 𝑃1 = 𝑃2 ( 𝑃1 − 𝑃2 = 0).
Alternative Hypothesis:
𝐻𝐴 : 𝑃1 > 𝑃2 ( 𝑃1 − 𝑃2 > 0).
𝐻𝐴 : 𝑃1 < 𝑃2 ( 𝑃1 − 𝑃2 < 0).
𝐻𝐴 : 𝑃1 ≠ 𝑃2 ( 𝑃1 − 𝑃2 ≠ 0).
Recall..
❑ Assuming at least 5 successes and 5 failures in each sample.
𝑋1 𝑃 (1−𝑃1 )
❑ Sample I : 𝑃1 = and 𝑃1 ~ 𝑁 𝑃1 , 1
𝑛1 𝑛1
𝑋2 𝑃 (1−𝑃2 )
❑ Sample 2 : 𝑃2 = and 𝑃2 ~𝑁 𝑃2 , 2
𝑛2 𝑛2
𝑃 (1−𝑃1 ) 𝑃 (1−𝑃2 )
❑ 𝑃1 − 𝑃2 ~ 𝑁 𝑃1 − 𝑃2 , 1 + 2
𝑛1 𝑛2
Test Statistic
❑ Under null hypothesis 𝐻0 : 𝑃1 = 𝑃2 = 𝑃,
𝑃 1−𝑃 𝑃 1−𝑃 1 1
𝑃1 − 𝑃2 ~ 𝑁 0, + = 𝑁 0, 𝑃 (1 − 𝑃) +
𝑛1 𝑛2 𝑛1 𝑛2
❑ How to estimate the unknown P??
𝑛1 𝑃1 +𝑛2 𝑃2 𝑋1 +𝑋2
❑ Pooled Estimate : 𝑃 = =
𝑛1 +𝑛2 𝑛1 +𝑛2
Test Statistic
1 1
❑ 𝑃1 − 𝑃2 ~𝑁 0, 𝑃 (1 − 𝑃)
+
𝑛1 𝑛2
❑ Test Statistic:
𝑃1 −𝑃2
❑𝑍 = ~ 𝑁(0,1), under null hypothesis.
1 1
𝑃 (1−𝑃)
+
𝑛1 𝑛2
Decision Rule
For a given sample and at 𝛼 level of significance, reject 𝐻0 in favour of
❑ 𝐻𝐴 ∶ 𝑃1 > 𝑃2 ( 𝑃1 − 𝑃2 > 0), if 𝑧 > 𝑍𝛼
❑ 𝐻𝐴 ∶ 𝑃1 < 𝑃2 ( 𝑃1 − 𝑃2 < 0), if 𝑧 < −𝑍𝛼
❑ 𝐻𝐴 ∶ 𝑃1 ≠ 𝑃2 ( 𝑃1 − 𝑃2 ≠ 0), , if |𝑧| > 𝑍𝛼/2
Example
200 patients suffering from a certain disease were randomly divided into two groups. Of the first
group consisting of 120 patients, who received treatment A, 99 recovered within three days. Out
of the other 80, who were treated by treatment B, 62 recovered within 3 days.
Can we conclude that treatment A is more effective?
Solution
Step - I: The null and alternative hypotheses are
𝐻0 : 𝑃1 = 𝑃2 ( 𝑃1 − 𝑃2 = 0).
𝐻𝐴 : 𝑃1 > 𝑃2 ( 𝑃1 − 𝑃2 > 0).
Step - II: The level of significance is 𝛼 = 0.05.
𝑃1 −𝑃2
Step - III: The suitable test statistic is 𝑍 = ~ 𝑁(0,1), under H0.
1 1
𝑃 (1−𝑃)
+
𝑛1 𝑛2
Solution
Step - IV: The critical value is 𝑍0.05 = 1.645.
𝑋 𝑋
Step - V: From the data: 𝑃1 = 1 = 0.825, 𝑃2 = 2 = 0.775, 𝑝Ƹ = 0.805.
𝑛1 𝑛2
𝑃1 −𝑃2 0.825−0.775
The test statistic value is 𝑍 = = = 0.87433.
1 1 1 1
𝑃 (1−𝑃)
+ 0.805 (1−0.805) +
𝑛1 𝑛2 120 80
Step VI: Here, z = 0.874 < 1.645. On the basis of the given data and at 5% level of significance,
we fail to reject the null hypothesis. We have sufficient evidence to conclude that both the
treatments are equally effective.
F Distribution
❑ Named in honor of R.A. Fisher, who studied it in 1924.
❑ Theoretically, define the F distribution to be the ratio of two independent chi-square distributions, each
divided by its degrees of freedom.
❑ Use: Comparing the variances of two populations.
Construction
2
❑ 𝑋 ~ 𝜒𝑚 , 𝑌~ 𝜒𝑛2 , independently.
❑ Positively skewed, Range is (0, ∞).
❑ If 𝑋 ~ 𝑡𝑛 , then 𝐹1,𝑛 = 𝑋 2
Comparing two population
variances
❑𝑋 ∶ 𝑋1 , 𝑋2 , . . . , 𝑋𝑛1 ~ 𝑁(𝜇1 , 𝜎12 ).
❑ 𝑌 ∶ 𝑌1 , 𝑌2 , . . . , 𝑌𝑛2 ~ 𝑁(𝜇2 , 𝜎22 ).
𝜎12
❑ Null Hypothesis: 𝐻0 : 𝜎12 = 𝜎22 ( 𝜎2 = 1).
2
𝜎12
❑ Alternative Hypothesis: 𝐻𝐴 : 𝜎12 > 𝜎22 ( > 1).
𝜎22
𝜎12
𝐻𝐴 : 𝜎12 < 𝜎22 ( 2 < 1).
𝜎2
𝜎12
𝐻𝐴 : 𝜎12 ≠ 𝜎22 ( 2 ≠ 1).
𝜎2
Recall
1 1
❑ 𝜎ො12 = 𝑆12 = σ𝑛𝑖=1
1
𝑋𝑖 − 𝑋ത 2 and 𝜎ො22 = 𝑆22 = σ𝑛𝑖=1
2
𝑌𝑖 − 𝑌ത 2
𝑛1 −1 𝑛2 −1
𝑛1 −1 𝑆12 𝑛2 −1 𝑆22
❑ 𝑉1 = ~ 𝜒𝑛21 −1 and 𝑉2 = ~ 𝜒𝑛22 −1
𝜎12 𝜎22
𝑉1 / 𝑛1 −1 𝑆12 𝜎22
❑ = × 2 ~ 𝐹𝑛1 −1,𝑛2 −1
𝑉2 / 𝑛2 −1 𝑆22 𝜎1
Test Statistic
𝑆12
❑𝐹 = ~ 𝐹𝑛1 −1,𝑛2 −1 , under null hypothesis.
𝑆22
❑ For a given sample and at 𝛼 level of significance, reject 𝐻0 in favour of
𝜎12
𝐻𝐴 : 𝜎12 > 𝜎22 ( > 1), if 𝐹 > 𝐹𝑛1 −1,𝑛2 −1; 𝛼
𝜎22
𝜎12
𝐻𝐴 : 𝜎12 < 𝜎22 ( < 1), if 𝐹 < 𝐹𝑛1 −1,𝑛2 −1; 1−𝛼 = 1/𝐹𝑛2 −1,𝑛1 −1; 𝛼
𝜎22
𝜎12
𝐻𝐴 : 𝜎12 ≠ 𝜎22 ( ≠ 1), if 𝐹 > 𝐹𝑛1 −1,𝑛2 −1; 𝛼/2 or 𝐹 < 𝐹𝑛1 −1,𝑛2 −1; 1−𝛼/2
𝜎22
F - Table
Example
Two college instructors are interested in whether or not there is any variation in the way they
grade math exams. They each grade the same set of 30 exams. The first instructor's grades have
a variance of 52.3. The second instructor's grades have a variance of 89.9. Test the claim that the
first instructor's variance is smaller. (In most colleges, it is desirable for the variances of exam
grades to be nearly the same among instructors.) The level of significance is 10%.
Solution
Step - I: The null and alternative hypotheses are
𝜎12
𝐻0 : 𝜎12 = 𝜎22 ( 𝜎22
= 1).
𝜎12
𝐻𝐴 : 𝜎12 < 𝜎22 ( 𝜎2 < 1).
2
Step - II: The level of significance is 𝛼 = 0.10.
𝑆12
Step - III : The suitable test statistic is 𝐹 = 𝑆22
~ 𝐹𝑛1 −1,𝑛2 −1 , under H0.
Solution
Step IV : The critical value is 𝐹𝑛1 −1,𝑛2 −1 ; 1−𝛼 = 𝐹29,29 ; 0.9 = 1/𝐹29,29 ; 0.10 .
𝑠12 = 52.3, 𝑠22 = 89.9
Step V: The test statistic value from the given sample is
𝑆12 52.3
𝐹 = = = 0.582.
𝑆22 89.9
1
Step VI: From the table 𝐹29,29 ; 0.10 ≈ 𝐹30,30;0.1 = 1.61. This implies 𝐹 < 𝐹 ≈ 0.62.
29,29 ; 0.9
On the basis of the given data and at 5% level of significance, we reject the null hypothesis. We have
sufficient evidence to conclude that the first instructor's variance is significantly smaller than the
second instructor.