Two-Sample Hypothesis Tests
Two-Sample Hypothesis Tests
Two-Sample Hypothesis Tests
Two-Sample Tests
Population Population
Means, Means, Population Population
Independent Related Proportions Variances
Samples Samples
Difference Between Two Means
Independent Samples
a a a/2 a/2
Hypothesis tests for µ1 - µ2 with σ1
and σ2 known
ZSTAT
X X μ μ
1 2 1 2
12 22
n1 n2
X X Z
1 2 /2
12 22
n1 n2
Hypothesis tests for µ1 - µ2 with σ1
and σ2 unknown and assumed equal
S 2
n1 1 S1 n 2 1 S2
2 2
p
(n1 1) ( n 2 1)
The test statistic is:
t STAT
X X μ μ
1 2 1 2
1 1
S
2
p
n1 n 2
X 1
X 2 t/2
1 1
S
2
p
n1 n 2
t STAT
X X μ
1 2 1 μ2
3.27 2.53 0 2.040
1 1 1 1
S
2
p
1.5021
n1 n 2 21 25
S2 1
n 1 S1
2
n 2 1 S 2
2
21 1 1.302
25 1 1.162
1.5021
P
(n1 1) (n 2 1) (21 - 1) (25 1)
Pooled-Variance t Test Example:
Hypothesis Test Solution
Reject H0 Reject H0
= 0.05
df = 21 + 25 - 2 = 44 .025 .025
X X t
1 2 /2 p
1 1
S 0.74 2.0154 0.3628 (0.009, 1.471)
2
n1 n 2
t STAT
X 1
X 2 μ1 μ 2
S12 S 22
n1 n 2
X
2 2
S S
1 X 2 t 1
2
2 n1 n 2
Difference Between Two Means
Di = X1i - X2i
Assumptions:
Both Populations Are Normally Distributed
Or, if not Normal, use large samples
Related Populations
The Paired Difference Test
population mean μD is : n
n
The sample standard i
(D D ) 2
deviation is SD SD i 1
n1
D μD
t STAT
SD
n
a a a/2 a/2
SD
D t / 2
n
Paired Difference Test:
Example
Assume you send your salespeople to a “customer
service” training workshop. Has the training made a
difference in the number of complaints? You collect
the following data:
Number of Complaints: (2) - (1) Di
Salesperson Before (1) After (2) Difference, Di D = n
C.B. 6 4 - 2 = -4.2
T.F. 20 6 -14
M.H. 3 2 - 1
R.K. 0 0 0
SD
i
(D D ) 2
M.O. 4 0 - 4 n 1
-21
5.67
Paired Difference Test:
Solution
Has the training made a difference in the number of complaints
(at the 0.01 level)?
Reject Reject
H0: μD = 0
H1: μD 0 /2
/2
= .01 D = - 4.2 - 4.604 4.604
- 1.66
t0.005 = ± 4.604
Decision: Do not reject H0
X1 X 2
p
n1 n 2
Z STAT
p1 p2 π1 π 2
1 1
p (1 p )
n1 n2
where
X1 X 2 X1 X2
p , p1 , p2
n1 n2 n1 n2
Hypothesis Tests for
Two Population Proportions
a a a/2 a/2
X 1 X 2 36 35 71
p 0 .582
n1 n2 72 50 122
Hypothesis Test Example:
Two population Proportions
Reject H0 Reject H0
.025 .025
z STAT
p1 p2 π1 π 2
1 1
p ( 1 p) -1.96 1.96
n1 n2 -2.20
.50 .70 0 2 .20
1 1 Decision: Reject H0
.582 ( 1 .582 )
72 50
Conclusion: There is
evidence of a difference in
Critical Values = ±1.96
For = .05 proportions who will vote
yes between men and
women.
Two Proportion Test In Minitab
Shows The Same Conclusions
Sample X N Sample p
1 36 72 0.500000
2 35 50 0.700000
If
the hypothesized difference is
nonzero (like=0.02), using the
following formula:
(p1 p 2 ) ( 1 2 )
Z STAT
p1 (1 p1 ) p 2 (1 p 2 )
n1 n2
Confidence Interval for
Two Population Proportions
p1 (1 p1 ) p 2 (1 p 2 )
p1 p 2 Z/2
n1 n2
Testing for the Ratio of Two
Population Variances
Hypotheses FSTAT
H0: σ12 = σ22
H1: σ12 ≠ σ22 S12
FSTAT 2
H0: σ12 ≤ σ22 S2
H1: σ12 > σ22
Where:
S12 = Variance of sample 1 (the larger sample variance)
n1 = sample size of sample 1
S 22 = Variance of sample 2 (the smaller sample variance)
n2 = sample size of sample 2
The F Distribution
The F critical value is found from the F table
There are two degrees of freedom required: numerator
and denominator
The larger sample variance is always the numerator
S12
When FSTAT 2 df1 = n1 – 1 ; df2 = n2 – 1
S2
In the F table,
numerator degrees of freedom determine the column
denominator degrees of freedom determine the row
Finding the Rejection Region
/2 /2
F
0
Reject H0 Do not Do not Reject H0 F
reject H0 Reject H0 reject H0 Fα
FL 1 FR
FR = F α/2, df1, df2
FL = F 1-α/2, df1, df2 = 1/Fα/2, df2, df1
Statistics
Sample N StDev Variance
1 21 1.300 1.690
2 25 1.160 1.346
CI for
Distribution CI for StDev Variance
of Data Ratio Ratio
Normal (0.735, 1.739) (0.540, 3.024)
Tests
Test
Method DF1 DF2 Statistic P-Value
F Test (normal) 20 24 1.26 0.589
Chapter Summary
Compared two independent samples
Performed pooled-variance t test for the difference in
two means
Performed separate-variance t test for difference in
two means
Formed confidence intervals for the difference
between two means
Compared two related samples (paired
samples)
Performed paired t test for the mean difference
Formed confidence intervals for the mean difference
Chapter Summary
Compared two population proportions
Formed confidence intervals for the difference
between two population proportions
Performed Z-test for two population proportions
Performed F test for the ratio of two
population variances
The Wall Street Journal recently published an article indicating
differences in perception of sexual harassment on the job between men
and women. The article claimed that women perceived the problem to
be much more prevalent than did men. One question asked of both men
and women was: "Do you think sexual harassment is a major problem in
the American workplace?" 24% of the men compared to 62% of the
women responded "Yes." Assuming W designates women's responses
and M designates men's.
1. What hypothesis should The Wall Street Journal test in order to show
that its claim is true?
2. Suppose that 150 women and 200 men were interviewed. For a 0.01
level of significance, what is the critical value for the rejection region
3. What is the value of the test statistic?