Hypothesis Testing
(Two Samples)
shs.mapua.edu.ph
Objectives
At the end of the lesson, the students should be able to:
1. Perform hypothesis testing for the difference between two
population means with known variances.
2. Conduct hypothesis testing for the difference between two
population means with unknown but equal variances.
shs.mapua.edu.ph
Hypothesis Testing for the Difference Between Two
Population Means: 𝝈𝟏 and 𝝈𝟐 Known
1. Assumptions for the Test to Determine the Difference Between Two Population Means:
a. The samples must be independent of each other; that is, there can be no
relationship between the subjects in each sample.
b. The standard deviations of both populations must be known.
c. Both samples are large (𝑛 ≥ 30). If the sample sizes are less than 30, the
populations must be normally or approximately normally distributed.
2. Test Statistic for 𝝁𝟏 − 𝝁𝟐 (𝝈𝟏 and 𝝈𝟐 Known)
ഥ𝟏 − 𝒙
𝒙 ഥ𝟐 − 𝝁𝟏 − 𝝁𝟐
𝒛=
𝝈𝟐𝟏 𝝈𝟐𝟐
+
𝒏𝟏 𝒏𝟐
shs.mapua.edu.ph
Critical values for z
shs.mapua.edu.ph
Hypothesis Testing for the Difference Between Two
Population Means: 𝝈𝟏 and 𝝈𝟐 Known
Examples:
1. A survey found that the average hotel room rate in New Orleans is $88.42, and the average room
rate in Phoenix is $80.61. Assume that the data were obtained from two samples of 50 each, and
that the standard deviations of the populations are $5.62 and $4.83, respectively. At 5% level of
significance, can it be concluded that there is a significant difference in the rates? Use the Critical-
Value Approach.
STEP 1: Formulate the hypotheses and identify the claim.
STEP 2: Find the critical value with the corresponding level of significance and type of test.
shs.mapua.edu.ph
Hypothesis Testing for the Difference Between Two
Population Means: 𝝈𝟏 and 𝝈𝟐 Known
Examples:
1. A survey found that the average hotel room rate in New Orleans is $88.42, and the average room
rate in Phoenix is $80.61. Assume that the data were obtained from two samples of 50 each, and
that the standard deviations of the populations are $5.62 and $4.83, respectively. At 5% level of
significance, can it be concluded that there is a significant difference in the rates? Use the Critical-
Value Approach.
STEP 1: Formulate the hypotheses and identify the claim.
𝑯𝟎 : 𝝁𝟏 − 𝝁𝟐 = 𝟎
𝑯𝟏 : 𝝁𝟏 − 𝝁𝟐 ≠ 𝟎 (𝑪𝒍𝒂𝒊𝒎)
STEP 2: Find the critical value with the corresponding level of significance and type of test.
𝛼 = 0.05, Two-Tailed Test
𝒛 = ±𝟏. 𝟗𝟔 (Critical Values)
shs.mapua.edu.ph
Hypothesis Testing for the Difference Between Two
Population Means: 𝝈𝟏 and 𝝈𝟐 Known
STEP 3: Compute the test value.
STEP 4: Make a decision.
STEP 5: Interpret the result.
shs.mapua.edu.ph
Hypothesis Testing for the Difference Between Two
Population Means: 𝝈𝟏 and 𝝈𝟐 Known
• STEP 3: Compute the test value.
𝑥ҧ 1 −𝑥ҧ 2 − 𝜇1 −𝜇2 88.42−80.61 −0
• 𝑧= =
5.62 2 4.83 2
𝜎2 2
1 +𝜎2 + 50
50
𝑛1 𝑛2
• 𝒛 = 𝟕. 𝟒𝟓 (Test Value)
• STEP 4: Make a decision.
• Since 𝑻𝒆𝒔𝒕 𝑽𝒂𝒍𝒖𝒆 ≥ 𝑪𝒓𝒊𝒕𝒊𝒄𝒂𝒍 𝑽𝒂𝒍𝒖𝒆 , reject 𝑯𝟎 .
• STEP 5: Interpret the result.
• Since we reject 𝑯𝟎 AND the claim is 𝑯𝟏 , there is sufficient evidence to support the claim
that the two average hotel room rates are significantly different.
shs.mapua.edu.ph
Hypothesis Testing for the Difference Between Two
Population Means: 𝝈𝟏 and 𝝈𝟐 Known
2. In a study of women science majors, there is a claim that those who left their profession within a
few months after graduation (leavers) had a lower science grade point average than those who
stayed in their profession after graduation (stayers). A random sample of 103 leavers has been
chosen, who gave an average grade point in science of 3.37. On the other hand, 225 stayers have
been selected, who gave an average grade point in science of 3.28. Assume the population
standard deviations to be 0.52 and 0.46, respectively.
a. What is the best point estimate for the difference between the two population means?
b. At 90% confidence, is there enough evidence to support the claim? Use the 𝑃-Value Method.
STEP 1: Formulate the hypotheses and identify the claim.
shs.mapua.edu.ph
Hypothesis Testing for the Difference Between Two
Population Means: 𝝈𝟏 and 𝝈𝟐 Known
2. In a study of women science majors, there is a claim that those who left their profession within a
few months after graduation (leavers) had a lower science grade point average than those who
stayed in their profession after graduation (stayers). A random sample of 103 leavers has been
chosen, who gave an average grade point in science of 3.37. On the other hand, 225 stayers have
been selected, who gave an average grade point in science of 3.28. Assume the population
standard deviations to be 0.52 and 0.46, respectively.
a. What is the best point estimate for the difference between the two population means?
𝑥ҧ1 − 𝑥ҧ2 = 3.37 − 3.28 = 𝟎. 𝟎𝟗
b. At 90% confidence, is there enough evidence to support the claim? Use the 𝑃-Value Method.
STEP 1: Formulate the hypotheses and identify the claim.
𝑯𝟎 : 𝝁𝟏 − 𝝁𝟐 ≥ 𝟎
𝑯𝟏 : 𝝁𝟏 − 𝝁𝟐 < 𝟎 (𝑪𝒍𝒂𝒊𝒎) Left-tailed test
shs.mapua.edu.ph
Hypothesis Testing for the Difference Between Two
Population Means: 𝝈𝟏 and 𝝈𝟐 Known
STEP 2: Calculate the test value.
STEP 3: Find the 𝒑-value.
shs.mapua.edu.ph
Hypothesis Testing for the Difference Between Two
Population Means: 𝝈𝟏 and 𝝈𝟐 Known
STEP 2: Calculate the test value.
𝑥ҧ1 − 𝑥ҧ2 − 𝜇1 − 𝜇2 3.37 − 3.28 − 0
𝑧= =
𝜎12 𝜎22 0.52 2 0.46 2
+
+ 103 225
𝑛1 𝑛2
𝒛 = 𝟏. 𝟓𝟏 (Test Value)
STEP 3: Find the 𝒑-value.
The area to the left of test value z = 1.51 is 0.9345.
shs.mapua.edu.ph
Hypothesis Testing for the Difference Between Two
Population Means: 𝝈𝟏 and 𝝈𝟐 Known
STEP 4: Make a decision.
STEP 5: Interpret the result.
shs.mapua.edu.ph
Hypothesis Testing for the Difference Between Two
Population Means: 𝝈𝟏 and 𝝈𝟐 Known
STEP 4: Make a decision.
Since 𝒑 − 𝒗𝒂𝒍𝒖𝒆 = 𝟎. 𝟗𝟑𝟒𝟓 > 𝜶 = 𝟎. 𝟏𝟎, fail to reject 𝑯𝟎 .
STEP 5: Interpret the result.
Since we fail to reject 𝑯𝟎 AND the claim is 𝑯𝟏 , there is no sufficient evidence to support the
claim that the science grade point average of leavers is lower than the science grade point
average of stayers.
shs.mapua.edu.ph
Hypothesis Testing for the Difference Between Two
Population Means: 𝝈𝟏 and 𝝈𝟐 Known
3. To determine whether car ownership affects student’s academic achievement, two random sample
of 100 male students were each drawn from the student body. The grade point average for 100 non-
owners of cars is 83.6 while the grade point average for 100 car owners is 85.8. The variance of all
non-owners of cars is 60 while the variance of all car owners is 65. Do the data present sufficient
evidence to indicate a difference in the mean achievements between car owners and nonowners of
cars? Test using 𝛼 = 0.05. Use p-value method.
STEP 1: Formulate the hypotheses and identify the claim.
shs.mapua.edu.ph
Hypothesis Testing for the Difference Between Two
Population Means: 𝝈𝟏 and 𝝈𝟐 Known
3. To determine whether car ownership affects student’s academic achievement, two random sample
of 100 male students were each drawn from the student body. The grade point average for 100 non-
owners of cars is 83.6 while the grade point average for 100 car owners is 85.8. The variance of all
non-owners of cars is 60 while the variance of all car owners is 65. Do the data present sufficient
evidence to indicate a difference in the mean achievements between car owners and nonowners of
cars? Test using 𝛼 = 0.05. Use p-value method.
STEP 1: Formulate the hypotheses and identify the claim.
𝑯𝟎 : 𝝁𝟏 − 𝝁𝟐 = 𝟎
𝑯𝟏 : 𝝁𝟏 − 𝝁𝟐 ≠ 𝟎 (𝑪𝒍𝒂𝒊𝒎) Two-tailed Test
shs.mapua.edu.ph
Hypothesis Testing for the Difference Between Two
Population Means: 𝝈𝟏 and 𝝈𝟐 Known
STEP 2: Calculate the test value.
STEP 3: Find the 𝒑-value.
shs.mapua.edu.ph
Hypothesis Testing for the Difference Between Two
Population Means: 𝝈𝟏 and 𝝈𝟐 Known
STEP 2: Calculate the test value.
𝑥ҧ1 − 𝑥ҧ2 − 𝜇1 − 𝜇2 (85.8 − 83.6) − 0
𝑧= =
𝜎12 𝜎22 65 60
+
+ 100 100
𝑛1 𝑛2
𝒛 = 𝟏. 𝟗𝟕 (Test Value)
STEP 3: Find the 𝒑-value.
The area to the right of test value z = 1.97 is 0.0244.
Since the test is two-tailed, 𝒑 − 𝒗𝒂𝒍𝒖𝒆 = 𝟐 𝟎. 𝟎𝟐𝟒𝟒 = 𝟎. 𝟎𝟒𝟖𝟖
shs.mapua.edu.ph
Hypothesis Testing for the Difference Between Two
Population Means: 𝝈𝟏 and 𝝈𝟐 Known
STEP 4: Make a decision.
STEP 5: Interpret the result.
shs.mapua.edu.ph
Hypothesis Testing for the Difference Between Two
Population Means: 𝝈𝟏 and 𝝈𝟐 Known
STEP 4: Make a decision.
Since 𝒑 − 𝒗𝒂𝒍𝒖𝒆 = 𝟎. 𝟎𝟒𝟖𝟖 < 𝜶 = 𝟎. 𝟎𝟓, reject 𝑯𝟎 .
STEP 5: Interpret the result.
Since we reject 𝑯𝟎 AND the claim is 𝑯𝟏 , there is sufficient evidence to support the claim that
car ownership affects student’s academic achievement.
shs.mapua.edu.ph
Hypothesis Testing for the Difference Between Two
Population Means: 𝝈𝟏 and 𝝈𝟐 Unknown but Equal
1. Assumptions for the Test to Determine the Difference Between Two Population Means:
a. The two samples are independent.
b. The standard deviations for both populations are unknown, but they can
assumed to be equal.
c. Both samples are large (𝑛 ≥ 30). If the sample sizes are less than 30, the
populations must be normally or approximately normally distributed.
2. Degrees of Freedom for the Test
𝒅𝒇 = 𝒏𝟏 + 𝒏𝟐 − 𝟐
shs.mapua.edu.ph
Hypothesis Testing for the Difference Between Two
Population Means: 𝝈𝟏 and 𝝈𝟐 Unknown but Equal
3. Pooled Standard Deviation
𝒏𝟏 − 𝟏 𝒔𝟐𝟏 + 𝒏𝟐 − 𝟏 𝒔𝟐𝟐
𝒔𝒑 =
𝒏𝟏 + 𝒏𝟐 − 𝟐
4. Test Statistic for 𝝁𝟏 − 𝝁𝟐 (𝝈𝟏 and 𝝈𝟐 Unknown but Equal)
ഥ𝟏 − 𝒙
𝒙 ഥ𝟐 − 𝝁𝟏 − 𝝁𝟐
𝒕=
𝟏 𝟏
𝒔𝒑 +
𝒏𝟏 𝒏 𝟐
shs.mapua.edu.ph
Hypothesis Testing for the Difference Between Two
Population Means: 𝝈𝟏 and 𝝈𝟐 Unknown but Equal
Example:
The standard recommendation for automobile oil changes is once every 3,000 miles. A local mechanic
is interested in determining if people who drive more expensive cars are significantly different from
those who drive compact lower-price cars in terms of following the recommendation. Independent
random samples of 38 customers who drive luxury cars and 15 customers who drive compact lower-
price cars were selected. The average distance driven between oil changes was 3,214 miles for the
luxury car owners and 3,187 miles for the compact lower-price cars. The sample standard deviations
were 42.40 and 50.70 miles for the luxury and compact groups, respectively. Assume that the
population distributions of the distances between oil changes have the same standard deviations for
the two populations. At 20% level of significance, can you conclude that the mean distance between
oil changes is significantly different for all luxury cars and for all compact lower-price cars by 45 miles?
Use the Critical-Value Approach.
LUXURY COMPACT
𝑥ҧ1 = 3,214 𝑚𝑖𝑙𝑒𝑠 𝑥ҧ2 = 3,187 𝑚𝑖𝑙𝑒𝑠
𝑛1 = 38 𝑛2 = 15
𝑠1 = 42.40 𝑚𝑖𝑙𝑒𝑠 𝑠2 = 50.70 𝑚𝑖𝑙𝑒𝑠
shs.mapua.edu.ph
Hypothesis Testing for the Difference Between Two
Population Means: 𝝈𝟏 and 𝝈𝟐 Unknown but Equal
STEP 1: Formulate the hypotheses and identify the claim.
STEP 2: Find the critical value with the corresponding level of significance and type of test.
STEP 3: Calculate the test value.
Solve for the pooled standard deviation.
shs.mapua.edu.ph
Hypothesis Testing for the Difference Between Two
Population Means: 𝝈𝟏 and 𝝈𝟐 Unknown but Equal
STEP 1: Formulate the hypotheses and identify the claim.
𝑯𝟎 : 𝝁𝟏 − 𝝁𝟐 = 𝟒𝟓 𝒎𝒊𝒍𝒆𝒔
𝑯𝟏 : 𝝁𝟏 − 𝝁𝟐 ≠ 𝟒𝟓 𝒎𝒊𝒍𝒆𝒔 (𝑪𝒍𝒂𝒊𝒎)
STEP 2: Find the critical value with the corresponding level of significance and type of test.
𝛼 = 0.20 with 𝑑𝑓 = 𝑛1 + 𝑛2 − 2 = 38 + 15 − 2 = 51, Two-Tailed Test
𝒕𝜶Τ𝟐 = ±𝟏. 𝟐𝟗𝟖 (Critical Values)
STEP 3: Calculate the test value.
Solve for the pooled standard deviation.
𝑛1 − 1 𝑠12 + 𝑛2 − 1 𝑠22 38 − 1 42.40 2 + 15 − 1 50.70 2
𝑠𝑝 = =
𝑛1 + 𝑛2 − 2 38 + 15 − 2
𝑠𝑝 = 44.83170709
shs.mapua.edu.ph
Hypothesis Testing for the Difference Between Two
Population Means: 𝝈𝟏 and 𝝈𝟐 Unknown but Equal
Solve for the test value.
STEP 4: Make a decision.
STEP 5: Interpret the result.
shs.mapua.edu.ph
Hypothesis Testing for the Difference Between Two
Population Means: 𝝈𝟏 and 𝝈𝟐 Unknown but Equal
Solve for the test value.
𝑥ҧ 1 −𝑥ҧ 2 − 𝜇1 −𝜇2 3214−3187 −45
𝑡= 1 1
=
1 1
𝑠𝑝 𝑛 +𝑛 44.83170709 38+15
1 2
𝒕 = −𝟏. 𝟑𝟏𝟕 (Test Value)
STEP 4: Make a decision.
Since 𝑻𝒆𝒔𝒕 𝑽𝒂𝒍𝒖𝒆 > 𝑪𝒓𝒊𝒕𝒊𝒄𝒂𝒍 𝑽𝒂𝒍𝒖𝒆 , reject 𝑯𝟎 .
STEP 5: Interpret the result.
Since we reject 𝑯𝟎 AND the claim is 𝑯𝟏 , it can be concluded that the mean distance between oil
changes is significantly different for all luxury cars and for all compact lower-price cars by 45
miles.
shs.mapua.edu.ph
Hypothesis Testing for the Difference Between Two
Population Means: 𝝈𝟏 and 𝝈𝟐 Unknown but Equal
Example:
A course can be taken for credit either by attending synchronous online classes at fixed times
and days, or by watching video lectures (asynchronous) that can be done at the student’s own
pace and at those times the student chooses. The course coordinator wants to determine if
these two ways of taking the course resulted in significant difference in achievement as
measured by the final exam for the course. The data below gives the mean scores in final exam
of two groups together with the standard deviations. Is there enough evidence to conclude that
the grades of those who took synchronous classes significantly higher than those who took
the asynchronous class? Use 𝜶 = 𝟎. 𝟎𝟓.
Synchronous Asynchronous
𝑥ҧ1 = 35.22 𝑥ҧ2 = 31.56
𝑛1 = 9 𝑛2 = 9
𝑠1 = 4.9441 𝑠2 = 4.4752
shs.mapua.edu.ph
Hypothesis Testing for the Difference Between Two
Population Means: 𝝈𝟏 and 𝝈𝟐 Unknown but Equal
STEP 1: Formulate the hypotheses and identify the claim.
STEP 2: Find the critical value with the corresponding level of significance and type of test.
STEP 3: Calculate the test value.
Solve for the pooled standard deviation.
shs.mapua.edu.ph
Hypothesis Testing for the Difference Between Two
Population Means: 𝝈𝟏 and 𝝈𝟐 Unknown but Equal
STEP 1: Formulate the hypotheses and identify the claim.
𝑯𝟎 : 𝝁𝟏 − 𝝁𝟐 ≤ 𝟎
𝑯𝟏 : 𝝁𝟏 − 𝝁𝟐 > 𝟎 (Claim)
STEP 2: Find the critical value with the corresponding level of significance and type of test.
𝛼 = 0.05 with 𝑑𝑓 = 𝑛1 + 𝑛2 − 2 = 9 + 9 − 2 = 16, Right-tailed Test
𝒕𝜶 = 𝟏. 𝟕𝟒𝟔 (Critical Value)
STEP 3: Calculate the test value.
Solve for the pooled standard deviation.
𝑛1 − 1 𝑠12 + 𝑛2 − 1 𝑠22 9 − 1 4.9441 2 + 9 − 1 4.4752 2
𝑠𝑝 = =
𝑛1 + 𝑛2 − 2 9+9−2
𝑠𝑝 = 4.71548194
shs.mapua.edu.ph
Hypothesis Testing for the Difference Between Two
Population Means: 𝝈𝟏 and 𝝈𝟐 Unknown but Equal
Solve for the test value.
STEP 4: Make a decision.
STEP 5: Interpret the result.
shs.mapua.edu.ph
Hypothesis Testing for the Difference Between Two
Population Means: 𝝈𝟏 and 𝝈𝟐 Unknown but Equal
Solve for the test value.
𝑥ҧ 1 −𝑥ҧ 2 − 𝜇1 −𝜇2 35.22−31.56 −0
𝑡= 1 1
=
1 1
𝑠𝑝 𝑛 +𝑛 4.71548194 9+9
1 2
𝒕 = 𝟏. 𝟔𝟒𝟔 (Test Value)
STEP 4: Make a decision.
Since 𝑻𝒆𝒔𝒕 𝑽𝒂𝒍𝒖𝒆 < 𝑪𝒓𝒊𝒕𝒊𝒄𝒂𝒍 𝑽𝒂𝒍𝒖𝒆, fail to reject 𝑯𝟎 .
STEP 5: Interpret the result.
Since we fail to reject 𝑯𝟎 AND the claim is 𝑯𝟏 , it cannot be concluded that the grades of those
who took synchronous classes significantly higher than those who took the asynchronous
class
shs.mapua.edu.ph
End of Presentation
shs.mapua.edu.ph