Uploaded by Diogo Araújo

Statistics

advertisement
Statistics for
Business and Economics
8th Edition
Chapter 10
Hypothesis Testing:
Additional Topics
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 10-1
Chapter Goals
After completing this chapter, you should be able to:
◼
Test hypotheses for the difference between two population means
◼
Two means, matched pairs
◼
Independent populations, population variances known
◼
Independent populations, population variances unknown but
equal
◼
Complete a hypothesis test for the difference between two
proportions (large samples)
◼
Use the F table to find critical F values
◼
Complete an F test for the equality of two variances
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 10-2
Two Sample Tests
Two Sample Tests
Population
Means,
Dependent
Samples
Population
Means,
Independent
Samples
Population
Proportions
Population
Variances
Examples:
Same group
before vs. after
treatment
Group 1 vs.
independent
Group 2
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall
Proportion 1 vs.
Proportion 2
Variance 1 vs.
Variance 2
Ch. 10-3
10.1
Dependent Samples
Dependent
Samples
Tests of the Difference Between Two Normal
Population Means: Dependent Samples
Tests Means of 2 Related Populations
◼
◼
◼
Paired or matched samples
Repeated measures (before/after)
Use difference between paired values:
di = xi - yi
◼
Assumptions:
◼ Both Populations Are Normally Distributed
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 10-4
Test Statistic:
Dependent Samples
Population
Means,
Dependent
Samples
For tests of the
following form:
H0: μx – μy  0
H0: μx – μy ≤ 0
H0: μx – μy = 0
The test statistic for the mean
difference is a t value, with
n – 1 degrees of freedom:
d
t=
sd
n
where
d

d=
i
n
sd = sample standard dev. of differences
n = the sample size (number of pairs)
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 10-5
Decision Rules: Matched Pairs
Matched or Paired Samples
Lower-tail test:
Upper-tail test:
Two-tail test:
H0: μx – μy  0
H1: μx – μy < 0
H0: μx – μy ≤ 0
H1: μx – μy > 0
H0: μx – μy = 0
H1: μx – μy ≠ 0
a
a
-ta
ta
Reject H0 if t < -tn-1, a
Where
Reject H0 if t > tn-1, a
t=
d
sd
n
a/2
-ta/2
a/2
ta/2
Reject H0 if t < -tn-1 , a/2
or t > tn-1 , a/2
has n - 1 d.f.
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 10-6
Matched Pairs 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:
 di
d = n
Number of Complaints:
(2) - (1)
◼
Salesperson
C.B.
T.F.
M.H.
R.K.
M.O.
Before (1)
6
20
3
0
4
After (2)
4
6
2
0
0
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall
Difference, di
- 2
-14
- 1
0
- 4
-21
= - 4.2
Sd =
2
(d
−
d
)
 i
