You are on page 1of 43

Chapter 5

Estimation and Hypothesis


Testing for Two Population
Parameters
(Part B)
Chapter Goals
After completing this chapter, you
should be able to:
 Test hypotheses or form interval
estimates for
◦ two independent population means
 Standard deviations known
 Standard deviations unknown
◦ two means from paired samples
◦ the difference between two population
proportions
Estimation for Two Populations

Estimating two
population values

Population
means, Paired Population
independent samples proportions
samples
Examples:
Group 1 vs. Same group Proportion 1 vs.
independent before vs. after Proportion 2
Group 2 treatment
Difference Between Two Means

Population means, Goal: Form a confidence


independent
samples
* interval for the difference
between two population
means, μ1 – μ2
σ1 and σ2 known

The point estimate for the


σ1 and σ2 unknown, difference is
n1 and n2  30
x1 – x2
σ1 and σ2 unknown,
n1 or n2 < 30
Independent Samples

 Different data sources


Population means,
◦ Unrelated
independent
samples
* ◦ Independent
 Sample selected from
one population has no
effect on the sample
σ1 and σ2 known selected from the other
population
σ1 and σ2 unknown,  Use the difference
n1 and n2  30 between 2 sample means
 Use z test or pooled
σ1 and σ2 unknown, variance t test
n1 or n2 < 30
σ1 and σ2 known

Population means, Assumptions:


independent
samples  Samples are randomly and
independently drawn
σ1 and σ2 known *  population distributions are
normal or both sample sizes
σ1 and σ2 unknown,
n1 and n2  30 are  30

 Population standard
σ1 and σ2 unknown,
n1 or n2 < 30 deviations are known
σ1 and σ2 known
(continued)

Population means, When σ1 and σ2 are known and


both populations are normal or
independent
both sample sizes are at least 30,
samples
the test statistic is a z-value…

σ1 and σ2 known * …and the standard error of


x1 – x2 is
σ1 and σ2 unknown,
n1 and n2  30 2 2
σ σ2
σ1 and σ2 unknown,
σ x1  x 2  1

n1 or n2 < 30
n1 n2
σ1 and σ2 known
(continued)

Population means,
independent The confidence interval for
samples μ1 – μ2 is:

σ1 and σ2 known *
x 
2 2
σ σ2
1  x 2  z /2 1

σ1 and σ2 unknown, n1 n2
n1 and n2  30

σ1 and σ2 unknown,
n1 or n2 < 30
σ1 and σ2 unknown, large
samples

Population means, Assumptions:


independent
 Samples are randomly and
samples
independently drawn

σ1 and σ2 known  both sample sizes


are  30
σ1 and σ2 unknown,
n1 and n2  30
*  Population standard
deviations are unknown
σ1 and σ2 unknown,
n1 or n2 < 30
σ1 and σ2 unknown, large
samples
(continued)

Population means,
independent Forming interval
samples estimates:

 use sample standard


σ1 and σ2 known
deviation s to estimate σ

σ1 and σ2 unknown,
n1 and n2  30
*  the test statistic is a z value

σ1 and σ2 unknown,
n1 or n2 < 30
σ1 and σ2 unknown, large
samples
(continued)

Population means,
independent The confidence interval for
samples μ1 – μ2 is:

σ1 and σ2 known

 
2 2
s s2
σ and σ unknown, *
x 1  x 2  z /2 1

1 2
n1 and n2  30
n1 n2

σ1 and σ2 unknown,
n1 or n2 < 30
σ1 and σ2 unknown, small
samples

Population means, Assumptions:


independent
samples  populations are normally
distributed

σ1 and σ2 known  the populations have equal


variances
σ1 and σ2 unknown,
n1 and n2  30  samples are independent

σ1 and σ2 unknown,
n1 or n2 < 30
*
σ1 and σ2 unknown, small
samples
(continued)

Population means, Forming interval


independent estimates:
samples
 The population variances
