06 Hypothesis Testing For Two Population Parameter PDF
06 Hypothesis Testing For Two Population Parameter PDF
Population Parameter
Glyzel Grace M. Francisco
STAT1200: Management Science
2nd Semester, 2022-2023
3. Perform t-Test for Comparing Two Means when the Samples are Dependent
o Independent samples
o Dependent samples
Assumptions:
• Randomly selected samples
• Each of the two populations must be normally distributed
GGMFRANCISCO HYPOTHESIS TESTING FOR TWO POPULATION PARAMETER | 4
DEPARTMENT of
STATISTICS
Hypothesis Testing for Two Populations
1. The effectiveness of Prilosec for treating heartburn is tested by measuring
gastric acid secretion in patients before and after the drug treatment.
(Dependent/paired samples)
Homogeneity
(𝜎1 𝑎𝑛𝑑 𝜎2 are unknown and 𝜎1 = 𝜎2 )
No
No
Independent Samples Test
Dependent or Paired
(Unequal Variances)
Samples Test
(z or t-test)
𝑑ҧ − 𝜇𝑑
𝑡𝑐 = 𝑠
𝑑
ൗ 𝑛
CHILD 1 2 3 4 5 6 7 8 9
1ST TRIAL 30 19 19 23 29 78 42 20 12
2ND TRIAL 30 6 14 8 14 52 14 22 17
d 0 13 5 15 15 26 28 -2 -5
Difference between the 1st and the 2nd trial
6 78 52 26 262 = 676 σ 𝑑𝑖 95
𝑑ҧ = = = 𝟏𝟎. 𝟓𝟓𝟓𝟔
7 42 14 28 282 = 784 𝑛 9
(σ 𝑑𝑖 )2 (95)2
8 20 22 -2 (−2)2 = 4 σ 𝑑𝑖2 − 2133 − 9
𝑠𝑑 2 = 𝑛 = = 141.2778
9 12 17 -5 (−5)2 = 25 𝑛−1 8
σ 𝑑𝑖 = 95 σ 𝑑𝑖2 =2133
𝑠𝑑 = 141.2778 = 𝟏𝟏. 𝟖𝟖𝟔𝟎
GGMFRANCISCO HYPOTHESIS TESTING FOR TWO POPULATION PARAMETER | 10
DEPARTMENT of
STATISTICS Dependent Samples: Example 1
Claim: there is no difference between the two times (𝝁𝒅 = 𝟎 or 𝝁𝟏 − 𝝁𝟐 = 𝟎)
1. 𝐻𝑜 : 𝝁𝒅 = 𝟎 𝐻𝑎 : 𝝁𝒅 ≠ 𝟎 𝑯𝒐
𝑜𝑟 𝐻𝑜 : 𝝁𝟏 − 𝝁𝟐 = 𝟎 𝐻𝑎 : 𝝁𝟏 − 𝝁𝟐 ≠ 𝟎 Since it contain the
condition of equality
𝑑ҧ − 𝜇𝑑 10.5556 − 0
𝑡𝑐 = 𝑠 = = 𝟐. 𝟔𝟔𝟒𝟐
𝑑
ൗ 𝑛 11.8860ൗ
9
df α = 0.01
Tail: two-tailed
df = n−1 = 8
𝑡(0.01/2,8) = 3.355
Rejection Rejection
Region Region
6. Conclusion
At 1% level of significance, there is no sufficient evidence to warrant
rejection of the claim that there is no difference between the times of
building blocks before and after a month.
(see next slide for the wording of final conclusion)
Claim: 𝝁𝒅 = 𝟎
Decision: Fail to reject 𝑯𝒐
GGMFRANCISCO HYPOTHESIS TESTING FOR TWO POPULATION PARAMETER | 15
DEPARTMENT of
STATISTICS Dependent Samples : Example 2
The management of Discount Furniture stores designed an
incentive plan for salespeople. To evaluate the innovation plan, 8 sales
person were selected at random, and their weekly incomes before and
after the plan were recorded. Was there a significant increase in the
average salesperson’s weekly income due to the innovative incentive plan?
Use the α = 0.05.
Salesperson Before After Salesperson Before After
A 320 340 E 625 631
B 290 285 F 560 560
C 421 475 G 360 365
D 510 510 H 431 431
GGMFRANCISCO HYPOTHESIS TESTING FOR TWO POPULATION PARAMETER | 16
DEPARTMENT of
STATISTICS Dependent Samples: Example 2
Since it does not contain
Claim: there is a significant increase in the average salesperson’s the condition of equality
weekly income due to the innovative incentive plan (𝝁𝒅 < 𝟎 𝑜𝑟 𝝁𝟏 < 𝝁𝟐
𝑜𝑟 𝝁𝟏 − 𝝁𝟐 < 𝟎)
SALESPERSON Before After d 𝑑2
• α = 0.05,
A 320 340 -20 (−20)2 = 400
290 285
• 𝜇𝑑 = 0 𝑯𝒂
B 5 52 = 256
• 𝑠𝑑 = 19.2799
C 421 475 (−54)2 = 2916 Why <?
-54 • n=8, df=n-1=7 Because the claim is “there
D 510 510 02 = 0
0 −80 is an increase after the
E 625 631
-6 (−6)2 = 36 𝑑ҧ = = −𝟏𝟎 plan”, therefore,
8 𝜇2 (𝑎𝑓𝑡𝑒𝑟) > 𝜇1 (𝐵𝑒𝑓𝑜𝑟𝑒)
F 560 560 02 = 0
0
(σ 𝑑𝑖 )2 (80)2
G 360 365 (−5)2 = 25 σ 𝑑𝑖2 − 3402 − 8
-5 𝑠𝑑 2 = 𝑛 = = 371.7143
H 431 431 02 = 0 𝑛−1 7
0
σ 𝑑𝑖 = −80 σ 𝑑𝑖2 =3402 𝑠𝑑 = 371.7143 = 𝟏𝟗. 𝟐𝟕𝟗𝟗
Rejection
Region
4. Computation
Given: α = 0.05, 𝜇𝑑 = 0, 𝑑ҧ = 10, 𝑠𝑑 = 19.2799,
n = 8, df = n-1 = 7
𝑑ҧ − 𝜇𝑑 −10 − 0
𝑡𝑐 = 𝑠 = = −𝟏. 𝟒𝟔𝟕𝟎
𝑑
ൗ 𝑛 19.2799ൗ
8
GGMFRANCISCO HYPOTHESIS TESTING FOR TWO POPULATION PARAMETER | 19
DEPARTMENT of
STATISTICS
Alpha
Dependent Samples:
tail Example 2
df
α = 0.05
Tail: one-tailed
df = n−1 = 7
𝑡(0.05,7) = 1.895
0.05
−𝑡(0.005,7) = −1.895
Rejection
Region
6. Conclusion
At 5% level of significance, there is no sufficient sample evidence to support
the claim that there is a significant increase in the average salesperson’s
weekly income due to the innovative incentive plan
(see next slide for the wording of final conclusion)
Claim: 𝝁𝒅 < 𝟎 ✓
Decision: Fail to reject 𝑯𝒐
GGMFRANCISCO HYPOTHESIS TESTING FOR TWO POPULATION PARAMETER | 22
DEPARTMENT of
STATISTICS Hypothesis Testing: Independent Samples
2
𝑠12 𝑠22
𝑛1 + 𝑛2
𝑑𝑓 = 2 2
𝑠12 𝑠22
𝑛1 𝑛2
+𝑛 −1
Type equation here. 𝑛1 − 1 2
*round up to whole number
GGMFRANCISCO HYPOTHESIS TESTING FOR TWO POPULATION PARAMETER | 23
DEPARTMENT of
STATISTICS Hypothesis Testing: Independent Samples
A survey found that the average hotel room rate in New Orleans
is $88.42, while it is $80.61 in Phoenix. Assume that the data
were obtained from two samples of 50 hotels each and that the
population standard deviations were $5.62 and $4.83,
respectively. At α = 0.05, can it be concluded that there is a
significant difference in the hotel room rates?
𝑍0.05/2 = 𝟏. 𝟗𝟔
6. Conclusion
At 5% level of significance, the sample data support the claim that
there is a significant difference in the hotel room rates
(see next slide for the wording of final conclusion)
✓ ✓
Claim: 𝝁𝒅 ≠ 𝟎
Decision: Reject 𝑯𝒐
GGMFRANCISCO HYPOTHESIS TESTING FOR TWO POPULATION PARAMETER | 31
DEPARTMENT of
STATISTICS Independent Samples : Example 2
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 table.
Statistics New Machine Old Machine
Sample size 10 64
Mean 42.14 43.23
Variance 0.47 0.56
Do the data provide sufficient evidence to conclude that, on the average, the
new machine packs faster? Perform the hypothesis test at the 10% level of
significance assuming equal population variances.
GGMFRANCISCO HYPOTHESIS TESTING FOR TWO POPULATION PARAMETER | 32
DEPARTMENT of
STATISTICS Independent Samples: Example 2
Claim: the new machine packs faster (𝝁𝒅 < 𝟎 𝑜𝑟 𝝁𝟏 < 𝝁𝟐 𝑜𝑟 𝝁𝟏 − 𝝁𝟐 < 𝟎)
1. 𝐻𝑜 : 𝝁𝒅 ≥ 𝟎 𝐻𝑎 : 𝝁𝒅 < 𝟎
𝑜𝑟 𝐻𝑜 : 𝝁𝟏 ≥ 𝝁𝟐 𝐻𝑎 : 𝝁𝟏 < 𝝁𝟐 𝑯𝒂
𝑜𝑟 𝐻𝑜 : 𝝁𝟏 − 𝝁𝟐 ≥ 𝟎 𝐻𝑎 : 𝝁𝟏 − 𝝁𝟐 < 𝟎 Since it does not contain
the condition of equality
2. test-statistic: t-test (since 𝜎 is unknown) – Assume equal variances
tail of distribution: left-tailed
𝑑𝑓 = 𝑛1 + 𝑛2 − 2 = 10 + 64 − 2 = 72 0.05
−𝑡 𝛼,𝑑𝑓 = −𝑡 0.10,72 = −𝟏. 𝟐𝟖𝟐 (see next slide)
−𝑡(0.005,7) = −1.282
Reject 𝑯𝒐 if 𝒕𝒄 < −𝟏. 𝟐𝟖𝟐
Rejection
4. Computation Region
Given: 𝑥ҧ1 (𝑁𝑒𝑤 𝑚𝑎𝑐ℎ𝑖𝑛𝑒) = 42.14, 𝑥ҧ2 (𝑜𝑙𝑑 𝑚𝑎𝑐ℎ𝑖𝑛𝑒) = 43.23, 𝑠12 = 0.47, 𝑠22 = 0.56, 𝑛1 = 10, 𝑛2 = 64
2 2
2
𝑛1 − 1 𝑠1 + 𝑛2 − 1 𝑠2 10 − 1 0.47 + 64 − 1 0.56
𝑠𝑝 = = = 0.5488
𝑛1 + 𝑛2 − 2 10 + 64 − 2
GGMFRANCISCO HYPOTHESIS TESTING FOR TWO POPULATION PARAMETER | 34
DEPARTMENT of
STATISTICS Independent Samples:
Alpha
tail Example 2
α = 0.10
Tail: one-tailed
df = 𝑛2 + 𝑛2 − 2
= 10 + 64 − 2 = 72
𝑡(0.10,72) = 1.282
df
GGMFRANCISCO HYPOTHESIS TESTING FOR TWO POPULATION PARAMETER | 35
DEPARTMENT of
STATISTICS Independent Samples: Example 2
5. Decision
Since -4.3271 < -1.282, we reject 𝐻𝑜 Since the variances are
Acceptance
unequal, df=smaller between
Region
𝑛1 − 1 𝑎𝑛𝑑 𝑛2 − 1 (see slide
45 for your reference)
−𝑡(0.005,7) = −1.282
Rejection
Region
6. Conclusion
At 10% level of significance, the sample data support the claim
that the new machine packs faster
(see next slide for the wording of final conclusion)
✓
✓
Claim: 𝝁𝒅 < 𝟎
Decision: Reject 𝑯𝒐
GGMFRANCISCO HYPOTHESIS TESTING FOR TWO POPULATION PARAMETER | 37
DEPARTMENT of
STATISTICS Independent Samples : Example 3
An experiment was conducted to test the effects of alcohol. The errors
were recorded in a test of visual and motor skills for a treatment group of
people who drank ethanol and another group given a placebo. The results
are shown in the accompanying table. Assuming unequal variances use a
0.05 significance level to test the claim that the two groups come from
populations with the same mean. Do these results support the common
belief that drinking is hazardous for drivers, pilots, ship captains and so on?
Statistics Treatment Group Placebo Group
Size 20 22
Mean 4.20 1.71
Standard Deviation 2.20 0.72
GGMFRANCISCO HYPOTHESIS TESTING FOR TWO POPULATION PARAMETER | 38
DEPARTMENT of
STATISTICS Independent Samples: Example 3
Claim: drinking is hazardous for drivers, pilots, ship captains and so on (𝝁𝒅 > 𝟎 𝑜𝑟 𝝁𝟏 > 𝝁𝟐
𝑜𝑟 𝝁𝟏 − 𝝁𝟐 > 𝟎)
1. 𝐻𝑜 : 𝝁𝒅 ≤ 𝟎 𝐻𝑎 : 𝝁𝒅 > 𝟎
𝑜𝑟 𝐻𝑜 : 𝝁𝟏 ≤ 𝝁𝟐 𝐻𝑎 : 𝝁𝟏 > 𝝁𝟐
𝑜𝑟 𝐻𝑜 : 𝝁𝟏 − 𝝁𝟐 ≤ 𝟎 𝐻𝑎 : 𝝁𝟏 − 𝝁𝟐 > 𝟎 𝑯𝒐
Since it contains the
2. test-statistic: t-test (since 𝜎 is unknown) – Assume unequal variances condition of equality
tail of distribution: right-tailed
𝑡(0.05,23) = 1.714
Rejection
Region
GGMFRANCISCO HYPOTHESIS TESTING FOR TWO POPULATION PARAMETER | 40
DEPARTMENT of
STATISTICS
Alpha
Independent Samples:
tail Example 3
α = 0.05
Tail: one-tailed
df = 23
𝑡(0.05,72) = 1.714
df
Acceptance
5. Decision Region 0.05
Since 4.8319 > 1.714, we reject 𝐻𝑜
𝑡(0.05,23) = 1.714
Rejection
6. Conclusion Region
At 5% level of significance, the sample data support the claim that drinking is
hazardous for drivers, pilots, ship captains and so on
(see next slide for the wording of final conclusion)
GGMFRANCISCO HYPOTHESIS TESTING 42
DEPARTMENT of
STATISTICS
✓
✓
Claim: 𝝁𝒅 > 𝟎
Decision: Reject 𝑯𝒐
GGMFRANCISCO HYPOTHESIS TESTING FOR TWO POPULATION PARAMETER | 43
DEPARTMENT of
STATISTICS Comparing Two Variances
• If two independent samples are selected from two normally distributed
populations in which the population variances are equal (𝜎12 = 𝜎22 )and if
𝑠12
the sample variances 𝑠12 and 𝑠22 are compared as , the sampling
𝑠22
distribution of the variances is called the F distribution.
Characteristics of the F distribution:
1. The values of F cannot be negative, because variances are always positive
or zero.
2. The distribution is positively skewed.
3. The mean value of F is approximately equal to 1.
4. The F distribution is a family of curves based on the degrees of freedom
of the variance of the numerator and the degrees of freedom of the
variance of the denominator.
GGMFRANCISCO HYPOTHESIS TESTING FOR TWO POPULATION PARAMETER | 44
DEPARTMENT of
STATISTICS Comparing Two Variances
𝑠12
Formula for the F Test: 𝐹= 𝑠22
where the larger of the two variances is placed in the numerator regardless
of the subscripts.
Remarks:
1. The F test has two values for the degrees of freedom: that of the
numerator, 𝑛1 − 1, and that of the denominator, 𝑛2 − 1, where 𝑛1 is the
sample size from which the larger variance was obtained.
2. When you are finding the F test value, the larger of the variances is
placed in the numerator of the F formula; this is not necessarily the
variance of the larger of the two sample sizes.
3. Decision Rule: Reject Ho if F Test > F critical value
Smokers Nonsmokers
Sample size 10 8
Variance 36 10
Note: Take the largest variance and divide it by the smallest variance to get the F-value
GGMFRANCISCO HYPOTHESIS TESTING FOR TWO POPULATION PARAMETER | 49
DEPARTMENT of
STATISTICS Comparing Two Population Variances:
Example 2
𝛼 = 0.01
𝐹0.10,9,7 = 𝟔. 𝟕𝟐