Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Hypothesis Testing
7-2
7 Hypothesis Testing
Using Statistics
The Concept of Hypothesis Testing
Computing the p-value
The Hypothesis Test
Pre-Test Decisions
7-3
7 LEARNING OBJECTIVES
Decision-Making
H0: p 40%
H1: p < 40%
H0: s2 50
H1: s2 >50
7-8
Consider H0: = 100. We may have a decision rule that says: Reject
H0 if the sample mean is less than 95 or more than 105.
Decision Making
Decision Making
= P(Reject H 0 H 0 is true)
= P(Accept H 0 H 0 is false)
7-13
The p-Value
Power = (1 - )
7-16
The probability of a type II error, and the power of a test, depends on the actual value
of the unknown population parameter. The relationship between the population mean
and the power of the test is called the power function.
1.0
0.9
Power
0.7
62 0.7405 0.2695 0.6
0.5
63 0.5577 0.4423 0.4
Example
Recall:
The p-value is the probability of obtaining a value of the test statistic as
extreme as, or more extreme than, the actual value obtained, when the null
hypothesis is true.
Example
An automatic bottling machine fills cola into two liter (2000 cc) bottles. A consumer advocate wants
to test the null hypothesis that the average amount filled by the machine into a bottle is at least 2000
cc. A random sample of 40 bottles coming out of the machine was selected and the exact content of
the selected bottles are recorded. The sample mean was 1999.6 cc. The population standard
deviation is known from past experience to be 1.30 cc.
Compute the p-value for this test.
The tails of a statistical test are determined by the need for an action. If action
is to be taken if a parameter is greater than some value a, then the alternative
hypothesis is that the parameter is greater than a, and the test is a right-tailed
test. H0: 50
H1: > 50
Computing (continued)
7-24
Computing (continued)
X crit 1
P Z > P( Z > 1.18 / 0.5) P( Z > 2.360)
s / n
0.0091
The power of the test = 1 0.0091 = 0.9909.
7-25
Rejection Region
Nonrejection Region
Note that the population mean may be 28 (the null hypothesis might be true), but
then the observed sample mean, 31.5, would be a very unlikely occurrence. There
is still the small chance ( = 0.05) that we might reject the true null hypothesis.
represents the level of significance of the test.
7-31
Nonrejection Region
If the observed sample mean falls within the nonrejection region, then you fail to
reject the null hypothesis as true. Construct a 95% nonrejection region around
the hypothesized population mean, and compare it with the 95% confidence
interval around the observed sample mean:
s 5 s 5
0 z.025 28 1.96 95% non- 95% Confidence x z .025 315
. 1.96
n 100 rejection region Interval n 100
around the around the
28.98 27,02 ,28.98 population Mean Sample Mean . .98 30.52 ,32.48
315
The nonrejection region and the confidence interval are the same width, but
centered on different points. In this instance, the nonrejection region does not
include the observed sample mean, and the confidence interval does not include
the hypothesized population mean.
7-32
0.5
0.2
.025 .025
0.1
We will find 95% of the 0.0
0.8
0.7 .95
0.6
0.5
0.4
0.3
.025 .025
0.2
0.1
0.0
Example 7-5
An automatic bottling machine fills cola into two liter (2000 cc) bottles. A consumer advocate wants to test the null
hypothesis that the average amount filled by the machine into a bottle is at least 2000 cc. A random sample of 40
bottles coming out of the machine was selected and the exact content of the selected bottles are recorded. The
sample mean was 1999.6 cc. The population standard deviation is known from past experience to be 1.30 cc.
Test the null hypothesis at the 5% significance level.
H0: 2000 n = 40
H0: 2000 x
z 0 = 1999.6 - 2000
H1: 2000 s 1.3
n = 40 n 40
For = 0.05, the critical value
of z is -1.645 = 1.95
Use when s
is known
Use when s
is unknown
7-37
Use when
s is known
Use when s
is unknown
7-38
A coin is to tested for fairness. It is tossed 25 times and only 8 Heads are
observed. Test if the coin is fair at an of 5% (significance level).
s 2
0
Note: Since the chi-square table only provides the critical values, it cannot
be used to calculate exact p-values. As in the case of the t-tables, only a
range of possible values can be inferred.
7-44
Example 7-8
A manufacturer of golf balls claims that they control the weights of the golf balls
accurately so that the variance of the weights is not more than 1 mg2. A random sample
of 31 golf balls yields a sample variance of 1.62 mg2. Is that sufficient evidence to
reject the claim at an of 5%?
Example 7-8
7-46
H1: 12
0.8
0.7 .95
0.6
x 0
0.3
.025 .025
0.2
n 0
z
x 0 14.6-12
.025 .025
0.2
z = 0.1
s 7.8 0.0
z
-1.96 0 1.96
n 144
Lower Rejection Nonrejection Upper Rejection
2.6 Region
= 4 Region Region
0.65
Since the test statistic falls in the upper rejection region, H0 is rejected, and we may
conclude that the average amount of carry-on baggage is more than 12 pounds.
7-48
An insurance company believes that, over the last few years, the average liability
insurance per board seat in companies defined as small companies has been $2000.
Using = 0.01, test this hypothesis using Growth Resources, Inc. survey data.
n = 100
H0: = 2000 x = 2700
H1: 2000 s = 947
z
-2.576 0 2.576
The average time it takes a computer to perform a certain task is believed to be 3.24
seconds. It was decided to test the statistical hypothesis that the average performance
time of the task using the new algorithm is the same, against the alternative that the
average performance time is no longer the same, at the 0.05 level of significance.
-1.96 0 1.96 z
changed from 3.24 seconds.
2
According to the Japanese National Land Agency, average land prices in central Tokyo
soared 49% in the first six months of 1995. An international real estate investment
company wants to test this claim against the alternative that the average price did not rise
by 49%, at a 0.01 level of significance.
H0: = 49 n = 18
H1: 49 x = 38
s = 14
n = 18
For = 0.01 and (18-1) = 17 df ,
x 38 - 49
critical values of t are 2.898 t 0 =
s 14
x 0
t n 18
The test statistic is: s
n
- 11
3.33 Reject H
Do not reject H0 if: [-2.898 t 2.898]
=
3.3 0
t
statistic is in the lower
-2.898 0 2.898
Canon, Inc,. has introduced a copying machine that features two-color copying capability
in a compact system copier. The average speed of the standard compact system copier is
27 copies per minute. Suppose the company wants to test whether the new copier has the
same average speed as its standard compact copier. Conduct a test at an = 0.05 level of
significance.
n = 24
H0: = 27 x = 24.6
H1: 27 s = 7.4
n = 24
For = 0.05 and (24-1) = 23 df , x 0 24.6 - 27
t =
critical values of t are 2.069 s 7.4
x 0 24
t n
The test statistic is: s
n -2.4
= 1.59 Do not reject H
Do not reject H0 if: [-2.069 t 2.069] 1.51 0
The t Distribution
0.8
Since the test statistic falls in
0.7
0.6
.95 the nonrejection region, H0 is
0.5 not rejected, and we may not
0.4
0.3
.025 .025
conclude that the average
0.2
0.1 speed is different from 27
0.0
-2.069 0 2.069 t
copies per minute.
5
Statistical Significance
A given sample mean will not lead to a rejection of a null hypothesis unless
it lies in outside the nonrejection region of the test. That is, the nonrejection
region includes all sample means that are not significantly different, in a
statistical sense, from the hypothesized mean. The rejection regions, in turn,
define the values of sample means that are significantly different, in a
statistical sense, from the hypothesized mean.
7-57
An investment analyst for Goldman Sachs and Company wanted to test the hypothesis
made by British securities experts that 70% of all foreign investors in the British market
were American. The analyst gathered a random sample of 210 accounts of foreign
investors in London and found that 130 were owned by U.S. citizens. At the = 0.05
level of significance, is there evidence to reject the claim of the British securities experts?
n = 210
H0: p = 0.70 130
H1: p 0.70 p =
210
0.619
n = 210
For = 0.05 critical values of z are 1.96 p - p
0 0.619 - 0.70
The test statistic is: z p p0 z=
p q
=
(0.70)(0.30)
p0 q 0 0 0
n 210
n
Do not reject H0 if: [-1.96 z 1.96] -0.081
2.5614 Reject H
Reject H0 if: [z < -1.96] or z > 1.96] =
0.0316 0
7-58
H0: 55 n = 100
x = 60
H1: >55 s = 20
n = 100
For = 0.01, the critical value x 0 60 - 55
z =
of z is 2.326 s 20
x 0 n 100
z
The test statistic is: s
n 5
= 2.5 Reject H
Do not reject H0 if: [z 2.326] 2 0
Reject H0 if: z >2.326]
7-59
0 .2
that the average concentration
0 .1 00
of vinyl chloride is more than
0 .0
-5 0 5 55 ppm.
z 2.326
2.5
Nonrejection Rejection
Region Region
7-60
n = 144
H0: 12
H1: 12 x = 11.8
s = 6
n = 144
For = 0.05, the critical value
of z is -1.645 x
z 0 = 11.8 -12
x 0 s 6
z
The test statistic is: s n 144
n
Do not reject H0 if: [z -1.645] =
-.2
0.4 Do not reject H
Reject H0 if: z 5] .5 0
7-61
0.2
005
conclude that the manufacturer
0.1
is underfilling packages on
0.0
-5 0 5
z
average.
-1.645
-0.4
Rejection Nonrejection
Region Region
7-62
A floodlight is said to last an average of 65 hours. A competitor believes that the average life of the
floodlight is less than that stated by the manufacturer and sets out to prove that the manufacturers
claim is false. A random sample of 21 floodlight elements is chosen and shows that the sample
average is 62.5 hours and the sample standard deviation is 3. Using =0.01, determine whether
there is evidence to conclude that the manufacturers claim is false.
H0: 65
H1: 65
n = 21
For = 0.01 an (21-1) = 20 df, the
critical value -2.528
005
0 .1
is false, that the average
0 .0
-5
-2.528
0 5
t
floodlight life is less than 65
-3.82 hours.
Rejection Nonrejection
Region Region
7-64
H0: p 0.0096
H1: p > 0.0096
n = 600
0 .2
0.4 0.4
p-value=area to
p-value=area to
0.3 right of the test statistic 0.3
right of the test statistic
=0.3018
=0.0062
f(z)
f(z)
0.2 0.2
0.1 0.1
0.0 0.0
-5 0 0.519 5 -5 0 5
z 2.5 z
The p-value is the smallest level of significance, , at which the null hypothesis
may be rejected using the obtained value of the test statistic.
7-67
When the p-value is greater than 0.10, the result is considered not
significant.
7-68
f(z) 0.3
0.2
0.1
0.0
-5 0 5
-0.4 0.4
z
The further away in the tail of the distribution the test statistic falls, the smaller
is the p-value and, hence, the more convinced we are that the null hypothesis is
false and should be rejected.
In a right-tailed test, the p-value is the area to the right of the test statistic if the
test statistic is positive.
In a left-tailed test, the p-value is the area to the left of the test statistic if the
test statistic is negative.
In a two-tailed test, the p-value is twice the area to the right of a positive test
statistic or to the left of a negative test statistic.
Computing and
Plotting Required
Sample size.
7-72
Plot of
versus for
various n.
Note: Similar
analysis can
be done when
testing for a
population
proportion.
7-73
Note: Similar
analysis can
be done when
testing for a
population
proportion.
7-74
Note: Similar
analysis can be
done when
testing a
population
proportion.