Académique Documents
Professionnel Documents
Culture Documents
Chap 10-2
Two-Sample Tests Overview
Two Sample Tests
Examples
Chap 10-5
Two-Sample Tests
Independent Populations
Independent
Population Means
Chap 10-6
Two-Sample Tests
Independent Populations
Assumptions:
Independent
Population Means Samples are randomly and
independently drawn
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
Chap 10-8
Two-Sample Tests
Independent Populations
Independent The test statistic is:
Population Means
σ1 and σ2 known Z
X X μ
1 2 1 μ2
2 2
σ1 σ 2
σ1 and σ2 unknown n1 n 2
Chap 10-9
Two-Sample Tests
Independent Populations
Two Independent Populations, Comparing Means
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
a a a/2 a/2
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
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
σ1 and σ2 unknown (n 1 1) (n 2 1)
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
(n1 1) (n2 1)
p
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
Chap 10-16
Two-Sample Tests
Independent Populations
The test statistic is:
t
X X μ μ
1 2
1 2 3.27 2.53 0 2.040
1 1 1 1
S
2
1.5021
21 25
p
n1 n2
S
2 n1 1S1
2
n 2 1S 2
2
21 11.30 2 25 11.16 2
1.5021
(n1 1) (n2 1) (21 - 1) (25 1)
p
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
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
Chap 10-19
Two-Sample Tests
Independent Populations
Independent The confidence interval for
Population Means μ1 – μ2 is:
2 2
σ1 σ 2
σ1 and σ2 known X1 X 2 Z
n1 n 2
σ1 and σ2 unknown
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
n
S2 1
1 S1
2
n 2 1 S 2
2
(n1 1) (n2 1)
p
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 - X2
Eliminates Variation Among Subjects
Assumptions:
Both Populations Are Normally Distributed
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. 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)
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
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. (D i D) 2
a a a/2 a/2
D i SD
i
(D D ) 2
D i 1
4.2 n 1
n 5.67
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
Chap 10-30
Two-Sample Tests
Related Populations Example
Reject Reject
a/2 a/2
- 4.604 4.604
- 1.66
σD
DZ
n
Where
n = the sample size (number of pairs in the paired sample)
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
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
Chap 10-34
Two Population Proportions
Since you begin by assuming the null
hypothesis is true, you assume π1 = π2 and pool
the two sample (p) estimates.
X1 X 2
The pooled estimate for p
the overall proportion is: n1 n 2
Chap 10-35
Two Population Proportions
The test statistic for p1 – p2 is a Z statistic:
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
Chap 10-36
Two Population Proportions
Hypothesis for Population Proportions
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
a a a/2 a/2
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:
Men: p1 = 36/72 = .50
Women: p2 = 31/50 = .62
.50 .62 0 1.31
-1.31
1 1
.549 (1 .549)
72 50 Decision: Do not reject H0
Chap 10-41
Two Independent Population
Proportions
The confidence interval for π1 – π2 is:
p1 (1 p1 ) p2 (1 p2 )
p1 p2 Z
n1 n2
Chap 10-42
Testing Population Variances
Purpose: To determine if two independent
populations have the same variability.
Chap 10-43
Testing Population Variances
The F test statistic is:
2
S
F 1
2
S 2
Chap 10-45
Testing Population Variances
Lower-tail test Upper-tail test
H0: σ12 σ22 H0: σ12 ≤ σ22
H1: σ12 < σ22 H1: σ12 > σ22
a
a
0 0
Do not Reject H0
Reject
FL
Do not
reject H0 reject H0 FU
H0
Reject H0 if F < FL Reject H0 if F > FU
Chap 10-46
Testing Population Variances
Two-tail test
Chap 10-49
Testing Population Variances
Form the hypothesis test:
H0: σ21 – σ22 = 0 (there is no difference between variances)
H1: σ21 – σ22 ≠ 0 (there is a difference between variances)
F U: F L:
Numerator: Numerator:
n1 – 1 = 21 – 1 = 20 d.f. n2 – 1 = 25 – 1 = 24 d.f.
Denominator: Denominator:
n2 – 1 = 25 – 1 = 24 d.f. n1 – 1 = 21 – 1 = 20 d.f.
Chap 10-50
Testing Population Variances
The test statistic is:
S12 1.302
F 2 2
1.256
S 2 1.16 a/2 = .025 a/2 = .025
0 F
Reject H0 Do not Reject H0
reject H0
FU=2.33
FL=0.41
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
Chap 10-53