Download chap16_2010

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Transcript
Chapter 16
Single-Population
Hypothesis Tests
Hypothesis Tests
• A statistical hypothesis is an assumption about a
population parameter.
• There are two types of statistical hypotheses.
– Null hypothesis -- The null hypothesis, H0, represents a
theory that has been put forward, either because it is
believed to be true or because it is to be used as a basis
for argument, but has not been proved.
– Alternative hypothesis (Research hypothesis) -- The
alternative hypothesis, H1, is a statement of what a
statistical hypothesis test is set up to establish.
Hypothesis Tests Examples
• Trials
– H0: The person is innocent
– H1: The person is guilty
• Soda
– H0:  = 12 oz
– H1:  < 12 oz
Hypothesis Tests
• Test Statistics -- the random variable X whose
value is tested to arrive at a decision.
• Critical values-- the values of the test statistic that
separate the rejection and non-rejection regions.
• Rejection Region -- the set of values for the test
statistic that leads to rejection of H0
• Non-rejection region -- the set of values not in the
rejection region that leads to non-rejection of H0
Errors in Hypothesis Tests
Actual Situation
H0 is true
H0 is false
Reject H0
Type I error ()
Decision
Fail to reject H0
No error
No error
Type II error ()
•  (Significance level): Probability of making Type I error
• : Probability of making Type II error
• 1-: Power of Test (Probability of rejecting H0 when H0 is
false)
Hypothesis Tests
Tails of a Test
Two-tailed
Test
Left-tailed
Test
Right-tailed
Test
H0
=
= or 
= or 
H1

<
>
Both tails
Left tail
Right tail
Sum of areas
beyond the test
statistics
Area to the left
of the test
statistic
Area to the right
of the test
statistic
Rejection region
p-value
Hypothesis Tests
Examples
Two-tailed test: According to the US Bureau of the Census,
the mean family size was 3.17 in 1991. An economist
wants to check whether or not this mean has changed
since 1991.
H0:  = 3.17
H1:   3.17
C2
C1
/2
1-
Rejection
Region
=3.17
Non-rejection
Region
/2
Rejection
Region
Hypothesis Tests
Examples
Left-tailed test: A soft-drink company claims that, on
average, its cans contain 12 oz of soda. Suppose that a
consumer agency wants to test whether the mean amount
of soda per can is less than 12 oz.
H0:  = 12
H1:  < 12
C

1-
Rejection
Region
=12
Non-rejection
Region
Hypothesis Tests
Examples
Right-tailed test: According to the US Bureau of the
Census, the mean income of all households was $37,922
in 1991. Suppose that we want to test whether the
current mean income of all households is higher than
$37,922.
C
H0:  = 37922
H1:  > 37922
1-
=37922
Non-rejection
Region

Rejection
Region
Hypothesis Tests
Rejection Region Approach
1. Select the type of test and check the underlying
conditions
2. State the null and alternative hypotheses
3. Determine the level of significance 
4. Calculate the test statistics
5. Determine the critical values and rejection region
6. Check to see whether the test statistic falls in the
rejection region
7. Make decision
Hypothesis Tests
P-Value Approach
1. Select the type of test and check the underlying
conditions
2. State the null and alternative hypotheses
3. Determine the level of significance 
4. Calculate the p-value (the smallest level of
significance that would lead to rejection of the null
hypothesis H0 with given data)
5. Check to see if the p-value is less than 
6. Make decision
Testing Hypothesis on the Mean
with Variance Known (Z-Test)
• Null Hypothesis: H0:  = 0
• Test statistic: Z  X  0
0

n
Alt. Hypothesis
P-value
H1:   0
P(z>z0)+P(z<-z0)
H1:  > 0
P(z>z0)
H1:  < 0
P(z<-z0)
Rejection Criterion
z0 > z1-/2 or z0 < z/2
z0 > z1-
z0 < z
Testing Hypothesis on the Mean
with Variance Known (Z-Test)– Example 16.1
•
•
•
•
•
Claim: Burning time at least 3 hrs
x  2.96 n=42, =0.23, =.10
Null Hypothesis: H0:   3
Alt. Hypothesis: H1:  < 3
Test statistic:
Z0 
X  0
2.96  3

 1.13
 n 0.23 42
