Download br7ch09a - Web4students

Document related concepts
Transcript
Understandable Statistics
Seventh Edition
By Brase and Brase
Prepared by: Lynn Smith
Gloucester County College
Chapter Nine Part 1
(Sections 9.1 & 9.2)
Hypothesis Testing
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
1
Hypothesis testing is used to
make decisions concerning the
value of a parameter.
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
2
Null Hypothesis: H0
a working hypothesis about the
population parameter in question
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
3
The value specified in the null
hypothesis is often:
• a historical value
• a claim
• a production specification
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
4
Alternate Hypothesis: H1
any hypothesis that differs from the
null hypothesis
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
5
An alternate hypothesis is
constructed in such a way that
it is the one to be accepted when
the null hypothesis must be
rejected.
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
6
A manufacturer claims that
their light bulbs burn for an
average of 1000 hours. We
have reason to believe that the
bulbs do not last that long.
Determine the null and alternate
hypotheses.
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
7
A manufacturer claims that
their light bulbs burn for an
average of 1000 hours. ...
The null hypothesis (the claim) is
that the true average life is 1000
hours.
H0:  = 1000
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
8
… A manufacturer claims that
their light bulbs burn for an
average of 1000 hours. We have
reason to believe that the bulbs
do not last that long. ...
If we reject the manufacturer’s claim,
we must accept the alternate
hypothesis that the light bulbs do not
last as long as 1000 hours.
H1:  < 1000
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
9
Type I Error
rejecting a null hypothesis which is,
in fact, true
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
10
Type II Error
not rejecting a null hypothesis
which is, in fact, false
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
11
Options in Hypothesis Testing
Our Choices:
Do Not Reject
Reject
True
H0
is
False
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
12
Errors in Hypothesis Testing
Our Choices:
Do Not Reject
True
H0
is
Reject
Type I
error
False
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
13
Errors in Hypothesis Testing
Our Choices:
Do Not Reject
True
Type I
error
H0
is
False
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
Reject
Type II
error
14
Errors in Hypothesis Testing
Our Choices:
True
H0
is
Do Not Reject
Reject
Correct
decision
Type I
error
False
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
Type II
error
Correct
decision
15
Level of Significance, Alpha ()
the probability with which we are
willing to risk a type I error
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
16
Type II Error
 = beta =probability of a type II error (failing
to reject a false hypothesis)
A small  is normally is associated with a
(relatively) large , and vice-versa.
Choices should be made according to which
error is more serious.
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
17
Power of the Test = 1 – Beta
• The probability of rejecting H0 when it is
in fact false = 1 – .
• The power of the test increases as the
level of significance () increases.
• Using a larger value of alpha increases
the power of the test but also increases
the probability of rejecting a true
hypothesis.
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
18
Probabilities Associated with a
Hypothesis Test
Our Decision
Do not reject H0
Reject H0
H0 is true
H0 is false
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
19
Probabilities Associated with a
Hypothesis Test
Our Decision
Do not reject H0
H0 is true
Reject H0
Correct decision
with probability
1-
H0 is false
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
20
Probabilities Associated with a
Hypothesis Test
Our Decision
Do not reject H0
H0 is true
Reject H0
Correct decision Type I error
with probability with probability
1-

H0 is false
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
21
Probabilities Associated with a
Hypothesis Test
Our Decision
Do not reject H0
Reject H0
H0 is true
Correct decision Type I error
with probability with probability
1-

H0 is false
Type II error
with probability

Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
22
Probabilities Associated with a
Hypothesis Test
Our Decision
Do not reject H0
Reject H0
H0 is true
Correct decision Type I error
with probability with probability
1-

H0 is false
Type II error Correct decision
with probability with probability

1-
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
23
Reject or ...
• When the sample evidence is not strong
enough to justify rejection of the null
hypothesis, we fail to reject the null hypothesis.
• Use of the term “accept the null hypothesis”
should be avoided.
• When the null hypothesis cannot be rejected, a
confidence interval is frequently used to give a
range of possible values for the parameter.
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
24
Fail to Reject H0
There is not enough evidence to
reject H0. The null hypothesis is
retained but has not been proven.
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
25
Reject H0
There is enough evidence to reject H0.
Choose the alternate hypothesis with
the understanding that it has not been
proven.
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
26
A fast food restaurant indicated
that the average age of its job
applicants is fifteen years. We
suspect that the true age is
lower than 15.
We wish to test the claim with a
level of significance of  = 0.01,
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
27
… average age of its job
applicants is fifteen years. We
suspect that the true age is
lower than 15.
H0:  = 15
H1:  < 15
Describe Type I and Type II errors.
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
28
H0:  = 15
H1:  < 15
 = 0.01
