Tests of Hypotheses
Based on a Single
Sample
8.1
Hypotheses and Test
Procedures
3
Hypotheses and Test Procedures
A (statistical) hypothesis is a claim or assertion such as,
= 5.9 ft, where = true mean height of all USF students
p < 0.10, where p = proportion of USF students 6.3 ft or taller
1
2
= 0.25 ft, where
1
,
2
= true mean height of male,
female USF students
USF student height has a normal distribution
4
Hypotheses and Test Procedures
For each hypothesis testing, there are 2 contradictory
hypotheses:
= 5.9 ft vs 5.9 ft
p < 0.10 vs p 0.10
1
2
= 0.25 ft vs
1
2
0.25 ft
USF student height has a normal distribution vs
student height does not have a normal distribution
One & only one of the 2 contradictory hypotheses is true!
5
Hypotheses and Test Procedures
Objective: To decide, based on sample information,
which of the two hypotheses is correct.
Null hypothesis H
0
: The claim initially assumed to be true.
Alternative hypothesis H
a
: The hypothesis contradictory to H
0
.
Conclusion from hypothesis testing: Reject H
0
, or
Fail to reject H
0
.
Reject H
0
(in favor of H
a
) only if sample evidence contradicts
H
0
and provides strong support for H
a
.
6
Hypotheses and Test Procedures
A Convention: Null hypothesis H
0
always stated as =.
Then there are 3 possible alternatives:
1. H
a
: u > u
0
(the implicit null hypothesis is u s u
0
),
2. H
a
: u < u
0
(the implicit null hypothesis is u > u
0
), or
3. H
a
: u u
0
7
Test Procedures
Consider the circuit board problem.
Test H
0
: p = 0.10 vs H
a
: p < 0.10 lowertailed
Each board is either defective or nondefective.
Examine a random sample of n = 200 boards.
Let X = # of defective boards in the sample.
X is a binomial random variable.
Let x represent the observed value of X.
8
Test Procedures
If H
0
is true, E(X) = np = 200(0.10) = 20
we can expect < 20 defective boards if H
a
is true.
If Then
x = 25 Cannot reject H
0
x = 24 Cannot reject H
0
x = 16 ?
x = 15 ? Rejection value
x = 14 ?
x = 12 Reject H
0
x = 11 Reject H
0
9
Test Procedures
Another example
Consider burning rate of a solid propellant used to power
aircrew escape systems.
X = burning rate (cm/s), E(X) = .
Test H
0
: = 50 vs H
a
: 50 twotailed
Randomly sample to get n burning rates of solid propellant.
If H
0
is true,
we can expect significantly deviates from 50 if H
a
is
true.
. 50 ) ( = = X E
X
10
Test Procedures
If Then
61 Reject H
0
60 Reject H
0
: ? Rejection value = ? 55?
: ?
51 Do not reject H
0
50 Do not reject H
0
49 Do not reject H
0
: ?
: ? Rejection value = ? 45?
x = 40 Reject H
0
x = 39 Reject H
0
= x
11
Test Procedures
Need two things to test a hypothesis:
(1) a test statistic (function of the sample data)
(2) a rejection value
Compare test statistic to rejection value to conclude:
either reject H
0
or fail to reject H
0
12
Test Procedures
In the circuit board example,
x is the test statistic
15 is the rejection value
If x 15, reject H
0
If x > 15, cannot reject H
0
x 15 (or x < 16) is called the rejection region.
13
Test Procedures
In the propellant burning rate example,
is the test statistic
45 and 55 are the rejection values
If 45, or 55 reject H
0
If 45 < < 55 , do not reject H
0
45 and 55 are called the rejection regions.
x
x x
x
x x
14
Errors in Hypothesis Testing
If the null hypothesis H
0
: p = 0.10 is true, then it should
not be rejected.
That is, not to reject H
0
is the correct decision!
But H
0
does get rejected when x s 15, which is an error!
It is called the type I error: wrongly reject a true H
0
.
In the circuit board problem, even when H
0
: p = 0.1 is true,
an unusual sample with x = 13 would lead to H
0
being
errornously rejected.
15
Errors in Hypothesis Testing
On the other hand, if the null hypothesis H
0
: p = 0.10 is
false, then it should be rejected.
That is, to reject H
0
is the correct decision!
But we cannot reject H
0
when x > 15, which is also an error!
It is called the type II error: fail to reject a false H
0
.
In the circuit board example, even when H
a
: p < 0.1 is true,
an unusual sample with x = 20 would lead to H
0
not being
rejected which is an incorrect conclusion.
16
Errors in Hypothesis Testing
Summary
When H
0
is true, we should not reject H
0
. But if H
0
does get
rejected, a type I error has been made.
When H
0
is false, we should reject H
0
. But if we fail to reject
H
0
, we are making a type II error.
= P(type I error) = P(reject H
0
when H
0
is true)
= P(type II error) = P(not reject H
0
when H
0
is false)
17
Example 8.1
Some car can sustain no visible damage 25% of the time in
10mph crash tests. A modified bumper design has been
proposed in an effort to increase this percentage.
Let p = proportion of all 10mph crashes with this new
bumper that result in no visible damage.
Test hypotheses
H
0
: p = 0.25 vs H
a
: p > 0.25 (improvement)
Sample n = 20 independent crashes with prototypes of the
new design.
18
Example 8.1
H
0
should be rejected if a large # of the crashes show no
damage. Consider the following test procedure:
Test statistic: X = the number of crashes with no visible
damage
Rejection region: R
8
= {8, 9, 10,,19, 20}.
Reject H
0
if x > 8, and
cannot reject H
0
if x < 8.
contd
19
Example 8.1
When H
0
is true, X has a binomial probability distribution
with n = 20 and p = 0.25.
o = P(type I error)
= P(H
0
is rejected when it is true)
= P(X > 8 when X ~ Bin(20, 0.25))
= 1 B(7; 20, 0.25)
= 1 0.898
= 0.102
Even when H
0
is actually true, about 10% of all
experiments of 20 crashes result in H
0
being incorrectly
rejected (a type I error).
contd
20
Example 8.1
If H
0
is false (p 0.25), a type II error is made when x < 8.
But the value of depends on what is the actual value of p.
Example Consider p = 0.3
(p=0.3) = P(type II error when p = 0.3)
= P(fail to reject H
0
when p = 0.3)
= P(X s 7 when X ~ Bin(20, 0.3))
= B(7; 20, 0.3)
= 0.772
When p = 0.3 (not 0.25), about 77% of all experiments
of 20 crashes result in H
0
being incorrectly not rejected!
contd
21
Example 8.1
Table below presents  values for various true p values.
 decreases as the true p value moves farther away from
the null value 0.25.
This agrees with the intuition that the greater the departure
from H
0
, the less likely it is that such a departure will not be
detected.
contd
22
Errors in Hypothesis Testing
The type I error probability o is often referred to as the
significance level of the test.
Typical levels of significance are 0.10, 0.05, and 0.01.
The corresponding test procedure is called a level o test
(e.g., a level 0.05 test or a level 0.01 test).
23
Exercise Problem 12
True mean braking distance at 40 mph is 120 ft for the
current braking system.
A new design for the brake system was proposed.
New design be implemented only if sample data strongly
indicates a reduction in for the new design.
a. Define the parameter of interest and state test hypothesis.
Solution
= true mean braking distance at 40 mph for new design.
Test hypotheses H
0
: = 120 vs H
a
: < 120
24
Exercise Problem 12
b. Suppose braking distance for new system is normally
distributed with = 10. For a random sample of size n = 36,
which rejection region is appropriate?
R1 = R2 =
R3 =
Solution
when H
0
is true, when H
a
is true.
R2 should be used, as support for H
a
is provided only by
an value substantially below 120.
} 8 . 124 : { > x x } 2 . 115 : { s x x
} 13 . 125 87 . 114 : { > s x or x either x
x
120 ) ( = X E 120 ) ( < X E
25
Exercise Problem 12
c. What is significant level for the rejection region of part
(b): ? How would you change the region to
obtain a test with = 0.01.
Solution
=
= 0.002
To obtain = 0.001, replace 115.2 by
120 3.08(1.6667) = 114.87, so that
} 2 . 115 : { s x x
6667 . 1
36
10
= = =
n
X
o
o
)
6667 . 1
120 2 . 115
( ) 120 2 . 115 (
s = = s Z P when X P
001 . 0 )
6667 . 1
120 87 . 114
( ) 120 87 . 114 ( =
s = = s Z P when X P
26
Exercise Problem 12
d. What is the probability that the new design is not
implemented when its true mean braking distance is actually
115 ft for rejection region ?
Solution
= 1 (0.12) = 0.4522
)
6667 . 1
115 2 . 115
( ) 115 2 . 115 ( ) 115 (
> = = > = Z P when X P 
} 2 . 115 : { s x x
27
Exercise Problem 12
c. Let .
What is for rejection region {z: z 2.33}?
What is for rejection region {z: z 2.88}?
Solution
Since Z is the standardization of when = 120,
for {z: z 2.33}, = P(Z 2.33) = 0.01, and
for {z: z 2.88}, = P(Z 2.88) = 0.002, equivalent to R2.
n
X
Z
/
120
o
=
X
28
Section Summary
Concepts Discussed
Statistics Hypothesis
Null Hypothesis H
0
Alternative Hypothesis H
a
Hypothesis Test
Test Statistic & Rejection Criteria
Type I Error
Type II Error
Significance Level of a Test
29
8.2
Tests About a Population
Mean
30
Tests About a Population Mean
We discussed CIs for for three different cases:
 A normal population with known
 Largesample CI
 A normal population with unknown
This section presents hypothesis tests for these 3 cases.
 Hypothesis Tests for a normal population with known
 Largesample Statistical hypothesis tests
 Hypothesis tests for a normal population with unknown
31
Case I: A Normal Population with Known o
Let X
1
,, X
n
be a random sample of size n from N(,
2
).
Then the sample mean
Null Hypothesis H
0
: =
0
.
When H
0
is true,
From sample data, compute
) , ( ~
2
n
N X
o
). 1 , 0 ( ~
/
0
N
n
X
Z
o
=
.
/
0
n
x
z
o
=
32
Case I: A Normal Population with Known o
3 possible alternative hypotheses: H
a
: >
0
H
a
: <
0
H
a
:
0
a. Uppertailed Test H
0
: =
0
vs H
a
: >
0
b. Lowertailed Test H
0
: =
0
vs H
a
: <
0
c. Twotailed Test H
0
: =
0
vs H
a
:
0
33
Case I: A Normal Population with Known o
The rejection regions are illustrated below.
34
Case I: A Normal Population with Known o
Null hypothesis: H
0
: =
0
Test statistic value :
Alternative Hypothesis Rejection Criteria for Level o Test
35
Case I: A Normal Population with Known o
To test a hypothesis, do the following:
1. State the null and alternative hypotheses.
2. Compute the z value.
3. Find the z
(or z
/2
) value.
4. Conclude by comparing z and z
(or z
/2
).
36
Example 8.6
A manufacturer of sprinkler systems used for fire protection
in office buildings claims that the true average
systemactivation temperature is 130.
A sample of n = 9 systems yields a sample average
activation temperature of 131.08F.
If the distribution of activation times is normal with =
1.5F, does the data contradict the manufacturers claim at
significance level o = 0.01?
37
Example 8.6
1. H
0
: = 130 vs H
a
: 130
2. Compute
3. = 0.01, z
/2
= z
0.005
= 2.58.
4. Cannot reject H
0
, as 2.58 < z < 2.58.
The data does not give strong support to the claim that
the true average differs from the design value of 130.
contd
. 16 . 2
9 / 5 . 1
130 08 . 131
/
0
=
=
n
x
z
o
38
Case I: A Normal Population with Known o
Compute 
Consider the uppertailed test with rejection region z > z
o
.
z > z
o
is equivalent to
H
0
will not be rejected if
39
Case I: A Normal Population with Known o
Type II error: H
0
( =
0
) is false, but H
0
is not rejected!
H
0
is false >
0
.
Suppose = (>
0
). Then depends on .
decreases, as increases!
40
Case I: A Normal Population with Known o
Type II Error Probability for
Alternative Hypothesis a Level Test .
Note: H
0
is false, and = .
41
Case I: A Normal Population with Known o
Determine a proper sample size n
The sample size n for which a level o test also has
( ') =  at the alternative value ' is
for a onetailed
(upper or lower) test
for a twotailed test
(an approximate solution)
42
Example 8.7
Let = true average tread life of some type of tire.
Test H
0
: = 30,000 vs H
a
: > 30,000
based on a sample of size n = 16 from N(, 1500
2
).
Consider o = 0.01. Then z
o
= z
0.01
= 2.33.
Here
0
= 30,000.
If = = 31,000. Then
3669 . 0 ) 34 . 0 ( )
16 / 1500
31000 30000
33 . 2 ( = u =
+ u = 
43
Example 8.7
If we want to be no more than 0.1, what should n be?
For = 0.1, z
= z
0.1
= 1.28. Then
= 29.32
The sample size of n = 30 tires should be used.
contd
44
Case II: LargeSample Tests
A large n implies that the standardized variable
has approximately a standard normal distribution,
regardless what distribution the sample is taking from.
When H
0
is true, ~ N(1, 0).
The rule of thumb n > 40 will again be used to characterize
a large sample size.
45
Case II: LargeSample Tests
a. Uppertailed Test H
0
: =
0
vs H
a
: >
0
b. Lowertailed Test H
0
: =
0
vs H
a
: <
0
c. Twotailed Test H
0
: =
0
vs H
a
:
0
46
Null hypothesis: H
0
: =
0
Test statistic value :
Alternative Hypothesis Rejection Criteria for Level o Test
Case II: LargeSample Tests
n s
x
z
/
0
=
47
Example 8.8
A dynamic cone penetrometer (DCP) is used for measuring
material resistance to penetration (mm/blow) as a cone is
driven into pavement or subgrade.
Suppose the true average DCP value () for a certain type
of pavement ir required to be less than 30.
The pavement will not be used unless there is conclusive
evidence that the specification has been met.
48
Example 8.8
52 data points are obtained and presented below.
The sample mean DCP < 30.
But there is a substantial amount of variation in the data
(sample coefficient of variation = = 0.4265).
contd
49
Example 8.8
1. Test H
0
: = 30 vs Ha: < 30 with = 0.05
Do not use the pavement unless H
0
is rejected.
2. Compute z. n = 52, = 28.76, and s = 12.2647
3. z
= z
0.05
= 1.645.
4. Cannot reject H
0
, as z < 1.645.
The use of the pavement is not justified!
contd
50
Case II: LargeSample Tests
Determination of  and the necessary sample size for
these largesample tests can be based either on specifying
a plausible value of o and using the case I formulas
(even though s is used in the test) or on using the
methodology to be introduced shortly in connection with
case III.
51
Compute
Type II Error Probability for
Alternative Hypothesis a Level Test .
Note: H
0
is false, and = .
Case II: LargeSample Tests

.

\

+ u
n s
z
/
'
0
o

.

\

+ u
n s
z
/
'
1
0
o

.

\

+ u 
.

\

+ u
n s
z
n s
z
/
'
/
'
0
2 /
0
2 /
o o
52
Case III: A Normal Population Distribution
Let X
1
, X
2
,, X
n
be sampled from a normal distribution.
If n is small & is unknown, the standardized variable
has a t distribution with n 1 degrees of freedom (df).
53
Case III: OneSample t Test
Null hypothesis: H
0
: =
0
Test statistic:
Alternative Hypothesis Rejection Criteria for a Level o Test
54
To test a hypothesis, do the following:
1. State the null and alternative hypotheses.
2. Compute the t value.
3. Find the t
, n1
(or t
/2, n1
) value.
4. Conclude by comparing t and t
, n1
(or z
/2, n1
).
Case III: OneSample t Test
55
Example 8.9
Glycerol is a major byproduct of ethanol fermentation in
wine production and contributes to the sweetness, body,
and fullness of wines.
A sample of n = 5 glycerol concentrations (mg/mL) for
standardquality (uncertified) white wines are obtained:
2.67, 4.62, 4.14, 3.81, 3.83.
Suppose the desired concentration value is 4.
Does the sample data suggest that true average
concentration is something other than the desired value
with 95% confidence?
56
Example 8.9
The following normal probability plot from Minitab strongly
support the assumption that the population distribution of
glycerol concentration is normal.
contd
57
Example 8.9
1. Test hypothesis H
0
: = 4 vs H
a
: 4
2. Compute t
Sample mean = 3.814 and s = 0.718
t = (3.814 4)/(0.718/5) = 0.58
3. For n = 5 and = 0.05, t
/2, n1
= t
0.025, 4
= 2.766
4. H
0
cannot be rejected since, 2.776 < t < 2.776.
contd
58
Case III: A Normal Population Distribution
Determine  & a Proper Sample Size n
When H
0
( =
0
) is false & = , the computation of type II
error is challenging, and must be done numerically.
The results are summarized in Appendix Table A.17.
The curves in Table A.17 are called Operating Characteristic
(OC) curves.
59
Case III: A Normal Population Distribution
Use the OC curves to find .
1. Compute d = 
0
'/o (or 
0
'/s) .
2. Find the degree of freedom df = n1.
3. Determine the proper graph to use, based on
 onetailed or twotailed alternative hypothesis
 the value of
4. The intersection of d and the OC curve of df = n1
determines the value.
60
Case III: A Normal Population Distribution
This procedure is illustrated below.
61
Case III: A Normal Population Distribution
Use the OC curves to fetermine a proper n.
1. Compute d = 
0
'/o (or 
0
'/s).
2. Determine the proper graph to use, based on
 onetailed or twotailed alternative hypothesis
 the value of
3. Identify the OC curve that passes through the
point (d, ).
4. n = df + 1, where df is associated with the OC curve
identified in (3).
62
Example 8.10
The true average voltage drop from collector to emitter of
insulated gate bipolar transistors of a certain type is
supposed to be at most 2.5 volts.
Test H
0
: = 2.5 vs H
a
: > 2.5
based on a sample of n = 10, and o = 0.05.
If o = 0.1, how likely is it that H
0
will not be rejected when in
fact = 2.6?
What is , if = 2.6?
63
Example 10
1. Compute d = 2.5 2.6/0.1 = 1.0
2. df = 10 1 = 9.
3. Use the topleft graph: o = 0.05, onetailed.
3. The intersection leads to  ~ 0.13.
What should be n, if one wants  = 0.05?
Locate point (d, ) = (1.0, 0.05).
Identify the OC curve passing (1, 0.05): 13 df curve.
Use n = 13: it will give both o = 0.05 and  = 0.05 when
the true value of is 2.6 and o = 0.10.
contd
64
Case III: A Normal Population Distribution
The power of a test: Power = 1 .
A powerful test is one that has high power and therefore
good ability to detect when the null hypothesis is false.
65
Exercise Problem 18
In Example 8.2, drying time is normally distributed with =9.
Test hypothesis H
0
: = 75 vs H
a
: < 75 n = 25
a. How many sds of below hull hypothesis is = 72.3?
b. If = 72.3, what is the test conclusion using = 0.01?
c. What is for test procedure what reject H
0
when z 2.88?
d. For the test procedure of part (c), what is (70)?
e. For test procedure of part (c), what n ensures (70) = 0.1?
f. For a level 0.01 test with n = 100, what is the probability of
a type I error when = 76?
x
x
X
66
Exercise Problem 18
a.
(72.3 75)/1.8 = 1.5, so 72.3 is 1.5 sds below 75.
b. For = 0.01, z
= 2.33. Reject H
0
if z 2.33.
z = 1.5 > 2.33, do not reject H
0
.
c. = P(Z 2.88) = 0.002.
d. (70) = 1 [2.88+(75 70)/1.8] = 1 0.4602 = 0.5398.
e. n = [9(2.88+2.33)/(7570)]
2
= 87.95. Use n = 88.
f. = 0, as a type I error occurs only when H
0
is ture!
But = 76 means H
0
is actually false!
8 . 1 25 / 9 / = = = n
X
o o
67
Exercise Problem 29
12 data points on time (min) to repair a rail break yield a
sample mean of 249.7 and a sample sd of 145.1
A normal probability plot indicates normal assumption OK.
a. Is there compelling evidence for concluding that true mean
repair time exceeds 200 min? Carry out a test of hypotheses
using = 0.05.
b. Using = 150, (300) = ?
68
Exercise Problem 29
a. 1. Test hypothesis H
0
: = 200 vs H
a
: > 200 n=12
2. Compute t = (249.7 200)/(145.1/12) = 1.19
3. = 0.05, t
0.05, 11
= 1.796.
4. t < 1.796 Cannot reject H
0
.
There is insufficient evidence to conclude that true mean
repair time exceeds 200 min
c. For = 150, d =
0
/ = 200300/150 = 2/3, df = 11.
Using OC curves in the topleft graph in Table A.17,
(300) = 0.3
69
Section Summary
Concepts Discussed
3 statistical hypothesis testing
a. Uppertailed Test H
0
: =
0
vs H
a
: >
0
b. Lowertailed Test H
0
: =
0
vs H
a
: <
0
c. Twotailed Test H
0
: =
0
vs H
a
:
0
for the following 3 cases:
 A normal population with known
 Largesample CI
 A normal population with unknown
Compute type II error
Determine a proper sample size n
OC curves
70
8.3
Tests Concerning a
Population Proportion
71
Tests Concerning a Population Proportion
p = proportion of individuals in a population who possess a
specified property, labeled S (success).
3 statistical hypothesis testing:
a. Uppertailed Test H
0
: p = p
0
vs H
a
: p > p
0
b. Lowertailed Test H
0
: p = p
0
vs H
a
: p < p
0
c. Twotailed Test H
0
: p = p
0
vs H
a
: p p
0
based on a sample of size n, and X = # of Ss in the sample.
72
Tests Concerning a Population Proportion
There are 2 cases:
1. If n is large (i.e., np > 10 and n(1 p) > 10), then X is
approximately a normal rv.
2. If n is small, then X is (approximately) a binomial rv.
73
LargeSample Tests
Null hypothesis: H
0
: p = p
0
Test statistic: , with
Alternative Hypothesis Rejection Criteria
H
a
: p > p
0
z > z
o
(uppertailed)
H
a
: p < p
0
z s z
o
(lowertailed)
H
a
: p p
0
either z > z
o/2
or z s z
o/2
(twotailed)
These test procedures are valid provided that
np
0
> 10 and n(1 p
0
) > 10.
n p p
p p
z
/ ) 1 (
0 0
0
= n x p /
=
74
Example 8.11
Natural cork in wine bottles is subject to deterioration, and
as a result wine in such bottles may experience
contamination.
In a tasting of commercial chardonnays, 16 of 91 bottles
were considered spoiled to some extent by corkassociated
characteristics. (n = 91, x = 16)
Does this data provide strong evidence for concluding that
more than 15% of all such bottles are contaminated in this
way with 90% confidence?
75
Example 8.11
1. Hypotheses: H
0
: p = 0.15 vs H
a
: p > 0.15.
2. np
0
= 91(0.15) = 13.65 > 10, n(1p
0
) = 77.35 > 10
Largesample z test can be used.
Compute z = (16/91 0.15)/[0.15(0.85)/91] = 0.69.
3. = 0.10. z
= z
0.10
= 1.28.
4. H
0
can not be rejected as z < 1.28.
The sample does not support the conclusion that the
percentage of contaminated bottles in the population
percentage exceeds 15%.
contd
76
LargeSample Tests
 and Sample Size Determination When H
0
is true, the
test statistic Z has approximately a standard normal
distribution.
Now suppose that H
0
is not true and that p = p'. Then Z still
has approximately a normal distribution (because it is a
linear function of ), but its mean value and variance are no
longer 0 and 1, respectively. Instead,
The probability of a type II error for an uppertailed test is
(p') = P(Z > z
o
when p = p').
77
LargeSample Tests
This can be computed by using the given mean and
variance to standardize and then referring to the standard
normal cdf.
In addition, if it is desired that the level o test also have
(p') =  for a specified value of , this equation can be
solved for the necessary n.
78
LargeSample Tests
Compute (p'), if p = p.
Alternative Hypothesis (p')
H
a
: p > p
0
H
a
: p < p
0
H
a
: p p
0
79
LargeSample Tests
Compute the proper sample size n for which the level o test
also satisfies (p') = 
80
Example 8.12
A packagedelivery service advertises that at least 90% of
all packages brought to its office by 9 A.M. for delivery in the
same city are delivered by noon that day.
Statistical hypotheses: H
0
: p = 0.9 vs H
a
: p < 0.9
(1) If only 80% of the packages are delivered as advertised,
how likely is it that a level 0.01 test based on n = 225
packages will detect such a departure from H
0
?
(2) What should the sample size be to ensure that (0.8) =
0.01?
81
Example 8.12
(1) With o = 0.01, p
0
= 0.9, p' = 0.8, and n = 225,
P(H
0
will be rejected, when p = 0.8) = 0.9772
About 98% of all samples lead to correct rejection of H
0
.
contd
82
Example 8.12
(2) = = 0.01. So z
o
= z

= 2.33.
contd
83
SmallSample Tests
We now discuss case 2: Sample size n is small.
X (= # of successes in the sample) is a binomial rv with p.
Test procedures are based on binomial distribution!
Consider H
0
: p = p
0
vs H
a
: p > p
0
Test statistic: X
Find the smallest x
1; n, p
0
) .
Reject H
0
if x x
.
Remark As X is discrete, in general 1B(x
1; n, p
0
) < .
84
Rejection Criteria for SmallSample Tests
Null hypothesis: H
0
: p = p
0
Test statistic: x
Alternative Hypothesis Rejection Criteria
H
a
: p > p
0
x > x
o
(uppertailed)
H
a
: p < p
0
x s x
o
(lowertailed)
H
a
: p p
0
x > x
o/2
or x s x
o/2
(twotailed)
where x
t
is the smallest c such that 1B(c1; n, p
0
) t, &
x
t
is the largest c such that B(c; n, p
0
) t,
t = or /2.
85
SmallSample Tests
Compute if H
0
(p =p
0
) is false, and p = p'
Consider H
0
: p = p
0
vs H
a
: p > p
0
(p') = P(type II error when p = p')
= P(X < x
o
when X ~ Bin(n, p'))
= B(x
o
1; n, p')
86
SmallSample Tests
Compute (p'), if p =p.
Alternative Hypothesis (p')
H
a
: p > p
0
B(x
o
1; n, p')
H
a
: p < p
0
1 B(x
o
; n, p')
H
a
: p p
0
B(x
o/2
1; n, p') B(x
o/2
; n, p')
87
Example 8.13
A plastics manufacturer has developed a new type of
plastic trash can and proposes to sell them with an
unconditional 6year warranty.
To see whether this is economically feasible, 20 prototype
cans are subjected to an accelerated life test to simulate 6
years of use.
The proposed warranty will be modified only if the sample
data strongly suggests that fewer than 90% of such cans
would survive the 6year period.
88
Example 8.13
Let p = proportion of cans that survive the accelerated test.
Test hypotheses H
0
: p = 0.9 vs H
a
: p < 0.9 for o=0.05
The smallest c satisfying B(c; 20, 0.9) s 0.05 is c = 15.
x
o
= x
0.05
= 15.
Reject H
0
if x s 15.
Remark P(type I error) = B(15; 20, 0.9) = 0.043 < .
contd
89
Example 8.13
Test conclusion
If the accelerated test results in x 14, H
0
would be
rejected in favor of H
a
, necessitating a modification of the
proposed warranty.
On the other hand, if the accelerated test results in x 15,
then H
0
cannot be rejected, and no modification necessary.
contd
90
Example 8.13
Find if p = p' = 0.8 (p 0.9)
(0.8) = 1 B(x
o
; n, p')
= 1 (15; 20, 0.8)
= 1 0.370
= 0.630
When p = 0.8, 63% of all samples consisting of n = 20
cans would result in H
0
being incorrectly not rejected.
This error probability is high because 20 is a small sample
size and p' = 0.8 is close to the null value p
0
= 0.9.
contd
91
Exercise Problem 38
A battery maker randomly tested 100 nickel plates and
found 14 have blistered.
a. Does this provide compelling evidence for concluding
that more than 10% plates blister? State and test
appropriate hypotheses using = 0.05. In reaching your
conclusion, what type of error might you have committed?
b. For the test in part (a), (0.15) = ?
If n = 200, (0.15) = ?
c. What n value ensures (0.15) = 0.1 for test in part (a)?
92
Exercise Problem 38
a. 1. Hypotheses H
0
: p = 0.1 vs H
a
: p > 0.1 n = 100
np
0
= 10, and n(1p
0
) = 90 Large sample size
2. Compute z = (14/100 0.15)/[0.1(10.1)/100] = 1.33
3. z
= z
0.05
= 1.645
4. Do not reject H
0
as z < 1.645.
Data does not provide compelling evidence do conclude
that more than 10% plates blister.
contd
93
Exercise Problem 38
b. (0.15)
= [(0.10.15+1.645(0.10.9/100))/(0.150.85/100)]
= (0.02) = 0.4920
For n = 200, (0.15)
= [(0.10.15+1.645(0.10.9/200))/(0.150.85/200)]
= (0.60) = 0.2743
c. z
= 1.645, and z
=1.28
Use n = 362.
contd
4 . 361 01 . 19
1 . 0 15 . 0
85 . 0 15 . 0 28 . 1 9 . 0 1 . 0 645 . 1
2
2
= =


.

\

+
= n
94
Exercise Problem 45
A firm developed a new faucet.
p = (a faucet develops a leak within 2 years in normal use)
New faucets be made unless p is too large, with p = 0.1 as
borderline.
Test n new faucets, X = # of faucets that leak.
Management Decision:
If p = 0.1, P(not making new faucets) 0.1
If p = 0.3, P(making new faucets) 0.1
a. Can n = 10 be used?
b. Can n = 20 be used?
c. Can n = 30 be used?
contd
95
Exercise Problem 45
Hypotheses H
0
: p = 0.1 vs H
a
: p > 0.1
n = 10, 20, or 25 np
0
< 10 Small sample size
Use binomial distribution!
Rejection region has the form R = {c, c+1, , n}.
a. For n = 10, c = 3.Then
= 1 B(2; 10, 0.1) = 0.07 < 0.1 OK
(0.3) = B(2; 10, 0.3) = 0.383 > 0.1 Not OK
n = 10 is too small.
b. Can n = 20 be used?
c. Can n = 30 be used?
96
Exercise Problem 45
b. For n = 20, c = 5.Then
= 1 B(4; 20, 0.1) = 0.043 < 0.1 OK
(0.3) = B(4; 20, 0.3) = 0.238 > 0.1 Not OK
n = 20 is also too small.
c. For n = 25, c = 5.Then
= 1 B(4; 25, 0.1) = 0.098 < 0.1 OK
(0.3) = B(4; 25, 0.3) = 0.098 < 0.1 OK
n = 25 can be used.
contd
97
Section Summary
Concepts Discussed
Largesample z test for a population proportion
 Rejection Criteria
 Computation of type II error
 Determination of a proper sample size n
Smallsample test for a population proportion
 Rejection Criteria
 Computation of type II error
98
8.4
PValues
99
PValues
For all the hypothesis testing, the rejection criteria are
functions of the significance level o.
Can a conclusion of a hypothesis testing be made
without being selected first?
Yes! It is done based on calculation of a Pvalue.
100
PValues
Decision rule based on the Pvalue
For any significance level o,
(i) reject H
0
if Pvalue s o, or
(ii) do not reject H
0
if Pvalue > o.
If the Pvalue exceeds the chosen significance level ,
the null hypothesis H
0
cannot be rejected at level .
But if the Pvalue o, then there is enough evidence
to justify rejecting H
0
.
101
PValues
Proposition
The Pvalue is the smallest significance level o at which the
null hypothesis can be rejected.
How to compute the Pvalues?
102
PValues for z Tests
For a z test, the Pvalues are computed as follows.
103
Example 8.17
The target thickness for silicon wafers used in a certain
type of integrated circuit is 245 m.
A sample of 50 wafers is obtained and the thickness of
each one is determined, resulting in a sample mean
thickness of 246.18 m and a sample sd of 3.60 m.
Does this data suggest that true average wafer thickness is
something other than the target value?
104
Example 8.17
1. Test hypotheses H
0
: = 245 vs H
a
: 245
2. Calculate test statistic
z = (246.18 245)/(3.6/50) = 2.32
3. Determine Pvalue
Pvalue = 2[1 u(2.32)] = 0.0204
4. Conclusion
Using a significance level of 0.01, cannot reject H
0
,
since 0.0204 > 0.01.
At this significance level, there is insufficient evidence to
conclude that true mean thickness differs from target value.
contd
105
PValues for t Tests
Recall Case III in Section 8.2, test statistic
Pvalues are computed as follows.
for an uppertailed t test
for a lowertailed t test
for a twotailed t test
Use Appendix Table A.8 to find Pvalue for a t test.
n s
x
t
/
0
=
= >
= >
= >
=
) 1 ( 2
) 1 ( 1
) 1 (
n df t T P
n df t T P
n df t T P
value P
106
Example 8.18 (Example 8.9 contd)
Test H
0
: = 4 vs H
a
: 4
based on a sample of n = 5 observations from a normal
population distribution.
Test statistic t = 0.594 ~ 0.6. df = 5 1 = 4.
In Appendix Table A.8, mark the 4 df column & the 0.6 row.
The entry at the intersection is 0.290.
P(T > 0.6df = 4) = 0.29
For a twotailed t test, Pvalue ~ 2(0.29) = 0.580.
This Pvalue > any reasonable o (0.01, 0.05, or 0.10).
No reason to reject the null hypothesis H
0
.
107
Exercise Problem 52
= true mean reflectometer reading of a new paint
Assume reflectometer reading is normally distributed.
Test hypotheses H
0
: = 20 vs H
a
: > 20
What conclusion is appropriate for the following?
a. n = 15, t = 3.2, = 0.05
b. n = 9, t = 1.8, = 0.01
c. n = 24, t = 0.2
108
Exercise Problem 52
a. df = 14, Pvalue = P(T 3.2df=14) = 0.003.
= 0.05 > Pvalue Reject H
0
.
b. df = 8, Pvalue = P(T 1.8df=8) = 0.055.
= 0.01 < Pvalue Do not reject H
0
.
c. df = 23, Pvalue = P(T 0.2df=23) = 0.578.
Do not reject H
0
at any reasonable significant level (<0.578).
109
Exercise Problem 58
A sample of n=30 on amount of organic matter in soil obtained
Sample mean = 2.481 Sample sd = 1.616
Test hypotheses H
0
: = 3 vs H
a
: 3 = 0.1
Assuming normality, we use t test.
t = (2.4813)/(1.616/30) = 1.759
Pvalue = 2P(T > 1.759df = 29) = 2(0.041) = 0.082
= 0.1 > Pvalue, reject H
0
.
True mean organic matter is something other than 3%.
For = 0.05, we would not have rejected H
0
.
110
Section Summary
Concepts Discussed
Pvalues
Use of Pvalues to draw conclusions for hypothesis tests
Compute Pvalues for a z test
Compute Pvalues for a t test
111
Test on
2
& of a Normal Distribution
A random sample of size n from a normal distribution
3 statistical hypothesis testing:
a. Uppertailed Test H
0
:
2
=
0
2
vs H
a
:
2
>
0
2
b. Lowertailed Test H
0
:
2
=
0
2
vs H
a
:
2
<
0
2
c. Twotailed Test H
0
:
2
=
0
2
vs H
a
:
2
0
2
Equivalent hypothesis testing:
a. Uppertailed Test H
0
: =
0
vs H
a
: >
0
b. Lowertailed Test H
0
: =
0
vs H
a
: <
0
c. Twotailed Test H
0
: =
0
vs H
a
:
0
112
Test on
2
& of a Normal Distribution
Null hypothesis: H
0
:
2
=
0
2
Test statistic:
Alternative Hypothesis Rejection Criteria
H
a
:
2
>
0
2
0
2
>
2
o, n1
(uppertailed)
H
a
:
2
<
0
2
0
2
2
1, n1
(lowertailed)
H
a
:
2
0
2
0
2
>
2
o/2, n1
or
0
2
2
1/2, n1
(twotailed)
2
0
2
2
0
) 1 (
o
_
s n
=
113
Test on
2
& of a Normal Distribution
Compute Pvalues
Null hypothesis: H
0
:
2
=
0
2
Test statistic:
Alternative Hypothesis Pvalue
H
a
:
2
>
0
2
P(
2
>
0
2
df = n1)
H
a
:
2
<
0
2
P(
2
0
2
df = n1)
H
a
:
2
0
2
2P(
2
>
0
2
n1 df), or 2P(
2
0
2
n1 df)
Reject H
0
at significant level , if Pvalue.
2
0
2
2
0
) 1 (
o
_
s n
=
114
Test on
2
& of a Normal Distribution
Example
An automatic filling machine to fill bottles with liquid detergent.
A sample of n=20 yields s
2
= 0.0153 (liquid ounces)
2
.
If > 0.01, an unacceptable proportion of bottles will be
underfilled or overfilled.
Is there evidence in the data to suggest that the manufacturer
has a problem with underfilled or overfilled bottles?
Use = 0.05, and assume the fill volume is a normal rv.
115
Test on
2
& of a Normal Distribution
Solution
1. Test H
0
:
2
= 0.01 (=
0
2
) vs H
0
:
2
> 0.01
2. Compute
3. Determine
2
o, n1
=
2
0.05, 19
= 30.14
4. Conclusion: Can not reject H
0
, as
0
2
< 30.14.
There is no strong evidence that the variance of fill
volume exceeds 0.01 (liquid ounces)
2
.
07 . 29
01 . 0
) 0153 . 0 )( 1 20 (
2
0
=
= _
116
Test on
2
& of a Normal Distribution
The Pvalue of this statistical hypothesis test is
Pvalue = P(
2
> 29.07df = 19) = 0.0649
Again, we cannot reject H
0
at 95% conficence level, since
Pvalue > = 0.05.
117
GoodnessofFit Test
So far we have discussed testing hypotheses for some
parameters of a given distribution.
But we also need to test hypotheses for a population
distribution itself.
Example H
0
: The population distribution is normal vs
H
a
: The population distribution is not normal.
We have learned to use a probability plot to test such
hypotheses. But such a conclusion is subjective.
We now present a formal goodnessoffit test procedure,
based on a sample of size n & the chisquare distribution.
118
GoodnessofFit Test
Arrange the n observations in a frequency histogram with k
class intervals.
O
i
= observed frequency in class interval i (= 1, 2, , k).
E
i
= expected frequency in class interval i, computed from
the hypothesized probability distribution.
If H
0
is true, O
i
and E
i
should be roughly equal to each other.
Test statistic
Rejection Criterion: Reject H
0
if
0
2
>
2
o, kp1
with p = # of
parameters in the hypothesized probability distribution.
=
k
i
i
i i
E
E O
1
2
2
0
) (
_
119
GoodnessofFit Test
The Pvalue of this statistical hypothesis test
Pvalue = P(
2
>
0
2
df = kp1).
Reject H
0
at 100(1)% confidence level for any Pvalue.
120
GoodnessofFit Test
Example A Poisson distribution
# of defects in printed circuit boards is hypothesized to
follow a Poisson distribution.
A sample of 60 PCBs is presented below
# of Defects Observed Frequency O
i
0 32
1 15
2 9
3 4
Test H
0
: Defect has a Poisson distribution
vs H
a
: Defect does not has a Poisson distribution.
121
GoodnessofFit Test
Solution
Use the sample average (0.75) to estimate the mean # of
defects per board.
From the Poisson distribution with = 0.75, the following
probabilities and expected frequencies can be computed.
# of defects Probability Expected Frequency E
i
0 0.472 28.32
1 0.354 21.24
2 0.133 7.98
3 or more 0.041 2.46
122
GoodnessofFit Test
Remark If the expected frequency in any cell < 3, combine
the cell with its adjacent cell.
The expected frequency in the last cell < 3, combine the last
two cells.
# of defects O
i
E
i
0 32 28.32
1 15 21.24
2 or more 13 11.44
k = 3, p = 1. df = 3 1 1 = 1.
123
GoodnessofFit Test
1. Compute test statistic:
2. Use = 0.05. Then
3. Conclusion: Cannot reject H
0
, since
0
2
< 3.84.
It is reasonable to assume that # of defects in PSBs has
a Poisson distribution.
Pvalue = P(
2
> 2.94
df = 1) = 0.0864.
Again, cannot reject H
0
, since Pvalue > = 0.05.
94 . 2
44 . 10
) 44 . 10 13 (
24 . 21
) 24 . 21 15 (
32 . 28
) 32 . 28 32 (
2 2 2
2
0
=
= _
. 84 . 3
2
1 , 05 . 0
2
1 ,
= =
_ _
o p k