• Rejection region: z= z.10=-1.282
• P-value = P(z<-1.13) = .1299
• Fail to reject H0
C
.9
.1
=3
Non-rejection
Region
-1.282
Rejection
Region
Testing Hypothesis on the Mean
with Variance Known (Z-Test)– Example 16.2
•
•
•
•
•
Claim: Width =38”
x  38.02 n=80, =0.098, =.05
Null Hypothesis: H0:  = 38
Alt. Hypothesis: H1:   38
Test statistic:
X  0 38.02  38
Z0 

 1.825
 n 0.098 80
C2
C1
.95
.025
.025
=38
Rejection
Non-rejection
Region
Region
1.96
-1.96
Rejection
Region
• Rejection region: z/2= z.025=-1.96
z1-/2= z.975= 1.96
• P-value = P(z>1.825)+P(z<-1.825) = .0679
• Fail to reject H0
Type II Error and Sample Size
• Increasing sample size could reduce Type II error
X  0 X  ( 0   )

Z0 


 n
 n
 n
C2
C1
1-
n
when H1 is true
2
= 0+
,1)

  ( z1 

= 0
Non-rejection
Region
Z0  N (



n
n
)  ( z 2 


( z1 2  z1  )2  2
2
when     0
n
)
Testing Hypothesis on the Mean
with Variance Known (Z-Test)– Example
•
•
•
•
•
Claim: Burning rate = 50 cm/s
x  51.3 n=25, =2, =.05
Null Hypothesis: H0:  = 50
Alt. Hypothesis: H1:   50
Test statistic:
X  0 51.3  50
Z0 

 3.25
 n
2 25
C2
C1
.95
.025
.025
=50
Rejection
Non-rejection
Region
Region
1.96
-1.96
Rejection
Region
• Rejection region: z/2= z.025=-1.96
z1-/2= z.975= 1.96
• P-value = P(z>3.25)+P(z<-3.25) = .0012
• Reject H0
Type II Error and Sample Size Example
• Claim: Burning rate = 50 cm/s
• n=25, =2, =.05, =.10
• Hypothesis: H0:  = 50; H1:   50
• If  = 51
C2
C1
1-
  ( z1 
2
 n
 n
)  ( z 
)


2
1 25
1 25
)  ( 1.96 
)
2
2
 ( 0.54)  ( 4.46)
 0.295
 (1.96 

= 0
Non-rejection
Region
n
= 0+
( z1 2  z1  )2  2
2
(1.96  1.28)2 22

12
 42
Testing Hypothesis on the Mean
with Variance Unknown (t-Test)
• Null Hypothesis: H0:  = 0
• Test statistic: T  X  0
0
Alt. Hypothesis
H1:   0
H1:  > 0
H1:  < 0
s
n
P-value
2*P(t>|t0|)
P(t>t0)
P(t<-t0)
Rejection Criterion
t0 > t/2,n-1 or t0 < -t/2,n-1
t0 > t, n-1
t0 <- t, n-1
Testing Hypothesis on the Mean
with Variance Unknown (t-Test)– Example 16.3
•
•
•
•
•
Claim: Length =2.5”
x  2.49 n=49, s=0.021, =.05
Null Hypothesis: H0:  = 2.5
Alt. Hypothesis: H1:   2.5
Test statistic:
X  0
2.49  2.5
T0 

 3.33
s n
0.021 49
C2
C1
.95
.025
=2.5
Rejection
Non-rejection
Region
Region
2.31
-2.31
Rejection
Region
• Rejection region: t.025,48= 2.3139
• P-value = 2*P(t>3.33)= .0033
• Reject H0
.025
Testing Hypothesis on the Mean
with Variance Unknown (t-Test)– Example 16.4
•
•
•
•
•
Claim: Battery life at least 65 mo.
x  63
n=15, s=3, =.05
Null Hypothesis: H0:   65
Alt. Hypothesis: H1:  < 65
Test statistic:
T0 
X  0 63  65

 2.582
s n
3 15
• Rejection region: -t.05, 14=-2.14
• P-value = P(t<-2.582) = .0109
• Reject H0
C
.95
.05
=65
Non-rejection
Region
-2.14
Rejection
Region
Testing Hypothesis on the Mean
with Variance Unknown (t-Test)– Example 16.5
•
•
•
•
•
Claim: Service rate = 22 customers/hr
x  23.7 n=18, s=4.2, =.01
Null Hypothesis: H0:  = 22
Alt. Hypothesis: H1:  > 22
Test statistic:
X  0 23.7  22
T0 

 1.717
s n
4.2 18
• Rejection region: t.01,17= 2.898
• P-value = P(t>1.717)= .0540
• Fail to reject H0
C
.99
.01
=22
Rejection
Non-rejection
Region
Region
2.31
Testing Hypothesis on the Median
• Null Hypothesis: H0:  = 0
• Test statistic: SH = No. of observations greater than 0
SL = No. of observations less than 0
Alt. Hypothesis Test Statistic
H1:   0
S=Max(SH, SL)
H1:  > 0
H1:  < 0
SH
SL
P-value (Binomial p=.5)
2*P(xS)
P(xSH)
P(xSL)
Testing Hypothesis on the Median
– Example 16.6
•
•
•
•
•
•
Claim: Median spending = $67.53
n=12, =.10
Null Hypothesis: H0:  = 67.53
Alt. Hypothesis: H1:  > 67.53
Test statistic: SH = 9, SL = 3
P-value = P(x9)= P(x=9)+P(x=10)+P(x=11)+P(x=12)
=.0730
• Reject H0
41
53
65
69
74
78
79
83
97
119
161
203
Testing Hypothesis on the Variance
of a Normal Distribution
• Null Hypothesis: H0: 2 = 02
• Test statistic:  2  (n  1)s 2
0
Alt.
Hypothesis
H1:
2
 0
2
H1: 2 > 02
H1: 2 < 02
 02
P-value
Rejection Criterion
2*P(2 >02 ) or
2*P(2 <02 )
02 > 2/2,n-1 or
02 < 21-/2,n-1
P(2 >02 )
P(2 <02 )
02 > 2,n-1
02 < 21-,n-1
Testing Hypothesis on the Variance
– Example
•
•
•
•
•
Claim: Variance  0.01
s2=0.0153, n=20, =.05
Null Hypothesis: H0: 2 = .01
Alt. Hypothesis: H1: 2 > .01
Test statistic:
 
2
0
(n  1)s 2

2
0
(20  1)0.0153

 29.07
0.01
• Rejection region: 2.05,19= 30.14
• p-value = P(2 >29.07)=0.0649
• Fail to reject H0
C
.95
.05
Rejection
Region
Non-rejection
Region
30.14
Testing Hypothesis on the
Population Proportion
• Null Hypothesis: H0: p = p0
• Test statistic: z  pˆ  p0
0
p0 (1  p0 )
n
Alt. Hypothesis
P-value
H1: p  p0
P(z>z0)+P(z<-z0)
H1: p > p0
P(z>z0)
H1: p < p0
P(z<-z0)
Rejection Criterion
z0 > z1-/2 or z0 < z/2
z0 > z1-
z0 < z
Testing Hypothesis on the
Population Proportion – Example 16.7
•
•
•
•
•
Claim: Market share = 31.2%
pˆ  .29
n=400, =.01
Null Hypothesis: H0: p = .312
Alt. Hypothesis: H1: p  .312
Test statistic:
z0 
pˆ  p0

p0 (1  p0 )
n
C2
C1
.005
.99
.005
=.312
.29  .312
Rejection
 .95 Rejection
Non-rejection
Region
Region
.312(1  .312)
Region
400
2.576
-2.576
• Rejection region: z/2= z.005=-2.576
z1-/2= z.995= 2.576
• P-value = P(z>.95)+P(z<-.95) = .3422
• Fail to reject H0
Testing Hypothesis on the
Population Proportion – Example 16.8
•
•
•
•
•
Claim: Defective rate  4%
pˆ  7 / 300  .07
n=300, =.05
Null Hypothesis: H0: p = .04
Alt. Hypothesis: H1: p > .04
Test statistic:
z0 
pˆ  p0

p0 (1  p0 )
n
.07  .04
 2.65
.04(1  .04)
300
• Rejection region: z1-= z.95= 1.645
• P-value = P(z>2.65) = .0040
• Reject H0
C
.95
.05
=.04
Rejection
Non-rejection
Region
Region
1.645
Similar