Sie sind auf Seite 1von 90

Introduction to Probability and Statistics

Probability & Statistics for Engineers & Scientists, 8th Ed.


2007
Handout #10
Instructor: Kuo-Jung Lee
TA: Brian Shea
The pdf le for this class is available on the class web page.
http://www.stat.umn.edu/~kjlee/STAT3021_Summer2009.html
1
Tests of hypotheses about one mean, variance
2
known
H
0
H
1
Critical Region
=
0
>
0
x >
0
+z

n
=
0
<
0
x <
0
z

n
=
0
=
0
| x
0
| > z
/2

n
Tests of hypotheses about one mean, variance
2
unknown
H
0
H
1
Critical Region
=
0
>
0
x >
0
+t
(,=n1)

n
=
0
<
0
x <
0
t
(,=n1)

n
=
0
=
0
| x
0
| > t
(/2,=n1)

n
2
Two-Sample T-Test
Tests of hypotheses for equality of two means;
equal variances,
2
1
=
2
2
H
0
H
1
Critical Region

1
=
2

1
>
2
x y > t
(,=n
1
+n
2
2)
s
p

_
1/n
1
+1/n
2

1
=
2

1
<
2
x y < t
(,=n
1
+n
2
2)
s
p

_
1/n
1
+1/n
2

1
=
2

1
=
2
| x y| > t
(/2,=n
1
+n
2
2)
s
p

_
1/n
1
+1/n
2
Paired T-Test
Tests of hypotheses about dierence of two means,
variance unknown
H
0
H
1
Critical Region

2
= d
1

2
> d x y > d +t
(,=n1)

s
d

2
= d
1

2
< d x y < d t
(,=n1)

s
d

2
= d
1

2
= d | x y d| > t
(/2,=n1)

s
d

n
3
Tests of hypotheses about variance;
2
=
(n1)s
2

2
0
.
H
0
H
1
Critical Region

2
=
2
0

2
>
2
0

2
>
2
(,=n1)

2
=
2
0

2
<
2
0

2
<
2
(1,=n1)

2
=
2
0

2
=
2
0

2
>
2
(/2,=n1)
or
2
<
2
(1/2,=n1)
Tests of hypotheses about the equality of variances
H
0
H
1
Critical Region

2
1
=
2
2

2
1
>
2
2
s
2
1
s
2
2
> f
(,
1
=n
1
1,
2
=n
2
1)

2
1
=
2
2

2
1
<
2
2
s
2
1
s
2
2
< f
(1,
1
=n
1
1,
2
=n
2
1)

2
1
=
2
2

2
1
=
2
2
s
2
1
s
2
2
> f
(/2,
1
=n
1
1,
2
=n
2
1)
or
s
2
1
s
2
2
< f
(1/2,
1
=n
1
1,
2
=n
2
1)
4
Tests of hypotheses for one proportion
H
0
H
1
Critical Region
p = p
0
p > p
0
z =
x/np
0

p
0
(1p
0
)/n
> z

p = p
0
p < p
0
z =
x/np
0

p
0
(1p
0
)/n
< z

p = p
0
p = p
0
z =
|x/np
0
|

p
0
(1p
0
)/n
> z
/2
Tests of hypotheses for two proportions; p =
x
1
+x
2
n
1
+n
2
H
0
H
1
Critical Region
p
1
= p
2
p
1
> p
2
z =
p
1
p
2
_
p(1 p)(
1
n
1
+
1
n
2
)
> z

p
1
= p
2
p
1
< p
2
z =
p
1
p
2
_
p(1 p)(
1
n
1
+
1
n
2
)
< z

p
1
= p
2
p
1
= p
2
z =
| p
1
p
2
|
_
p(1 p)(
1
n
1
+
1
n
2
)
> z
/2
5

2
-tests
H
0
H
1
Critical Region
Expected Distribution Not H
0