n −1
= 5.67
Ch. 10-7
Matched Pairs: Solution
◼ Has the training made a difference in the number of
complaints (at the a = 0.05 level)?
H0: μx – μy = 0
H1: μx – μy  0
a = .05
d = - 4.2
Critical Value = ± 2.776
d.f. = n − 1 = 4
Reject
Reject
a/2
a/2
- 2.776
2.776
- 1.66
Decision: Do not reject H0
(t stat is not in the reject region)
Test Statistic:
d
− 4.2
t=
=
= −1.66
sd / n 5.67/ 5
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall
Conclusion: There is not a
significant change in the
number of complaints.
Ch. 10-8
10.2
Independent Samples
Population
means,
independent
samples
◼
Tests of the Difference Between Two Normal
Population Means: Dependent Samples
Goal: Form a confidence interval
for the difference between two
population means, μx – μy
Different populations
◼ Unrelated
◼ Independent
◼
◼
Sample selected from one population has no effect on the
sample selected from the other population
Normally distributed
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 10-9
Difference Between Two Means
(continued)
Population means,
independent
samples
σx2 and σy2 known
Test statistic is a z value
σx2 and σy2 unknown
σx2 and σy2
assumed equal
σx2 and σy2
assumed unequal
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall
Test statistic is a a value from the
Student’s t distribution
Ch. 10-10
σx2 and σy2 Known
Population means,
independent
samples
σx2 and σy2 known
Assumptions:
*
σx2 and σy2 unknown
▪ Samples are randomly and
independently drawn
▪ both population distributions
are normal
▪ Population variances are
known
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 10-11
σx2 and σy2 Known
(continued)
When σx2 and σy2 are known and
both populations are normal, the
variance of X – Y is
Population means,
independent
samples
2
σx2 and σy2 known
σx2 and σy2 unknown
σ 2X − Y
*
2
σy
σx
=
+
nx
ny
…and the random variable
Z=
(x − y) − (μX − μY )
2
σ 2x σ y
+
nX nY
has a standard normal distribution
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 10-12
Test Statistic,
σx2 and σy2 Known
H0 : μx − μy = 0
Population means,
independent
samples
σx2 and σy2 known
*
σx2 and σy2 unknown
The test statistic for
μx – μy is:
z=
( x − y)
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall
2
σy
σx
+
nx
ny
2
Ch. 10-13
Hypothesis Tests for
Two Population Means
Two Population Means, Independent Samples
Lower-tail test:
Upper-tail test:
Two-tail test:
H0: μx  μy
H1: μx < μy
H0: μx ≤ μy
H1: μx > μy
H0: μx = μy
H1: μx ≠ μy
i.e.,
i.e.,
i.e.,
H0: μx – μy  0
H1: μx – μy < 0
H0: μx – μy ≤ 0
H1: μx – μy > 0
H0: μx – μy = 0
H1: μx – μy ≠ 0
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 10-14
Decision Rules
Two Population Means, Independent
Samples, Variances Known
Lower-tail test:
Upper-tail test:
Two-tail test:
H0: μx – μy  0
H1: μx – μy < 0
H0: μx – μy ≤ 0
H1: μx – μy > 0
H0: μx – μy = 0
H1: μx – μy ≠ 0
a
a
-za
Reject H0 if z < -za
za
Reject H0 if z > za
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall
a/2
-za/2
a/2
za/2
Reject H0 if z < -za/2
or z > za/2
Ch. 10-15
σx2 and σy2 Unknown,
Assumed Equal
Assumptions:
Population means,
independent
samples
▪ Samples are randomly and
independently drawn
σx2 and σy2 known
▪ Populations are normally
distributed
σx2 and σy2 unknown
σx2 and σy2
assumed equal
*
▪ Population variances are
unknown but assumed equal
σx2 and σy2
assumed unequal
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 10-16
σx2 and σy2 Unknown,
Assumed Equal
(continued)
Population means,
independent
samples
▪ The population variances
are assumed equal, so use
the two sample standard
deviations and pool them to
estimate σ
σx2 and σy2 known
σx2 and σy2 unknown
σx2 and σy2
assumed equal
*
▪ use a t value with
(nx + ny – 2) degrees of
freedom
σx2 and σy2
assumed unequal
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 10-17
Test Statistic,
σx2 and σy2 Unknown, Equal
The test statistic for
H0 :μx – μy = 0 is:
σx2 and σy2 unknown
σx2 and σy2
assumed equal
*
t=
σx2 and σy2
assumed unequal
( x − y)
sp2
sp2
+
nx ny
Where t has (n1 + n2 – 2) d.f.,
and
sp2 =
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall
(n x − 1)s2x + (n y − 1)s 2y
nx + ny − 2
Ch. 10-18
Decision Rules
Two Population Means, Independent
Samples, Variances Unknown
Lower-tail test:
Upper-tail test:
Two-tail test:
H0: μx – μy  0
H1: μx – μy < 0
H0: μx – μy ≤ 0
H1: μx – μy > 0
H0: μx – μy = 0
H1: μx – μy ≠ 0
a
a
-ta
Reject H0 if
t < -t (n1+n2 – 2), a
ta
Reject H0 if
t > t (n1+n2 – 2), a
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall
a/2
-ta/2
a/2
ta/2
Reject H0 if
t < -t (n1+n2 – 2), a/2 or
t > t (n1+n2 – 2), a/2
Ch. 10-19
Pooled Variance t Test: Example
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
Assuming both populations are
approximately normal with
equal variances, is
there a difference in average
yield (a = 0.05)?
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 10-20
Calculating the Test Statistic
H0: μ1 - μ2 = 0 i.e. (μ1 = μ2)
H1: μ1 - μ2 ≠ 0 i.e. (μ1 ≠ μ2)
The test statistic is:
t=
(X − X )
1
2
1 1
S  + 
 n1 n2 
=
2
p
(3.27 − 2.53 )
1 
 1
1.5021 +

 21 25 
= 2.040
2
2
2
2
(
)
(
)
(
)
(
)
n
−
1
S
+
n
−
1
S
21
−
1
1.30
+
25
−
1
1.16
2
1
2
2
S = 1
=
p
(n1 − 1) + (n2 − 1)
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall
(21 - 1) + (25 − 1)
= 1.5021
Ch. 10-21
Solution
H0: μ1 - μ2 = 0 i.e. (μ1 = μ2)
H1: μ1 - μ2 ≠ 0 i.e. (μ1 ≠ μ2)
a = 0.05
df = 21 + 25 − 2 = 44
Critical Values: t = ± 2.0154
Reject H0
.025
-2.0154
Reject H0
.025
0 2.0154
t
2.040
Test Statistic:
Decision:
3.27 − 2.53
t=
= 2.040 Reject H0 at a = 0.05
1 
 1