are assumed equal, so use
σ1 and σ2 known the two sample standard
deviations and pool them to
σ1 and σ2 unknown, estimate σ
n1 and n2  30
 the test statistic is a t value
σ1 and σ2 unknown,
n1 or n2 < 30
* with (n1 + n2 – 2) degrees
of freedom
σ1 and σ2 unknown, small
samples (continued)

Population means, The pooled standard


independent deviation is
samples

σ1 and σ2 known

sp 
n1  1s
1
2
 n2  1s 2
2

σ1 and σ2 unknown, n1  n2  2
n1 and n2  30

σ1 and σ2 unknown,
n1 or n2 < 30
σ1 and σ2 unknown, small
samples
(continued)

Population means, The confidence interval for


independent μ1 – μ2 is:
samples

σ1 and σ2 known x 1 
 x 2  t /2 sp
1 1

n1 n2
σ1 and σ2 unknown, Where t/2 has (n1 + n2 – 2) d.f.,
n1 and n2  30 and
sp 
n1  1s12  n2  1s2 2
σ1 and σ2 unknown,
n1 or n2 < 30
* n1  n2  2
Paired Samples

Tests Means of 2 Related Populations


Paired ◦ Paired or matched samples
samples ◦ Repeated measures (before/after)
◦ Use difference between paired values:

d = x1 - x 2
 Eliminates Variation Among Subjects
 Assumptions:
◦ Both Populations Are Normally Distributed
◦ Or, if Not Normal, use large samples
Paired Differences

The ith paired difference is di , where


Paired di = x1i - x2i
samples
n
The point estimate for d i
the population mean d i 1
paired difference is d : n

n
The sample standard
deviation is  i
(d  d) 2

sd  i1
n 1
n is the number of pairs in the paired sample
Paired Differences
(continued)

Paired The confidence interval for d is


samples
sd
d  t /2
n
n
Where t/2 has  (d  d)
i
2

n - 1 d.f. and sd is: sd  i1


n 1
n is the number of pairs in the paired sample
Hypothesis Tests for the
Difference Between Two Means

 Testing Hypotheses about μ1 – μ2

 Use the same situations discussed


already:
◦ Standard deviations known or
unknown
◦ Sample sizes  30 or not  30
Hypothesis Tests for
Two Population Means

Two Population Means, Independent Samples

Lower tail test: Upper tail test: Two-tailed test:

H0: μ1  μ2 H0: μ1 ≤ μ2 H0: μ1 = μ2


HA: μ1 < μ2 HA: μ1 > μ2 HA: μ1 ≠ μ2
i.e., i.e., i.e.,
H0: μ1 – μ2  0 H0: μ1 – μ2 ≤ 0 H0: μ1 – μ2 = 0
HA: μ1 – μ2 < 0 HA: μ1 – μ2 > 0 HA: μ1 – μ2 ≠ 0
Hypothesis tests for μ1 – μ2

Population means, independent samples

σ1 and σ2 known Use a z test statistic

Use s to estimate unknown


σ1 and σ2 unknown, σ , approximate with a z
n1 and n2  30 test statistic

σ1 and σ2 unknown, Use s to estimate unknown


n1 or n2 < 30 σ , use a t test statistic and
pooled standard deviation
σ1 and σ2 known

Population means,
independent The test statistic for
samples μ1 – μ2 is:

σ1 and σ2 known * z  x 1 
 x 2   μ1  μ2 
2 2
σ1 and σ2 unknown, σ σ2
n1 and n2  30
1

n1 n2
σ1 and σ2 unknown,
n1 or n2 < 30
σ1 and σ2 unknown, large
samples

Population means,
independent The test statistic for
samples μ1 – μ2 is:

σ1 and σ2 known
z
 x 1 
 x 2   μ1  μ2 
2 2
σ1 and σ2 unknown,
n1 and n2  30
* s