2
>
2
(,=k1)
Independence Dependence
2
>
2
(,=(r1)(c1))
Homogeneity Inhomogeneity
2
>
2
(,=(r1)(c1))
p
0
= p
2
= = p
k
Not all equal
2
>
2
(,=k1)
6
Chapter 10
One- and Two-Sample Tests of Hypotheses
Statistical Hypotheses: General Concepts
7
Instead of making an estimate about a population parameter,
youll learn how to test a claim about a parameter.
Example 1
Suppose that you work for Gallup and are asked to test a claim
that the proportion of eligible American voters who support
Barack Obama is p = 0.47. To test the claim, you take a ran-
dom sample of n = 1200 eligible voters and nd 594 of them
support Barack Obama. Your sample statistic is p = 0.495.
Is the sample statistic identical enough to your claim (p = 0.47)
to decide that the claim is true, or dierent enough from the
claim (p = 0.47) to decide that the claim is false?
8
Example 2
Suppose that you work for Gallup and are asked to test a claim
that 68 percent of Americans approve of Obamas performance
as the nations chief executive. To test the claim, you take a
random sample of n = 1200 eligible voters and nd 780 of them
support Barack Obama. Your sample statistic is p = 0.65.
Is the sample statistic identical enough to your claim (p = 0.68)
to decide that the claim is true, or dierent enough from the
claim (p = 0.68) to decide that the claim is false?
9
Example 3
A medical researcher may decide on the basis of experimental
evidence whether coee drinking increases the risk of
cancer in humans.
An engineer might have to decide on the basis of sample data
whether there is a dierence between the accuracy of
two kinds of gauges.
A sociologist might wish to collect appropriate data to enable
him or her to decide whether a persons blood type and
eye color are independent variables.
10
In each of these cases the scientist or engineer postulates or
conjectures something about a system. In addition, each must
involve the use of experimental data and decision-making that is
based on the data.
Statistical Hypothesis
A statistical hypothesis is an assertion or conjecture con-
cerning one or more populations.
We take a random sample from the population of interest and
use the data contained in this sample to provide evidence that
either supports or does not support the the hypothesis. Evidence
from the sample that is inconsistent with the stated hypothesis
leads to a rejection of the hypothesis.
11
The rejection of a hypothesis implies that the sample evidence
refutes it. Put another way, rejection means that there is a
small probability of obtaining the sample information ob-
served when, in fact, the hypothesis is true.
Example 4
Suppose that the hypothesis postulated by the engineer is that
the fraction defective in a certain process is p = 0.10. A sam-
ple of 100 revealing 20 defective items is certainly evidence of
rejection. Why?
If, indeed, p = 0.10, the probability of obtaining 20 or more
defectives is approximately 0.002. With the resulting small risk
of a wrong conclusion it would seem safe to reject the hypothesis
that p = 0.10.
12
The formal statement of a hypothesis is often inuenced by the
structure of the probability of a wrong conclusion. If the scientist
is interested in strongly supporting a contention, he or she
hopes to arrive at the contention in the form of rejection a
hypothesis.
Example 5
If the medical researcher wishes to show strong evidence in favor
of the contention that coee drinking increases the risk of cancer,
the hypothesis tested should be of the form there is no increase
in cancer risk produced by drinking coee. As a result, the
contention is reached via a rejection.
13
Example 6
Similarly, to support the claim that one kind of gauge is more
accurate than another, the engineer tests the hypothesis that
there is no dierence in the accuracy of the two kinds of gauges.
The foregoing implies that when the data analyst formalizes ex-
perimental evidence on the basis of hypothesis testing, the formal
statement of hypothesis is very important.
14
Null Hypothesis: H
0
and Alternative Hypothesis: H
1
The structure of hypothesis testing will be formulated with the
use of the term null hypothesis which we wish to test and is
denoted by H
0
.
The alternative hypothesis H
1
usually represents the question
to be answered, the theory to be tested and thus its specication
is crucial.
Reject H
0
: in favor of H
1
because of sucient evidence in the
data.
Fail to reject H
0
: because of insucient evidence in the data.
15
Stating a Hypothesis
A null hypothesis, H
0
, is statistical hypothesis that contains a
statement of equality, such as , =, .
The alternative hypothesis, H
1
, is the complement of the null
hypothesis. It is a statement that must be true if H
0
is false and
it contains a statement of inequality, such as >, =, <.
16
One-Tailed Tests
H
0
: = ( or )
0
versus H
1
: >
0
H
0
: = ( or )
0
versus H
1
: <
0
Two-Tailed Test
H
0
: =
0
versus H
1
: =
0
17
How Are the Null and Alternative Hypotheses
Chosen?
18
Example 7
Write the claim as a mathematical sentence. State the null and
alternative hypotheses.
1. A university claims that the proportion of its students who
graduate in four years is 82%.
2. A television manufacturer claims that the variance of the life
of a certain type of television is less than or equal to 3.5.
3. A cereal company claims that the mean weight of the con-
tents of its 20-ounce cereal boxes is more than 20 ounces.
19
Solution:
1. The claim the proportion . . . is 82% can be written as
p = 0.82. Its complement is p = 0.82. Because contains the
statement of equality, it becomes the null hypothesis.
H
0
: p = 0.82 versus H
1
: p = 0.82.
2. The claim the mean . . . is less than or equal to 3.5 can be
written as
2
3.5. Its complement is
2
> 3.5. Because

