Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
2 views125 pages

STAT2225 Module 8. Hypothesis Testing For Two Population Parameters

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 125

Hypothesis Testing for

Two Population Parameters


Jomel R. Alanzalon
STAT 2225: Elementary Statistics & Probability
2nd Semester, A.Y. 2023-2024

CENTRAL LUZON STATE UNIVERSITY


DEPARTMENT of
STATISTICS

Inferential
Statistics

Hypothesis
Estimation
Testing

About one About two


Point Interval
population population
Estimation Estimation
parameter parameters

Hypothesis Testing for Two Population Parameters | 2


DEPARTMENT of
STATISTICS
Learning Outcomes
After completing this chapter, the students must be able to
• Perform F-test in Comparing the Difference Between Two Variances
• Perform z-Test for Comparing Two Means from Independent Populations
• Perform t-Test for Comparing Two Means from Independent Samples
• Perform t-Test for Comparing Two Means when the Samples are
Dependent
• Perform z-test for Comparing Two Population Proportions

Hypothesis Testing for Two Population Parameters | 3


DEPARTMENT of
STATISTICS

Hypothesis Testing for Two Populations (Two Samples Test)


• It is used when researcher wishes to compare two sample means,
variances, or proportions using experimental and control groups.
• Main interest is to test the difference between the two samples or
populations.

Example:
• we wish to compare the average lifetime of two different brands of batteries
• two different brands of fertilizer might be tested to see whether one brand is
more effective than the other
• compare two different teaching styles to test if there is a difference in effectivity in
terms of perceived learning by the students
Hypothesis Testing for Two Population Parameters | 4
DEPARTMENT of
STATISTICS Hypothesis Testing for Two Populations
• Two samples are independent if the samples from one population are not related to or
not paired with the samples selected from other population.
• Two samples are dependent if there is some relationship so that each value in one
sample is paired (or matched) with a corresponding value in the other sample.
Example:
• One group of subjects is treated with the cholesterol-reducing drug Lipitor, while
second and separate group of subjects is given a placebo. These two sample groups are
independent because the individual treatment group are in no way paired or matched
with the corresponding members in the placebo group. The two groups here are
different.
• The effectiveness of a diet pill is tested using weights of subjects measured before and
after the treatment. Each “before” value is matched with the “after” value because each
before-after pair of measurements comes from same person, thus these are dependent.

Hypothesis Testing for Two Population Parameters | 5


DEPARTMENT of
STATISTICS Hypothesis Testing for Two Population Parameters

• Hypothesis Testing for Two Variances

• Hypothesis Testing for Two Means

• Hypothesis Testing for Two Proportions

Hypothesis Testing for Two Population Parameters | 6


DEPARTMENT of
STATISTICS 1. Hypothesis Testing for Two Variances
• If two independent samples are selected from two normally distributed
populations in which the population variances are equal (𝜎12 and 𝜎22 ) and if the
𝑠12
sample variances 𝑠12 and 𝑠22 are compared as , the sampling distribution of the
𝑠22
variances is called 𝑭-distribution.

Characteristics of the 𝑭-distribution:


1. The values of 𝐹 cannot be negative, since variance are always nonnegative.
2. The distribution is positively skewed.
3. The mean value of 𝐹 is approximately equal to 1.
4. The 𝐹 distribution is a family of curves based on the degrees of freedom of the
variance in the numerator and the degrees of freedom of the variance in the
denominator.
Hypothesis Testing for Two Population Parameters | 7
DEPARTMENT of
STATISTICS F-test in Comparing the Difference Between Two Variances
Main Interest: test the equality of variance
homoscelatic
• also known as test for homogeneity of variance. - homogeneous variances
equal variances

Assumptions:
1. The samples must be random samples.
2. The populations from which the samples were obtained must be normally
distributed. (Note: The test should not be used when the distributions
depart from normality.)
3. The samples must be independent of each other.

Hypothesis Testing for Two Population Parameters | 8


DEPARTMENT of
STATISTICS

Test for Homogeneity of Variance (F-test)

Test Statistic 𝑯𝟎 𝑯𝒂 Decision Rule


𝜎12 = 𝜎22 𝜎12 ≠ 𝜎22 Reject Ho if 𝐹 > 𝐹𝛼Τ2 , 𝑛1−1, 𝑛2 −1
𝑠12
𝐹= 2 𝜎12 ≤ 𝜎22 𝜎12 > 𝜎22 Reject Ho if 𝐹 > 𝐹𝛼, 𝑛1 −1,𝑛2 −1
𝑠2
𝜎12 ≥ 𝜎22 𝜎12 < 𝜎22 Reject Ho if 𝐹 < 𝐹1−𝛼 , 𝑛1−1, 𝑛2−1
where:
𝑠12 = the larger of the two sample variances
𝑠22 = the smaller of the two sample variances
𝑛1 = the sample size of the group with larger sample variance (𝑠12 )
𝑛2 = the sample size of the group with smaller sample variance (𝑠22 )
Hypothesis Testing for Two Population Parameters | 9
DEPARTMENT of
STATISTICS F-table for 𝟎. 𝟎𝟓

Example: Find the critical value.


- 𝑛1 = 9
- 𝑛2 = 13
- 𝛼 = 0.10
- 𝐻0 : 𝜎12 = 𝜎22

𝐹0.10ൗ = 𝐹0.05, 8, 12
2 , 9−1, 13−1
= 𝟐. 𝟖𝟓

Hypothesis Testing for Two Population Parameters | 10


DEPARTMENT of
STATISTICS

Example: Find the


critical value.
- 𝑛1 = 5
- 𝑛2 = 6
- 𝛼 = 0.05
- 𝐻0 : 𝜎12 = 𝜎22

𝐹0.05ൗ
2 , 5−1, 6−1
= 𝐹0.025, 4, 5
= 𝟕. 𝟑𝟗

Hypothesis Testing for Two Population Parameters | 11


DEPARTMENT of
STATISTICS

Example: Find the critical value. F-table (online)


https://atozmath.com/CONM/DistributionTables.aspx?q=f
- 𝑛1 = 35
- 𝑛2 = 26
- 𝛼 = 0.05
- 𝐻0 : 𝜎12 = 𝜎22

𝐹0.05ൗ = 𝐹0.025, 34, 25


2 , 35−1, 26−1

Hypothesis Testing for Two Population Parameters | 12


DEPARTMENT of
STATISTICS

Example: Find the critical value. F-table (online)


https://atozmath.com/CONM/DistributionTables.aspx?q=f
- 𝑛1 = 35
- 𝑛2 = 26
- 𝛼 = 0.05
- 𝐻0 : 𝜎12 = 𝜎22

𝐹0.05ൗ = 𝐹0.025, 34, 25


2 , 35−1, 26−1
= 𝟐. 𝟏𝟓𝟐𝟐

Hypothesis Testing for Two Population Parameters | 13


DEPARTMENT of
STATISTICS Test for Homogeneity of Variance (F-test)
Example 1. A medical researcher wishes to see whether the variance of the
heart rates (in beats per minute) of smokers is different from the variance of
heart rates of people who do not smoke. Two random sample groups are
selected, and the data are shown. Using 𝛼 = 0.10, is there enough evidence
to support the claim? Assume the variable is normally distributed.

Smokers Nonsmokers
Sample size 10 8
Variance 36 10

Given: Smokers have the larger variance, hence


𝑠12 = 36, 𝑛1 = 10, 𝑠22 = 10, 𝑛2 = 8, 𝛼 = 0.10
Hypothesis Testing for Two Population Parameters | 14
DEPARTMENT of
STATISTICS Test for Homogeneity of Variance (F-test)
Step 0: Verify if the requirements are met.
All the three requirements/assumptions are met.

Step 1: Identify the claim. State 𝐻0 and 𝐻𝑎 .


Claim: the variance of the heart rates of smokers and nonsmokers is
different ⟹ 𝝈𝟐𝟏 ≠ 𝝈𝟐𝟐
𝑯𝟎 : 𝝈𝟐𝟏 = 𝝈𝟐𝟐 𝑯𝒂 : 𝝈𝟐𝟏 ≠ 𝝈𝟐𝟐

Step 2: Determine the test statistic to use and its distribution’s tail.
Test statistic: F-test or Test for Homogeneity of Variance
Distribution’s tail: two-tailed test (since 𝐻𝑎 is 𝜎12 ≠ 𝜎22 )
Hypothesis Testing for Two Population Parameters | 15
DEPARTMENT of
STATISTICS Test for Homogeneity of Variance (F-test)
Step 3: Find the critical value.

Since 𝛼 = 0.10 and the test is a


two-tailed test, the critical value is
𝐹𝛼Τ2, 𝑛1 −1, 𝑛2 −1 = 𝐹0.10Τ2, 10−1, 8−1 =
𝐹0.05, 9, 7 = 𝟑. 𝟔𝟖.

Decision Rule:
Reject 𝑯𝟎 if 𝑭 > 𝟑. 𝟔𝟖

Hypothesis Testing for Two Population Parameters | 16


DEPARTMENT of
STATISTICS Test for Homogeneity of Variance (F-test)
Step 4: Compute for the test statistic.

Given: 𝑠12 = 36 and 𝑠22 = 10

𝑠12 36
𝐹= 2= = 𝟑. 𝟔𝟎
𝑠2 10

Step 5: Make a decision.


Decision Rule: Reject 𝐻0 if 𝐹 > 3.68.
Since 3.60 > 3.68, we fail to reject 𝑯𝟎 .

Hypothesis Testing for Two Population Parameters | 17


DEPARTMENT of
STATISTICS Test for Homogeneity of Variance (F-test)
Step 6: State the conclusion in terms of the claim.

At 10% significance level, there is no enough evidence to support the claim


that the variance of the heart rates of smokers and nonsmokers is different.
There is no significant difference between the variance of the heart rates of the smokers and nonsmokers.
Hypothesis Testing for Two Population Parameters | 18
DEPARTMENT of
STATISTICS Test for Homogeneity of Variance (F-test)
Example 2. A new drug is proposed to lower cholesterol. Thirty random
participants are enrolled in the trial and are randomly assigned to receive
either the new drug or a placebo. Each participant is asked to take the
assigned treatment for 6 weeks. At the end of 6 weeks, each patient’s
cholesterol level is measured and the sample statistics are as follows. Can we
assume equality of variance based on the data? Assume normality.

Given: Placebo has the larger variance, hence


𝑠1 = 35.5, 𝑛1 = 15, 𝑠2 = 20.5, 𝑛2 = 15, 𝛼 = 0.05
Hypothesis Testing for Two Population Parameters | 19
DEPARTMENT of
STATISTICS Test for Homogeneity of Variance (F-test)
Step 1: Identify the claim. State 𝐻0 and 𝐻𝑎 .
Claim: the variances are equal ⟹ 𝝈𝟐𝟏 = 𝝈𝟐𝟐
𝑯𝟎 : 𝝈𝟐𝟏 = 𝝈𝟐𝟐 𝑯𝒂 : 𝝈𝟐𝟏 ≠ 𝝈𝟐𝟐

