Post on 08-Apr-2018
8/7/2019 hypothesis testing slides
1/45
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Chapter 8
Tests ofHypotheses Based
on a SingleSample
8/7/2019 hypothesis testing slides
2/45
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
8.1
Hypothesesand Test
Procedures
8/7/2019 hypothesis testing slides
3/45
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Hypotheses
The null hypothesis, denotedH0, is the
claim that is initially assumed to be true.
The alternative hypothesis, denoted byHa, is the assertion that is contrary toH0.
Possible conclusions from hypothesis-
testing analysis are reject H0 orfail toreject H0.
8/7/2019 hypothesis testing slides
4/45
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Hypotheses
H0 may usually be considered the
skeptics hypothesis: Nothing new or
interesting happening here! (Andanything interesting observed is due to
chance alone.)
Ha may usually be considered the
researchers hypothesis.
8/7/2019 hypothesis testing slides
5/45
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Rules for Hypotheses
H0 is always stated as an equality claim
involving parameters.
Ha is an inequality claim that contradicts
H0. It may be one-sided (using either >
or
8/7/2019 hypothesis testing slides
6/45
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
A Test of Hypotheses
A test of hypotheses is a method forusing sample data to decide whether
the null hypothesis should be
rejected.
8/7/2019 hypothesis testing slides
7/45
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Test Procedure
A test procedure is specified by1. A test statistic, a function of the
sample data on which the decision is
to be based.
2. (Sometimes, not always!) A
rejection region, the set of all test
statistic values for whichH0 will be
rejected
8/7/2019 hypothesis testing slides
8/45
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Errors in Hypothesis Testing
A type I errorconsists of rejecting the
null hypothesisH0 when it was true.A type II errorconsists of not rejecting
H0 whenH0 is false.
andE F are the probabilities of typeI and type II error, respectively.
8/7/2019 hypothesis testing slides
9/45
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Level TestE
A test corresponding to the significance
level is called a level test. A test
with significance level is one forwhich the type I error probability is
controlled at the specified level.
E
E
Sometimes, the experimenter will fix
the value of , also known as the
significance level.
E
8/7/2019 hypothesis testing slides
10/45
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Rejection Region: andE F
Suppose an experiment and a sample
size are fixed, and a test statistic is
chosen. Decreasing the size of the
rejection region to obtain a smaller
value of results in a larger value of
for any particular parameter value
consistent withHa.
E F
8/7/2019 hypothesis testing slides
11/45
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
8.2
Tests Abouta
Population Mean
8/7/2019 hypothesis testing slides
12/45
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Case I: A Normal Population
With Known W
Null hypothesis: 0 0:H Q Q!
Test statistic value:0
/
x
zn
Q
W
8/7/2019 hypothesis testing slides
13/45
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Case I: A Normal Population
With Known W
a 0:H Q Q"
Alternative
HypothesisRejection Region
for Level Test
a 0:H Q Qa 0:H Q Q{
Ez zEu
z zEe
/ 2z zEu / 2z zEe or
8/7/2019 hypothesis testing slides
14/45
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Recommended Steps in
Hypothesis-Testing Analysis
1. Identify the parameter of interest and
describe it in the context of theproblem situation.
2. Determine the null value and state
the null hypothesis.
3. State the alternative hypothesis.
8/7/2019 hypothesis testing slides
15/45
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Hypothesis-Testing Analysis
4. Give the formula for the computed
value of the test statistic.
5. State the rejection region for theselected significance level
6. Compute any necessary sample
quantities, substitute into the formula
for the test statistic value, and
compute that value.
8/7/2019 hypothesis testing slides
16/45
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Hypothesis-Testing Analysis
7. Decide whetherH0 should be
rejected and state this conclusion in
the problem context.
The formulation of hypotheses (steps 2
and 3) should be done before examiningthe data.
8/7/2019 hypothesis testing slides
17/45
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Type II Probability for a Level
Test
E( )F Qd
Alt. Hypothesis
a 0
:H Q Q"
a 0:H Q Q
a 0:H Q Q{
Type IIProbability ( )F Qd
0
/z
nE
Q Q
W
d *
01/
z
nE
Q Qd *
0 0/ 2 / 2
/ /z z
n nE E
Q Q Q Qd d * *
8/7/2019 hypothesis testing slides
18/45
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Sample Size
The sample size n for which a level
test also has at the alternative
value is
( )F Q Fd!Qd
E
2
0
2
/ 2
0
( )
( )
z z
nz z
E F
E F
W
Q Q
W
Q Q
d
!
d
one-tailed test
two-tailed test
8/7/2019 hypothesis testing slides
19/45
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Case II: Large-Sample Tests
When the sample size is large, the z
tests for case I are modified to yieldvalid test procedures without
requiring either a normal population
distribution or a known .W
8/7/2019 hypothesis testing slides
20/45
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Large Sample Tests (n > 40)
For large n, s is close to .W
Test Statistic: 0/
XZ
S nQ!
The use of rejection regions for case I
results in a test procedure for which the
significance level is approximately .E
8/7/2019 hypothesis testing slides
21/45
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Case III: A Normal Population
Distribution
IfX1,,Xn is a random sample from a
normal distribution, the standardizedvariable
has a tdistribution with n 1
degrees of freedom.
/
XT
S
n
Q!
8/7/2019 hypothesis testing slides
22/45
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
The One-Sample tTest
Null hypothesis:0 0:H Q Q!
Test statistic value: 0
/
x
ts n
Q!
8/7/2019 hypothesis testing slides
23/45
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
a 0:H Q Q"
Alternative
Hypothesis
Rejection Region
for Level Test
a 0:H Q Qa 0:H Q Q{
E, 1nt tE u
, 1nt tE e
/ 2, 1nt tE or
The One-Sample tTest
/ 2, 1nt tE e
8/7/2019 hypothesis testing slides
24/45
8/7/2019 hypothesis testing slides
25/45
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
8.3
Tests Concerninga
Population Proportion
8/7/2019 hypothesis testing slides
26/45
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
A Population Proportion
Letp denote the proportion of
individuals or objects in a
population who possess a specified
property.
8/7/2019 hypothesis testing slides
27/45
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Large-Sample Tests
Large-sample tests concerningpare a special case of the more
general large-sample procedures
for a parameter.U
8/7/2019 hypothesis testing slides
28/45
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Large-Samples Concerningp
Null hypothesis:0 0:H p p!
Test statistic value:
0
0 0
1 /
p pz
p p n
!
8/7/2019 hypothesis testing slides
29/45
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
a 0
:H p p"
AlternativeHypothesis
Rejection Region
a 0:H p p
a 0:H p p{
z z
E
u
z zEe
/ 2z zEu / 2z zEe or
Large-Samples Concerningp
Valid provided
0 010 and (1 ) 10.np n pu u
8/7/2019 hypothesis testing slides
30/45
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
( )pF d
Alt. Hypothesis
a 0:H p p"
a 0:H p p
( )pF d
0 0 0(1 ) /
(1 ) /
p p z p p n
p p n
E d
* d d
General Expressions for
0 0 0(1 ) /1
(1 ) /
p p z p p n
p p n
E d
* d d
8/7/2019 hypothesis testing slides
31/45
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
( )pF d
Alt. Hypothesis
a 0:H p p{
( )pF d
General Expressions for
0 0 0(1 ) /
(1 ) /
p p z p p n
p p n
E d * d d
0 0 0(1 ) /
(1 ) /
p p z p p n
p p n
E d * d d
8/7/2019 hypothesis testing slides
32/45
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Sample Size
The sample size n for which a level
test also has ( )p pF d!E
20 0
0
2
/ 2 0 0
0
(1 ) (1 )
(1 ) (1 )
z p p z p p
p pn
z p p z p pp p
E F
E F
d d d
!
d d d
two-tailedtest
one-tailedtest
8/7/2019 hypothesis testing slides
33/45
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Small-Sample Tests
Test procedures when the sample size
n is small are based directly on the
binomial distribution rather than thenormal approximation.
0(type I) 1 ( 1; , )P B c n p! ( ) ( 1; , )B p B c n pd d!
8/7/2019 hypothesis testing slides
34/45
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
8.4
P- Values
8/7/2019 hypothesis testing slides
35/45
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
P- Value
TheP-value is the smallest level of
significance at whichH0 would be
rejected when a specified test procedure
is used on a given data set.
0
1. -value
reject at a level of
P
H
E
E
e
0
2. -value
do not reject at a level of
P
H
E
E
"
8/7/2019 hypothesis testing slides
36/45
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
P- Value
TheP-value is the probability,
calculated assumingH0 is true, of
obtaining a test statistic value at least ascontradictory toH0 as the value that
actually resulted. The smaller theP-
value, the more contradictory is the datatoH0.
8/7/2019 hypothesis testing slides
37/45
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
P-Values for a z Test
P-value:
1 ( )
( )
2 1 ( )
z
P z
z
*
! *
*
upper-tailed test
lower-tailed test
two-tailed test
8/7/2019 hypothesis testing slides
38/45
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
P-Value (area)
z
-z
-value 1 ( )P z! *
-value ( )P z! *
-value 2[1 (| |)]P z! *
0
0
0
-z
z
Upper-Tailed
Lower-Tailed
Two-Tailed
8/7/2019 hypothesis testing slides
39/45
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
PValues fortTests
TheP-value for a ttest will be a tcurve area. The number of df for the
one-sample ttest is n 1.
8/7/2019 hypothesis testing slides
40/45
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
8.5
Some Comments onSelecting a
Test Procedure
8/7/2019 hypothesis testing slides
41/45
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Constructing a Test Procedure
1. Specify a test statistic.
2. Decide on the general form of the
rejection region.
3. Select the specific numerical critical
value or values that will separate the
rejection region from the acceptance
region.
8/7/2019 hypothesis testing slides
42/45
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Issues to be Considered
1. What are the practical implications
and consequences of choosing a
particular level of significance once
the other aspects of a test procedure
have been determined?
2. Does there exist a general principlethat can be used to obtain best or good
test procedures?
8/7/2019 hypothesis testing slides
43/45
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Issues to be Considered
3. When there exist two or more tests thatare appropriate in a given situation, how
can the tests be compared to decide
which should be used?
4. If a test is derived under specific
assumptions about the distribution of
the population being sampled, how well
will the test procedure work when the
assumptions are violated?
8/7/2019 hypothesis testing slides
44/45
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
StatisticalVersus Practical
Significance
Be careful in interpreting evidence when
the sample size is large, since any smalldeparture fromH0 will almost surely be
detected by a test (statistical significance),
yet such a departure may have little
practical significance.
8/7/2019 hypothesis testing slides
45/45
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
The Likelihood Ratio Principle
1. Find the largest value of the likelihoodfor any
2. Find the largest value of the likelihoodfor any
3. Form the ratio
0in .U ;
ain .U ;
01a
maximum likelihood for in,...,maximum likelihood for in
nx xUPU
;!;
RejectH0 when this ratio is small.