1.5021  +
Conclusion:

 21 25 
There is evidence of a
difference in means.
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 10-22
σx2 and σy2 Unknown,
Assumed Unequal
Assumptions:
Population means,
independent
samples
▪ Samples are randomly and
independently drawn
σx2 and σy2 known
▪ Populations are normally
distributed
σx2 and σy2 unknown
▪ Population variances are
unknown and assumed
unequal
σx2 and σy2
assumed equal
σx2 and σy2
assumed unequal
*
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 10-23
σx2 and σy2 Unknown,
Assumed Unequal
(continued)
Forming interval estimates:
Population means,
independent
samples
▪ The population variances are
assumed unequal, so a pooled
variance is not appropriate
σx2 and σy2 known
▪ use a t value with  degrees
of freedom, where
σx2 and σy2 unknown
2
σx2 and σy2
assumed equal
σx2 and σy2
assumed unequal
*
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall
 s2x
s2y 
( ) + ( )
n y 
 n x
v=
2
2
2
2


s
 sx 
  /(n x − 1) +  y  /(n y − 1)
n 
 nx 
 y
Ch. 10-24
Test Statistic,
σx2 and σy2 Unknown, Unequal
σx2 and σy2 unknown
The test statistic for
H0: μx – μy = 0 is:
σx2 and σy2
assumed equal
σx2 and σy2
assumed unequal
*
t=
(x − y)
2
x
2
y
s
s
+
nX nY
2
Where t has  degrees of freedom:
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall
 s 2x
s 2y 
( ) + ( )
n y 
 n x
v=
2
2
 s 2y 
 s 2x 
  /(nx − 1) +   /(ny − 1)
n 
 nx 
 y
Ch. 10-25
10.3
Population
proportions
Two Population Proportions
Tests of the Difference Between Two
Population Proportions (Large Samples)
Goal: Test hypotheses for the
difference between two population
proportions, Px – Py
Assumptions:
Both sample sizes are large,
nP(1 – P) > 5
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 10-26
Two Population Proportions
(continued)
Population
proportions
◼
The random variable
Z=
(pˆ x − pˆ y ) − (Px − Py )
Px (1− Px ) Py (1− Py )
+
nx
ny
has a standard normal distribution
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 10-27
Test Statistic for
Two Population Proportions
The test statistic for
H0: Px – Py = 0
is a z value:
Population
proportions
z=
( pˆ
x
− pˆ y )
pˆ 0 (1− pˆ 0 ) pˆ 0 (1− pˆ 0 )
+
nx
ny
Where
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall
pˆ 0 =
n xpˆ x + n ypˆ y
nx + ny
Ch. 10-28
Decision Rules: Proportions
Population proportions
Lower-tail test:
Upper-tail test:
Two-tail test:
H0: Px – Py  0
H1: Px – Py < 0
H0: Px – Py ≤ 0
H1: Px – Py > 0
H0: Px – Py = 0
H1: Px – Py ≠ 0
a
a
-za
Reject H0 if z < -za
za
Reject H0 if z > za
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall
a/2
-za/2
a/2
za/2
Reject H0 if z < -za/2
or z > za/2
Ch. 10-29
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
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 10-30
Example:
Two Population Proportions
(continued)
◼
The hypothesis test is:
H0: PM – PW = 0 (the two proportions are equal)
H1: PM – PW ≠ 0 (there is a significant difference between
proportions)
◼
The sample proportions are:
◼ Men:
p̂M = 36/72 = .50
p̂ W = 31/50 = .62
◼ Women:
▪ The estimate for the common overall proportion is:
ˆ M + n W pˆ W 72(36/72) + 50(31/50) 67
n
p
M
pˆ 0 =
=
=
= .549
nM + n W
72 + 50
122
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 10-31
Example:
Two Population Proportions
(continued)
The test statistic for PM – PW = 0 is:
z=
=
( pˆ
− pˆ W )
pˆ 0 (1− pˆ 0 ) pˆ 0 (1− pˆ 0 )
+
n1
n2
Reject H0
Reject H0
.025
.025
M
-1.96
-1.31
1.96
( .50 − .62)
 .549 (1− .549) .549 (1− .549)  Decision: Do not reject H0
+


72
50

 Conclusion: There is not
