Statistics For Managers Using Microsoft® Excel 5th Edition: Two-Sample Tests
Statistics For Managers Using Microsoft® Excel 5th Edition: Two-Sample Tests
Chapter 10
Two-Sample Tests
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-1
Learning Objectives
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-2
Two-Sample Tests Overview
Examples
Group 1 vs. Same group Proportion 1vs. Variance 1 vs.
Group 2 before vs. after Proportion 2 Variance 2
treatment
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-3
Two-Sample Tests
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-4
Two-Sample Tests
Independent Populations
Different data sources
Independent Independent: Sample selected
Population Means from one population has no
effect on the sample selected
from the other population
σ1 and σ2 known Use the difference between 2
sample means
Use Z test, pooled variance t
σ1 and σ2 unknown
test, or separate-variance t test
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-5
Two-Sample Tests
Independent Populations
Independent
Population Means
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-6
Two-Sample Tests
Independent Populations
Assumptions:
Independent
Population Means Samples are randomly and
independently drawn
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-7
Two-Sample Tests
Independent Populations
When σ1 and σ2 are known and both
Independent populations are normal, the test
Population Means statistic is a Z-value and the
standard error of X1 – X2 is
σ1 and σ2 known
2 2
σ1 σ 2
σ1 and σ2 unknown σ X1 X 2
n1 n 2
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-8
Two-Sample Tests
Independent Populations
σ1 and σ2 known Z
X X μ
1 2 1 μ2
2 2
σ1 σ 2
σ1 and σ2 unknown n1 n 2
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-9
Two-Sample Tests
Independent Populations
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-10
Two-Sample Tests
Independent Populations
Two Independent Populations, Comparing Means
Lower-tail test: Upper-tail test: Two-tail test:
H0: μ1 – μ2 0 H0: μ1 – μ2 ≤ 0 H0: μ1 – μ2 = 0
H1: μ1 – μ2 < 0 H1: μ1 – μ2 > 0 H1: μ1 – μ2 ≠ 0
/2 /2
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-11
Two-Sample Tests
Independent Populations
Independent Assumptions:
Population Means Samples are randomly and
independently drawn
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-12
Two-Sample Tests
Independent Populations
Forming interval estimates:
Independent
Population Means The population variances
are assumed equal, so use
the two sample standard
σ1 and σ2 known deviations and pool them to
estimate σ
σ1 and σ2 unknown the test statistic is a t value
with (n1 + n2 – 2) degrees
of freedom
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-13
Two-Sample Tests
Independent Populations
Independent
Population Means
The pooled standard
deviation is:
σ1 and σ2 known
Sp
n1 1S1 n 2 1S2
2 2
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-14
Two-Sample Tests
Independent Populations
The test statistic is:
Independent
Population Means
t
X X μ
1 2 1 μ2
1 1
S
2
p
σ1 and σ2 known n1 n 2
p
(n1 1) (n2 1)
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-15
Two-Sample Tests
Independent Populations
You are a financial analyst for a brokerage firm. Is there a
difference in dividend yield between stocks listed on the
NYSE & NASDAQ? You collect the following data:
NYSE NASDAQ
Number 21 25
Sample mean 3.27 2.53
Sample std dev 1.30 1.16
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-16
Two-Sample Tests
Independent Populations
The test statistic is:
t
X 1
X 2 μ1 μ2
3.27 2.53 0 2.040
1 1 1 1
S
2
p
1.5021
n1 n2 21 25
S
2 n1 1 S1
2
n 2 1 S 2
2
21 11.30 2 25 11.16 2
1.5021
p
(n1 1) (n2 1) (21 - 1) (25 1)
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-17
Two-Sample Tests
Independent Populations
H0: μ1 - μ2 = 0 i.e. (μ1 = μ2) Reject H0 Reject H0
df = 21 + 25 - 2 = 44 -2.0154 0 2.0154 t
Critical Values: t = ± 2.0154
2.040
Test Statistic: 2.040
Decision: Reject H0 at α = 0.05
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-18
Independent Populations
Unequal Variance
If you cannot assume population variances
are equal, the pooled-variance t test is
inappropriate
Instead, use a separate-variance t test, which
includes the two separate sample variances in
the computation of the test statistic
The computations are complicated and are
best performed using Excel
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-19
Two-Sample Tests
Independent Populations
2 2
σ1 σ 2
σ1 and σ2 known X1 X 2 Z
n1 n 2
σ1 and σ2 unknown
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-20
Two-Sample Tests
Independent Populations
The confidence interval for
Independent
μ1 – μ2 is:
Population Means
X X t
1 2 n1 n 2 - 2 p
1 1
S
2
σ1 and σ2 known n1 n 2
Where
σ1 and σ2 unknown
S2 1
n 1 S1
2
n 2 1 S 2
2
p
(n1 1) (n2 1)
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-21
Two-Sample Tests
Related Populations
Tests Means of 2 Related Populations
Paired or matched samples
Repeated measures (before/after)
Use difference between paired values:
D = X1 - X 2
Eliminates Variation Among Subjects
Assumptions:
Both Populations Are Normally Distributed
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-22
Two-Sample Tests
Related Populations
The ith paired difference is Di , where
Di = X1i - X2i
The point estimate for the population mean
paired difference is D :
n
D i
D i 1
n
Suppose the population standard deviation of
the difference scores, σD, is known.
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-23
Two-Sample Tests
Related Populations
The test statistic for the mean difference is a Z
value:
D μD
Z
σD
n
Where
μD = hypothesized mean difference
σD = population standard deviation of differences
n = the sample size (number of pairs)
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-24
Two-Sample Tests
Related Populations
If σD is unknown, you can estimate the
unknown population standard deviation with a
sample standard deviation:
i
(D D ) 2
SD i 1
n 1
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-25
Two-Sample Tests
Related Populations
The test statistic for D is now a t statistic:
D μD
t
SD
n
n
Where t has n - 1 d.f. i
(D D ) 2
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-26
Two-Sample Tests
Related Populations
Lower-tail test: Upper-tail test: Two-tail test:
/2 /2
C.B. 6 4 -2
T.F. 20 6 -14
M.H. 3 2 -1
R.K. 0 0 0
M.O 4 0 -4
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-28
Two-Sample Tests
Related Populations Example
Salesperson Number of Complaints Difference, Di
Before (1) After (2) (2-1)
C.B. 6 4 -2
T.F. 20 6 -14
M.H. 3 2 -1
R.K. 0 0 0
M.O 4 0 -4
n
Di SD
(D i D) 2
D i 1
4.2 n 1
n 5.67
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-29
Two-Sample Tests
Related Populations Example
Has the training made a difference in the number of
complaints (at the α = 0.01 level)?
Test Statistic:
D μ D 4.2 0
t 1.66
SD / n 5.67/ 5
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-30
Two-Sample Tests
Related Populations Example
Reject Reject
/2 /2
- 4.604 4.604
- 1.66
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-31
Two-Sample Tests
Related Populations
The confidence interval for μD (σ known) is:
σD
DZ
n
Where
n = the sample size (number of pairs in the paired sample)
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-32
Two-Sample Tests
Related Populations
The confidence interval for μD (σ unknown) is:
SD
D t n1
n
i
(D D ) 2
where SD i1
n 1
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-33
Two Population Proportions
Goal: Test a hypothesis or form a confidence
interval for the difference between two
independent population proportions, π1 – π2
Assumptions:
n1π1 5 , n1(1-π1) 5
n2π2 5 , n2(1-π2) 5
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-34
Two Population Proportions
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-35
Two Population Proportions
Z
p1 p2 1 2
1 1
p (1 p )
n1 n2
X1 X 2 X X
where p , P1 1 , P2 2
n1 n 2 n1 n2
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-36
Two Population Proportions
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-37
Two Population Proportions
Hypothesis for Population Proportions
Lower-tail test: Upper-tail test: Two-tail test:
H0: π1 – π2 0 H0: π1 – π2 ≤ 0 H0: π1 – π2 = 0
H1: π1 – π2 < 0 H1: π1 – π2 > 0 H1: π1 – π2 ≠ 0
/2 /2
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-38
Two Independent Population
Proportions: Example
Is there a significant difference between the
proportion of men and the proportion of
women who will vote Yes on Proposition A?
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-39
Two Independent Population
Proportions: Example
H0: π1 – π2 = 0 (the two proportions are equal)
H1: π1 – π2 ≠ 0 (there is a significant difference
between proportions)
The sample proportions are:
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-40
Two Independent Population
Proportions: Example
Reject H0 Reject H0
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-41
Two Independent Population
Proportions
p1 (1 p1 ) p2 (1 p2 )
p1 p2 Z
n1 n2
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-42
Testing Population Variances
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-43
Testing Population Variances
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-44
Testing Population Variances
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-45
Testing Population Variances
Lower-tail test Upper-tail test
H0: σ12 σ22 H0: σ12 ≤ σ22
H1: σ12 < σ22 H1: σ12 > σ22
0 0
Do not Do not Reject H0
Reject
H0 FL reject H0 reject H0 FU
Reject H0 if F < FL Reject H0 if F > FU
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-46
Testing Population Variances
Two-tail test
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-47
Testing Population Variances
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-49
Testing Population Variances
S12 1.30 2
F 2 2
1.256
S 2 1.16 /2 = .025 /2 = .025
0 F
Reject H0 Do not Reject H0
reject H0
FU=2.33
FL=0.41
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-52
Chapter Summary
In this chapter, we have
Compared two population proportions
Formed confidence intervals for the difference between
two population proportions
Performed Z-test for two population proportions
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-53