6 Hypothesis Testing
6 Hypothesis Testing
OBJECTIVES
When you have completed this topic, you
should be able to:
Develop the hypothesis testing procedure as a
technique for decision making
Determine the risks involved in making these
decisions based only upon sample information
1
CONCEPTUAL EMPHASIS
1. Basic concepts of hypothesis testing
2. One sample tests for means, proportions
and variance
3. Two sample tests for a mean
4. The paired difference test
Readings
• Berenson and Levine (1992) Chapters 11, 12 & 13.
• Kusnandar (2004) Chapter 6.
3
2
STRUCTURE OF HYPOTHESIS TESTING
Null hypothesis
Alternative hypothesis
Test statistic
Rejection region (critical region)
3
CRUCIAL THINGS ABOUT THE TWO
HYPOTHESES
4
REJECTION REGION FOR
H0: θ = θ0 VS. H1: θ ≠ θ0
Rejection Rejection
region Nonrejection region
α region α
2 2
Critical θ0 Critical θ
value value 9
Rejection
region
Nonrejection
α
region
θ0 Critical θ
value
10
5
REJECTION REGION FOR
H0: θ = θ0 VS. H1: θ < θ0
Rejection
region
Nonrejection
α region
Critical θ0 θ
value 11
6
RELATIONSHIP BETWEEN α AND β
Actual situation
13
14
7
TEST OF HYPOTHESIS FOR THE MEAN, Σx
KNOWN
REJECTION RULES
X −µ
Test statistic: Z=
σ
n
Hypotheses Rejection rules
H0: µ = µ0 • Reject H0 if Z < – zα/2 or Z > zα/2
H1: µ ≠ µ0 • Do not reject H0 if –zα/2 ≤ Z ≤ zα/2
H0: µ = µ0 • Reject H0 if Z > zα
H1: µ > µ0 • Do not reject H0 if Z ≤ zα
H0: µ = µ0 • Reject H0 if Z < – zα
H1: µ < µ0 • Do not reject H0 if Z ≥ –zα
16
8
EXAMPLE 1
BERENSON & LEVINE (1992) PROBLEMS 11.13 P.365
Suppose that the director of manufacturing at
clothing factory needed to determine whether a
new machine was producing a particular type of
clothing according to the manufacturer’s
specification, which indicate that the cloth should
have a mean breaking strength of 70 pound and
a standard deviation of 3.5 pounds. A sample of
36 pieces revealed a sample mean of 69.7 pounds.
Is there evidence that the machine is not meeting
the manufacturer’s specification in term of the
average breaking strength? (Use the .05 level of
significance) 17
SOLUTION TO EXAMPLE 1
1. The null and alternative hypothesis were
H0: µ = 70
H1: µ ≠ 70
2. The test statistic would be the Z statistic
3. Significance level of .05 specified the size of the
rejection region. Since H1 is a two sided hypothesis, the
rejection region is divided into the two tails of the
distribution, i.e. 0.025 each. Looking up the area in the
Normal distribution the critical value that divide the
rejection and nonrejection region are +1.96 and –1.96
Z = -1.96 Z = 1.96
µX = 70
18
9
SOLUTION TO EXAMPLE 1 (CONTINUED)
4. The value of the test statistics were
X −µ 69.7 − 70
Z= = = −0.514
σ 3.5
n 36
USING MINITAB
Store the data in one column of Minitab spreadsheet
Choose Stats Basic Statistics 1-Sample z
Click Test mean button and complete the dialog box
20
10
MINITAB OUTPUT
H0: µ = 70 H1: µ ≠ 70
Z-Test
The value of
Z statistic
Test of mu = 70.000 vs mu not = 70.000
The assumed sigma = 3.50
11
EXAMPLE 2
23
MINITAB OUTPUT
Stats Basic Statistics 1-Sample t
T-Test of the Mean
24
12
RULE OF THUMB
Test of hypothesis for the mean
Population variance Sample size Test statistic
X −µ
Known Any sample size Z=
σ n
X −µ
Unknown n ≥ 30 Z=
s n
X −µ
Unknown n < 30 T=
S n
25
13
EXAMPLE 3
A stationery supply store receives a shipment of a
certain brand of inexpensive ball point pens from
the manufacturer. The shipment can be returned if
there is more than 5% defective. A random sample
of 300 pens is tested and 30 are found to be
defective. Can the owner returned this shipment?
Use a level of significance of .10.
27
α α
2 2
0 χ 1−α χ α χ2
28
14
CRITICAL VALUES OF Χ2
α
2
0 χα χ2
χ2 α
ν α=0,995 α=0,990 α=0,975 α=0,950 α=0,900 α=0,100 α=0,050 α=0,025 α=0,010 α=0,005
1 0,000 0,000 0,001 0,004 0,016 2,706 3,841 5,024 6,635 7,879
2 0,010 0,020 0,051 0,103 0,211 4,605 5,992 7,378 9,210 10,597
3 0,072 0,115 0,216 0,352 0,584 6,251 7,815 9,348 11,345 12,838
4 0,207 0,297 0,484 0,711 1,064 7,779 9,488 11,143 13,277 14,860
5 0,412 0,554 0,831 1,146 1,610 9,236 11,071 12,833 15,086 16,750
6 0,676 0,872 1,237 1,635 2,204 10,645 12,592 14,449 16,812 18,548
7 0,989 1,239 1,690 2,167 2,833 12,017 14,067 16,013 18,475 20,278
8 1,344 1,647 2,180 2,733 3,490 13,362 15,507 17,535 20,090 21,955
9 1,735 2,088 2,700 3,325 4,168 14,684 16,919 19,023 21,666 23,589
10 2,156 2,558 3,247 3,940 4,865 15,987 18,307 20,483 23,209 25,188
11 2,603 3,054 3,816 4,575 5,578 17,275 19,675 21,920 24,725 26,757
12 3,074 3,571 4,404 5,226 6,304 18,549 21,026 23,337 26,217 28,300
13 3,565 4,107 5,009 5,892 7,042 19,812 22,362 24,736 27,688 29,820
14 4,075 4,660 5,629 6,571 7,790 21,064 23,685 26,119 29,141 31,319
15 4,601 5,229 6,262 7,261 8,547 22,307 24,996 27,488 30,578 32,801
29
15
EXAMPLE 4
A manufacture of candy must monitor the
temperature at which the candies are
baked. Too much variation will cause
inconsistency in the taste of the candy. Past
records show that the standard deviation of
the temperature has been 1.2o F. A random
sample of 30 batches of candy is selected
and the sample standard deviation of the
temperature is 2.1o F. Is there any evidence
that the population standard deviation has
31
increase above 1.2o F?
TWO-SAMPLE TESTS
Population 1 Population 2
µ1 , σ 12
? µ 2 , σ 22
Sample
Sample
n1 , x1 , s12
! n 2 , x 2 , s 22
32
16
TESTING FOR DIFFERENCE BETWEEN THE
MEANS OF TWO INDEPENDENT POPULATIONS
Two-tailed test:
H0: µ1 = µ2 or µ1 – µ2 = 0
H1: µ1 ≠ µ2 or µ1 – µ2 ≠ 0 Rejection regions
One-tailed tests:
H0: µ1 = µ2 or µ1 – µ2 = 0
H1: µ1 > µ2 or µ1 – µ2 > 0
Rejection region
or
H0: µ1 = µ2 or µ1 – µ2 = 0
H1: µ1 < µ2 or µ1 – µ2 < 0
33
Rejection region
17
EXAMPLE 5
Management of the Sycamore Steel Co.
wishes to determine if there is any
difference in performance between the day
shift of workers and the evening shift of
workers. A sample of 120 day-shift workers
reveals an average output of 74.3 parts per
hour with a standard deviation of 16 parts
per hour. A sample of 100 evening-shift
workers reveals an average output of 69.7
parts per hour with a standard deviation of
18 parts per hour. Is there any evidence of a
difference in output between the day shift
and evening shift? 35
18
EXAMPLE 6
A quality control manager at a light bulb factory
would like to determine if there is any difference
in the average life of bulb manufactured on two
different types of machines. A random sample of
25 light bulbs obtained from machine 1 indicated
a sample mean of 375 hours with a sample
standard deviation of 110 hours, and a similar
sample of 25 from machine 2 indicated a sample
mean of 362 hours with a sample standard
deviation of 125 hours. Is there any evidence of a
difference in the average life of bulbs produced by
the two types of machines?
37
19
EXAMPLE 7
An experiment was conducted to compare the mean
number of tapeworm in the stomachs of sheep that have
been treated for worms against the mean number in
those that were untreated. A sample of 14 worm-
infected lambs was randomly divided into two groups.
Seven were injected with the drug and the remainder
were left untreated. After a six-month period only 13
animals were available for analysis and the following
worm counts were recorded:
Drug-treated sheep 5 13 18 6 4 2 15
Untreated 40 54 26 63 21 37
Is there any difference in the mean number of worms
between treated and untreated lambs? 39
20
Observations Sample 1 Sample 2 Difference
⋮ ⋮ ⋮ ⋮
i x1i x2i di = x1i – x2i
⋮ ⋮ ⋮ ⋮
n x1n x2n dn = x1n – x2n
41
21
EXAMPLE 8
The marketing manager of a
company decided to evaluate Store Before ($) During ($)
the effectiveness of a new 1 63,458 65,496
advertising campaign. He 2 48,510 52,462
collected data on monthly 3 51,203 50,864
sales before and during the
4 75,241 79,520
campaign for eight regional
stores (see the table). What 5 60,123 71,145
should he conclude? 6 55,555 55,600
7 45,456 48,654
8 57,438 60,897
43
22