= − 1.31
Critical Values = ±1.96
For a = .05
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall
significant evidence of a
difference between men
and women in proportions
who will vote yes.
Ch. 10-32
10.4
Tests for Two
Population
Variances
F test statistic
Tests of Equality of
Two Variances
▪ Goal: Test hypotheses about two
population variances
H0: σx2  σy2
H1: σx2 < σy2
H0: σx2 ≤ σy2
H1: σx2 > σy2
H0: σx2 = σy2
H1: σx2 ≠ σy2
Lower-tail test
Upper-tail test
Two-tail test
The two populations are assumed to be
independent and normally distributed
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 10-33
Hypothesis Tests for
Two Variances
(continued)
Tests for Two
Population
Variances
F test statistic
The random variable
2
x
2
y
s /σ
F=
s /σ
2
x
2
y
Has an F distribution with (n x – 1)
numerator degrees of freedom and
(ny – 1) denominator degrees of
freedom
Denote an F value with 1 numerator and 2
denominator degrees of freedom by Fν1,ν 2
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 10-34
Test Statistic
Tests for Two
Population
Variances
The critical value for a hypothesis test
about two population variances is
s
F=
s
F test statistic
2
x
2
y
where F has (nx – 1) numerator
degrees of freedom and (ny – 1)
denominator degrees of freedom
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 10-35
Decision Rules: Two Variances
Use sx2 to denote the larger variance.
H0: σx2 = σy2
H1: σx2 ≠ σy2
H0: σx2 ≤ σy2
H1: σx2 > σy2
a/2
a
0
Do not
reject H0
Reject H0
Fn x −1,n y −1,α
F
Reject H0 if F  Fn x −1,n y −1,α
0
Do not
reject H0
F
Reject H0
Fn x −1,n y −1,α / 2
rejection region for a twotail test is:
◼
Reject H0 if F  Fnx −1,ny −1,α / 2
where sx2 is the larger of
the two sample variances
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 10-36
Example: F Test
You are a financial analyst for a brokerage firm. You
want to compare dividend yields between stocks listed
on the NYSE & NASDAQ. You collect the following data:
NYSE
NASDAQ
Number
21
25
Mean
3.27
2.53
Std dev
1.30
1.16
Is there a difference in the
variances between the NYSE
NASDAQ at the a = 0.10 level?
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall
&
Ch. 10-37
F Test: Example Solution
◼
◼
Form the hypothesis test:
H0: σx2 = σy2 (there is no difference between variances)
H1: σx2 ≠ σy2 (there is a difference between variances)
Find the F critical values for a = .10/2:
Degrees of Freedom:
◼ Numerator
(NYSE has the larger
standard deviation):
◼
◼
nx – 1 = 21 – 1 = 20 d.f.
Fnx −1, ny −1, α / 2
= F20 , 24 , 0.10/2 = 2.03
Denominator:
◼
ny – 1 = 25 – 1 = 24 d.f.
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 10-38
F Test: Example Solution
(continued)
◼
The test statistic is:
H0: σx2 = σy2
H1: σx2 ≠ σy2
s2x 1.30 2
F= 2 =
= 1.256
2
s y 1.16
◼
◼
F = 1.256 is not in the rejection
region, so we do not reject H0
a/2 = .05
Do not
reject H0
Reject H0
F
F20 , 24 , 0.10/2 = 2.03
Conclusion: There is not sufficient evidence
of a difference in variances at a = .10
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 10-39
Some Comments on
Hypothesis Testing
◼
A test with low power can result from:
◼
◼
◼
◼
◼
Small sample size
Large variances in the underlying populations
Poor measurement procedures
If sample sizes are large it is possible to find
significant differences that are not practically
important
Researchers should select the appropriate level
of significance before computing p-values
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 10-40
Two-Sample Tests in EXCEL
For paired samples (t test):
◼
Data | data analysis | t-test: paired two sample for means
For independent samples:
◼
Independent sample z test with variances known:
◼
Data | data analysis | z-test: two sample for means
For variances…
◼ F test for two variances:
◼
Data | data analysis | F-test: two sample for variances
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 10-41
Chapter Summary
◼
Compared two dependent samples (paired
samples)
◼
◼
Compared two independent samples
◼
◼
◼
Performed paired sample t test for the mean
difference
Performed z test for the differences in two means
Performed pooled variance t test for the differences
in two means
Compared two population proportions
◼
Performed z-test for two population proportions
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 10-42
Chapter Summary
(continued)
◼
Performed F tests for the difference between
two population variances
◼
Used the F table to find F critical values
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 10-43
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, electronic, mechanical, photocopying,
recording, or otherwise, without the prior written permission of the publisher.
Printed in the United States of America.
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 10-44
Download