Step 2: Determine the test statistic to use and its distribution’s tail.
Test statistic: F-test or Test for Homogeneity of Variance
Distribution’s tail: two-tailed test (since 𝐻𝑎 is 𝜎12 ≠ 𝜎22 )

Hypothesis Testing for Two Population Parameters | 20


DEPARTMENT of
STATISTICS Test for Homogeneity of Variance (F-test)
Step 3: Find the critical value.

Since 𝛼 = 0.05 and the test is a two-


tailed test, the critical value is
𝐹𝛼Τ2, 𝑛1 −1, 𝑛2 −1 = 𝐹0.05Τ2, 15−1, 15−1 =
𝐹0.025, 14, 14 = 𝟐. 𝟗𝟕𝟖𝟔.

Decision Rule:
Reject 𝑯𝟎 if 𝑭 > 𝟐. 𝟗𝟕𝟖𝟔

Hypothesis Testing for Two Population Parameters | 21


DEPARTMENT of
STATISTICS Test for Homogeneity of Variance (F-test)
Step 4: Compute for the test statistic.

Given: 𝑠1 = 35.5 and 𝑠2 = 20.5

𝑠12 35.5
35.522
𝐹= 2= 22
=
= 𝟐.
𝟐.𝟗𝟗𝟖𝟖
𝟐. 𝟗𝟗𝟖𝟖
𝟗𝟗𝟖𝟖
𝑠2 20.5
20.5

Step 5: Make a decision.


Decision Rule: Reject 𝐻0 if 𝐹 > 2.9786.
Since 2.9988 > 2.9786, we reject 𝑯𝟎 .

Hypothesis Testing for Two Population Parameters | 22


DEPARTMENT of
STATISTICS Test for Homogeneity of Variance (F-test)
Step 6: State the conclusion in terms of the claim.

At 5% significance level, there is enough evidence to reject the claim that


the variances are equal.
There is a significant difference between the variances of the cholesterol level of two groups .
Hypothesis Testing for Two Population Parameters | 23
DEPARTMENT of
STATISTICS Test for Homogeneity of Variance (F-test)
Example 3. In attempting to improve student services, two colleges
investigate their registration process on some randomly selected students and
found out the following data (in minutes). At the 0.01 significance level, test
the claim that the two random samples came from populations with the same
variances. Assume normality of variables.
𝒏 ഥ
𝑿 𝒔
College A 12 73.2 14.2
College B 15 42.3 9.8

Given: 𝑠1 = 14.2, 𝑛1 = 12, 𝑠2 = 9.8, 𝑛2 = 15, 𝛼 = 0.01


Step 0: The requirements are met.

Hypothesis Testing for Two Population Parameters | 24


DEPARTMENT of
STATISTICS Test for Homogeneity of Variance (F-test)
Step 1: Identify the claim. State 𝐻0 and 𝐻𝑎 .
Claim: the two random samples came from populations with the same
variances ⟹ 𝝈𝟐𝟏 = 𝝈𝟐𝟐
𝑯𝟎 : 𝝈𝟐𝟏 = 𝝈𝟐𝟐 𝑯𝒂 : 𝝈𝟐𝟏 ≠ 𝝈𝟐𝟐

Step 2: Determine the test statistic to use and its distribution’s tail.
Test statistic: F-test or Test for Homogeneity of Variances
Distribution’s tail: two-tailed test (since 𝐻𝑎 is 𝜎12 ≠ 𝜎22 )

Hypothesis Testing for Two Population Parameters | 25


DEPARTMENT of
STATISTICS Test for Homogeneity of Variance (F-test)
Step 3: Find the critical value.

Since 𝛼 = 0.01 and the test is a two-


tailed test, the critical value is
𝐹𝛼Τ2, 𝑛1 −1, 𝑛2 −1 = 𝐹0.01Τ2, 12−1, 15−1 =
𝐹0.005, 11, 14 = 𝟒. 𝟐𝟗𝟗𝟑.

Decision Rule:
Reject 𝑯𝟎 if 𝑭 > 𝟒. 𝟐𝟗𝟗𝟑

Hypothesis Testing for Two Population Parameters | 26


DEPARTMENT of
STATISTICS Test for Homogeneity of Variance (F-test)
Step 4: Compute for the test statistic.

Given: 𝑠1 = 14.2 and 𝑠2 = 9.8

𝑠12 14.2
14.222
𝐹= 2== 22
=
= 𝟐.
𝟐.𝟎𝟗𝟗𝟓
𝟎𝟗𝟗𝟓
𝑠2 9.8
9.8

Step 5: Make a decision.


Decision Rule: Reject 𝐻0 if 𝐹 > 4.2993.
Since 2.0995 > 4.2993, we fail to reject 𝑯𝟎 .

Hypothesis Testing for Two Population Parameters | 27


DEPARTMENT of
STATISTICS Test for Homogeneity of Variance (F-test)
Step 6: State the conclusion in terms of the claim.

At 1% significance level, there is no enough evidence to reject the claim that


the two random samples came from populations with the same variances.
There is no significant differences between the variances of the duration of the registration process in College
A and College B.

Hypothesis Testing for Two Population Parameters | 28


DEPARTMENT of
STATISTICS Hypothesis Testing about Two Means
Two Samples

Are the two Are


samples YES YES Independent Samples
𝝈𝟏 and 𝝈𝟐
independent? known? z-test

NO

Dependent Samples NO Independent Samples


t-test t-test

Hypothesis Testing for Two Population Parameters | 29


DEPARTMENT of
STATISTICS Hypothesis Testing about Two Means
Two Samples

Are the two Are


samples YES YES Independent Samples
𝝈𝟏 and 𝝈𝟐
independent? known? z-test

NO

Dependent Samples NO Independent Samples


t-test t-test

Hypothesis Testing for Two Population Parameters | 30


DEPARTMENT of
STATISTICS 2. Independent Samples z-test
z-test for Comparing Two Means from Independent Samples
Main Interest: difference between 𝝁𝟏 and 𝝁𝟐
• used when population standard deviations (𝝈𝟏 and 𝝈𝟐 ) are known.

Assumptions:
1. Both samples are random samples.
2. The samples must be independent of each other.
3. Either or both of these conditions are satisfied:
• The two sample sizes are both large (𝑛1 > 30 and 𝑛2 > 30).
• Both samples come from populations having normal or
approximately normal distribution.
Hypothesis Testing for Two Population Parameters | 31
DEPARTMENT of
STATISTICS 2. Independent Samples z-test
Independent Samples z-test

Test Statistic 𝑯𝟎 𝑯𝒂 Decision Rule

(𝑋ത1 − 𝑋ത2 ) − (𝜇1 − 𝜇2 ) 𝜇1 = 𝜇2 𝜇1 ≠ 𝜇2 Reject Ho if |𝑍𝑐 | ≥ 𝑍𝛼Τ2


𝑍𝑐 =
𝜎12 𝜎22 𝜇1 ≤ 𝜇2 𝜇1 > 𝜇2 Reject Ho if 𝑍𝑐 > 𝑍𝛼
+
𝑛1 𝑛2
𝜇1 ≥ 𝜇2 𝜇1 < 𝜇2 Reject Ho if 𝑍𝑐 < − 𝑍𝛼

Hypothesis Testing for Two Population Parameters | 32


DEPARTMENT of
STATISTICS 2. Independent Samples z-test

Critical Values

Degree of Level of Critical Value


Confidence significance Two-tailed Right-tailed Left-Tailed
(1 − 𝛼) (𝛼) 𝑍𝛼ൗ 𝑍𝛼 −𝑍𝛼
2

90% 0.10 𝑍0.10ൗ = 1.645 𝑍0.10 = 1.282 −𝑍0.10 = −1.282


2
95% 0.05 𝑍0.05ൗ = 1.960 𝑍0.05 = 1.645 −𝑍0.05 = −1.645
2
99% 0.01 𝑍0.01ൗ = 2.575 𝑍0.01 = 2.326 −𝑍0.01 = −2.326
2

Hypothesis Testing for Two Population Parameters | 33


DEPARTMENT of
STATISTICS 2. Independent Samples z-test
Example 4. A study using two random samples of 35 people each found that
the average amount of time those in the age group of 26-35 years spent per
week on leisure activities was 39.6 hours, and those in the age group of 46-55
years spent 35.4 hours. Assume that the population standard deviation for
those in the first age-group found by previous studies is 6.3 hours, and the
population standard deviation of those in the second group found by previous
studies was 5.8 hours. At 𝛼 = 0.05, can it be concluded that there is a
significant difference in the average times of each group spends on leisure
activities. Assume that the variable is normally distributed.

Given: 26-35 years: 𝑛1 = 35, 𝑋ത1 = 39.6, 𝜎1 = 6.3


46-55 years: 𝑛2 = 35, 𝑋ത2 = 35.4, 𝜎2 = 5.8
Hypothesis Testing for Two Population Parameters | 34
DEPARTMENT of
STATISTICS 2. Independent Samples z-test
Step 0: Verify if the requirements are met.
The requirements are met.

Step 1: Identify the claim. State 𝐻0 and 𝐻𝑎 .


Claim: there is a significant difference in the average times of each
group spends on leisure activities. ⟹ 𝝁𝟏 ≠ 𝝁𝟐
𝑯𝟎 : 𝝁𝟏 = 𝝁𝟐 𝑯𝒂 : 𝝁𝟏 ≠ 𝝁𝟐

Step 2: Determine the test statistic to use and its distribution’s tail.
Test statistic: Independent Samples z-test (since 𝜎1 and 𝜎2 are known)
Distribution’s tail: two-tailed test (since 𝐻𝑎 is 𝜇1 ≠ 𝜇2 )
Hypothesis Testing for Two Population Parameters | 35
DEPARTMENT of
STATISTICS 2. Independent Samples z-test
Step 3: Find the critical value and the critical region. Formulate decision rule.

Since 𝛼 = 0.05 and the test is a


two-tailed test, the critical value is
𝑍𝛼Τ2 = 𝑍0.05Τ2 = 𝑍0.025 = 𝟏. 𝟗𝟔. Rejection Acceptance Rejection
Region Region Region

𝑧 = −1.96 0 𝑧 = 1.96

Decision Rule:

Hypothesis Testing for Two Population Parameters | 36


DEPARTMENT of
STATISTICS 2. Independent Samples z-test
Independent Samples z-test

Test Statistic 𝑯𝟎 𝑯𝒂 Decision Rule

(𝑋ത1 − 𝑋ത2 ) − (𝜇1 − 𝜇2 ) 𝜇1 = 𝜇2 𝜇1 ≠ 𝜇2 Reject Ho if |𝑍𝑐 | ≥ 𝑍𝛼Τ2


