Download Slide 1

Document related concepts

Foundations of statistics wikipedia , lookup

Psychometrics wikipedia , lookup

Statistical hypothesis testing wikipedia , lookup

Omnibus test wikipedia , lookup

Resampling (statistics) wikipedia , lookup

Misuse of statistics wikipedia , lookup

Student's t-test wikipedia , lookup

Transcript
Sullivan, 4th ed.
Copyright of the definitions and examples is
reserved to Pearson Education, Inc.. In order to
use this PowerPoint presentation, the required
textbook for the class is the Fundamentals of
Statistics, Informed Decisions Using Data,
Michael Sullivan, III, fourth edition.
Hypothesis Tests Regarding a Parameter
Ch 10.1 The Language of Hypothesis Testing
Objective A : Set up a Hypothesis Testing
Objective B : Type I or Type II Error
Objective C : State conclusions for Hypothesis Tests
Ch 10.2 Hypothesis Test for a Population Mean
Objective A : Classical Approach
Ch 10.1 The Language of Hypothesis Testing
Objective A : Set up a Hypothesis Testing
Hypothesis testing is a procedure, based on a sample evidence and
probability, used to test statements regarding a characteristic of one
or more populations.
– The null hypothesis H 0 is a statement to be tested.
– The alternate hypothesis H1 is a statement that we are trying
to find evidence to support.
Example 1 : Set up H 0 and H1 .
In the past, student average income was $6000 per year.
(a) An administrator believes the average income has increased.
H 0 :   6000
(No change)
H1 :   6000
(A right-tailed test)
(b) The percentage of passing a Math course was 50%. A Math
professor believes there is a decrease in the passing rate.
H 0 : p  0.5
H1 : p  0.5
(A left-tailed test)
Ch 10.1 The Language of Hypothesis Testing
Objective A : Set up a Hypothesis Testing
Objective B : Type I or Type II Error
Objective C : State conclusions for Hypothesis Tests
Ch 10.2 Hypothesis Test for a Population Mean
Objective A : Classical Approach
Ch 10.1 The Language of Hypothesis Testing
Objective B : Type I or Type II Error
Type I Error → Rejecting H 0 when H 0 is true.
Type II Error → Not rejecting H 0 when H1 is true.
We use  for the probability of making Type I error.
We use  for the probability of making Type II error.
For this statistics class, we only control the Type I error.
(0.01    0.10)
 is also called the level of significance.