1 s2
n1 n2
σ1 and σ2 unknown,
n1 or n2 < 30
σ1 and σ2 unknown, small
samples

The test statistic for


Population means,
independent μ1 – μ2 is:
samples

t
 x 1 
 x 2   μ1  μ2 
σ1 and σ2 known 1 1
sp 
σ1 and σ2 unknown,
n1 n2
n1 and n2  30 Where t/2 has (n1 + n2 – 2) d.f.,
n1  1s12  n2  1s2 2
σ1 and σ2 unknown,
n1 or n2 < 30
* and
sp 
n1  n2  2
Hypothesis tests for μ1 – μ2

Two Population Means, Independent Samples


Lower tail test: Upper tail test: Two-tailed test:
H0: μ1 – μ2  0 H0: μ1 – μ2 ≤ 0 H0: μ1 – μ2 = 0
HA: μ1 – μ2 < 0 HA: μ1 – μ2 > 0 HA: μ1 – μ2 ≠ 0

  /2 /2

-z z -z/2 z/2


Reject H0 if z < -z Reject H0 if z > z Reject H0 if z < -z/2
or z > z/2
Pooled sp t Test: Example
You’re 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

Assuming equal variances, is


there a difference in average
yield ( = 0.05)?
Calculating the Test Statistic

The test statistic is:

t
x 1 
 x 2  μ1  μ2  3.27  2.53   0
  2.040
1 1 1 1
sp  1.2256 
n1 n2 21 25

sp 
n1  1s12  n2  1s2 2 
21  11.30 2  25  11.16 2  1.2256
n1  n2  2 21  25  2
Solution
Reject H0 Reject H0
H0: μ1 - μ2 = 0 i.e. (μ1 = μ2)
HA: μ1 - μ2 ≠ 0 i.e. (μ1 ≠ μ2)
 = 0.05 .025 .025
df = 21 + 25 - 2 = 44
Critical Values: t = ± 2.0154 -2.0154 0 2.0154 t
2.040
Test Statistic:
Decision:
3.27  2.53 Reject H0 at  = 0.05
t  2.040
1 1
1.2256  Conclusion:
21 25 There is evidence of a
difference in means.
Hypothesis Testing
for Paired Samples

The test statistic for d is


Paired
samples
d  μd
t
sd
n is the
n
number
of pairs n
in the
paired
Where t/2 has n - 1 d.f.
 i
(d  d) 2

sample and sd is: sd  i1


n 1
Hypothesis Testing for
Paired Samples
(continued)
Paired Samples

Lower tail test: Upper tail test: Two-tailed test:

H0: μd  0 H0: μd ≤ 0 H0: μd = 0


HA: μd < 0 HA: μd > 0 HA: μd ≠ 0

  /2 /2

-t t -t/2 t/2


Reject H0 if t < -t Reject H0 if t > t Reject H0 if t < -t/2
or t > t/2
Where t has n - 1 d.f.
 Assume you send your salespeople to a
“customer service” training workshop. Is the
training effective? You collect the following data:

Number of Complaints: (2) - (1)


Salesperson Before (1) After (2) Difference, di

C.B. 6 4
T.F. 20 6
M.H. 3 2
R.K. 0 0
M.O. 4 0
Paired Samples Example
 Assume you send your salespeople to a
“customer service” training workshop. Is the
training effective? You collect the following data:

Number of Complaints:
Salesperson Before (1) After (2)
(2) - (1)
Difference, di
 di
d = n
C.B. 6 4 - 2
T.F. 20 6 -14 = -4.2
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 Samples: Solution
 Has the training made a difference in the number of
complaints (at the 0.01 level)?
Reject Reject
H0: μd = 0
HA: μd  0
/2 /2
 = .01 d = - 4.2 - 4.604 4.604
- 1.66
Critical Value = ± 4.604
d.f. = n - 1 = 4
Decision: Do not reject H0
(t stat is not in the reject region)
Test Statistic:
Conclusion: There is not a
d  μd  4.2  0
t   1.66 significant change in the
sd / n 5.67/ 5 number of complaints.
Two Population Proportions