𝑍𝑐 =
𝜎12 𝜎22 𝜇1 ≤ 𝜇2 𝜇1 > 𝜇2 Reject Ho if 𝑍𝑐 > 𝑍𝛼
+
𝑛1 𝑛2
𝜇1 ≥ 𝜇2 𝜇1 < 𝜇2 Reject Ho if 𝑍𝑐 < − 𝑍𝛼

Hypothesis Testing for Two Population Parameters | 37


DEPARTMENT of
STATISTICS 2. Independent Samples z-test
Step 3: Find the critical value and the critical region. Formulate decision rule.

Since 𝛼 = 0.05 and the test is a


two-tailed test, the critical value is
𝑍𝛼Τ2 = 𝑍0.05Τ2 = 𝑍0.025 = 𝟏. 𝟗𝟔. Rejection Acceptance Rejection
Region Region Region

𝑧 = −1.96 0 𝑧 = 1.96

Decision Rule:
Reject 𝐻0 if |𝑍𝑐 | ≥ 𝑍𝛼Τ2 , that is,
Reject 𝑯𝟎 if |𝒁𝒄 | ≥ 𝟏. 𝟗𝟔

Hypothesis Testing for Two Population Parameters | 38


DEPARTMENT of
STATISTICS 2. Independent Samples z-test
Step 4: Compute for the test statistic.

Given: 26-35 years: 𝑛1 = 35, 𝑋ത1 = 39.6, 𝜎1 = 6.3


46-55 years: 𝑛2 = 35, 𝑋ത2 = 35.4, 𝜎2 = 5.8

(𝑋ത1 − 𝑋ത2 ) − (𝜇1 − 𝜇2 ) (39.6 − 35.4) − 0


𝑍𝑐 = = =
= 𝟐.
𝟐. 𝟗𝟎
𝟗𝟎
𝜎12 𝜎22 6.32 5.82
+
+ 35 35
𝑛1 𝑛2
Step 5: Make a decision.
Acceptance
Rejection Rejection
Decision Rule: Reject 𝐻0 if |𝑍𝑐 | ≥ 1.96 Region
Region
Region
Since |2.90| ≥ 1.96, we reject 𝑯𝟎 . −1.96 0 1.962.90
Hypothesis Testing for Two Population Parameters | 39
DEPARTMENT of
STATISTICS 2. Independent Samples z-test
Step 6: State the conclusion in terms of the claim.

At 5% significance level, there is enough evidence to support the claim that


there is a significant difference in the average times spent of these two age
groups on leisure activities.
There is a significant difference in the average times spent of these two age groups on leisure activities.
Hypothesis Testing for Two Population Parameters | 40
DEPARTMENT of
STATISTICS 2. Independent Samples z-test
Example 5. The average number of hours of television watched per week by
women over age 55 is 48 hours. Men over age 55 watch an average of 43
hours of television per week. Random samples of 40 men and 40 women from
a large retirement community yielded the following results. At the 0.05 level
of significance, can it be concluded that women watch more television per
week than men?
Sample Size Mean Pop’n Standard Deviation
(Group 1) Women 40 48.2 5.6
(Group 2) Men 40 44.3 4.5

Given: Aside from the table, we are also given that 𝜇1 = 48, 𝜇2 = 43, and
𝛼 = 0.05
Hypothesis Testing for Two Population Parameters | 41
DEPARTMENT of
STATISTICS 2. Independent Samples z-test
Step 0: Verify if the requirements are met.
The requirements are met.

Step 1: Identify the claim. State 𝐻0 and 𝐻𝑎 .


Claim: women watch more television per week than men ⟹ 𝝁𝟏 > 𝝁𝟐
𝑯𝟎 : 𝝁𝟏 ≤ 𝝁𝟐 𝑯𝒂 : 𝝁𝟏 > 𝝁𝟐

Step 2: Determine the test statistic to use and its distribution’s tail.
Test statistic: Independent Samples z-test (since 𝜎1 and 𝜎2 are known)
Distribution’s tail: right-tailed test (since 𝐻𝑎 is 𝜇1 > 𝜇2 )

Hypothesis Testing for Two Population Parameters | 42


DEPARTMENT of
STATISTICS 2. Independent Samples z-test
Step 3: Find the critical value and the critical region. Formulate decision rule.

Since 𝛼 = 0.05 and the test is a


right-tailed test, the critical value is
Rejection Region
𝑍𝛼 = 𝑍0.05 = 𝟏. 𝟔𝟒𝟓.
Acceptance
Region

0 1.645
Decision Rule:

Hypothesis Testing for Two Population Parameters | 43


DEPARTMENT of
STATISTICS 2. Independent Samples z-test
Independent Samples z-test

Test Statistic 𝑯𝟎 𝑯𝒂 Decision Rule

(𝑋ത1 − 𝑋ത2 ) − (𝜇1 − 𝜇2 ) 𝜇1 = 𝜇2 𝜇1 ≠ 𝜇2 Reject Ho if |𝑍𝑐 | ≥ 𝑍𝛼Τ2


𝑍𝑐 =
𝜎12 𝜎22 𝜇1 ≤ 𝜇2 𝜇1 > 𝜇2 Reject Ho if 𝑍𝑐 > 𝑍𝛼
+
𝑛1 𝑛2
𝜇1 ≥ 𝜇2 𝜇1 < 𝜇2 Reject Ho if 𝑍𝑐 < − 𝑍𝛼

Hypothesis Testing for Two Population Parameters | 44


DEPARTMENT of
STATISTICS 2. Independent Samples z-test
Step 3: Find the critical value and the critical region. Formulate decision rule.

Since 𝛼 = 0.05 and the test is a


right-tailed test, the critical value is
Rejection Region
𝑍𝛼 = 𝑍0.05 = 𝟏. 𝟔𝟒𝟓.
Acceptance
Region

0 1.645
Decision Rule:
Reject 𝐻0 if 𝑍𝑐 > 𝑍𝛼 , that is,
Reject 𝑯𝟎 if 𝒁𝒄 > 𝟏. 𝟔𝟒𝟓

Hypothesis Testing for Two Population Parameters | 45


DEPARTMENT of
STATISTICS 2. Independent Samples z-test
Step 4: Compute for the test statistic.

Given: Women: 𝑛1 = 40, 𝑋ത1 = 48.2, 𝜎1 = 5.6, 𝜇1 = 48


Men: 𝑛2 = 40, 𝑋ത2 = 44.3, 𝜎2 = 4.5, 𝜇2 = 43

(𝑋ത1 − 𝑋ത2 ) − (𝜇1 − 𝜇2 ) (48.2 − 44.3) − (48 − 43)


𝑍𝑐 = = =
= −𝟎.
−𝟎.𝟗𝟔𝟖
𝟗𝟔𝟖
𝜎12 𝜎22 5.62 4.52
+
+ 40 40
𝑛1 𝑛2
Step 5: Make a decision.
Decision Rule: Reject 𝐻0 if 𝑍𝑐 > 1.645
Since −0.968 > 1.645, we failed to reject 𝑯𝟎 . -0.968

Hypothesis Testing for Two Population Parameters | 46


DEPARTMENT of
STATISTICS 2. Independent Samples z-test
Step 6: State the conclusion in terms of the claim.

At 5% significance level, there is no enough evidence to support the claim


that women watch more television per week than men.

Hypothesis Testing for Two Population Parameters | 47


DEPARTMENT of
STATISTICS Hypothesis Testing about Two Means
Two Samples

Are the two Are


samples YES YES Independent Samples
𝝈𝟏 and 𝝈𝟐
independent? known? z-test

NO

Dependent Samples NO Independent Samples


t-test t-test

Hypothesis Testing for Two Population Parameters | 48


DEPARTMENT of
STATISTICS 3. Independent Samples t-test
t-test for Comparing Two Means from Independent Samples
Main Interest: difference between 𝝁𝟏 and 𝝁𝟐
• used when population standard deviations (𝝈𝟏 and 𝝈𝟐 ) are unknown.

Assumptions:
1. Both samples are random samples.
2. The samples must be independent of each other.
3. Either or both of these conditions are satisfied:
• The two sample sizes are both large (𝑛1 > 30 and 𝑛2 > 30).
• Both samples come from populations having normal or
approximately normal distribution.
Hypothesis Testing for Two Population Parameters | 49
DEPARTMENT of
STATISTICS 3. Independent Samples t-test

Test for Homogeneity of Variance

Are
Independent Samples
Independent Samples population YES t-test
t-test variances
equal? (Equal Variances)

NO Independent Samples
t-test
(Unequal Variances)

Hypothesis Testing for Two Population Parameters | 50


DEPARTMENT of
STATISTICS 3.1 Independent Samples t-test (Equal Variances)

Test for Homogeneity of Variance

Are
Independent Samples
Independent Samples population YES t-test
t-test variances
equal? (Equal Variances)

NO Independent Samples
t-test
(Unequal Variances)

Hypothesis Testing for Two Population Parameters | 51


DEPARTMENT of
STATISTICS 3.1 Independent Samples t-test (Equal Variances)
Independent Samples t-test (Equal Variances)

Test Statistic 𝑯𝟎 𝑯𝒂 Decision Rule

(𝑋ത1 − 𝑋ത2 ) − (𝜇1 − 𝜇2 ) 𝜇 = 𝜇 𝜇 ≠ 𝜇 Reject Ho if |𝑡𝑐 | ≥ 𝑡𝛼Τ2 , 𝑛1 +𝑛2 −2


𝑡𝑐 = 1 2 1 2
2 1 1
𝑠𝑝 +
𝑛1 𝑛2
𝜇1 ≤ 𝜇2 𝜇1 > 𝜇2 Reject Ho if 𝑡𝑐 > 𝑡𝛼 , 𝑛1 +𝑛2 −2
where: 𝑠𝑝2 = pooled variance
2 2
2
𝑛 1 − 1 𝑠1 + 𝑛 2 − 1 𝑠2
𝑠𝑝 = 𝜇1 ≥ 𝜇2 𝜇1 < 𝜇2 Reject Ho if 𝑡𝑐 < −𝑡𝛼 , 𝑛1 +𝑛2 −2
𝑛1 − 1 + (𝑛2 − 1)

Hypothesis Testing for Two Population Parameters | 52


DEPARTMENT of
STATISTICS 3.1 Independent Samples t-test (Equal Variances)
Example 6. The mean for the number of weeks 15 New York Times hard-cover
fiction books spent on the best seller list is 22 weeks. The standard deviation
is 6.17 weeks. The mean for the number of weeks 15 New York Times hard-
cover nonfiction books spent on the best seller list is 28 weeks. The standard
deviation is 13.2 weeks. At 𝛼 = 0.10, can we conclude that there is a
difference in the mean times for the number of weeks the books were on the
best seller lists? Assume that the variable is normally distributed and the
samples are random sample. Assume equality of variance.
Given: fiction: 𝑛1 = 15, 𝑋ത1 = 22, 𝑠1 = 6.17
non-fiction: 𝑛2 = 15, 𝑋ത2 = 28, 𝑠2 = 13.2 𝛼 = 0.10
Step 0: The requirements are met.
Hypothesis Testing for Two Population Parameters | 53
DEPARTMENT of
STATISTICS 3.1 Independent Samples t-test (Equal Variances)
Step 1: Identify the claim. State 𝐻0 and 𝐻𝑎 .
Claim: there is a difference in the mean times for the number of weeks
the books were on the best seller lists ⟹ 𝝁𝟏 ≠ 𝝁𝟐
𝑯𝟎 : 𝝁𝟏 = 𝝁𝟐 𝑯𝒂 : 𝝁𝟏 ≠ 𝝁𝟐