A type I error would occur if we rejected
the claim that the mean age was 15, when
in fact the mean age was 15 (or higher).
The probability of committing such an
error is as much as 1%.
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
29
H0:  = 15
H1:  < 15
= 0.01
A type II error would occur if we failed to
reject the claim that the mean age was 15,
when in fact the mean age was lower than
15. The probability of committing such
an error is called beta.
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
30
Types of Tests
•
•
•
When the alternate hypothesis contains
the “not equal to” symbol (  ),
perform a two-tailed test.
When the alternate hypothesis contains
the “greater than” symbol ( > ),
perform a right-tailed test.
When the alternate hypothesis contains
the “less than” symbol ( < ), perform a
left-tailed test.
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
31
Two-Tailed Test
H0:
=k
H1:
k
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
32
Two-Tailed Test
If test statistic is
at or near the
claimed mean, we
H0:
=k
H1 :
 k
do not reject
the Null
Hypothesis
–z
0
z
If test statistic is in either tail - the critical region - of
the distribution, we
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
reject the Null Hypothesis.
33
Right-Tailed Test
H0:
=k
H1:
>k
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
34
Right-Tailed Test
H0:
=k
H1 :
>k
If test statistic is at,
near, or below the
claimed mean, we do
not reject the Null
Hypothesis
0
z
If test statistic is in the right tail - the critical region - of
the distribution, we
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
reject the Null Hypothesis.
35
Left-Tailed Test
H0:
=k
H1 :
<k
If test statistic is at,
near, or above the
claimed mean, we do
not reject the Null
Hypothesis
z
0
If test statistic is in the left tail - the critical region - of the
distribution, we
reject the Null Hypothesis.
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
36
Procedure for Hypothesis
Testing
1.
2.
3.
4.
5.
Establish the null hypothesis, H0.
Establish the alternate hypothesis: H1.
Use the level of significance and the alternate
hypothesis to determine the critical region.
Find the critical values that form the boundaries of
the critical region(s).
Use the sample evidence to draw a conclusion
regarding whether or not to reject the null
hypothesis.
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
37
Null Hypothesis
Claim about  or historical value
of 
H0:  = k
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
38
H0:  = k
If you believe  is less than the value stated
in H0,
use a left-tailed test.
H1:  < k
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
39
H0:  = k
If you believe  is more than the value
stated in H0,
use a right-tailed test.
H1:  > k
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
40
H0:  = k
If you believe  is different from the value
stated in H0,
use a two-tailed test.
H1:   k
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
41
Hypothesis Testing About a
Population Mean  when
Sample Evidence Comes From
a Large Sample
Apply the Central Limit Theorem.
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
42
Central Limit Theorem
Indicates:
Since we are working with assumptions
concerning a population mean for a large
sample, we can assume:
1.
The distribution of sample means is
(approximately) normal.
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
43
Central Limit Theorem
Indicates:
Since we are working with assumptions
concerning a population mean for a large
sample, we can assume:
2. The mean of the sampling distribution is
the same as the mean of the original
distribution.
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
44
Assumptions:
Since we are working with assumptions
concerning a population mean for a large
sample, we can assume:
3.
The standard deviation of the sampling
distribution = the original standard
deviation divided by the square root of
the the sample size.
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
45
Use of the Level of Significance
For a one-tailed test,  is the area in
the tail (the rejection area).

Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
46
Use of the Level of Significance
For a two-tailed test,  is the total area
in the two tails.
Each tail =  /2.
/2
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
/2
47
Critical z Values for Two-Tailed
Test:  = 0.05
If test statistic is
at or near the
claimed mean, we
H0:
 =k
H1 :
 k
do not reject
the Null
Hypothesis
– 1.96
0
1.96
The critical regions: z < – 1.96 with z > 1.96.
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
48
Critical z Values for Two-Tailed
Test:  = 0.01
If test statistic is
at or near the
claimed mean, we
H0:
 =k
H1 :
  k