Ch 10.1 The Language of Hypothesis Testing
Objective A : Set up a Hypothesis Testing
Objective B : Type I or Type II Error
Objective C : State conclusions for Hypothesis Tests
Ch 10.2 Hypothesis Test for a Population Mean
Objective A : Classical Approach
Section 10.1 The Language of Hypothesis Testing
Objective C : State Conclusions for Hypothesis Tests
If H 0 is rejected, there is sufficient evidence to support the
statement in H1 .
If H 0 is NOT rejected, there is NOT sufficient evidence to
support the statement in H1 .
Example 1 : In 2007, the mean SAT score on the reasoning test for all
students was 710. A teacher believes that, due to the
heavy use of multiple choice test questions, the mean
SAT reasoning test has decreased.
(a) Determine H 0 and H1 .
H 0 :   710
H1 :   710
(b) Explain what it would mean to make a Type I error.
A Type I error is made when the sample evidence leads the
teacher to believe   710 is not true when in fact   710
is true.
(c) Explain what it would mean to make a Type II error.
A Type II error is made when the sample evidence leads the
teacher to believe   710 is true when in fact  is less than
710.
(d) State the conclusion if the null hypothesis is rejected.
H 0 :   710
H1 :   710
There is enough evidence to support the teacher’s claim that
the mean SAT reasoning test score has decreased.
Example 2 : The mean score on the SAT Math Reasoning exam is 516.
A test preparation company states that the mean score of
students who take its course is higher than 516.
(a) Determine the null and alternative hypotheses that would be
used to test the effectiveness of the marketing campaign.
H 0 :   516
H1 :   516
(b) If sample data indicate that the null hypothesis should not be
rejected, state the conclusion of the company.
There is not sufficient evidence to support the mean score
of the reasoning exam is higher than 516.
(c) Suppose, in fact, that the mean score of students taking the
preparatory course is 522. Has a Type I or Type II error been made?
Type II error.
If we tested this hypothesis at the  = 0.01 level, what is the
probability of committing a Type I error?
Since  is the probability of committing Type I error, it is 0.01.
(d) If we wanted to decrease the probability of making a Type II error,
would we need to increase or decrease the level of significance?
If we increase  , we decrease  and vice versa.
Therefore, we need to increase the level of significance  in order
to decrease the probability of Type II error.
Example 3 : According to the Centers for Disease Control, 15.2% of
adults experience migraine headaches. Stress is a major
contributor to the frequency and intensity of headaches.
A massage therapist feels that she has a technique that
can reduce the frequency and intensity of migraine
headaches.
(a) Determine the null and alternative hypotheses that would be
used to test the effectiveness of the massage therapist's techniques.
H 0 : p  0.152
H1 : p  0.152
(b) A sample of 500 American adults who participated in the massage
therapist's program results in data that indicate that the null
hypothesis should be rejected. Provide a statement that supports
the massage therapist's program.
There is sufficient evidence to support the massage therapist’s
program that can reduce the percentage of migraine headache
from 15.2%.
(c) Suppose, in fact, that the percentage of patients in the program
who experience migraine headaches is 15.2%. Was a Type I or Type
II error committed?
Type I error.
Ch 10.1 The Language of Hypothesis Testing
Objective A : Set up a Hypothesis Testing
Objective B : Type I or Type II Error
Objective C : State conclusions for Hypothesis Tests
Ch 10.2 Hypothesis Test for a Population Mean
Objective A : Classical Approach
Ch 10.2 Hypothesis Tests for a Population Proportion
Objective A : Classical Approach
Z – Test for a Proportion
A hypothesis test involving a population proportion can be
considered as a binomial experiment. As we learned from Ch 8.2,
the best point estimate of p , the population proportion, is a
x
sample proportion, pˆ  .
n
There are two methods for testing hypothesis.
Method 1 : The Classical Approach
Method 2 : The P – Value Approach
We are going to focus on the Classical Approach for today’s lecture.
Testing Hypotheses Regarding a Population Proportion, p .
Use the following steps to perform a proportion Z – Test provided that
Example 1: Use the Classical Approach to test the following hypotheses.
H 0 : p  0.25 versus H1 : p  0.25
n  400 , x  96 ,   0.1
Step 1 : H 0 : p  0.25
H1 : p  0.25
Step 2 :
(left-tailed test)
  0.1
Step 3 : Sample :
n  400 , x  96
x
96
pˆ  
 0.24
n 400
z0 
z0 
pˆ  p0

p0 (1  p0 )
n
0.24  0.25
(0.25)(1  0.25)
400
0.24  0.25
 0.46* (test statistic)
(0.25)(0.75)
400
Use Table V to determine critical value for   0.1 :
Recall : H1 : p  0.25
(left-tailed test)
From Table V
0.08
  0.1
z  1.28
*z
 1.2
0
 0.46
0.1003 0.0985
(Closer to
0.1)
Step 4 :
Since Z – statistic, z0 , is not within the critical region, z , fail to
reject H 0 .
Step 5 :
There is not enough evidence to support H1 : p  0.25.
Example 2: The percentage of physicians who are women is 27.9%. In a
survey of physicians employed by a large university health
system, 45 of 120 randomly selected physicians were
women. Use the Classical Approach to determine whether
there is sufficient evidence at the 0.05 level of significance
to conclude that the proportion of women physicians at the
university health system exceeds 27.9%?
Step 1 : H 0 : p  0.279
H1 : p  0.279
Step 2 :
  0.05
(right-tailed test)
Step 3 : Sample :
n  120 , x  45
x 45
pˆ  
 0.375
n 120
z0 
z0 
pˆ  p0

p0 (1  p0 )
n
0.375  0.279
(0.279)(1  0.279)
120
0.375  0.279
 2.34* (test statistic)
(0.279)(0.721)
120
Use Table V to determine critical value for
H1 : p  0.279
(right-tailed test)
  0.05
  0.05:
From Table V
0.045
0.04
0.05
  1  0.05  0.95
  0.05