Step 2: Determine the test statistic to use and its distribution’s tail.
Test statistic: Independent Samples t-test (Equal Variances)
(since 𝜎1 and 𝜎2 are unknown and variances are assume
equal)
Distribution’s tail: two-tailed test (since 𝐻𝑎 is 𝜇1 ≠ 𝜇2 )

Hypothesis Testing for Two Population Parameters | 54


DEPARTMENT of
STATISTICS 3.1 Independent Samples t-test (Equal Variances)
Step 3: Find the critical value and the critical region. Formulate decision rule.

Since 𝛼 = 0.10 and the test is a


two-tailed test, the critical value is
𝑡𝛼Τ2 ,𝑛1 +𝑛2 −2 = 𝑡0.10Τ2 , 15+15−2 = Rejection Acceptance Rejection
Region Region Region
𝑡0.05, 28 = 𝟏. 𝟕𝟎𝟏.
−1.701 0 1.701

Decision Rule:

Hypothesis Testing for Two Population Parameters | 55


DEPARTMENT of
STATISTICS 3.1 Independent Samples t-test (Equal Variances)
Independent Samples t-test (Equal Variances)

Test Statistic 𝑯𝟎 𝑯𝒂 Decision Rule

(𝑋ത1 − 𝑋ത2 ) − (𝜇1 − 𝜇2 ) 𝜇 = 𝜇 𝜇 ≠ 𝜇 Reject Ho if |𝑡𝑐 | ≥ 𝑡𝛼Τ2 ,𝑛1 +𝑛2 −2


𝑡𝑐 = 1 2 1 2
2 1 1
𝑠𝑝 +
𝑛1 𝑛2
𝜇1 ≤ 𝜇2 𝜇1 > 𝜇2 Reject Ho if 𝑡𝑐 > 𝑡𝛼 ,𝑛1 +𝑛2 −2
where: 𝑠𝑝2 = pooled variance
2 2
2
𝑛 1 − 1 𝑠1 + 𝑛 2 − 1 𝑠2
𝑠𝑝 = 𝜇1 ≥ 𝜇2 𝜇1 < 𝜇2 Reject Ho if 𝑡𝑐 < −𝑡𝛼 ,𝑛1 +𝑛2 −2
𝑛1 − 1 + (𝑛2 − 1)

Hypothesis Testing for Two Population Parameters | 56


DEPARTMENT of
STATISTICS 3.1 Independent Samples t-test (Equal Variances)
Step 3: Find the critical value and the critical region. Formulate decision rule.

Since 𝛼 = 0.10 and the test is a


two-tailed test, the critical value is
𝑡𝛼Τ2 ,𝑛1 +𝑛2 −2 = 𝑡0.10Τ2 , 15+15−2 = Rejection Acceptance Rejection
Region Region Region
𝑡0.05, 28 = 𝟏. 𝟕𝟎𝟏.
−1.701 0 1.701

Decision Rule:
Reject 𝐻0 if |𝑡𝑐 | ≥ 𝑡𝛼Τ2 ,𝑛1 +𝑛2 −2 , that is,
Reject 𝑯𝟎 if |𝒕𝒄 | ≥ 𝟏. 𝟕𝟎𝟏

Hypothesis Testing for Two Population Parameters | 57


DEPARTMENT of
STATISTICS 3.1 Independent Samples t-test (Equal Variances)
Step 4: Compute for the test statistic.
Given: fiction: 𝑛1 = 15, 𝑋ത1 = 22, 𝑠1 = 6.17
non-fiction: 𝑛2 = 15, 𝑋ത2 = 28, 𝑠2 = 13.2

2 2 2 2
2
𝑛1 − 1 𝑠1 + 𝑛 2 − 1 𝑠2 15 − 1 6.17 + 15 − 1 13.2
𝑠𝑝 = = = 106.15
𝑛1 − 1 + (𝑛2 − 1) 15 − 1 + (15 − 1)

(𝑋ത1 − 𝑋ത2 ) − (𝜇1 − 𝜇2 ) (22 − 28) − 0


𝑡𝑐 = = = −𝟏. 𝟓𝟗𝟓
1 1 1 1
𝑠𝑝2 + 106.15 +
𝑛1 𝑛2 15 15
Hypothesis Testing for Two Population Parameters | 58
DEPARTMENT of
STATISTICS

Step 5: Make a decision.


Decision Rule: Reject 𝐻0 if |𝑡𝑐 | ≥ 1.701.
Since | − 1.595| ≥ 1.701, we failed to reject 𝑯𝟎 .
Step 6: State the conclusion in terms of the claim.

At 10% significance level, there is no enough evidence to support the claim


that there is a difference in the mean times for the number of weeks the
books were on the best seller lists..
Hypothesis Testing for Two Population Parameters | 59
DEPARTMENT of
STATISTICS 3.1 Independent Samples t-test (Equal Variances)
Example 7. In attempting to improve student services, two colleges
investigate their registration process on some randomly selected students and
found out the following data (in minutes). At the 0.01 significance level, test
the claim that the two random sample groups came from populations with
the same mean. Assume normality of the variables.
𝒏 ഥ
𝑿 𝒔
College A 12 73.2 14.2
College B 15 42.3 9.8

Recall: This problem is also used in Example 3 (Test for Homogeneity of Variance) and result
showed that the population variances of these two colleges are equal, hence it is
appropriate to use Independent Samples t-test (Equal Variances).

Hypothesis Testing for Two Population Parameters | 60


DEPARTMENT of
STATISTICS 3.1 Independent Samples t-test (Equal Variances)
Example 7. In attempting to improve student services, two colleges
investigate their registration process on some randomly selected students and
found out the following data (in minutes). At the 0.01 significance level, test
the claim that the two random sample groups came from populations with
the same mean. Assume normality of the variables.
𝒏 ഥ
𝑿 𝒔
(Group 1) College A 12 73.2 14.2
(Group 2) College B 15 42.3 9.8

Given: College A: 𝑛1 = 12, 𝑋ത1 = 73.2, 𝑠1 = 14.2


College B: 𝑛2 = 15, 𝑋ത2 = 42.3, 𝑠2 = 9.8 𝛼 = 0.01
Step 0: The requirements are met.
Hypothesis Testing for Two Population Parameters | 61
DEPARTMENT of
STATISTICS 3.1 Independent Samples t-test (Equal Variances)
Step 1: Identify the claim. State 𝐻0 and 𝐻𝑎 . ⟹ 𝝁𝟏 = 𝝁𝟐
Claim: the two samples came from populations with the same mean
𝑯𝟎 : 𝝁𝟏 = 𝝁𝟐 𝑯𝒂 : 𝝁𝟏 ≠ 𝝁𝟐

Step 2: Determine the test statistic to use and its distribution’s tail.
Test statistic: Independent Samples t-test (Equal Variances)
(since 𝜎1 and 𝜎2 are unknown and population variances are
shown to be equal)
Distribution’s tail: two-tailed test (since 𝐻𝑎 is 𝜇1 ≠ 𝜇2 )

Hypothesis Testing for Two Population Parameters | 62


DEPARTMENT of
STATISTICS 3.1 Independent Samples t-test (Equal Variances)
Step 3: Find the critical value and the critical region. Formulate decision rule.

Since 𝛼 = 0.01 and the test is a


two-tailed test, the critical value is
𝑡𝛼Τ2 ,𝑛1 +𝑛2 −2 = 𝑡0.01Τ2 , 12+15−2 = Rejection Acceptance Rejection
Region Region Region
𝑡0.005, 25 = 𝟐. 𝟕𝟖𝟕.
−2.787 0 2.787

Decision Rule:

Hypothesis Testing for Two Population Parameters | 63


DEPARTMENT of
STATISTICS 3.1 Independent Samples t-test (Equal Variances)
Independent Samples t-test (Equal Variances)

Test Statistic 𝑯𝟎 𝑯𝒂 Decision Rule

(𝑋ത1 − 𝑋ത2 ) − (𝜇1 − 𝜇2 ) 𝜇 = 𝜇 𝜇 ≠ 𝜇 Reject Ho if |𝑡𝑐 | ≥ 𝑡𝛼Τ2 ,𝑛1 +𝑛2 −2


𝑡𝑐 = 1 2 1 2
2 1 1
𝑠𝑝 +
𝑛1 𝑛2
𝜇1 ≤ 𝜇2 𝜇1 > 𝜇2 Reject Ho if 𝑡𝑐 > 𝑡𝛼 ,𝑛1 +𝑛2 −2
where: 𝑠𝑝2 = pooled variance
2 2
2
𝑛 1 − 1 𝑠1 + 𝑛 2 − 1 𝑠2
𝑠𝑝 = 𝜇1 ≥ 𝜇2 𝜇1 < 𝜇2 Reject Ho if 𝑡𝑐 < −𝑡𝛼 ,𝑛1 +𝑛2 −2
𝑛1 − 1 + (𝑛2 − 1)

Hypothesis Testing for Two Population Parameters | 64


DEPARTMENT of
STATISTICS 3.1 Independent Samples t-test (Equal Variances)
Step 3: Find the critical value and the critical region. Formulate decision rule.

Since 𝛼 = 0.01 and the test is a


two-tailed test, the critical value is
𝑡𝛼Τ2 ,𝑛1 +𝑛2 −2 = 𝑡0.01Τ2 , 12+15−2 = Rejection Acceptance Rejection
Region Region Region
𝑡0.005, 25 = 𝟐. 𝟕𝟖𝟕.
−2.787 0 2.787

Decision Rule:
Reject 𝐻0 if |𝑡𝑐 | ≥ 𝑡𝛼Τ2 ,𝑛1 +𝑛2 −2 , that is,
Reject 𝑯𝟎 if 𝒕𝒄 ≥ 𝟐. 𝟕𝟖𝟕

Hypothesis Testing for Two Population Parameters | 65


DEPARTMENT of
STATISTICS 3.1 Independent Samples t-test (Equal Variances)
Step 4: Compute for the test statistic.
Given: College A: 𝑛1 = 12, 𝑋ത1 = 73.2, 𝑠1 = 14.2
College B: 𝑛2 = 15, 𝑋ത2 = 42.3, 𝑠2 = 9.8

2 2 2 2
2
𝑛1 − 1 𝑠1 + 𝑛 2 − 1 𝑠2 12 − 1 14.2 + 15 − 1 9.8
𝑠𝑝 = = =
= 142.50
142.50
𝑛1 − 1 + (𝑛2 − 1) 12 − 1 + (15 − 1)