2
3.5 contains the statement of equality, it becomes the
null hypothesis.
H
0
:
2
3.5 versus H
1
:
2
> 3.5.
20
3. The claim the mean . . . is more than 20 ounces can be
written as > 20. Its complement is 20. Because
20 contains the statement of equality, ti becomes the
null hypothesis.
H
0
: 20 versus H
1
: > 20.
Example 8
A manufacturer of a certain brand of rice cereal claims that the
average saturated fat content does not exceed 1.5 grams. State
the null and alternative hypotheses to be used in testing this
claim and determine where the critical regions is located.
Solution:
The manufactures claim should be rejected only if is greater
than 1.5 milligrams and should not be rejected if is less than
or equal to 1.5 milligrams. We test
H
0
: = 15 versue H
1
: > 15,
the non-rejection of H
0
does not rule out values less than 1.5
milligrams. Since we have a one-tailed test, the greater than
symbol indicates that the critical region lies entirely in the right
tail of the distribution of our test statistic

X.
21
Testing a Statistical Hypothesis
22
A certain type of cold vaccine is known to be only 25% eec-
tive after 2 years. To determine if a new and somewhat more
expensive vaccine is superior in providing protection against the
same virus for a longer period of time.
Suppose that 20 people are chosen at random and inoculated.
In an actual study of this type of participants receiving the new
vaccine might number several thousand. The number 20 is being
used here only to demonstrate the basic steps in carrying out a
statistical test. If more than 8 of those receiving the new vaccine
surpass the 2-year period without contracting the virus, the new
vaccine will be considered superior to the one presently in use.
The requirement that the number exceed 8 is somewhat arbitrary
but appears reasonable in that it represents a modest gain over
the 5 people that could be expected to receive protection if
the 20 people had been inoculated with the vaccine already in
23
use. We are essentially testing the null hypothesis that the new
vaccine is equally eective after a period of 2 years as the one
now commonly used. The alternative hypothesis is that the new
vaccine is in fact superior. This is equivalent to testing the
hypothesis that the binomial parameter for the probability of a
success on a given trial is p = 1/4 against the alternative that
p > 1/4. This is usually written as follows:
H
0
: p = 0.25 versus H
1
: p > 0.25.
Decision criterion for test p = 0.25 versus p > 0.25.
Remember, the only way to be certain of whether H
0
is true or
false is to test the entire population. Because your decision (to
reject H
0
or fail to reject H
0
) is based on a sample, you must
accept the fact that your decision might be incorrect.
Type I Error
Rejection of the null hypothesis when it is true is called a type
I error.
= P(Reject H
0
|H
0
is Ture)
The probability of committing a type I error, also called the level
of signicance.
24
Type II Error
Nonrejection of the null hypothesis when it is false is called a
type II error.
= P(Do Not Reject H
0
|H
1
is Ture)
Type I and Type II Errors
H
0
is true H
0
is false
Do not reject H
0
Correct decision Type II error ()
Reject H
0
Type I error () Correct decision
25
Example 9
The proportion of adults living in a small town who are college
graduates is estimated to be p = 0.6. To test this hypothesis,
a random sample of 15 adults is selected is anywhere from 6 to
12, we will not reject the null hypothesis that p = 0.6; otherwise,
we shall conclude that p = 0.6.
1. Evaluate type I Error, .
2. Evaluate type II Error, for the alternative p = 0.5.
26
Solution:
H
0
: p = 0.6 versus H
1
: p = 0.6.
1.
= P(Type I Error)
= P(X < 6 or X > 12|p = 0.6)
=
5

