Please Subscribe to this Channel for more solutions and lectures
http://www.youtube.com/onlineteaching
Chapter 9: Inferences from Two Samples
9.2: Two Means, Independent Samples
2. Chapter 9: Inferences from Two Samples
9. 1 Two Proportions
9.2 Two Means: Independent Samples
9.3 Two Dependent Samples (Matched Pairs)
9.4 Two Variances or Standard Deviations
2
Objectives:
• Test the difference between two proportions.
• Test the difference between sample means, using the z test.
• Test the difference between two means for independent samples, using the t test.
• Test the difference between two means for dependent samples.
• Test the difference between two variances or standard deviations.
3. 9.2 Two Means: Independent Samples
Requirements
1. The two samples are independent.
2. Both samples are simple random samples.
3. Either or both of these conditions are satisfied:
The two sample sizes are both large (with n1 >
30 and n2 > 30) or both samples come from
populations having normal distributions.
3
The values of σ1 and σ2 are known: Use the z test for
comparing two means from independent populations
𝑇𝑆: 𝑧 =
(𝑥1 − 𝑥2) − (𝜇1 − 𝜇2)
𝜎1
2
𝑛1
+
𝜎2
2
𝑛2
Or 𝑧 =
𝑥1 − 𝑥2
𝜎1
2
𝑛1
+
𝜎2
2
𝑛2
𝐸 = 𝑧𝛼
2
𝜎1
2
𝑛1
+
𝜎2
2
𝑛2
(𝑥1 − 𝑥2) ± 𝐸
TI Calculator:
2 - Sample Z - test
1. Stat
2. Tests
3. 2 ‒ SampZTest
4. Enter Data or Stats
𝝈𝟏 , 𝝈𝟐, 𝒙𝟏 , 𝒏𝟏, 𝒙𝟐
𝒏𝟏 , 𝒏𝟐,
5. Choose RTT, LTT,
or 2TT
6. Calculate
TI Calculator:
2 - Sample Z - Interval
1. Stat
2. Tests
3. 2 ‒ SampZInt
4. Enter Data or Stats
𝝈𝟏 , 𝝈𝟐, 𝒙𝟏 , 𝒏𝟏, 𝒙𝟐
𝒏𝟏 , 𝒏𝟐,
5. Choose RTT, LTT, or
2TT
6. Calculate
4. Step 4: Decision:
a. Reject H0
b. The claim is True
c. There is enough evidence to support the
claim that the means are not equal.
Hence, there is a significant difference
in the rates. 4
A survey found that the average hotel room rate in an upscale area is
$88.42 and the average room rate in downtown area is $80.61. Each
sample contained 50 hotels. Assume that the standard deviations of the
populations are $5.62 and $4.83, respectively. At α = 0.05, can it be
concluded that there is a significant difference in the rates?
Example 1a: CV Method
Step 3: CV: α = 0.05 → 𝑧 = ±1.96
Step 1: H0: μ1 = μ2 , H1: μ1 μ2 (claim), 2TT
Given: SRS:
𝑈𝑝𝑠𝑐𝑎𝑙𝑒: 𝑥1 = $88.42,
𝑛1= 50, 𝜎1 = $5.62
𝐷𝑜𝑤𝑛𝑡𝑜𝑤𝑛: 𝑥2 = $80.61,
𝑛2= 50, 𝜎2 = $4.83
Step 2: 𝑇𝑆: 𝑧 =
88.42−80.61
5.622
50
+
4.832
50
= 7.45
𝑇𝑆: 𝑧 =
(𝑥1 − 𝑥2) − (𝜇1 − 𝜇2)
𝜎1
2
𝑛1
+
𝜎2
2
𝑛2
Or 𝑧 =
𝑥1 − 𝑥2
𝜎1
2
𝑛1
+
𝜎2
2
𝑛2
Step 1: H0 , H1, claim & Tails
Step 2: TS Calculate (TS)
Step 3: CV using α
Step 4: Make the decision to
a. Reject or not H0
b. The claim is true or false
c. Restate this decision: There
is / is not sufficient evidence
to support the claim that…
TI Calculator:
2 - Sample Z - test
1. Stat
2. Tests
3. 2 ‒ SampZTest
4. Enter Data or Stats
𝝈𝟏 , 𝝈𝟐, 𝒙𝟏 , 𝒏𝟏, 𝒙𝟐
𝒏𝟏 , 𝒏𝟐,
5. Choose RTT, LTT,
or 2TT
6. Calculate
5. 5
A survey found that the average hotel room rate in an upscale area is $88.42
and the average room rate in downtown area is $80.61. Each sample
contained 50 hotels. Assume that the standard deviations of the populations
are $5.62 and $4.83, respectively. At α = 0.05, can it be concluded that there
is a significant difference in the rates? Find the 95% confidence interval for
the difference between the means.
Example 1b: CI Method
Given: SRS:
𝑈𝑝𝑠𝑐𝑎𝑙𝑒:
𝑥1= $88.42, 𝑛1 = 50, 𝜎1 = $5.62
Downtown:
𝑥2 = $80.61, 𝑛2 = 50, 𝜎2 = $4.83
(88.42 − 80.61) ± 2.05
5.76 < 𝜇1 − 𝜇2 < 9.86
= 2.05
𝐸 = 1.96
5.622
50
+
4.832
50
7.81 − 2.05 < 𝜇1 − 𝜇2 < 7.81 + 2.05
Interpretation: The confidence interval limits
do not contain 0, therefore, there is a
significant difference between the two average
rates. The confidence interval indicates that
the value of 𝜇1 is greater than the value of 𝜇2,
so there seems to be sufficient evidence to
support the claim that there is a significant
difference in the rates.
Step 1: H0 , H1, claim & Tails
Step 2: TS Calculate (TS)
Step 3: CV using α
Step 4: Make the decision to
a. Reject or not H0
b. The claim is true or false
c. Restate this decision: There
is / is not sufficient evidence
to support the claim that…
TI Calculator:
2 - Sample Z - Interval
1. Stat
2. Tests
3. 2 ‒ SampZInt
4. Enter Data or Stats
𝝈𝟏 , 𝝈𝟐, 𝒙𝟏 , 𝒏𝟏, 𝒙𝟐
𝒏𝟏 , 𝒏𝟐,
5. Choose RTT, LTT, or
2TT
6. Calculate
𝐸 = 𝑧𝛼
2
𝜎1
2
𝑛1
+
𝜎2
2
𝑛2
(𝑥1 − 𝑥2) ± 𝐸
6. 9.2 Two Means: Independent Samples
Requirements
1. The two samples are independent.
2. Both samples are simple random samples.
3. Either or both of these conditions are satisfied: The two sample
sizes are both large (with n1 > 30 and n2 > 30) or both samples
come from populations having normal distributions.
6
The values of σ1 and σ2 are unknown:
Use the t test for comparing two means from independent
populations
Unequal Variances: df = smaller of n1 – 1 or n2 – 1.
𝐸 = 𝑡𝛼
2
𝑠1
2
𝑛1
+
𝑠2
2
𝑛2
(𝑥1 − 𝑥2) ± 𝐸
𝑇𝑆: 𝑡 =
(𝑥1 − 𝑥2) − (𝜇1 − 𝜇2)
𝑠1
2
𝑛1
+
𝑠2
2
𝑛2
Or 𝑡 =
𝑥1 − 𝑥2
𝑠1
2
𝑛1
+
𝑠2
2
𝑛2
TI Calculator:
2 - Sample T - test
1. Stat
2. Tests
3. 2 ‒ SampTTest
4. Enter Data or Stats
𝒙𝟏, 𝒔𝟏 , 𝒏𝟏, 𝒙𝟐
𝒏𝟏 , 𝒔𝟐,
5. Choose RTT, LTT,
or 2TT
6. Pooled: No
7. Calculate
TI Calculator:
2 - Sample T - Interval
1. Stat
2. Tests
3. 2 ‒ SampTInt
4. Enter Data or Stats
𝒙𝟏, 𝒔𝟏 , 𝒏𝟏, 𝒙𝟐
𝒏𝟏 , 𝒔𝟐,
5. Choose RTT, LTT,
or 2TT
6. Pooled: No
7. Calculate
7. Step 4: Decision:
a. Do not Reject H0
b. The claim is True
c. There is sufficient evidence to support the claim
that female professors and male professors have
the same mean course evaluation score. 7
Listed below are stats for student course evaluation scores for courses
taught by female professors and male professors.
Females: 𝑥1= 3.8667, 𝑛1 = 12, 𝑠1 = 0.5630, Males: 𝑥2 = 3.9933, 𝑛2 = 15, 𝑠2 = 0.3955
Use a 0.05 significance level to test the claim that the two samples are from populations with
the same mean.? Assume the populations are normally distributed.
Example 2a: CV Method
Step 3: CV: α = 0.05,
df = smaller of n1 – 1 or
n2 – 1 = 12 – 1 = 11 →
t = ±2.201
Step 1: H0: μ1 = μ2 , Claim & H1: μ1 μ2 , 2TT
Step 2: 𝑇𝑆: 𝑡 =
3.8667−3.9933
0.56302
12
+
0.39552
15
= −0.660
𝑡 =
(𝑥1 − 𝑥2) − (𝜇1 − 𝜇2)
𝑠1
2
𝑛1
+
𝑠2
2
𝑛2
Step 1: H0 , H1, claim & Tails
Step 2: TS Calculate (TS)
Step 3: CV using α
Step 4: Make the decision to
a. Reject or not H0
b. The claim is true or false
c. Restate this decision: There
is / is not sufficient evidence
to support the claim that…
TI Calculator:
2 - Sample T - test
1. Stat
2. Tests
3. 2 ‒ SampTTest
4. Enter Data or Stats
𝒙𝟏, 𝒔𝟏 , 𝒏𝟏, 𝒙𝟐
𝒏𝟏 , 𝒔𝟐,
5. Choose RTT, LTT,
or 2TT
6. Pooled: No
7. Calculate
8. 8
Listed below are stats for student course evaluation scores for courses taught by female
professors and male professors. 𝐹𝑒𝑚𝑎𝑙𝑒𝑠: 𝑥1= 3.8667, 𝑛1 = 12, 𝑠1 = 0.5630,
𝑀𝑎𝑙𝑒𝑠: 𝑥2 = 3.9933, 𝑛2 = 15, 𝑠2 = 0.3955
Assume the populations are normally distributed. Find the 95% confidence interval for the
difference between the means.
Example 2b: CI Method & P-Value
𝐸 = 2.201
0.56302
12
+
0.39552
15
= 0.42245
−0.5491 < 𝜇1 − 𝜇2 < 0.2959
P-Value Method: 2TT
t = −0.660, df = 11
t –Distribution table:
the P-value > 0.20
Technology: the P-value = 0.5174
the P-value > α = 0.05
Interpretation: The confidence interval limits does contain 0, therefore,
there is a no significant difference between the two the means. The
confidence interval suggests that the value of 𝜇1 is the same as the value of
𝜇2, so there is sufficient evidence to support the claim that female
professors and male professors have the same mean course evaluation score.
TI Calculator:
2 - Sample T - Interval
1. Stat
2. Tests
3. 2 ‒ SampTInt
4. Enter Data or Stats
𝒙𝟏, 𝒔𝟏 , 𝒏𝟏, 𝒙𝟐
𝒏𝟏 , 𝒔𝟐,
5. Choose RTT, LTT,
or 2TT
6. Pooled: No
7. Calculate
𝐸 = 𝑡𝛼
2
𝑠1
2
𝑛1
+
𝑠2
2
𝑛2
(𝑥1 − 𝑥2) ± 𝐸
9. 9.2 Two Means: Independent Samples
Requirements
1. The two samples are independent.
2. Both samples are simple random samples.
3. Either or both of these conditions are satisfied: The two
sample sizes are both large (with n1 > 30 and n2 > 30)
or both samples come from populations having normal
distributions.
The values of σ1 and σ2 are unknown:
Use the t test for comparing two means from independent
populations
Alternate Methods: Assume that σ1 = σ 2 and Pool the
Sample Variances
Equal Variances: df = n1 – 1 + n2 – 1.
9
𝐸 = 𝑡𝛼
2
𝑠𝑝
2
𝑛1
+
𝑠𝑝
2
𝑛2
(𝑥1 − 𝑥2) ± 𝐸
𝑡 =
(𝑥1 − 𝑥2) − (𝜇1 − 𝜇2)
𝑠𝑝
2
𝑛1
+
𝑠𝑝
2
𝑛2
𝑠𝑝
2 =
(𝑛1 − 1)𝑠1
2
+ (𝑛2 − 1)𝑠2
2
(𝑛1 − 1) + (𝑛2 − 1)
Pooled Sample Variance
Strategy:
Assume that s1 and s2 are unknown,
do not assume that s1 = s2.
TI Calculator:
2 - Sample T - test
1. Stat
2. Tests
3. 2 ‒ SampTTest
4. Enter Data or Stats
𝒙𝟏, 𝒔𝟏 , 𝒏𝟏, 𝒙𝟐
𝒏𝟏 , 𝒔𝟐,
5. Choose RTT, LTT,
or 2TT
6. Pooled: Yes
7. Calculate
TI Calculator:
2 - Sample T - Interval
1. Stat
2. Tests
3. 2 ‒ SampTInt
4. Enter Data or Stats
𝒙𝟏, 𝒔𝟏 , 𝒏𝟏, 𝒙𝟐
𝒏𝟏 , 𝒔𝟐,
5. Choose RTT, LTT,
or 2TT
6. Pooled: Yes
7. Calculate
10. Step 4: Decision:
a. Do not Reject H0
b. The claim is False
c. There is not enough evidence to support the claim that those treated
with magnets have a greater reduction in pain than those given a
sham treatment. 10
Researchers conducted a study to determine whether magnets are effective in treating back
pain. Reduction in pain level after magnet treatment: 𝑛1= 20, 𝑥1= 0.49, 𝑠1 = 0.96
Reduction in pain level after sham treatment 𝑛2= 20, : 𝑥2 = 0.44, : 𝑠2 = 1.4.
a. Use a 0.05 significance level to test the claim that those treated with magnets have a
greater reduction in pain than those given a sham treatment (similar to a placebo).
b. Find a 90% CI.
Example 3
Step 3: CV: α = 0.05,
df = smaller of n1 – 1 or n2 – 1
= 20 – 1 =19 → 𝑡 = 1.729
Step 1: H0: μ1 = μ2 & H1: μ1 > μ2 , claim, RTT
= 0.1320
Step 2: 𝑇𝑆: 𝑡 =
0.49−0.44
0.962
20
+
1.42
20
=
0.05
0.3796
Find the P-value.
RTT: the P-value = The area
to the right of TS: t = 0.1320
The P-value = 0.4483
𝐸 = 𝑡𝛼
2
𝑠1
2
𝑛1
+
𝑠2
2
𝑛2
−0.61 < 𝜇1 − 𝜇2 < 0.71
90%𝐶𝐼:
𝐸 = 1.729(0.3796) = 0.66
(𝑥1 − 𝑥2) ± 𝐸
𝑡 =
𝑥1 − 𝑥2
𝑠1
2
𝑛1
+
𝑠2
2
𝑛2
11. Decision:
a. Do not Reject H0
b. The claim is False
c. There is not enough evidence to support the claim
that those treated with magnets have a greater
reduction in pain than those given a sham treatment. 11
Researchers conducted a study to determine whether magnets are effective in treating back pain.
Reduction in pain level after magnet treatment: 𝑛1= 20, 𝑥1 = 0.49, 𝑠1 = 0.96
Reduction in pain level after sham treatment 𝑛2= 20, : 𝑥2 = 0.44, : 𝑠2 = 1.4.
a. Use a 0.05 significance level to test the claim that those treated with magnets have a greater
reduction in pain than those given a sham treatment (similar to a placebo).
b. Find a 90% CI.
Example 3 again: Assume equal variances
CV: α = 0.05,
df = n1 – 1 + n2 – 1 = 38 → 𝑡 = 1.686
H0: μ1 = μ2 & H1: μ1 > μ2 (claim), RTT
0.05
0.3796
= 0.1320
𝑇𝑆: 𝑧 =
0.49 − 0.44
1.44082
20
+
1.44082
20
𝑠𝑝
2
=
𝑛1 − 1 𝑠1
2
+ 𝑛2 − 1 𝑠2
2
𝑛1 − 1 + 𝑛2 − 1
=
20 − 1 0.962
+ 20 − 1 1. 42
20 − 1 + 20 − 1
54.7504
38
= 1.4408
Note: Normally TS from
this part is not equal to TS
from the previous part
except whenever: 𝑛1= 𝑛2
The CI is slightly Narrower due to the
assumption of equal SD which
introduces a little more certainty.
TI Calculator:
2 - Sample T - test
1. Stat
2. Tests
3. 2 ‒ SampTTest
4. Enter Data or Stats
𝒙𝟏, 𝒔𝟏 , 𝒏𝟏, 𝒙𝟐
𝒏𝟏 , 𝒔𝟐,
5. Choose RTT, LTT,
or 2TT
6. Pooled: Yes
7. Calculate
𝑡 =
𝑥1 − 𝑥2
𝑠𝑝
2
𝑛1
+
𝑠𝑝
2
𝑛2
(𝑥1 − 𝑥2) ± 𝐸
𝑠𝑝
2
=
(𝑛1 − 1)𝑠1
2
+ (𝑛2 − 1)𝑠2
2
(𝑛1 − 1) + (𝑛2 − 1)
12. Decision:
a. Do not Reject H0
b. The claim is False
c. There is not enough evidence to support the claim that colleges
offer more sports for males than they do for females. 12
A researcher hypothesizes that the average number of sports that colleges offer
for males is greater than the average number of sports that colleges offer for
females. A sample of the number of sports offered by colleges results in
Males: 𝑥1= 8.6, 𝑛1 = 50, & Females: 𝑥2 = 7.9, 𝑛2 = 50. At α = 0.10,
is there enough evidence to support the claim? Assume 1 and 2 = 3.3.
Example 4
CV: α = 0.10
→ 𝑧 = 1.285
H0: μ1 = μ2 & H1: μ1 > μ2 (claim), RTT
Given: SRS: α = 0.10
Males: 𝑥1= 8.6, 𝑛1 = 50, 𝜎1 = 3.3
Females: 𝑥2 = 7.9, 𝑛2 = 50, 𝜎2 = 3.3
= 1.06
𝑇𝑆: 𝑧 =
8.6 − 7.9
3. 32
50
+
3. 32
50
Find the P-value.
RTT: the P-value = The area
to the right of TS: z = 1.06..
The P-value = 0.1446.
Step 1: H0 , H1, claim & Tails
Step 2: TS Calculate (TS)
Step 3: CV using α
Step 4: Make the decision to
a. Reject or not H0
b. The claim is true or false
c. Restate this decision: There
is / is not sufficient evidence
to support the claim that…
𝑧 =
𝑥1 − 𝑥2
𝜎1
2
𝑛1
+
𝜎2
2
𝑛2
13. InferencesAbout Two Means: Independent Samples: Hypothesis Test Statistic for Two
Means: Independent Samples (with H0: µ1 = µ2)
Degrees of freedom
1. Use this simple and conservative estimate:
df = smaller of n1 − 1 and n2 − 1.
2. Technologies typically use the more accurate but more difficult estimate given by
the following formula:
13
P-Values & Critical Values: Refer to the t distribution Table
The P-value method of hypothesis testing, the critical value method of hypothesis
testing, and confidence intervals all use the same distribution and standard error, so
they are all equivalent in the sense that they result in the same conclusions.
𝑑𝑓 =
𝐴+𝐵 2
𝐴2
𝑛1−1
+
𝐵2
𝑛2−1
, A =
𝑠1
2
𝑛1
, 𝐵 =
𝑠2
2
𝑛2