(𝑋ത1 − 𝑋ത2 ) − (𝜇1 − 𝜇2 ) (73.2 − 42.3) − 0


𝑡𝑐 = = = 𝟔.
= 𝟔.𝟔𝟖𝟒
𝟔𝟖𝟒
1 1 1 1
𝑠𝑝2 + 142.50 +
𝑛1 𝑛2 12 15

Hypothesis Testing for Two Population Parameters | 66


DEPARTMENT of
STATISTICS 3.1 Independent Samples t-test (Equal Variances)
Step 5: Make a decision.
Decision Rule: Reject 𝐻0 if |𝑡𝑐 | ≥ 2.787
Since |6.684| ≥ 2.787, we reject 𝑯𝟎 .
Step 6: State the conclusion in terms of the claim.

At 1% significance level, there is enough evidence to reject the claim that


the two samples came from populations with the same mean.
There is a significant difference in the mean registration time of College A and B.
Hypothesis Testing for Two Population Parameters | 67
DEPARTMENT of
STATISTICS 3.2 Independent Samples t-test (Unequal Variances)

Test for Homogeneity of Variance

Are
Independent Samples
Independent Samples population YES t-test
t-test variances
equal? (Equal Variances)

NO Independent Samples
t-test
(Unequal Variances)

Hypothesis Testing for Two Population Parameters | 68


DEPARTMENT of
STATISTICS 3.2 Independent Samples t-test (Unequal Variances)

Independent Samples t-test (Unequal Variances)


Test Statistic 𝑯𝟎 𝑯𝒂 Decision Rule
(𝑋ത1 − 𝑋ത2 ) − (𝜇1 − 𝜇2 )
𝑡𝑐 = 𝜇1 = 𝜇2 𝜇1 ≠ 𝜇2 Reject Ho if |𝑡𝑐 | ≥ 𝑡𝛼Τ2 , 𝑑𝑓
𝑠12 𝑠22
+
𝑛1 𝑛2
where: 𝜇1 ≤ 𝜇2 𝜇1 > 𝜇2 Reject Ho if 𝑡𝑐 > 𝑡𝛼 , 𝑑𝑓
2 2 2
𝑠1 𝑠2
+
𝑛1 𝑛2
𝑑𝑓 = 2 2 2 2
𝑠1 𝑠2 𝜇1 ≥ 𝜇2 𝜇1 < 𝜇2 Reject Ho if 𝑡𝑐 < −𝑡𝛼, 𝑑𝑓
𝑛1 𝑛2
+
𝑛1 −1 𝑛2 −1

*Round-up df to next whole number Hypothesis Testing for Two Population Parameters | 69
DEPARTMENT of
STATISTICS 3.2 Independent Samples t-test (Unequal Variances)

Example 8. A new drug is proposed to lower cholesterol. Thirty random


participants are enrolled in the trial and are randomly assigned to receive
either the new drug or a placebo. Each participant is asked to take the
assigned treatment for 6 weeks. At the end of 6 weeks, each patient’s
cholesterol level is measured and the sample statistics are as follows. Assume
normality. Can we conclude that the new drug lowers the cholesterol?

Recall: This problem is also used in Example 2 (Test for Homogeneity of Variance) and result showed
that the population variances are unequal, hence it is appropriate to use Independent Samples t-
test (Unequal Variances).
Hypothesis Testing for Two Population Parameters | 70
DEPARTMENT of
STATISTICS 3.2 Independent Samples t-test (Unequal Variances)

Example 8. A new drug is proposed to lower cholesterol. Thirty random


participants are enrolled in the trial and are randomly assigned to receive
either the new drug or a placebo. Each participant is asked to take the
assigned treatment for 6 weeks. At the end of 6 weeks, each patient’s
cholesterol level is measured and the sample statistics are as follows. Assume
normality. Can we conclude that the new drug lowers the cholesterol?

(Group 1) (Group 2)
Given: 𝑛1 = 15, 𝑠1 = 20.5, 𝑋ത1 = 195.9,
𝑛2 = 15, 𝑠2 = 35.5, 𝑋ത2 = 227.4, 𝛼 = 0.05
Hypothesis Testing for Two Population Parameters | 71
DEPARTMENT of
STATISTICS 3.2 Independent Samples t-test (Unequal Variances)

Step 1: Identify the claim. State 𝐻0 and 𝐻𝑎 .


Claim: the new drug lowers the cholesterol ⟹ 𝝁𝟏 < 𝝁𝟐
𝑯𝟎 : 𝝁𝟏 ≥ 𝝁𝟐 𝑯𝒂 : 𝝁𝟏 < 𝝁𝟐

Step 2: Determine the test statistic to use and its distribution’s tail.
Test statistic: Independent Samples t-test (Unequal Variances)
(since 𝜎1 and 𝜎2 are unknown and population variances are
shown to be unequal)
Distribution’s tail: left-tailed test (since 𝐻𝑎 is 𝜇1 < 𝜇2 )

Hypothesis Testing for Two Population Parameters | 72


DEPARTMENT of
STATISTICS 3.2 Independent Samples t-test (Unequal Variances)

Step 3: Find the critical value and the critical region. Formulate decision rule.

Since 𝛼 = 0.05 and the test is a Compute for 𝑑𝑓:


left-tailed test, the critical value is 2 2
𝑠2 𝑠
1+ 2 20.52 35.52
2
−𝑡𝛼 ,𝑑𝑓 = −𝑡0.05, 𝑑𝑓 = 𝑛1 𝑛2 + 15
15
−𝑡0.05, 23 = −𝟏. 𝟕𝟏𝟒. 𝑑𝑓 = 2 2 2 2 = 2 2
𝑠1 𝑠2 20.52 35.52
𝑛1 𝑛2 15 15
+ 15−1
+ 15−1
𝑛1 −1 𝑛2 −1

𝑑𝑓 = 22.4026 ≈ 𝟐𝟑

Hypothesis Testing for Two Population Parameters | 73


DEPARTMENT of
STATISTICS 3.2 Independent Samples t-test (Unequal Variances)

Step 3: Find the critical value and the critical region. Formulate decision rule.

Since 𝛼 = 0.05 and the test is a


left-tailed test, the critical value is
−𝑡𝛼 ,𝑑𝑓 = −𝑡0.05, 𝑑𝑓 = Rejection
Region
−𝑡0.05, 23 = −𝟏. 𝟕𝟏𝟒. Acceptance Region

−1.714

Decision Rule:

Hypothesis Testing for Two Population Parameters | 74


DEPARTMENT of
STATISTICS 3.2 Independent Samples t-test (Unequal Variances)

Independent Samples t-test (Unequal Variances)


Test Statistic 𝑯𝟎 𝑯𝒂 Decision Rule
(𝑋ത1 − 𝑋ത2 ) − (𝜇1 − 𝜇2 )
𝑡𝑐 = 𝜇1 = 𝜇2 𝜇1 ≠ 𝜇2 Reject Ho if |𝑡𝑐 | ≥ 𝑡𝛼Τ2 , 𝑑𝑓
𝑠12 𝑠22
+
𝑛1 𝑛2
where: 𝜇1 ≤ 𝜇2 𝜇1 > 𝜇2 Reject Ho if 𝑡𝑐 > 𝑡𝛼 , 𝑑𝑓
2 2 2
𝑠1 𝑠2
+
𝑛1 𝑛2
𝑑𝑓 = 2 2 2 2
𝑠1 𝑠2 𝜇1 ≥ 𝜇2 𝜇1 < 𝜇2 Reject Ho if 𝑡𝑐 < −𝑡𝛼, 𝑑𝑓
𝑛1 𝑛2
+
𝑛1 −1 𝑛2 −1

*Round-up df to next whole number Hypothesis Testing for Two Population Parameters | 75
DEPARTMENT of
STATISTICS 3.2 Independent Samples t-test (Unequal Variances)

Step 3: Find the critical value and the critical region. Formulate decision rule.

Since 𝛼 = 0.05 and the test is a


left-tailed test, the critical value is
−𝑡𝛼 ,𝑑𝑓 = −𝑡0.05, 𝑑𝑓 = Rejection
Region
−𝑡0.05, 23 = −𝟏. 𝟕𝟏𝟒. Acceptance Region

−1.714

Decision Rule:
Reject 𝐻0 if 𝑡𝑐 < −𝑡𝛼, 𝑑𝑓 , that is,
Reject 𝑯𝟎 if 𝒕𝒄 < −𝟏. 𝟕𝟏𝟒.

Hypothesis Testing for Two Population Parameters | 76


DEPARTMENT of
STATISTICS 3.2 Independent Samples t-test (Unequal Variances)
Step 4: Compute for the test statistic.
Given: new drug: 𝑛1 = 15, 𝑠1 = 20.5, 𝑋ത1 = 195.9,
placebo: 𝑛2 = 15, 𝑠2 = 35.5, 𝑋ത2 = 227.4,

(𝑋ത1 − 𝑋ത2 ) − (𝜇1 − 𝜇2 ) (195.9 − 227.4) − 0


𝑡𝑐 = = = −𝟐.
−𝟐. 𝟗𝟕𝟔
𝟗𝟕𝟔
𝑠12 𝑠22 20.52 35.52
+
+ 15 15
𝑛1 𝑛2
Step 5: Make a decision.
Decision Rule: Reject 𝐻0 if 𝑡𝑐 < −1.714. Rejection
Region
Acceptance
Region
Since −2.976 < −1.714, we reject 𝑯𝟎 .
−2.976 −1.714

Hypothesis Testing for Two Population Parameters | 77


DEPARTMENT of
STATISTICS 3.2 Independent Samples t-test (Unequal Variances)

Step 6: State the conclusion in terms of the claim.

At 5% significance level, there is enough evidence to support the claim that


the new drug lowers the cholesterol.

Hypothesis Testing for Two Population Parameters | 78


DEPARTMENT of
STATISTICS Hypothesis Testing about Two Means
Two Samples

Are the two Are


samples YES YES Independent Samples
𝝈𝟏 and 𝝈𝟐
independent? known? z-test

NO

Dependent Samples NO Independent Samples


t-test t-test

Hypothesis Testing for Two Population Parameters | 79


DEPARTMENT of
STATISTICS 4. Dependent Samples t-test
t-test for Comparing Two Means from Dependent Samples
• Dependent samples means the samples are related to each other. Such
samples are also referred as paired sample or matched sample.
Main Interest: difference between 𝝁𝟏 and 𝝁𝟐

Assumptions:
1. Both samples are random samples.
2. The sample data are dependent.
3. Either or both of these conditions are satisfied:
• The number of pairs of sample data is large (𝑛 > 30).
• The population must be normally or approximately normally distributed.
Hypothesis Testing for Two Population Parameters | 80
DEPARTMENT of
STATISTICS 4. Dependent Samples t-test
Dependent Samples t-test

Test Statistic 𝑯𝟎 𝑯𝒂 Decision Rule