x=0
_
15
x
_
(0.6)
x
(0.4)
15x
+
15

x=13
_
15
x
_
(0.6)
x
(0.4)
15x
0.0609
27
2.
= P(Type II Error)
= P(6 X 13|p = 0.5)
=
12

x=6
_
15
x
_
(0.5)
x
(0.5)
15x
0.8454
Ideally, we like to use a test procedure for which the type I and
type II error probabilities are both small.
Example 10
A fabric manufacturer believes that the proportion of orders for
raw material arriving late is p = 0.6. If a random sample of
10 orders show that 3 or fewer arrived late, the hypothesis that
p = 0.6 should be rejected in favor of the alternative p < 0.6.
Using the binomial distribution.
1. Find the probability of committing a type I error if the true
proportion is p = 0.6.
2. Find the probability of committing a type II error for the
alternative p = 0.3.
28
Solution:
29
The Role of , , and Sample Size
Let us assume the the director of the testing program is unwilling
to commit a type II error when the alternative hypothesis p = 0.5
is true even though we have found the probability of such an
error to be = 0.8454. A reduction in is always possible by
increasing the size of the critical region.
By adopting a new decision procedure, we have reduced the
probability of committing a type II error at the the expense of
increasing the probability of committing a type I error.
30
Example 11
Consider what happens to the values of and when we change
our rejection region to be anywhere greater than 10 or less than
7 that Now, in testing p = 0.6 against the alternative hypothesis
that p = 0.5, we nd that
= P(Type I Error) = P(X < 7 or X > 10|p = 0.6)
0.2402
= P(Type II Error) = P(7 X 10|p = 0.5)
0.6876
For a xed sample size, a decrease in the probability of one
error will usually result in an increase in the probability of the
other error.
Fortunately, the probability of committing both types of er-
ror can be reduced by increasing the sample size.
31
Example 12
Consider the null hypothesis that the average weight of male
students in a certain college is 68 kilograms against alternative
hypothesis that it is unequal to 68. That is, we wish to test
H
0
: = 68 versus H
1
: = 68.
The alternative hypothesis allows for the possibility that < 68
or > 68. The probability of committing a type I error, or the
level of signicance of our test, is equal to the sum of the areas
that have been shaded in each tail of the distribution in Figure.
Assume the standard deviation of the population of weights to
be = 3.6. Our decision statistic, based on a random sample of
size n = 36, will be

X. From C.L.T., we know that the sampling
32
distribution of

X is approximately normal with standard deviation