*
z  1.645
1.6
0.9495
0.9505
0.95
z0  2.34
Step 4 :
Since Z – statistic, z0 ,falls within the critical region, z , reject H 0 .
Step 5 :
There is sufficient evidence to support the claim that the proportion
of female physicians exceeds 27.9%.
Ch 10.3 Part I Classical Approach
Ch 10.3 Hypothesis Test about a Population
Mean with unknown 
Objective A : Classical Approach
Ch 10.3 Hypothesis Test about a Population
Mean with unknown 
The t – test procedure requires either that the sample was drawn
from a normally distributed population or the sample size was
greater than 30. Minor departures from normality will not
adversely affect the results of the test. However, if the data
include outliers, the t – test procedure should not be used. A
normality plot is used to test whether the sample was drawn
from a normally distributed population. A boxplot is used to
detect outliers.
Ch 10.3 Hypothesis Test about a Population
Mean with unknown 
Objective A : Classical Approach
Ch 10.3 Hypothesis Test about a Population
Mean with unknown 
Objective A : Classical Approach
Example 1: Determine the critical value(s) for
(a) a right-tailed test of a population mean at the   0.05
level of significance based on a sample size of n  18.
df  n  1  18  1  17
From Table VI
t  1.740
df
0.05
17
1.740
(b) a left-tailed test of a population mean at the   0.01
level of significance based on a sample size of n  15.
From Table VI
df  n  1  15  1  14
0.01
df
t  2.624
14
2.624
(c) a two-tailed test of a population mean at the   0.05 level of
significance based on a sample size of n  25.
df  n  1  25  1  24

 0.025
2
t /2  2.064
From Table VI
df
0.025
24
2.064
Example 2: Determine the t – statistic and the tail(s) of testing.
(a) H 0 :   16 versus   16
A random sample of size n  10 was obtained from a
population that was normally distributed produced a
mean of 16.5 with a standard deviation of 0.4 .
0  16 , n  10 , x  16.5 , s  0.4
16.5  16
x  0
 3.953
t0 

0.4 10
s n
(b) H 0 :   72 versus   72
A random sample of size n  15 was obtained from a
population that was normally distributed produced a
mean of 73.5 with a standard deviation of 17.1 .
0  72 , n  15 , x  73.5 , s  17.1
73.5  72
x  0
t0 
s
n

17.1 15
 0.340
Example 3: Use the classical approach to determine whether to reject
or fail to reject H 0 .
(a) t0  2.578 versus t  2.056 for a right-tailed test
t0  2.578
Reject H 0 .
*
t  2.056
(b) t0  1.657 versus t  1.771 for a left-tailed test
t0  1.657
*
t  1.771
Fail to reject H 0 .
(c) t0  2.125 versust /2  2.069for a two-tailed test
reject H 0 .
t0  2.125
*
t 2  2.069
t 2  2.069
Example 4: To test H 0 :   0.3 versus   0.3 , a random sample of size
n  16 is obtained from a population that is known to be
normally distributed.
(a) If x  0.295 , s  0.168 , compute the test statistic and
round the answer to three decimal places.
0  0.3 , n  16 , x  0.295 , s  0.168
0.295  0.3
x  0
  0.119 *
t0 

0.168 16
s n
(b) If the researcher decides to test this hypothesis at the
  0.05 level of significance, determine the critical
value(s).
From Table VI
n  16
0.05
df
df  n  1  16  1  15
Recall :   0.3 (left-tailed test)
15
1.753
t  1.753
(c) Draw a t – distribution that depicts the critical region and the
t – statistic.
t0  0.119
t  1.753
*
(d) What conclusion can be drawn?
Fail to reject H 0 . There is not enough evidence to
support   0.3.
Example 5: An Fast Oil Change Company advertised a 15-minute wait
for an oil change. A sample of 25 oil changes showed a
mean time of 16.8 minutes and a standard deviation of 4.3
minutes. At the 2% level of significance, is there evidence
that the mean time for an oil change is different from 15
minutes? Assume the population is approximately normal.
Use the Classical Approach.
Population : 0  15 ,   0.02
Sample:
n  25 , x  16.8 , s  4.3
H 0 :   15
H1 :   15
(two-tailed test)
16.8  15
x  0
 1.6212*