do not reject
the Null
Hypothesis
– 2.58
0
2.58
The critical regions: z < – 2.58 with z > 2.58.
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
49
Critical z Value for RightTailed Test:  = 0.05
H0:
=k
H1 :
>k
If test statistic is at,
near, or below the
claimed mean, we do
not reject the Null
Hypothesis
0
1.645
The critical region: z > 1.645.
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
50
Critical z Value for RightTailed Test:  = 0.01
H0:
=k
H1 :
>k
If test statistic is at,
near, or below the
claimed mean, we do
not reject the Null
Hypothesis
0
2.33
The critical region: z > 2.33.
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
51
Critical z Value for Left-Tailed
Test:  = 0.05
H0:
=k
H1 :
<k
If test statistic is at,
near, or above the
claimed mean, we do
not reject the Null
Hypothesis
-1.645
0
The critical region: z < – 1.645
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
52
Critical z Value for Left-Tailed
Test:  = 0.01
H0:
=k
H1 :
<k
If test statistic is at,
near, or above the
claimed mean, we do
not reject the Null
Hypothesis
-2.33
0
The critical region: z < – 2.33
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
53
Hypothesis Test Example
Your college claims that the mean age of its
students is 28 years. You wish to check
the validity of this statistic with a level of
significance of  = 0.05.
A random sample of 49 students has a
mean age of 26 years with a standard
deviation of 2.3 years.
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
54
Hypothesis Test Example
Test H0:
Against H1:
= 28
28
two
Perform a ________-tailed
test.
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
55
Hypothesis Test Example
Test H0:
Against H1:
= 28
28
two
Perform a ________-tailed
test.
Using
= 0.05
±1.96
Critical z value(s) = _________
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
56
Critical z Values for Two-Tailed
Test:  = 0.05
If test statistic is
at or near the
claimed mean, we
H0:
 = 28
H1 :
  28
do not reject
the Null
Hypothesis
– 1.96
0
1.96
The critical regions: z < – 1.96 with z > 1.96.
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
57
Sample Results
x  26,
s  2.3.
Calculatethe test statistic z :
x   26  28
2
  6.09
z


  n 2.3  7 .32857
reject the null
Since z < – 1.96, we _________
hypothesis.
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
58
Hypothesis Test Example
Your college claims that the mean age of its
students is 28 years. You wish to check
the validity of this statistic with a level of
significance of  = 0.05.
A random sample of 49 students has a
mean age of 27.5 years with a standard
deviation of 2.3 years.
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
59
Hypothesis Test Example
Test H0:
Against H1:
= 28
28
So, perform a two-tailed test.
Using
= 0.05 Critical z values = 1.96
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
60
Sample Results
x  27.5, s  2.3.
Calculate the test statistic, z :
x   27.5  28
z



2.3  7
n
 .5
 1.52
.32857
Since the test statistic is neither < – 1.96 nor
> 1.96 , we _______________
the null
do not reject
hypothesis.
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
61
Hypothesis Test Example
The manufacturer of light bulbs
claims that they will burn for
1000 hours. I will test a sample of
the bulbs before deciding
whether to keep them. The bulbs
will be returned to the
manufacturer only if my sample
indicates that they will burn less
than 1000 hours.
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
62
Hypothesis Test Example
The manufacturer of light bulbs claims that
they will burn for 1000 hours. ...The bulbs
will be returned ... if my sample indicates that
they will burn less than 1000 hours.
H0:
H 1:
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
= 1000
< 1000
63
Hypothesis Test Example
Test H0:
Against H1:
= 1000
< 1000
left
Perform a ____-tailed
test.)
Using
= 0.01 (So, critical z value = –2.33
_______)
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
64
Critical z Value for Left-Tailed
Test:  = 0.01
H0:
 = 1000
H1 :
 < 1000
If test statistic is at,
near, or above the
claimed mean, we do
not reject the Null
Hypothesis
-2.33
0
The critical region: z < – 2.33
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
65
Sample Results
Suppose our sample of 36 bulbs shows
x  999 hours and s  3.4 hours.
Calculate z :
x   999  1000
z



3.4  6
n
1
 1.76
.567
Since the test statistic is not < – 2.33 we
do not reject
_____________
the null hypothesis.
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
66
Comparison of Critical z
Values for Left-Tailed Tests:
 = 0.01 and  = 0.05
.05
.01
– 2.33
0
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
– 1.645
0
67
In our last hypothesis test
example, we calculated z = – 1.76.
Since we were using  = 0.01, the
boundary of the critical region was
– 2.33.
Our conclusion was not to reject the null
hypothesis.
Had we been using  = 0.05, our
conclusion would have been to reject H0.
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
68
Comparison of Critical z
Values for Left-Tailed Tests:
 = 0.01 and  = 0.05
 =.01
– 2.33
 = .05
0
z = – 1.76
Do not reject H0.
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
– 1.645
0
z = – 1.76
Reject H0.
69
Statistical Significance
• If we reject H0, we say that the data
collected in the hypothesis testing process
are statistically significant.
• If we do not reject H0, we say that the
data collected in the hypothesis testing
process are not statistically significant.
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved .
70