X
= 3.6/6 = 0.6.
= P(

X < 67| = 68) +P(

X > 69| = 68) = 0.0950.
Thus, 9.5% of all samples of size 36 would lead us to reject
= 68 kilograms when, in fact, it is true.
Critical region for testing = 68 versus = 68.
The reduction in is not sucient by itself to guarantee a good
testing procedure. We must also evaluate for various alterna-
tive hypotheses.
= P(67

X 69| = 70) = 0.0132.
If the true value of is the alternative = 70, the value of
will be 0.0132.
Probability of type II error for testing = 68 versus = 70.
= P(67

X 69| = 68.5) = 0.8661.
Probability of type II error for testing = 68 versus = 68.5.
Power
The power of a test is the probability of rejecting H
0
given that
a specic alternative is true.
1 = P(Reject H
0
|H
1
is True).
In a sense, the power is a more succinct measure of how sensitive
the test is for detecting dierences between a mean of 68 and
68.5. In this case, if is truly 68.5, the test described will
properly reject H
0
only 13.39% of the time.
33
After stating the null and alternative hypotheses and specifying
the level of signicance (), the next step in a hypothesis test
is to obtain a random sample from the population and calculate
sample statistics such as the mean and the standard deviation.
The statistic that is compared to the parameter in the null hy-
pothesis is called the test statistic. The type of test used and
sampling distribution is based on the test statistic.
34
Test statistic
A test statistic T is a quantity calculated from our sample
of data. Its value is used to decide whether or not the null
hypothesis should be rejected in our hypothesis test. The choice
of a test statistic will depend on the assumed probability model
and the hypotheses under question.
Critical Region and Critical Value
The critical region C of a statistical test refers to the set of
values for the corresponding test statistic which tend to support
the alternative hypothesis rather than the null hypothesis.
Reject H
0
T C
The critical value(s) for a hypothesis test is a threshold to which
the value of the test statistic in a sample is compared to deter-
mine whether or not the null hypothesis is rejected.
35
Important Properties of a Test of Hypothesis
1. The type I error and type II error are related.
2. The size of the critical region can always be reduced by ad-
justing the critical value.
3. An increase in the sample size n will reduce and simul-
taneously.
4. The greater the distance between the true value and the
hypothesized value, the smaller will be.
36
P-Value
Each statistical test has an associated null hypothesis, the p-
value is the probability that your sample could have been
drawn from the population(s) being tested (or that a more
improbable sample could be drawn) given the assumption that
the null hypothesis is true. A p-value of .05, for example, in-
dicates that you would have only a 5% chance of drawing the
sample being tested if the null hypothesis was actually true.
This is a way of assessing the believability of the null hypoth-
esis, given the evidence provided by a random sample.
Denition
A p-value is the lowest level (of signicance) at which the ob-
served value of the test statistic is signicant.
37
Interpreting a P-Value
Could random variation alone account for the dierence between
the null hypothesis and observations from a random sample?
A small p-value implies that random variation due to the sam-
pling process alone is not likely to account for the observed
dierence.
With a small p-value we reject H
0
. The true property of the
population is signicantly dierent from what was stated in
H
0
.
Thus, small p-values are strong evidence AGAINST H
0
.
38
Example 13
H
0
: = 68 versus H
1
: = 68.
Suppose a value of z = 1.87 is observed. In fact, in a two-tailed
scenario one can quantify this risk as
p-value = 2P(Z > 1.87| = 10) = 0.0614
The risk of committing a type I error if one rejects H
0
in this
could hardly be considered severe. Strictly speaking, with =
0.05 the value is not signicant.
Although this evidence against H
0
is not as strong as that which
would result from a rejection at an = 0.05 level, it is important
information to the user. The approach is designed to give the
user an alternative (in terms of a probability) to a mere
reject or do not reject conclusion.
39
For example, if z is 2.73, it is informative for the user to observe
that
p-value = 2P(Z > 2.73| = 10) = 0.0064
It is important to know that under the condition of H
0
, a value
of z = 2.73 is an extremely rare event. Namely, a value at least
that large in magnitude would only occur 64 times in 10,000
experiments.
Approach to Hypothesis Testing
1. State the null and alternative hypotheses.
2. Choose a xed signicance level .
3. Choose an appropriate test statistic and establish the critical
region based on .
4. From the computed test statistic, reject H
0
if the test statis-
tic is in the critical region. Otherwise, do not reject.
5. Draw scientic or engineering conclusion.
40
Signicance Testing (P-Value Approach)
1. State null and alternative hypotheses.
2. Choose an appropriate test statistic.
3. Compute p-value based on computed value of test statistic.
4. Use judgment based on p-value and knowledge of scientic
system.
41
Single Sample: Tests Concerning a Single Mean
(Variance Known)
42
Test for Single Mean (Variance Known)
z =
x
0
/

n
> z
/2
or z =
x
0
/

n
< z
/2
If z
/2
< z < z
/2
, do not reject H
0
. Rejections of H
0
, of
course, implies acceptance of the alternative hypothesis H
1
:
=
0
. With this denition of critical region it should be clear
that there will be probability of rejecting H
0
(failing into the
critical region) when, indeed, =
0
. For H
1
: >
0
, rejection
results when z > z

. For H
1
: <
0
, rejection results when
z < z

.
43
Example 14
A random sample of 100 recorded deaths in the United States
during the past year showed an average life span of 71.8 years.
Assuming a population standard deviation of 8.9 years, does this
seem to indicate that the mean life span today is greater than
70 years? Use a 0.05 level of signicance.
1. H
0
: = 70 years.
2. H
1
: > 70 years.
3. = 0.05.
44
4. Critical region: z > 1.645, where z =
x
0
/