t0 

4.3 25
s n
Recall :   0.02
-- > two-tailed test

 0.01
-- >
2
df  n  1  25  1  24
From Table VI
t0  1.6212
t 2  2.492
*
t 2  2.492
df
0.01
24
2.492
Fail to reject H 0 . There is not enough evidence to support the
mean waiting time for an oil change is different from 15 minutes.
Ch 10.2 Part II
and
Ch 10.3 Part II
Ch 10.2 Hypothesis Test for a Population Mean
Objective B : P – Value Approach
Ch 10.3 Hypothesis Test about a Population
Mean with unknown 
Objective B : P – Value Approach
Ch 10.2 Hypothesis Test for a Population Mean
Objective B : P – Value Approach
Z – Test for a Proportion
A hypothesis test involving a population proportion can be
considered as a binomial experiment. As we learned from Ch 8.2,
the best point estimate of p , the population proportion, is a
x
sample proportion, pˆ  , provided the sample is obtained by
n
1) simple random sampling ;
2) np0 (1  p0 )  10 to guarantee that a normal distribution can be
used to test hypotheses for H 0 : p  p 0 ;
3) the sampled values are independent of each other ( n  0.05N).
Testing Hypotheses Regarding a Population Proportion, p .
Use the following steps to perform a Z – Test for a Proportion.
Example 1: The percentage of physicians who are women is 27.9%. In a
survey of physicians employed by a large university health
system, 45 of 120 randomly selected physicians were
women. Use the P - Value Approach to determine whether
there is sufficient evidence at the 0.05 level of significance
to conclude that the proportion of women physicians at the
university health system exceeds 27.9%?
n  120 , x  45 ,   0.05
Step 1 :
H 0 : p  0.279
H1 : p  0.279
Step 2 :
  0.05
(right-tailed test)
Step 3 : Sample :
n  120 , x  45
x 45
pˆ  
 0.375
n 120
z0 
z0 
pˆ  p0

p0 (1  p0 )
n
0.375  0.279
(0.279)(1  0.279)
120
0.375  0.279
 2.34* (test statistic)
(0.279)(0.721)
120
P – value approach
-- > Let  alone.
-- > Convert z0  2.34 to a tailed area.
From Table V
0.04
0.9904
2.3
0.9904
z0  2.34
Step 4 :
P – value = 1 – 0.9904
= 0.0096
Is P – value <  ?
Is 0.0096 < 0.05 ? Yes, reject H 0 .
Step 5 :
There is enough evidence to support the claim that the
proportion of female physicians exceeds 27.9%.
Example 2: In 1997, 4% of mothers smoked more than 21 cigarettes
during their pregnancy. An obstetrician believes that the
percentage of mothers who smoke 21 cigarettes or more is
less than 4% today. She randomly selects 120 pregnant
mothers and finds that 3 of them smoked 21 or more
cigarettes during pregnancy. Does the sample data support
the obstetrician’s belief? Use the P - Value Approach with
  0.01 level of significant.
H 0 : p  0.04
H1 : p  0.04
(left-tailed test)
n  120 , x  3 ,   0.01
x
3
pˆ  
 0.025
n 120
z0 
pˆ  p0

p0 (1  p0 )
n
0.025  0.04
z0 
(0.04)(0.96)
120
0.025  0.04
(0.04)(1  0.04)
120
 0.84 * (test statistic)
P – value approach
-- > Let  alone.
-- > Convert z0  0.84 to a tailed area.
From Table V
0.04
0.2005
z0  0.84
P – value = 0.2005
 0.8
0.2005
Is P – value <  ?
Is 0.2005 < 0.01 ? No, do not reject H 0 .
There is not enough evidence to support the claim that the
percentages of mothers who smoke 21 cigarettes or more is less
than 4%.
Example 3: In 2000, 58% of females aged 15 years of age and older lived
alone, according to the U.S. Census Bureau. A sociologist
tests whether this percentage is different today by
conducting a random sample of 500 females aged 15 years
of age and older and finds that 285 are living alone. Use the
P -Value Approach to determine whether there is sufficient
evidence at the   0.1 level of significance to conclude
the proportion has changed since 2000?
H 0 : p  0.58
H1 : p  0.58
(Two-tailed test)
n  500 , x  285 ,   0.1
x 285
pˆ  
 0.57