𝜇1 = 𝜇2 𝜇1 ≠ 𝜇2 Reject Ho if |𝑡𝑐 | ≥ 𝑡𝛼Τ2 , 𝑛−1
𝑑ҧ − 𝜇𝑑
𝑡𝑐 = 𝑠𝑑 𝜇1 ≤ 𝜇2 𝜇1 > 𝜇2 Reject Ho if 𝑡𝑐 > 𝑡𝛼 , 𝑛−1
𝑛 𝜇1 ≥ 𝜇2 𝜇1 < 𝜇2 Reject Ho if 𝑡𝑐 < −𝑡𝛼 , 𝑛−1
where:
𝑑ҧ = mean difference 𝑠𝑑 = sd of differences 𝑛 = number of pairs

∑𝑑𝑖 2
∑𝑑𝑖 ∑𝑑𝑖2 − 𝜇𝑑 = claimed value of
𝑑ҧ = 𝑛 the difference
𝑛 𝑠𝑑 =
𝑛−1
Hypothesis Testing for Two Population Parameters | 81
DEPARTMENT of
STATISTICS 4. Dependent Samples t-test
Example 9. As an aid for improving students’ study habits, nine students were
randomly selected to attend a seminar on the importance of education in life.
The table shows the number of hours each student studied per week before
and after the seminar. At 𝛼 = 0.05, did attending the seminar increase the
number of hours the students studied per week? Assume that the sample
came from normally distributed population.
Student 1 2 3 4 5 6 7 8 9
Before (𝑋1 ) 9 12 6 15 3 18 10 13 7
After (𝑋2 ) 9 17 9 20 2 21 15 22 6

Step 0: All the three requirements/assumptions are met.

Hypothesis Testing for Two Population Parameters | 82


DEPARTMENT of
STATISTICS 4. Dependent Samples t-test
Step 1: Identify the claim. State 𝐻0 and 𝐻𝑎 .
Claim: attending the seminar increase the number of hours the students
studied per week ⟹ 𝝁𝟏 < 𝝁𝟐
𝑯𝟎 : 𝝁𝟏 ≥ 𝝁𝟐 𝑯𝒂 : 𝝁𝟏 < 𝝁𝟐

Step 2: Determine the test statistic to use and its distribution’s tail.
Test statistic: Dependent Samples t-test (since data are paired)
Distribution’s tail: left-tailed test (since 𝐻𝑎 is 𝜇1 < 𝜇2 )

Hypothesis Testing for Two Population Parameters | 83


DEPARTMENT of
STATISTICS 4. Dependent Samples t-test
Step 3: Find the critical value and the critical region. Formulate decision rule.

Since 𝛼 = 0.05 and the test is a


left-tailed test, the critical value is
−𝑡𝛼, 𝑛−1 = −𝑡0.05, 9−1 = Rejection
Region Acceptance
−𝑡0.05, 8 = −𝟏. 𝟖𝟔𝟎. Region

−1.860 0
Decision Rule:

Hypothesis Testing for Two Population Parameters | 84


DEPARTMENT of
STATISTICS 4. Dependent Samples t-test
Dependent Samples t-test

Test Statistic 𝑯𝟎 𝑯𝒂 Decision Rule


𝜇1 = 𝜇2 𝜇1 ≠ 𝜇2 Reject Ho if |𝑡𝑐 | ≥ 𝑡𝛼Τ2 , 𝑛−1
𝑑ҧ − 𝜇𝑑
𝑡𝑐 = 𝑠𝑑 𝜇1 ≤ 𝜇2 𝜇1 > 𝜇2 Reject Ho if 𝑡𝑐 > 𝑡𝛼 , 𝑛−1
𝑛 𝜇1 ≥ 𝜇2 𝜇1 < 𝜇2 Reject Ho if 𝑡𝑐 < −𝑡𝛼 , 𝑛−1
where:
𝑑ҧ = mean difference 𝑠𝑑 = sd of differences 𝑛 = number of pairs

∑𝑑𝑖 2
∑𝑑𝑖 ∑𝑑𝑖2 − 𝜇𝑑 = claimed value of
𝑑ҧ = 𝑛 the difference
𝑛 𝑠𝑑 =
𝑛−1
Hypothesis Testing for Two Population Parameters | 85
DEPARTMENT of
STATISTICS 4. Dependent Samples t-test
Step 3: Find the critical value and the critical region. Formulate decision rule.

Since 𝛼 = 0.05 and the test is a


left-tailed test, the critical value is
−𝑡𝛼, 𝑛−1 = −𝑡0.05, 9−1 = Rejection
Region Acceptance
−𝑡0.05, 8 = −𝟏. 𝟖𝟔𝟎. Region

−1.860 0
Decision Rule:
Reject 𝐻0 if 𝑡𝑐 < −𝑡𝛼 , 𝑛−1 , that is
Reject 𝑯𝟎 if 𝒕𝒄 < −𝟏. 𝟖𝟔𝟎

Hypothesis Testing for Two Population Parameters | 86


DEPARTMENT of
STATISTICS 4. Dependent Samples t-test
Step 4: Compute for the test statistic.
Compute for 𝑑ҧ and 𝑠𝑑 first.
Student 1 2 3 4 5 6 7 8 9 Total
Before (𝑋1 ) 9 12 6 15 3 18 10 13 7
After (𝑋2 ) 9 17 9 20 2 21 15 22 6
𝑑𝑖 = 𝑋1 − 𝑋2 0 -5 -3 -5 1 -3 -5 -9 1 -28
𝑑𝑖2 0 25 9 25 1 9 25 81 1 176

∑𝑑𝑖 2 −28 2
2
∑𝑑𝑖 −28 ∑𝑑𝑖 − 176 −
𝑛 9
𝑑ҧ = = = −3.11 𝑠𝑑 = = = 3.33
𝑛 9 𝑛−1 9−1
Hypothesis Testing for Two Population Parameters | 87
DEPARTMENT of
STATISTICS 4. Dependent Samples t-test
Step 4: Compute for the test statistic.
Recall: 𝑑ҧ = −3.11, 𝑠𝑑 = 3.33, 𝑛=9

𝑑ҧ − 𝜇𝑑 −3.11 − 0
𝑡𝑐 = 𝑠𝑑 = = −𝟐.
−𝟐. 𝟖𝟎𝟐
𝟖𝟎𝟐
3.33
𝑛 9

Step 5: Make a decision.


Decision Rule: Reject 𝐻0 if 𝑡𝑐 < −1.860.
Since −2.802 < −1.860, we reject 𝑯𝟎 .

Hypothesis Testing for Two Population Parameters | 88


DEPARTMENT of
STATISTICS 4. Dependent Samples t-test
Step 6: State the conclusion in terms of the claim.

At 5% significance level, there is enough evidence to support the claim that


attending the seminar increase the number of hours the students studied
per week.
Hypothesis Testing for Two Population Parameters | 89
DEPARTMENT of
STATISTICS 4. Dependent Samples t-test
Example 10. A dietitian wishes to see if a person’s cholesterol level will
change if the diet is supplemented by a certain mineral. Six randomly selected
subjects were pretested, and then they took the mineral supplement for a six-
week period. The results are shown in the table. (Cholesterol level is
measured in milligrams per deciliter.) Can it be concluded that the mineral
supplement is effective for diet at 𝛼 = 0.10 ? Assume the variable is
approximately normally distributed.
Subject 1 2 3 4 5 6
Before (𝑋1 ) 210 235 208 190 172 244
After (𝑋2 ) 190 170 210 188 173 228

Step 0: All the three requirements/assumptions are met.


Hypothesis Testing for Two Population Parameters | 90
DEPARTMENT of
STATISTICS 4. Dependent Samples t-test
Step 1: Identify the claim. State 𝐻0 and 𝐻𝑎 .
Claim: the mineral supplement is effective for diet ⟹ 𝝁𝟏 > 𝝁𝟐
𝑯𝟎 : 𝝁𝟏 ≤ 𝝁𝟐 𝑯𝒂 : 𝝁𝟏 > 𝝁𝟐

Step 2: Determine the test statistic to use and its distribution’s tail.
Test statistic: Dependent Samples t-test (since data are paired)
Distribution’s tail: right-tailed test (since 𝐻𝑎 is 𝜇1 > 𝜇2 )

Hypothesis Testing for Two Population Parameters | 91


DEPARTMENT of
STATISTICS 4. Dependent Samples t-test
Step 3: Find the critical value and the critical region. Formulate decision rule.

Since 𝛼 = 0.10 and the test is a


right-tailed test, the critical value is
𝑡𝛼, 𝑛−1 = 𝑡0.10, 6−1 = Rejection Region
Acceptance
𝑡0.10, 5 = 𝟏. 𝟒𝟕𝟔. Region

0 1.476
Decision Rule:

Hypothesis Testing for Two Population Parameters | 92


DEPARTMENT of
STATISTICS 4. Dependent Samples t-test
Dependent Samples t-test

Test Statistic 𝑯𝟎 𝑯𝒂 Decision Rule


𝜇1 = 𝜇2 𝜇1 ≠ 𝜇2 Reject Ho if |𝑡𝑐 | ≥ 𝑡𝛼Τ2 , 𝑛−1
𝑑ҧ − 𝜇𝑑
𝑡𝑐 = 𝑠𝑑 𝜇1 ≤ 𝜇2 𝜇1 > 𝜇2 Reject Ho if 𝑡𝑐 > 𝑡𝛼 , 𝑛−1
𝑛 𝜇1 ≥ 𝜇2 𝜇1 < 𝜇2 Reject Ho if 𝑡𝑐 < −𝑡𝛼 , 𝑛−1
where:
𝑑ҧ = mean difference 𝑠𝑑 = sd of differences 𝑛 = number of pairs

∑𝑑𝑖 2
∑𝑑𝑖 ∑𝑑𝑖2 − 𝜇𝑑 = claimed value of
𝑑ҧ = 𝑛 the difference
𝑛 𝑠𝑑 =
𝑛−1
Hypothesis Testing for Two Population Parameters | 93
DEPARTMENT of
STATISTICS 4. Dependent Samples t-test
Step 3: Find the critical value and the critical region. Formulate decision rule.

Since 𝛼 = 0.10 and the test is a


right-tailed test, the critical value is
𝑡𝛼, 𝑛−1 = 𝑡0.10, 6−1 = Rejection Region
Acceptance
𝑡0.10, 5 = 𝟏. 𝟒𝟕𝟔. Region

0 1.476
Decision Rule:
Reject 𝐻0 if 𝑡𝑐 > 𝑡𝛼 , 𝑛−1 , that is
Reject 𝑯𝟎 if 𝒕𝒄 > 𝟏. 𝟒𝟕𝟔

Hypothesis Testing for Two Population Parameters | 94