n
.
5. Computations: x = 71.8 years, = 8.9 years, and z =
71.870
8.9/

100
= 2.02.
6. Decision: Reject H
0
and conclude that the mean life span
today is greater than 70 years.
The P-value corresponding to z = 2.02 is given by the area of
shaded region in Figure. P(Z > 2.02) = 0.0217. As a result,
the evidence in favor of H
1
is even stronger than suggested by
a 0.05 level of signicance.
Decision criterion for test = 70 versus > 70.
45
Example 15
A manufacturer of sports equipment has developed a new syn-
thetic shing line that he claims has a mean breaking strength
of 8 kilograms with a standard deviation of 0.5 kilogram. Test
the hypothesis that = 8 kilograms against the alternative that
= 8 kilograms if a random sample of 50 lines is tested and
found to have a mean breaking strength of 7.8 kilograms. Use
a 0.01 level of signicance.
1. H
0
: = 8 kilograms.
2. H
1
: = 8 kilograms.
3. = 0.01.
46
4. Critical region: z < 2.575 and z > 2.575, where z =
x
0
/

n
.
5. Computations: x = 7.8 years, = 0.5 years, and z =
7.88
0.5/

100
= 2.83.
6. Decision: Reject H
0
and conclude that the mean life span
today is greater than 70 years.
The P-value corresponding to z = 2.83 is given by twice the
area of shaded region in Figure.. P(|Z| > 2.83) = 0.0046. As a
result, the evidence in favor of H
1
is even stronger than suggested
by a 0.01 level of signicance.
Decision criterion for test p = 0.25 versus p > 0.25.
47
Example 16
The average height of females in the freshman class of a certain
college has been 162.5 centimeters with a standard deviation of
6.9 centimeters. Is there reason to believe that there has been a
change in the average height at the 0.05 level of signicance if a
random sample of 50 females in the present freshman class has
an average height of 165.2 centimeters? Assume the standard
deviation remains the same.
48
Solution:
1. H
0
: = 162.5 centimeters.
2. H
1
: = 162.5 centimeters.
3. = 0.05.
4. Critical region: |z| < 1.96 , where z =
x
0
/

n
.
5. Computations: x = 162.5 kilowatt hours, = 6.9 kilowatt
hours, and n = 50. Hence
z =
42 46
11.9/

12
= 1.16 p value = P(T < 1.16) 0.135
49
6. Do not reject H
0
and conclude that the average number of
kilowatt hours expended annually by vacuum cleaners is not
signicantly less than 46.
Relationship to Condence Interval Estimation
50
Condence interval estimation involves computation of bounds
for which it is reasonable that the parameter in question is
inside the bounds. For the case of a single population mean
with
2
known, the structure of both hypothesis testing and
condence interval estimation is based on the random variable
Z =

X
/

n
.
It turns out that the testing of H
0
: =
0
against H
1
: =
0
at
a signicance level is equivalent to computing a 100(1 )%
condence interval on and rejecting H
0
if
0
is outside the
condence interval. If
0
is inside the condence interval, the
hypothesis is not rejected.
51
Single Sample: Tests Concerning a Single Mean
(Variance Unknown)
52
Test for Single Mean (Variance Unknown)
t =
x
0
s/

n
> t
/2
(n 1) or t =
x
0
s/

n
< t
/2
(n 1)
If t
/2
(n1) < t < t
/2
(n1), do not reject H
0
for H
1
: =
0
.
Rejections of H
0
, of course, implies acceptance of the alternative
hypothesis =
0
. With this denition of critical region it should
be clear that there will be probability of rejecting H0 (failing
into the critical region) when, indeed, =
0
. For H
1
: >
0
,
rejection results when t > t

(n 1). For H
1
: <
0
, rejection
results when t < t