n 500
pˆ  p0

p0 (1  p0 )
n
z0 
z0 
0.57  0.58
(0.58)(0.42)
500
0.57  0.58
(0.58)(1  0.58)
500
 0.45 * (test statistic)
P – value approach
-- > Let  alone.
-- > Convert z0  0.45 to a two-tailed area.
From Table V
0.05
0.3264
z0  0.45
0.3264
z0  0.45
P – value = Double (0.3264)
= 0.6528
 0.4
0.3264
Is P – value <  ?
Is 0.6528 < 0.1 ?
No, do not reject H 0 .
There is not enough evidence to support the claim.
Ch 10.2 Hypothesis Test for a Population Mean
Objective B : P – Value Approach
Ch 10.3 Hypothesis Test about a Population
Mean with unknown 
Objective B : P – Value Approach
Ch 10.3 Hypothesis Test about a Population
Mean with unknown 
Objective B :
P – Value Approach
The t – test procedure requires either that the sample was drawn
from a normally distributed population or the sample size was
greater than 30. Minor departures from normality will not
adversely affect the results of the test. However, if the data
include outliers, the t – test procedure should not be used. A
normality plot is used to test whether the sample was drawn
from a normally distributed population. A boxplot is used to
detect outliers.
Example 1: Find the P – value interval for each test value.
(a) t0  2.624 , n  15 , right-tailed
df  n  1  15  1  14
P  value  0.01
t0  2.624
df  14
From Table VI
df
0.01
14
2.624
(b) t0  1.703 , n  28 , right-tailed
df  n  1  28  1  27
P  value  0.05
t0  1.703
df  27
From Table VI
df
0.05
27
1.703
(c) t0  2.321, n  23 , left-tailed
From Table VI
df  n  1  23  1  22
0.01
df
0.02
22
2.321
2.183
2.508
0.01  P  value  0.02
t0  2.321
df  22
P – value is between 0.01 and 0.02.
0.01  P  value  0.02
(d) t0  1.562 , n  17 , two-tailed
df  n  1  17  1  16
From Table VI
df
0.10  P  value  0.20
t0  1.562
df  17
1
( P  value ) is between 0.05 and 0.10.
2
1
0.05  ( P  value )  0.10
2
0.10  P  value  0.20
16
0.05
0.10
1.562
1.337
1.746
Example 2: Use the P – value approach to determine whether to reject
or fail to reject H 0 .
(a) P – value  0.126 versus   0.05 for a right-tailed test
Since P – value is not smaller than  , fail to reject H 0 .
(0.05)
(0.126)
(b) P – value  0.001 versus   0.025 for a left-tailed test
Since P – value <  , reject H 0 .
(0.001)
(0.025)
Example 3: A survey of 15 large U.S. cities finds that the average
commute time one way is 25.4 minutes. A chamber of
commerce executive feels that the commute in his city is
less and wants to publicize this. He randomly selects 25
commuters and finds the average is 22.1 minutes with a
standard deviation of 5.3 minutes. At   0.01 , is there
enough evidence to support the claim? Use the P – value
approach.
Step 1 :
Setup :
H 0 :   25.4
H 0 :   25.4 (left-tailed test)
Step 2 :
  0.01
Step 3 :
0  25.4 , n  25 , x  22.1, s  5.3
x  0 22.1  25.4
  3.113 *
t0 

5.3 25
s n
P – value Approach
df  n  1  25  1  24
From Table VI
0.001
df
0.0025
24
3.113
3.091
3.467
0.001  P  value  0.0025
t0  3.113
df  24
P – value is between 0.001 and 0.0025.
0.001  P  value  0.0025
Step 4 :
Is P – value <  ? Yes , reject H 0 .
( Between 0.001 (0.01)
and 0.0025)
Step 5 :
There is sufficient evidence to support the executive’s claim that
the commute time in his city is less than 25.4 minutes.
As we have experienced from example 1 to 3, we were unable to
find exact P – values using the table because the t – table provides
t – values only for certain area. To find exact P – values, we use
statistical software.
Example 4: Use StatCrunch to calculate the following question.