DEPARTMENT of
STATISTICS 4. Dependent Samples t-test
Step 4: Compute for the test statistic.
Compute for 𝑑ҧ and 𝑠𝑑 first.
Student 1 2 3 4 5 6 Total
Before (𝑋1 ) 210 235 208 190 172 244
After (𝑋2 ) 190 170 210 188 173 228
𝑑𝑖 = 𝑋1 − 𝑋2 20 65 -2 2 -1 16 100
𝑑𝑖2 400 4225 4 4 1 256 4890

2 ∑𝑑𝑖 2 (100)2
∑𝑑𝑖 100 ∑𝑑𝑖 − 4890 −
𝑛 6 = 25.39
𝑑ҧ = = = 16.67 𝑠𝑑 = =
𝑛 6 𝑛−1 6−1
Hypothesis Testing for Two Population Parameters | 95
DEPARTMENT of
STATISTICS 4. Dependent Samples t-test
Step 4: Compute for the test statistic.
Recall: 𝑑ҧ = 16.67, 𝑠𝑑 = 25.39, 𝑛=6

𝑑ҧ − 𝜇𝑑 16.67 − 0
𝑡𝑐 = 𝑠𝑑 = 25.39 = 𝟏. 𝟔𝟎𝟖
𝑛 6

Step 5: Make a decision.


Decision Rule: Reject 𝐻0 if 𝑡𝑐 > 1.476.
Since 1.608 > 1.476, we reject 𝑯𝟎 .

Hypothesis Testing for Two Population Parameters | 96


DEPARTMENT of
STATISTICS 4. Dependent Samples t-test
Step 6: State the conclusion in terms of the claim.

At 10% significance level, there is enough evidence to support the claim that
the mineral supplement is effective for diet.

Hypothesis Testing for Two Population Parameters | 97


DEPARTMENT of
STATISTICS 5. Hypothesis Testing for Two Proportions
z-test for Two Proportions
Main Interest: compare the proportions of two independent populations

Examples:
• Assess whether the proportion of female household heads is greater in
urban areas than in rural localities.
• Compare the percentage of left-handed male basketball players and
female volleyball players.
• A marketing manager would consider packaging a product for working
mothers if, based on planned research, the proportion of potential
purchasers is higher in this group compared to the group of nonworking
mothers.
Hypothesis Testing for Two Population Parameters | 98
DEPARTMENT of
STATISTICS 5. Hypothesis Testing for Two Proportions
z-test for Two Proportions

Test Statistic 𝑯𝟎 𝑯𝒂 Decision Rule

𝑝Ƹ1 − 𝑝Ƹ 2 𝑝1 = 𝑝2 𝑝1 ≠ 𝑝2 Reject Ho if |𝑍𝑐 | ≥ 𝑍𝛼Τ2


𝑍𝑐 =
1 1
𝑃෠ 1 − 𝑃෠ +
𝑛1 𝑛2 𝑝1 ≤ 𝑝2 𝑝1 > 𝑝2 Reject Ho if 𝑍𝑐 > 𝑍𝛼
where: 𝑃෠ = pooled proportion
𝑥+𝑦
𝑃෠ = 𝑝1 ≥ 𝑝2 𝑝1 < 𝑝2 Reject Ho if 𝑍𝑐 < − 𝑍𝛼
𝑛1 + 𝑛2

Hypothesis Testing for Two Population Parameters | 99


DEPARTMENT of
STATISTICS 5. Hypothesis Testing for Two Proportions
In the formula,
ෝ𝟏 − 𝒑
𝒑 ෝ𝟐
𝒁𝒄 =
෡ 𝟏−𝑷
෡ 𝟏 𝟏
𝑷 +
𝒏𝟏 𝒏𝟐

• 𝑝Ƹ1 and 𝑝Ƹ 2 is the sample proportion of groups 1 and 2, respectively, where


𝑥 𝑦
𝑝Ƹ1 = and 𝑝Ƹ2 =
𝑛1 𝑛2
• 𝑥 and 𝑦 is the number of samples from groups 1 and 2, respectively, that
possesses the characteristics of interest
• 𝑛1 and 𝑛2 are the sample sizes of groups 1 and 2, respectively
• 𝑃෠ is the pooled proportion, where
𝑥+𝑦

𝑃=
𝑛1 + 𝑛2
Hypothesis Testing for Two Population Parameters | 100
DEPARTMENT of
STATISTICS 5. Hypothesis Testing for Two Proportions

Critical Values

Degree of Level of Critical Value


Confidence significance Two-tailed Right-tailed Left-Tailed
(1 − 𝛼) (𝛼) 𝑍𝛼ൗ 𝑍𝛼 −𝑍𝛼
2

90% 0.10 𝑍0.10ൗ = 1.645 𝑍0.10 = 1.282 −𝑍0.10 = −1.282


2
95% 0.05 𝑍0.05ൗ = 1.960 𝑍0.05 = 1.645 −𝑍0.05 = −1.645
2
99% 0.01 𝑍0.01ൗ = 2.575 𝑍0.01 = 2.326 −𝑍0.01 = −2.326
2

Hypothesis Testing for Two Population Parameters | 101


DEPARTMENT of
STATISTICS 5. Hypothesis Testing for Two Proportions
Example 11. Suppose two random samples were taken in the Philippines. The
first sample consists of 2,015 adult males while the second sample consists of
2,085 adult females. Each respondent was asked about their opinion on the
pleasantness of shopping. The results of the survey were as follows:
Males Females
Sample Size 2015 2085
Number who think shopping is
850 570
an unpleasant experience
(Group 1) (Group 2)

We want to test the hypothesis that males dislike shopping more than females
at 0.05 level of significance.

Hypothesis Testing for Two Population Parameters | 102


DEPARTMENT of
STATISTICS 5. Hypothesis Testing for Two Proportions
Given: characteristics of interest: dislike shopping
𝑛1 = 2015, 𝑛2 = 2085
𝑥 = 850, 𝑦 = 570, 𝛼 = 0.05

Step 1: Identify the claim. State 𝐻0 and 𝐻𝑎 .


Claim: males dislike shopping more than females ⟹ 𝒑𝟏 > 𝒑𝟐
𝑯𝟎 : 𝒑𝟏 ≤ 𝒑𝟐 𝑯𝒂 : 𝒑𝟏 > 𝒑 𝟐

Step 2: Determine the test statistic to use and its distribution’s tail.
Test statistic: z-test for Two Proportions
Distribution’s tail: right-tailed test (since 𝐻𝑎 is 𝑝1 > 𝑝2 )
Hypothesis Testing for Two Population Parameters | 103
DEPARTMENT of
STATISTICS 5. Hypothesis Testing for Two Proportions
Step 3: Find the critical value and the critical region. Formulate decision rule.

Since 𝛼 = 0.05 and the test is a


right-tailed test, the critical value is
Rejection Region
𝑍𝛼 = 𝑍0.05 = 𝟏. 𝟔𝟒𝟓.
Acceptance
Region

0 1.645
Decision Rule:

Hypothesis Testing for Two Population Parameters | 104


DEPARTMENT of
STATISTICS 5. Hypothesis Testing for Two Proportions
z-test for Two Proportions

Test Statistic 𝑯𝟎 𝑯𝒂 Decision Rule

𝑝Ƹ1 − 𝑝Ƹ 2 𝑝1 = 𝑝2 𝑝1 ≠ 𝑝2 Reject Ho if |𝑍𝑐 | ≥ 𝑍𝛼Τ2


𝑍𝑐 =
1 1
𝑃෠ 1 − 𝑃෠ +
𝑛1 𝑛2 𝑝1 ≤ 𝑝2 𝑝1 > 𝑝2 Reject Ho if 𝑍𝑐 > 𝑍𝛼
where: 𝑃෠ = pooled proportion
𝑥+𝑦
𝑃෠ = 𝑝1 ≥ 𝑝2 𝑝1 < 𝑝2 Reject Ho if 𝑍𝑐 < − 𝑍𝛼
𝑛1 + 𝑛2

Hypothesis Testing for Two Population Parameters | 105


DEPARTMENT of
STATISTICS 5. Hypothesis Testing for Two Proportions
Step 3: Find the critical value and the critical region. Formulate decision rule.

Since 𝛼 = 0.05 and the test is a


right-tailed test, the critical value is
Rejection Region
𝑍𝛼 = 𝑍0.05 = 𝟏. 𝟔𝟒𝟓.
Acceptance
Region

0 1.645
Decision Rule:
Reject 𝐻0 if 𝑍𝑐 > 𝑍𝛼 , that is,
Reject 𝑯𝟎 if 𝒁𝒄 > 𝟏. 𝟔𝟒𝟓

Hypothesis Testing for Two Population Parameters | 106


DEPARTMENT of
STATISTICS 5. Hypothesis Testing for Two Proportions
Step 4: Compute for the test statistic.
Given: 𝑛1 = 2015, 𝑛2 = 2085, 𝑥 = 850, 𝑦 = 570

Compute first for the proportions: 𝑝Ƹ1 , 𝑝Ƹ 2 , and 𝑃෠


𝑥 850 170 𝑦 570 38
𝑝Ƹ1 = = = 𝑝Ƹ 2 = = =
𝑛1 2015 403 𝑛2 2085 139

𝑥+𝑦 850 + 570 1420 71


𝑃෠ = = = =
𝑛1 + 𝑛2 2015 + 2085 4100 205

Hypothesis Testing for Two Population Parameters | 107


DEPARTMENT of
STATISTICS 5. Hypothesis Testing for Two Proportions
Step 4: Compute for the test statistic.
Given: 𝑛1 = 2015, 𝑛2 = 2085, 𝑥 = 850, 𝑦 = 570
170 38 71
𝑝Ƹ1 = , 𝑝Ƹ 2 = , 𝑃෠ =
403 139 205
170 38
𝑝Ƹ1 − 𝑝Ƹ 2 −
𝑍𝑐 = = 403 139 ==−𝟎.
𝟗. 𝟗𝟖𝟖
𝟗𝟔𝟖
1 1 71 71 1 1
𝑃෠ 1 − 𝑃෠ + 1− +
𝑛1 𝑛2 205 205 2015 2085

Step 5: Make a decision.


Decision Rule: Reject 𝐻0 if 𝑍𝑐 > 1.645
Since 9.988 > 1.645, we reject 𝑯𝟎 .
Hypothesis Testing for Two Population Parameters | 108
DEPARTMENT of
STATISTICS 5. Hypothesis Testing for Two Proportions
Step 6: State the conclusion in terms of the claim.

At 5% significance level, there is enough evidence to support the claim that


males dislike shopping more than females.

Hypothesis Testing for Two Population Parameters | 109


DEPARTMENT of
STATISTICS 5. Hypothesis Testing for Two Proportions
Example 12. In a random sample of 650 students enrolled in public schools,
115 were found to be smokers. In a random sample of 160 students enrolled
in private schools, 60 were found to be smokers. Is there sufficient evidence
to conclude that there is a higher proportion of student smokers in private
schools than in public schools? Test at 0.01 level of significance.

Given: characteristics of interest: smokers