(n 1).
53
Example 17
The Edison Electric Institute has published gures on the annual
number of kilowatt hours expended by various home appliances.
It is claimed that a vacuum cleaner expends an a 46 kilowatt
hours per year. If a random sample of 12 homes included in a
planned study indicates that vacuum cleaners expend an average
of 42 kilowatt hours per year with a standard deviation of 11.9
kilowatt hours, does this suggest at the 0.05 level of signicance
that vacuum cleaners expend, on the average, less than 46 kilo-
watt hours annually? Assume the population of kilowatt hours
to be normal.
1. H
0
: = 46 kilowatt hours.
2. H
1
: < 46 kilowatt hours.
54
3. = 0.05.
4. Critical region: t < 1.796 , where t =
x
0
s/

n
.
5. Computations: x = 42 kilowatt hours, s = 11.9 kilowatt
hours, and n = 12. Hence
t =
42 46
11.9/

12
= 1.16 p value = P(T < 1.16) 0.135
6. Do not reject H
0
and conclude that the average number of
kilowatt hours expended annually by vacuum cleaners is not
signicantly less than 46.
Example 18
An industrial company claims that the mean pH level of the
water in a nearby river is 6.8. You randomly select 19 water
samples and measure the pH of each. The sample mean and
standard deviation are 6.7 and 0.24, respectively. Is there enough
evidence to reject the companys claim at = 0.05. Assume the
population is normally distributed.
55
Solution:
56
Two Samples: Tests on Two Means
57
Two-Sample T-Test
T =

X
1


X
2
(
1

2
)
_
S
2
p
_
1
n
1
+
1
n
2
_
where
S
2
p
=
(n
1
1)S
2
1
+(n
2
1)S
2
2
n
1
+n
2
2
The t-distribution is involved and the two-sided hypothesis is not
rejected when
t
/2
(n
1
+n
2
2) < t < t
/2
(n
1
+n
2
2)
For H
1
:
1

2
> d
0
, rejection results when t > t

(n
1
+n
2
2).
For H
1
:
1

2
< d
0
, rejection results when t < t

(n
1
+n
2
2).
58
Paired T-Test
T =

D
D
S
d
/

n
where

D and S
d
are random variables representing the sample
mean and standard deviations of the dierences of the obser-
vations in the experimental units. The t-distribution is involved
and the two-sided hypothesis is not rejected when
t
/2
(n 1) < t < t
/2
(n 1)
For H
1
:
D
> d
0
, rejection results when t > t

(n 1).
For H
1
:
D
< d
0
, rejection results when t < t

(n 1).
59
Example 19
An experiment was performed to compare the abrasive wear of
two dierent laminated materials. Twelve pieces of material 1
were tested by exposing each piece to a machine measuring wear.
Ten pieces of material 2 were similarly tested. In each case, the
depth of wear was observed. The samples of material 1 gave
an average (coded) wear of 85 units with a sample standard
deviation of 4, while the samples of material 2 gave an average
of 81 and a sample standard deviation of 5. Can we conclude at
the 0.05 level of signicance that the abrasive wear of material
1 exceeds that of material 2 by more than 2 units? Assume the
populations to be approximately normal with equal variances.
60
Solution:
1. H
0
:
1

2
= 2.
2. H
1
:
1

2
> 2.
3. = 0.05.
4. Critical region: t > 1.725 , where T =
x
1
x
2
(
1

2
)
_
s
2
p
_
1
n
1
+
1
n
2
_
with
= 20 degrees of freedom.
5. Computations:
x
1
= 85, s
1
= 4, n
1
= 12,
x
2
= 81, s
2
= 5, n
1
= 10.
61
s
p
=

11 16 +9 25
12 +10 2
= 4.478,
t =
(85 81) 2
4.478
_
1/12 +1/10
= 1.04,
P =P(T > 1.04) 0.16.
6. Decision: Do not reject H
0
. We are unable to conclude that
the abrasive wear of material 1 exceeds that of material 2 by
more than 2 units.
Example 20
A vendor of milk product produces and seel low-fat dry milk to
a company that use it to produce baby formula. In order to de-
termine the fat content of the milk, both the company and the
vendor take a sample from each lot and test it for fat content in
percent. Ten sets of paired test results are as follows
62
Company Test Vendor Test
Lot Number Results (X) Results (Y ) D
i
= X
i
Y
i
1 0.50 0.79 -0.29
2 0.58 0.71 -0.13
3 0.90 0.82 0.08
4 1.17 0.82 0.35
5 1.14 0.73 0.41
6 1.25 0.77 0.48
7 0.75 0.72 0.03
8 1.22 0.79 0.43
9 0.74 0.72 0.02
10 0.80 0.91 -0.11
Let
D
denote the mean of the dierences. Test H
0
:
D
= 0
against H
1
:
D
> 0 using a paired t-test with dierences. Let
= 0.05.
Solution:
1. H
0
:
D
= 0.
2. H
1
:
D
> 0.
3. = 0.05.
4. Critical region: t > 1.833 , where T =