Goal: Form a confidence interval for


Population or test a hypothesis about the
proportions difference between two population
proportions, p1 – p2
Assumptions:
n1p1  5 , n1(1-p1)  5
n2p2  5 , n2(1-p2)  5
The point estimate for
the difference is p1 – p2
Confidence Interval for
Two Population Proportions

Population The confidence interval for


proportions
p1 – p2 is:

p 1 
 p 2  z /2
p1(1  p1 ) p 2 (1  p 2 )
n1

n2
Hypothesis Tests for
Two Population Proportions
Population proportions

Lower tail test: Upper tail test: Two-tailed test:

H0: p1  p2 H0: p1 ≤ p2 H0: p1 = p2


HA: p1 < p2 HA: p1 > p2 HA: p1 ≠ p2
i.e., i.e., i.e.,
H0: p1 – p2  0 H0: p1 – p2 ≤ 0 H0: p1 – p2 = 0
HA: p1 – p2 < 0 HA: p1 – p2 > 0 HA: p1 – p2 ≠ 0
Two Population Proportions
Since we begin by assuming the null
hypothesis is true, we assume p1 = p2
Population
and pool the two p estimates
proportions
The pooled estimate for the
overall proportion is:

n1p1  n2 p 2 x1  x 2
p 
n1  n2 n1  n2
where x1 and x2 are the numbers from
samples 1 and 2 with the characteristic of interest
Two Population Proportions
(continued)

Population The test statistic for


proportions p1 – p2 is:

z
 p  p   p  p 
1 2 1 2

1 1
p (1  p)   
 n1 n2 
Hypothesis Tests for
Two Population Proportions

Population proportions
Lower tail test: Upper tail test: Two-tailed test:
H0: p1 – p2  0 H0: p1 – p2 ≤ 0 H0: p1 – p2 = 0
HA: p1 – p2 < 0 HA: p1 – p2 > 0 HA: p1 – p2 ≠ 0

  /2 /2

-z z -z/2 z/2


Reject H0 if z < -z Reject H0 if z > z Reject H0 if z < -z/2
or z > z/2
Example:
Two population Proportions
Is there a significant difference
between the proportion of men and the
proportion of women who will vote Yes
on Proposition A?

 In a random sample, 36 of 72 men and


31 of 50 women indicated they would
vote Yes

 Test at the .05 level of significance


Example:
Two population Proportions
(continued)
 The hypothesis test is:
H0: p1 – p2 = 0 (the two proportions are equal)
HA: p1 – p2 ≠ 0 (there is a significant difference between proportions)

 The sample proportions are:


 Men: p1 = 36/72 = .50
 Women: p2 = 31/50 = .62

 The pooled estimate for the overall proportion is:


x1  x 2 36  31 67
p    .549
n1  n2 72  50 122
Example:
Two population Proportions
(continued)
Reject H0 Reject H0

The test statistic for p1 – p2 is:


p 
.025 .025
 p 2   p1  p 2 
z 1

1 1
p (1  p)    -1.96 1.96
 n1 n2  -1.31


 .50  .62    0   1.31
 1 1  Decision: Do not reject H0
.549 (1  .549)   
 72 50  Conclusion: There is not
significant evidence of a
Critical Values = ±1.96 difference in proportions
For  = .05 who will vote yes between
men and women.
Chapter Summary
 Compared two independent samples
◦ Formed confidence intervals for the differences between
two means
◦ Performed Z test for the differences in two means
◦ Performed t test for the differences in two means
 Compared two related samples (paired samples)
◦ Formed confidence intervals for the paired difference
◦ Performed paired sample t tests for the mean
difference
 Compared two population proportions
◦ Formed confidence intervals for the difference between
two population proportions
◦ Performed Z-test for two population proportions

You might also like