Ch08 Hypothesis Testing
-
Upload
sona-krausova -
Category
Documents
-
view
218 -
download
0
Transcript of Ch08 Hypothesis Testing
-
8/6/2019 Ch08 Hypothesis Testing
1/56
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc. Chap 8-1
Business Statistics:A Decision-Making Approach6th Edition
Chapter 8Introduction to
Hypothesis Testing
-
8/6/2019 Ch08 Hypothesis Testing
2/56
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc. Chap 8-2
Chapter Goals
After completing this chapter, you should be
able to:
Formulate null and alternative hypotheses forapplications involving a single population mean orproportion
Formulate a decision rule for testing a hypothesis
Know how to use the test statistic, critical value, andp-value approaches to test the null hypothesis
Know what Type I and Type II errors are
Compute the probability of a Type II error
-
8/6/2019 Ch08 Hypothesis Testing
3/56
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc. Chap 8-3
What is a Hypothesis?
A hypothesis is a claim(assumption) about apopulation parameter:
population mean
population proportion
Example: The mean monthly cell phone billof this city is Q = $42
Example: The proportion of adults in thiscity with cell phones is p = .68
-
8/6/2019 Ch08 Hypothesis Testing
4/56
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc. Chap 8-4
The Null Hypothesis, H0
States the assumption (numerical) to betested
Example: The average number of TV sets inU.S. Homes is at least three ( )
Is always about a population parameter,
not about a sample statistic
3:H0 u
3:0 u 3x:0 u
-
8/6/2019 Ch08 Hypothesis Testing
5/56
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc. Chap 8-5
The Null Hypothesis, H0
Begin with the assumption that the nullhypothesis is true
Similar to the notion of innocent untilproven guilty
Refers to the status quo
Always contains = , or u sign May or may not be rejected
(continued)
-
8/6/2019 Ch08 Hypothesis Testing
6/56
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc. Chap 8-6
The Alternative Hypothesis, HA
Is the opposite of the null hypothesis
e.g.: The average number of TV sets in U.S.homes is less than ( HA: Q < )
Challenges the status quo
Never contains the = , or u sign
May or may not be accepted
Is generally the hypothesis that is believed(or needs to be supported) by theresearcher
-
8/6/2019 Ch08 Hypothesis Testing
7/56
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc.
Population
Claim: thepopulationmean age is 50.(Null Hypothesis:
REJECT
Supposethe samplemean ageis 20: x = 20
SampleNull Hypothesis
20 likely if Q = 50?!Is
Hypothesis Testing Process
If not likely,
Now select arandom sample
H0: Q = 50 )
x
-
8/6/2019 Ch08 Hypothesis Testing
8/56
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc. Chap 8-8
Sampling Distribution of x
Q = 50IfH0 is true
If it is unlikely thatwe would get asample mean ofthis value ...
... then wereject the null
hypothesis thatQ = 50.
Reason for Rejecting H0
20
... if in fact this werethe population mean
x
-
8/6/2019 Ch08 Hypothesis Testing
9/56
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc. Chap 8-9
Level of Significance, E
Defines unlikely values of sample statistic if
null hypothesis is true
Defines rejection region of the samplingdistribution
Is designated by E , (level of significance)
Typical values are .01, .05, or .10 Is selected by the researcher at the beginning
Provides the critical value(s) of the test
-
8/6/2019 Ch08 Hypothesis Testing
10/56
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc. Chap 8-10
Level of Significanceand the Rejection Region
H0:
HA:
H0: =
HA:
E
E
/2
Representscritical value
Lower tail test
Level of significance = E
0
0
E/2E
Upper tail test
Two tailed test
Rejection
region isshaded
-
8/6/2019 Ch08 Hypothesis Testing
11/56
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc. Chap 8-11
Errors in Making Decisions
Type IError
Reject a true null hypothesis
Considered a serious type of error
The probability of Type I Error is E
Called level of significance of the test Set by researcher in advance
-
8/6/2019 Ch08 Hypothesis Testing
12/56
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc. Chap 8-12
Errors in Making Decisions
Type IIError
Fail to reject a false null hypothesis
The probability of Type II Error is
(continued)
-
8/6/2019 Ch08 Hypothesis Testing
13/56
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc. Chap 8-13
Outcomes and Probabilities
State of Nature
Decision
Do NotReject
H0
No error(1 - )E
Type IIError( )
RejectH0
Type IError( )E
Possible Hypothesis Test Outcomes
H0 FalseH0 True
Key:
Outcome(Probability) No Error( 1 - )
-
8/6/2019 Ch08 Hypothesis Testing
14/56
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc. Chap 8-14
Type I & II Error Relationship
Type I and Type II errors can not happen atthe same time
Type I error can only occur if H0 is true
Type II error can only occur if H0 is false
If Type I error probability ( E ) , then
Type II error probability ( )
-
8/6/2019 Ch08 Hypothesis Testing
15/56
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc. Chap 8-15
Factors Affecting Type II Error
All else equal,
when the difference between
hypothesized parameter and its true value
when E
when when n
-
8/6/2019 Ch08 Hypothesis Testing
16/56
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc. Chap 8-16
Critical ValueApproach to Testing
Convert sample statistic (e.g.: ) to test
statistic ( Z or t statistic )
Determine the critical value(s) for a specifiedlevel of significance E from a table or
computer
If the test statistic falls in the rejection region,reject H0 ; otherwise do not reject H0
x
-
8/6/2019 Ch08 Hypothesis Testing
17/56
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc. Chap 8-17
Reject H0 Do not reject H0
The cutoff value,
or , is called a
critical value
Lower Tail Tests
E
-z
x
-z x
0
H0: 3
HA: < 3
n
zx
EE!
-
8/6/2019 Ch08 Hypothesis Testing
18/56
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc. Chap 8-18
Reject H0Do not reject H0
The cutoff value,
or , is called a
critical value
Upper Tail Tests
E
z
x
z x
0
H0: 3
HA: > 3
n
zx EE !
-
8/6/2019 Ch08 Hypothesis Testing
19/56
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc. Chap 8-19
Do not reject H0 Reject H0Reject H0
There are two cutoff
values (critical values):
or
Two Tailed Tests
E/2
-z/2
x/2
z/2
x/2
00
H0: = 3
HA: { 3
z/2
x/2
n
zx /2/2 EE s!
Lower
Upperx/2
Lower Upper
E/2
-
8/6/2019 Ch08 Hypothesis Testing
20/56
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc. Chap 8-20
Critical ValueApproach to Testing
Convert sample statistic ( ) to a test statistic( Z or t statistic )
x
W Known
LargeSamples
W Unknown
HypothesisTests forQ
SmallSamples
-
8/6/2019 Ch08 Hypothesis Testing
21/56
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc. Chap 8-21
W Known
LargeSamples
W Unknown
HypothesisTests for
SmallSamples
The test statistic is:
Calculating the Test Statistic
!
-
8/6/2019 Ch08 Hypothesis Testing
22/56
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc. Chap 8-22
W Known
LargeSamples
W Unknown
HypothesisTests forQ
SmallSamples
The test statistic is:
Calculating the Test Statistic
st 1
!
But is sometimesapproximated
using a z:
n
xz
!
(continued)
-
8/6/2019 Ch08 Hypothesis Testing
23/56
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc. Chap 8-23
W Known
LargeSamples
W Unknown
HypothesisTests forQ
SmallSamples
The test statistic is:
Calculating the Test Statistic
st 1
!
(The population must beapproximately normal)
(continued)
-
8/6/2019 Ch08 Hypothesis Testing
24/56
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc. Chap 8-24
Review: Steps in Hypothesis Testing
1. Specify the population value of interest
2. Formulate the appropriate null andalternative hypotheses
. Specify the desired level of significance
4. Determine the rejection region
5. Obtain sample evidence and compute thetest statistic
6. Reach a decision and interpret the result
-
8/6/2019 Ch08 Hypothesis Testing
25/56
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc. Chap 8-25
Hypothesis Testing Example
Test the claim that the true mean # of TVsets in US homes is at least 3.
(Assume = 0.8)
1. Specify the population value of interest
The mean number of TVs in US homes
2. Formulate the appropriate null and alternativehypotheses
H0: u 3 HA:
-
8/6/2019 Ch08 Hypothesis Testing
26/56
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc. Chap 8-26
Reject H0 Do not reject H0
4. Determine the rejection region
E = .05
-z= -1.645 0
This is a one-tailed test with E = .05.Since is known, the cutoff value is a z value:
Reject H0 if z < zE = -1.645 ; otherwise do not reject H0
Hypothesis Testing Example
(continued)
-
8/6/2019 Ch08 Hypothesis Testing
27/56
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc. Chap 8-27
5. Obtain sample evidence and compute thetest statistic
Suppose a sample is taken with the following
results: n = 100, x = 2.84 (W = 0.8 is assumed known)
Then the test statistic is:
22
n
!
!
!
!
Hypothesis Testing Example
-
8/6/2019 Ch08 Hypothesis Testing
28/56
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc. Chap 8-28
Reject H0 Do not reject H0
E = .05
-1.645 0
6. Reach a decision and interpret the result
-2.0
Since z = -2.0< -1.645, we reject the nullhypothesis that the mean number of TVs in UShomes is at least 3
Hypothesis Testing Example
(continued)
z
-
8/6/2019 Ch08 Hypothesis Testing
29/56
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc. Chap 8-29
Reject H0
E = .05
2.8684
Do not reject H0
3
An alternate way of constructing rejection region:
2.84
Since x = 2.84
-
8/6/2019 Ch08 Hypothesis Testing
30/56
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc. Chap 8-30
p-Value Approach to Testing
Convert Sample Statistic (e.g. ) to TestStatistic ( Z or t statistic )
Obtain the p-value from a table or computer
Compare the p-value with E
If p-value
-
8/6/2019 Ch08 Hypothesis Testing
31/56
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc. Chap 8-31
p-Value Approach to Testing
p-value: Probability of obtaining a test
statistic more extreme ( oru ) than the
observed sample value given H0 is true
Also called observed level of significance
Smallest value of E for which H0 can berejected
(continued)
-
8/6/2019 Ch08 Hypothesis Testing
32/56
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc. Chap 8-32
p-value =.0228
E = .05
p-value example
Example: How likely is it to see a sample meanof2.84 (or something further below the mean) ifthe true mean is Q = 3.0?
2.8684 3
2.84
x
.0.0)(z
000.
3.0.
z
3.0)|.xP(
!!
!
!
-
8/6/2019 Ch08 Hypothesis Testing
33/56
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc. Chap 8-33
Compare the p-value with E
If p-value
-
8/6/2019 Ch08 Hypothesis Testing
34/56
-
8/6/2019 Ch08 Hypothesis Testing
35/56
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc. Chap 8-35
Reject H0Do not reject H0
Suppose that E = .10 is chosen for this test
Find the rejection region:
E = .10
z=1.280
Reject H0
Reject H0 if z > 1.28
Example: Find Rejection Region
(continued)
-
8/6/2019 Ch08 Hypothesis Testing
36/56
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc. Chap 8-36
Review:Finding Critical Value - One Tail
Z .07 .09
1.1 .3790 .3810 .3830
1.2.3980 .4015
1.3 .4147 .4162 .4177z 0 1.28
.08
Standard NormalDistribution Table (Portion)What is z given E = 0.10?
E = .10
Critical Value= 1.28
.90
.3997
.10
.40.50
-
8/6/2019 Ch08 Hypothesis Testing
37/56
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc. Chap 8-37
Obtain sample evidence and compute the teststatistic
Suppose a sample is taken with the following
results: n = 64, x = 53.1 (W=10 was assumed known)
Then the test statistic is:
n
!
!
!
Example: Test Statistic
(continued)
-
8/6/2019 Ch08 Hypothesis Testing
38/56
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc. Chap 8-38
Reject H0Do not reject H0
Example: Decision
E = .10
1.280
Reject H0
Do not reject H0 since z = 0.88 1.28
i.e.: there is not sufficient evidence that themean bill is over $52
z = .88
Reach a decision and interpret the result:(continued)
-
8/6/2019 Ch08 Hypothesis Testing
39/56
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc. Chap 8-39
Reject H0
E = .10
Do not reject H0 1.28
0
Reject H0
z = .88
Calculate the p-value and compare to E
(continued)
. 9
.3 0.0. )P(z
0
.03.zP
5 .0)|53.xP(
!!u!
!
!u
p-value = .1894
p -Value Solution
Do not reject H0 since p-value = .1894 > E = .10
-
8/6/2019 Ch08 Hypothesis Testing
40/56
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc. Chap 8-40
Example: Two-Tail Test(W Unknown)
The average cost of ahotel room in New York
is said to be $168 pernight. A random sampleof25 hotels resulted inx = $172.50 and
s = $15.40. Test at the
E = 0.05 level.(Assume the population distribution is normal)
H0: = 168
HA: { 168
-
8/6/2019 Ch08 Hypothesis Testing
41/56
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc. Chap 8-41
E = 0.05
n = 25
W is unknown, so
use a t statistic Critical Value:
t24 = 2.0639
Example Solution: Two-Tail Test
Do not reject H0: not sufficient evidence thattrue mean cost is different than $168
Reject H0Reject H0
E/2=.025
-t/2Do not reject H0
0t/2
E/2=.025
-2.0639 2.0639
1.46
2515.40
168172.50
ns
xt
1n
!
!
!
1.46
H0: = 168
HA: { 168
-
8/6/2019 Ch08 Hypothesis Testing
42/56
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc. Chap 8-42
Hypothesis Tests for Proportions
Involves categorical values
Two possible outcomes
Success (possesses a certain characteristic)
Failure (does not possesses that characteristic)
Fraction or proportion of population in the
success category is denoted by p
-
8/6/2019 Ch08 Hypothesis Testing
43/56
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc. Chap 8-43
Proportions
Sample proportion in the success category isdenoted by p
When both np and n(1-p) are at least 5, p can
be approximated by a normal distribution withmean and standard deviation
(continued)
sizesample sampleinsuccessesofnumbernxp!!
pP!
n
p)p(1
p
!
-
8/6/2019 Ch08 Hypothesis Testing
44/56
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc. Chap 8-44
The samplingdistribution of p isnormal, so the teststatistic is a zvalue:
Hypothesis Tests for Proportions
n
)p(p
pp
z
! 1
np u 5and
n(1-p) u 5
HypothesisTests for p
np < 5or
n(1-p) < 5
Not discussedin this chapter
-
8/6/2019 Ch08 Hypothesis Testing
45/56
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc. Chap 8-45
Example: z Test for Proportion
A marketing companyclaims that it receives8% responses from itsmailing. To test thisclaim, a random sampleof 500 were surveyedwith 25 responses. Testat the E = .05significance level.
Check:
np = (500)(.08) = 40
n(1-p) = (500)(.92) = 460
-
8/6/2019 Ch08 Hypothesis Testing
46/56
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc. Chap 8-46
Z Test for Proportion: Solution
E = .05
n = 500, p = .05
Reject H0 at E = .05
H0: p = .08
HA: p { .08
Critical Values: 1.96
Test Statistic:
Decision:
Conclusion:
z0
Reject Reject
.025.025
1.96
-2.47
There is sufficientevidence to reject thecompanys claim of 8%
response rate.
2.47
500
.08).08(1
.08.05
n
p)p(1
ppz !
!
!
-1.96
-
8/6/2019 Ch08 Hypothesis Testing
47/56
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc. Chap 8-47
Do not reject H0Reject H0Reject H0
E/2 = .025
1.960
z = -2.47
Calculate the p-value and compare to E(For a two sided test the p-value is always two sided)
(continued)
0.0 3(.00 )
. 93 )(.5
. 7)P(x. 7)P(z
!!
!
ue
p-value = .0136:
p -Value Solution
Reject H0 since p-value = .0136 < E = .05
z = 2.47
-1.96
E/2 = .025
.0068.0068
-
8/6/2019 Ch08 Hypothesis Testing
48/56
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc. Chap 8-48
RejectH0: u 52
Do not rejectH0: u 52
Type II Error
Type II error is the probability of
failing to reject a false H0
5250
Suppose we fail to reject H0: u 52
when in fact the true mean is = 50
E
-
8/6/2019 Ch08 Hypothesis Testing
49/56
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc. Chap 8-49
RejectH0: Q u 52
Do not rejectH0: Q u 52
Type II Error
Suppose we do not reject H0: Q u 52 when in factthe true mean is Q = 50
5250
This is the truedistribution of x ifQ = 50
This is the range of x whereH0 is not rejected
(continued)
-
8/6/2019 Ch08 Hypothesis Testing
50/56
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc. Chap 8-50
RejectH0: u 52
Do not rejectH0: u 52
Type II Error
Suppose we do not reject H0: u 52 whenin fact the true mean is = 50
E
5250
Here, = P( x u cutoff ) if = 50
(continued)
-
8/6/2019 Ch08 Hypothesis Testing
51/56
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc. Chap 8-51
RejectH0: u 52
Do not rejectH0: u 52
Suppose n = 64 , = 6 , and E = .05
E
5250
So = P( x u 50.766 ) if = 50
Calculating
50.7. 55
n
zxc t ff !!!! EE
(for H0: u 52)
50.766
-
8/6/2019 Ch08 Hypothesis Testing
52/56
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc. Chap 8-52
RejectH0: u 52
Do not rejectH0: u 52
. 539.3.5.02)P(z5050.7
zP50)|50.7xP( !!u!
u!!u
Suppose n = 64 , = 6 , and E = .05
E
5250
Calculating
(continued)
Probability oftype II error:
= .1539
-
8/6/2019 Ch08 Hypothesis Testing
53/56
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc. Chap 8-53
Using PHStat
Options
-
8/6/2019 Ch08 Hypothesis Testing
54/56
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc. Chap 8-54
Sample PHStat Output
Input
Output
-
8/6/2019 Ch08 Hypothesis Testing
55/56
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc. Chap 8-55
Chapter Summary
Addressed hypothesis testing methodology
Performed z Test for the mean ( known)
Discussed pvalue approach to
hypothesis testing
Performed one-tail and two-tail tests . . .
-
8/6/2019 Ch08 Hypothesis Testing
56/56
Business Statistics: A Decision Making Approach 6e 2005 Prentice Hall Inc Chap 8 56
Chapter Summary
Performed t test for the mean (
unknown)
Performed z test for the proportion
Discussed type II error and computed its
probability
(continued)