d
D
s
d
/

n
with = 9
degrees of freedom.
5. Computations: The sample mean and standard deviation for
the d

i
s are

d
1
= 0.127, s
d
= 0.272, t =
0.1270
0.272/

10
= 1.477.
63
6. Decision: Though the t-statistic is not signicant at the 0.05
level. Do not reject H
0
. However,
P =P(T > 1.477) 0.087.
As a result, there is some evidence that there is a dierence
in the fat content in percent.
Example 21
A taxi company is trying to decide whether to purchase brand A
or brand B tires for its eet of taxis. To estimate the dierence
in the two brands, an experiments is conducted using 16 of each
brand. The tires are run until they wear out. The results are
Brand A: x
A
= 36, 000 kilometers; s
A
= 5, 000 kilometers.
Brand B: x
B
= 38, 000 kilometers; s
B
= 5, 200 kilometers.
Assuming the populations to be approximately normally distributed
with equal variances.
64
1. Compute a 95% condence interval for
A

B
.
2. Test the hypothesis that there is no dierence in the average
wear of 2 brands of tires. Use a signicance level of 0.05.
Solution:
65
Example 22
Referring to the previous problem, suppose a tire from each
company is assigned at random to the rear wheels of 8 taxis and
the following distance, in kilometers, recorded:
Taxi Brand A Brand B
1 34,000 36,000
2 45,000 46,000
3 36,000 37,000
4 32,000 31,000
5 48,000 47,000
6 32,000 36,000
7 38,000 38,000
8 30,000 31,000
Assume that the dierences of the distances are approximately
normally distributed.
66
1. Compute a 95% condence interval for
A

B
.
2. Test the hypothesis that there is no dierence in the average
wear of 2 brands of tires. Use a signicance level of 0.05.
Solution:
67
Choice of Sample Size for Testing Means
68
In most practical circumstances the experiment should be planned
with a choice of sample size made prior to the data-taking pro-
cess if possible. The sample size is usually made to achieve good
power for a xed and xed specied alternative.
Suppose that we wish to test the hypothesis
H
0
: =
0
versus H
1
: >
0
.
with a signicance level when the variance
2
is known. Sup-
pose the rejection region is R = {

X > a}.For a specic alterna-


tive, say =
0
+, the power of our test is
1 = P
_

X > a| =
0
+( H
1
is ture)
_
69
Testing =
0
versus =
0
+.
Therefore,
= P
_

X < a| =
0
+ (H
1
is ture)
_
= P
_

X (
0
+)
/

n
<
a (
0
+)
/

n
| =
0
+
_
= P
_
Z <
a
0
/

n
_
= P
_
Z < z

n
_
from which we conclude that
z

= z

n
and hence the choice of sample size
n
(z

+z

)
2

2
a result that is also true when the alternative hypothesis is H
1
:
<
0
. In a case of a two-tailed test we obtain the power 1
for a specied alternative when
n
(z
/2
+z

)
2

2
Example 23
Suppose that we wish to test the hypothesis
H
0
: = 68 kilograms versus H
1
: > 68 kilograms
for the weights of male students at a certain college using an
= 0.05 level of signicance when it is known that = 5. Find
the sample size required if the power of our test is to be 0.95
when the true mean is 69 kilograms.
Solution:
Since = = 0.05, we have z

= z

= 1.645. For the alterna-


tive = 69 =
0
+1, we take = 1 and then
n =
(1.645 +1.645)
2
25
1
= 270.6
Therefore, 271 observations are required if the test is to reject
the null hypothesis 95% of the time when, in fact, is as large
as 69 kilograms.
70

Das könnte Ihnen auch gefallen