Public School: 𝑛1 = 650 𝑥 = 115
Private School: 𝑛2 = 160 𝑦 = 60
𝛼 = 0.01

Hypothesis Testing for Two Population Parameters | 110


DEPARTMENT of
STATISTICS 5. Hypothesis Testing for Two Proportions
Step 1: Identify the claim. State 𝐻0 and 𝐻𝑎 .
Claim: there is a higher proportion of student smokers in private schools
than in public schools ⟹ 𝒑𝟏 < 𝒑𝟐
𝑯 𝟎 : 𝒑𝟏 ≥ 𝒑𝟐 𝑯 𝒂 : 𝒑𝟏 < 𝒑𝟐

Step 2: Determine the test statistic to use and its distribution’s tail.
Test statistic: z-test for Two Proportions
Distribution’s tail: left-tailed test (since 𝐻𝑎 is 𝑝1 < 𝑝2 )

Hypothesis Testing for Two Population Parameters | 111


DEPARTMENT of
STATISTICS 5. Hypothesis Testing for Two Proportions
Step 3: Find the critical value and the critical region. Formulate decision rule.

Since 𝛼 = 0.01 and the test is a


left-tailed test, the critical value is Rejection Region
−𝑍𝛼 = −𝑍0.01 = −𝟐. 𝟑𝟐𝟔. 𝟑𝟐𝟔. Acceptance
Region

−2.326

Decision Rule:

Hypothesis Testing for Two Population Parameters | 112


DEPARTMENT of
STATISTICS 5. Hypothesis Testing for Two Proportions
z-test for Two Proportions

Test Statistic 𝑯𝟎 𝑯𝒂 Decision Rule

𝑝Ƹ1 − 𝑝Ƹ 2 𝑝1 = 𝑝2 𝑝1 ≠ 𝑝2 Reject Ho if |𝑍𝑐 | ≥ 𝑍𝛼Τ2


𝑍𝑐 =
1 1
𝑃෠ 1 − 𝑃෠ +
𝑛1 𝑛2 𝑝1 ≤ 𝑝2 𝑝1 > 𝑝2 Reject Ho if 𝑍𝑐 > 𝑍𝛼
where: 𝑃෠ = pooled proportion
𝑥+𝑦
𝑃෠ = 𝑝1 ≥ 𝑝2 𝑝1 < 𝑝2 Reject Ho if 𝑍𝑐 < − 𝑍𝛼
𝑛1 + 𝑛2

Hypothesis Testing for Two Population Parameters | 113


DEPARTMENT of
STATISTICS 5. Hypothesis Testing for Two Proportions
Step 3: Find the critical value and the critical region. Formulate decision rule.

Since 𝛼 = 0.01 and the test is a


right-tailed test, the critical value is Rejection Region
−𝑍𝛼 = −𝑍0.01 = −𝟐. 𝟑𝟐𝟔. Acceptance
Region

−2.326

Decision Rule:
Reject 𝐻0 if 𝑍𝑐 < −𝑍𝛼 , that is,
Reject 𝑯𝟎 if 𝒁𝒄 < −𝟐. 𝟑𝟐𝟔

Hypothesis Testing for Two Population Parameters | 114


DEPARTMENT of
STATISTICS 5. Hypothesis Testing for Two Proportions
Step 4: Compute for the test statistic.
Given: 𝑛1 = 650, 𝑛2 = 160, 𝑥 = 115, 𝑦 = 60

Compute first for the proportions: 𝑝Ƹ1 , 𝑝Ƹ 2 , and 𝑃෠


𝑥 115 23 𝑦 60 3
𝑝Ƹ1 = = = 𝑝Ƹ 2 = = =
𝑛1 650 130 𝑛2 160 8

𝑥+𝑦 115 + 60 175 35


𝑃෠ = = = =
𝑛1 + 𝑛2 650 + 160 810 162

Hypothesis Testing for Two Population Parameters | 115


DEPARTMENT of
STATISTICS 5. Hypothesis Testing for Two Proportions
Step 4: Compute for the test statistic.
Given: 𝑛1 = 650, 𝑛2 = 160, 𝑥 = 115, 𝑦 = 60
23 3 35
𝑝Ƹ1 = , 𝑝Ƹ 2 = , 𝑃෠ =
130 8 162
23 3
𝑝Ƹ1 − 𝑝Ƹ 2 −
𝑍𝑐 = = 130 8 == −𝟓.
−𝟎. 𝟒𝟓𝟒
𝟗𝟔𝟖
1 1 35 35 1 1
𝑃෠ 1 − 𝑃෠ + 1− +
𝑛1 𝑛2 162 162 650 160

Step 5: Make a decision. Rejection Acceptance


Region
Decision Rule: Reject 𝐻0 if 𝑍𝑐 < −2.326 Region

Since −5.454 < −2.326, we reject 𝑯𝟎 . −5.454 −2.326

Hypothesis Testing for Two Population Parameters | 116


DEPARTMENT of
STATISTICS 5. Hypothesis Testing for Two Proportions
Step 6: State the conclusion in terms of the claim.

At 1% significance level, there is enough evidence to support the claim that


there is a higher proportion of student smokers in private schools than in
public schools.

Hypothesis Testing for Two Population Parameters | 117


DEPARTMENT of
STATISTICS 5. Hypothesis Testing for Two Proportions
Example 13. Data were taken from a random sample of 120 females, where
108 passed Stat 201 on their first take, and another random sample of 80
males, where 60 passed Stat 201 on their first take. Test the hypothesis that
the proportions who passed Stat 201 on their first take differ for males and
females.

Given: characteristics of interest: passed Stat 201 on first take


Female: 𝑛1 = 120 𝑥 = 108
Male: 𝑛2 = 80 𝑦 = 60
𝛼 = 0.05

Hypothesis Testing for Two Population Parameters | 118


DEPARTMENT of
STATISTICS 5. Hypothesis Testing for Two Proportions
Step 1: Identify the claim. State 𝐻0 and 𝐻𝑎 .
Claim: the proportions who passed Stat 201 on their first take differ for
males and females ⟹ 𝒑𝟏 ≠ 𝒑𝟐
𝑯 𝟎 : 𝒑𝟏 = 𝒑𝟐 𝑯 𝒂 : 𝒑𝟏 ≠ 𝒑𝟐

Step 2: Determine the test statistic to use and its distribution’s tail.
Test statistic: z-test for Two Proportions
Distribution’s tail: two-tailed test (since 𝐻𝑎 is 𝑝1 ≠ 𝑝2 )

Hypothesis Testing for Two Population Parameters | 119


DEPARTMENT of
STATISTICS 5. Hypothesis Testing for Two Proportions
Step 3: Find the critical value and the critical region. Formulate decision rule.

Since 𝛼 = 0.05 and the test is a


two-tailed test, the critical value is
𝑍𝛼Τ2 = 𝑍0.05Τ2 = 𝑍0.025 = 𝟏. 𝟗𝟔𝟎. Rejection Acceptance Rejection
Region Region Region

𝑧 = −1.960 0 𝑧 = 1.960

Decision Rule:

Hypothesis Testing for Two Population Parameters | 120


DEPARTMENT of
STATISTICS 5. Hypothesis Testing for Two Proportions
z-test for Two Proportions

Test Statistic 𝑯𝟎 𝑯𝒂 Decision Rule

𝑝Ƹ1 − 𝑝Ƹ 2 𝑝1 = 𝑝2 𝑝1 ≠ 𝑝2 Reject Ho if |𝑍𝑐 | ≥ 𝑍𝛼Τ2


𝑍𝑐 =
1 1
𝑃෠ 1 − 𝑃෠ +
𝑛1 𝑛2 𝑝1 ≤ 𝑝2 𝑝1 > 𝑝2 Reject Ho if 𝑍𝑐 > 𝑍𝛼
where: 𝑃෠ = pooled proportion
𝑥+𝑦
𝑃෠ = 𝑝1 ≥ 𝑝2 𝑝1 < 𝑝2 Reject Ho if 𝑍𝑐 < − 𝑍𝛼
𝑛1 + 𝑛2

Hypothesis Testing for Two Population Parameters | 121


DEPARTMENT of
STATISTICS 5. Hypothesis Testing for Two Proportions
Step 3: Find the critical value and the critical region. Formulate decision rule.

Since 𝛼 = 0.05 and the test is a


two-tailed test, the critical value is
𝑍𝛼Τ2 = 𝑍0.05Τ2 = 𝑍0.025 = 𝟏. 𝟗𝟔𝟎. Rejection Acceptance Rejection
Region Region Region

𝑧 = −1.960 0 𝑧 = 1.960

Decision Rule:
Reject 𝐻0 if 𝑍𝑐 ≥ 𝑍𝛼Τ2 , that is,
Reject 𝑯𝟎 if 𝒁𝒄 ≥ 𝟏. 𝟗𝟔𝟎.

Hypothesis Testing for Two Population Parameters | 122


DEPARTMENT of
STATISTICS 5. Hypothesis Testing for Two Proportions
Step 4: Compute for the test statistic.
Given: 𝑛1 = 120, 𝑛2 = 80, 𝑥 = 108, 𝑦 = 60

Compute first for the proportions: 𝑝Ƹ1 , 𝑝Ƹ 2 , and 𝑃෠


𝑥 108 9 𝑦 60 3
𝑝Ƹ1 = = = 𝑝Ƹ 2 = = =
𝑛1 120 10 𝑛2 80 4

𝑥+𝑦 108 + 60 168 21


𝑃෠ = = = =
𝑛1 + 𝑛2 120 + 80 200 25

Hypothesis Testing for Two Population Parameters | 123


DEPARTMENT of
STATISTICS 5. Hypothesis Testing for Two Proportions
Step 4: Compute for the test statistic.
Given: 𝑛1 = 120, 𝑛2 = 80, 𝑥 = 108, 𝑦 = 60
9 3 21
𝑝Ƹ1 = , 𝑝Ƹ 2 = , ෠
𝑃=
10 4 25
9 3
𝑝Ƹ1 − 𝑝Ƹ 2 −
𝑍𝑐 = = 10 4 =
= −𝟎. 𝟗𝟔𝟖
𝟐. 𝟖𝟑𝟓
1 1 21 21 1 1
𝑃෠ 1 − 𝑃෠ + 1− +
𝑛1 𝑛2 25 25 120 80

Step 5: Make a decision. Acceptance


Rejection Rejection
Decision Rule: Reject 𝐻0 if 𝑍𝑐 ≥ 1.960. Region
Region
Region
Since 2.835 ≥ 1.960, we reject 𝑯𝟎 . −1.960 0 1.960 2.835
Hypothesis Testing for Two Population Parameters | 124
DEPARTMENT of
STATISTICS 5. Hypothesis Testing for Two Proportions
Step 6: State the conclusion in terms of the claim.

At 5% significance level, there is enough evidence to support the claim that


the proportions who passed Stat 201 on their first take differ for males and
females.

Hypothesis Testing for Two Population Parameters | 125

You might also like