Download as pdf or txt
Download as pdf or txt
You are on page 1of 22

Examples: Hypothesis Test

Examples: Hypothesis Testing


9.5/335) A manufacturer of power meters, which are used to regulate energy
thresholds of a data-communications system, claims that when its production process
is operating correctly, only 10% of the power meters will be defective. A vendor has
just received a shipment of 25 power meters from the manufacturer. Suppose the
vendor wants to test H0: p = .10 against H1: p > .10, where p is the true proportion of
power meters that are defective. Use x 6 as the rejection region.
a. Determine the value of for this test procedure.
b. Find if in fact p = .2. What is the power of the test for this value of p?
c. Find if in fact p = .4. What is the power of the test for this value of p?

Soln:

p(x)

0.3

0.2

=.03339
0.1

0 1 2 3 4 5 6 7 8 25

Graph of p(x) for n = 25 and p = .10, i.e. if the null hypothesis is true.

a) Elements of the test:


H0: p = 0.10
H1: p > 0.10

Test statistic: x
Rejection region: x 6
25
= (P x 6 if in fact p = .10) = p(x)
x=6

ENGSTAT Notes of AM Fillone


Examples: Hypothesis Test

= 1 - p(x)
0

= 1- 0.96661

= 0.03339

Hence, we say that the null hypothesis, p = .10, is being tested at the = .03339 level
of significance.

b) The probability that we will fail to reject H0, is equal to the probability that x = 0, 1,
2, 3, 4, and 5, i.e., the probability that x does not fall in the rejection region.
5
= P(x 5 if in fact p = .2) = p(x) for n = 25 and p = 0.2
x=0

= 0.6167

p(x)

0.2

= .6167

0.1

0 1 2 3 4 5 6 7 8 9 10 25

Graph of p(x) for n = 25 and p = .20, i.e. if the null hypothesis is true.

c) The probability that we will fail to reject H0, is equal to the probability that x = 0, 1,
2, 3, 4, and 5, i.e., the probability that x does not fall in the rejection region.
5
= P(x 5 if in fact p = .4) = p(x) for n = 25 and p = 0.4
x=0

= 0.02936

ENGSTAT Notes of AM Fillone


Examples: Hypothesis Test

p(x)
0.2

= .02936

0.1

1 5 6 7 8 9 10 11 12 13 14 15

Graph of p(x) for n = 25 and p = .40, i.e. if the null hypothesis is true.

ENGSTAT Notes of AM Fillone


Examples: Hypothesis Test

Examples:
4/308) The proportion of adults living in a small town who are college graduates is
estimated to be p = 0.3. To test this hypothesis, a random sample of 15 adults is
selected. If the number of college graduates in our sample is anywhere from 2 to 7, we
shall accept the null hypothesis that p = 0.3; otherwise, we shall conclude that p 0.3;
a) Evaluate assuming that p = 0.3.
b) Evaluate for the alternative p = 0.2 and p = 0.4.
c) Is this a good test procedure?
Soln:
p(x)

0.2

= .08528

0.1

0 1 2 3 4 5 6 7 8 9 10 25
Graph of p(x) for n = 15 and p = .30, i.e. if the null hypothesis is true.

a) Elements of the test:


H0: p = 0.30
H1: p 0.30

Test statistic: x
Rejection region: x < 2 and x > 7

= P (x > 7) and P(x < 2) if in fact p = .30


7 1
= 1 - b(15; 0.3, 0.7) + b(15; 0.3, 0.7)
x=0 x=0
= (1 0.94999) + 0.03527
= 0.08528

Hence, we say that the null hypothesis, p = .30, is being tested at the = .08528 level
of significance.

ENGSTAT Notes of AM Fillone


Examples: Hypothesis Test

b-1)

p(x)

0.2
= .8286

0.1

0 1 2 3 4 5 6 7 8 9 10 25
@p = .20
7
= P( 2 x 7 if in fact p = .2) = p(x) for n = 15 and p = 0.2
x=2
= 0.8286

b-2)

p(x)

0.2
= .7817

0.1

0 1 2 3 4 5 6 7 8 9 10 25

ENGSTAT Notes of AM Fillone


Examples: Hypothesis Test

@p = .40
7
= P( 2 x 7 if in fact p = .4) = p(x) for n = 15 and p = 0.4
x=2
= 0.7817

c) no

ENGSTAT Notes of AM Fillone


Examples: Hypothesis Test

14/309) A manufacturer has developed a new fishing line, which he claims has a mean
breaking strength of 15 kilograms with a standard deviation of 0.5 kilogram. To test
the hypothesis that = 15 kilograms against the alternative that < 15 kilograms, a
random sample of 50 lines will be tested. The critical region is defined to bex < 14.9.
a) Find the probability of committing a type I error when H0 is true.
b) Evaluate for the alternatives = 14.8 and = 14.9 kilograms.

Soln:
Given: n = 50 lines, = 15 kg, = 0.5 kg

14.9 =15
__
z =(x - 0)/(/n) = (14.9 15)/ (0.5/50) = -1.414

= P( Z < -1.414 when = 150)

b) @ = 14.8

=14.8 14.9 15

is the probability of accepting H0 when in fact it is false or the probability of


rejecting H1 when in fact it is true.

ENGSTAT Notes of AM Fillone


Examples: Hypothesis Test

__
z = (14.9 14.8)/ 0.5/50 = 1.414

= P(Z > 1.414 when = 14.8)


= 1 P(Z < 1.414)
= 1 0.9207
= 0.0793

@ = 14.9

= 14.9 15

is the probability of accepting H0 when in fact it is false or the probability of


rejecting H1 when in fact it is true.
__
z = (14.9 14.9)/ 0.5/50 = 0

= P(Z > 0 when = 14.9)


= 1 P(Z < 0)
= 1 0.50
= 0.50

ENGSTAT Notes of AM Fillone


Examples: Hypothesis Test

15/309) A soft-drink machine at the Longhorn Steak House is regulated so that the
amount of drink dispensed is approximately normally distributed with a mean of 200
milliliters and a standard deviation of 15 milliliters. The machine is checked
periodically by taking a sample of 9 drinks and computing the average content. Ifx
falls in the interval 191 <x < 209, the machine is thought to be operating
satisfactorily; otherwise, we conclude that 200 milliliters.
a) Find the probability of committing a type I error when = 200 milliliters.
b) Find the probability of committing a type II error when = 215 milliliters.

Soln:
Given: n = 9 drinks, = 200 ml, = 15 ml

/2
/2

191 =200 209

z =(x - 0)/(/n) = 0

= P(x < 191 when = 200) + P(x > 209 when = 200)
z1 = (191 200)/ 15/9 = -1.8
z2 = (209 200)/ 15/9 = 1.8

From Table A.3, P(z < -1.8) = 0.0359


= P(z < -1.8) + P(z > 1.8)
= 2P(z < -1.8)
= 0.0718

ENGSTAT Notes of AM Fillone


Examples: Hypothesis Test

b. A type II error will result when the sample mean x falls between 191 and 209
when H1 is true.

191 =200 209 215

is the probability of accepting H0 when in fact it is false or the probability of


rejecting H1 when in fact it is true.

= P(191 x 209 when = 215)

z1 = (191 - 215)/ 15/9 = -4.8


z2 = (209 215)/ 15/9 = -1.2

= P(-4.8 Z -1.2)
= P(Z < -1.2) P(Z < -4.8)
= 0.1151 0.0000
= 0.1151

ENGSTAT Notes of AM Fillone


Examples: Hypothesis Test

1/329) An electrical firm manufactures light bulbs that have a length of life that is
approximately normally distributed with a mean of 800 hours and a standard deviation
of 40 hours. Test the hypothesis that = 800 hours against the alternative 800
hours if a random sample of 30 bulbs has an average life of 788 hours. Use a 0.04
level of significance.
Soln:
Hypothesis: H0: = 800
H1: 800

z = (x - )/ (/n) = (788 800) / (40/30) = -1.643

@ .04 level of significance


From Table A.3, z/2 = z.02 = -2.5
Since z < z/2, do not reject the null hypothesis.

7/330) Test the hypothesis that the average content of containers of a particular
lubricant is 10 liters if the contents of a random sample of 10 containers are 10.2, 9.7,
10.1, 10.3, 10.1, 9.8, 9.9, 10.4, 10.3, and 9.8 liters. Use a 0.01 level of significance and
assume that the distribution of contents is normal.
Soln:
Hypothesis: H0: = 10
H1: 10

10.2+9.7+10.1+10.3+10.1+9.8+9.9+10.4+10.3+9.8
x = ---------------------------------------------------------------
10
x = 10.06
10
s2 = (xi -x)2/(n-1) = 0.544/9 = 0.0604
i=1

s = 0.246

t = (10.06 10)/(0.246/10) = 0.772

@ 0.01 level of confidence with v = n-1 = 9 degrees of freedom


From Table A.4, t.01 = 2.821

Since t < t.01, do not reject H0.

ENGSTAT Notes of AM Fillone


Examples: Hypothesis Test

13/330) A manufacturer claims that the average tensile strength of thread A exceeds
the average tensile strength of thread B by at least 12 kilograms. To test his claim, 50
pieces of each type of thread are tested under similar conditions. Type A thread had an
average tensile strength of 86.7 kilograms with a standard deviation of 6.28 kilograms,
while type B thread had an average tensile strength of 77.8 kilograms with a standard
deviation of 5.61 kilograms. Test the manufacturers claim using a 0.05 level of
significance.
Soln:
Given:

Thread A Thread B
No. of samples 50 50
x 86.3 kg 77.8 kg
6.28 kg 5.61 kg

Hypothesis: H0: A - B = 12
H1: A - B < 12

(x1 -x2) d0 (86.7 77.8) - 12


z = ------------------------ = ------------------------------- = -2.603
(21/n1) + 22/n2) (6.28)2/50 + (5.61)2/50

@ .05 level of confidence


From Table A.3
z.05 = -1.645

Since z < z.05, reject H0. A - B < 12

ENGSTAT Notes of AM Fillone


Examples: Hypothesis Test

20/331) A UCLA researcher claims that the average life span of mice can
be extended by as much as 8 months when the calories in their food are
reduced by approximately 40% from the time they are weaned. The
restricted diets are enriched to normal levels by vitamins and protein.
Suppose that a random sample of 10 mice are fed a normal diet and live an
average life span of 32.1 months with a standard deviation of 3.2 months,
while a random sample of 15 mice are fed the restricted diet and live an
average life span of 37.6 months with a standard deviation of 2.8 months.
Test the hypothesis at the 0.05 level of significance that the average life
span of mice on this restricted diet is increased by 8 months against the
alternative that the increase is less than 8 months. Assume the distributions
of life spans for the regular and restricted diets are approximately normal
with equal variances.
Given:
Normal diet Restricted diet

n1 = 10 n2 = 15

x1 = 32.1 months x2 = 37.6 months


s1 = 3.2 months s2 = 2.8 months

= .05 level of significance


1 = 2

Hypothesis: H0: x2 -x1 = 8


H1: x2 -x1 < 8

(n1 1)s21 + (n2 1)s22 (10 1)(3.2)2 + (15 1)(2.8)2


s2p = --------------------------------- = --------------------------------------
n1 + n2 2 10 + 15 - 2

s2p = 8.779
sp = 2.963
(x2 -x1) 8 (37.6 32.1) - 8
t = ------------------------ = --------------------------- = -2.067
sp 1/n1 + 1/n2 2.963 1/10 + 1/15

ENGSTAT Notes of AM Fillone


Examples: Hypothesis Test

@ = .05 level of significance with v = n1 + n2 2 = 23


From Table A.4, t = t0.05 = 1.714

Since t < t0.05, Reject H0

ENGSTAT Notes of AM Fillone


Examples: Hypothesis Test

21/331) The following data represent the running times of films produced
by 2 motion-picture companies:

Company Time (minutes)


1 102 86 98 109 92
2 81 165 97 134 92 87 114

Test the hypothesis that the average running time of films produced by
company 2 exceeds the average running time of films produced by
company 1 by 10 minutes against the one-sided alternative that the
difference is more than 10 minutes. Use a 0.1 level of significance and
assume the distributions of times to be approximately normal with unequal
variances.

Soln:

Company 1
x1 = (102 + 86 + 98 + 109 + 92)/5 = 97.4
5
s21 = (xi -x)2/(n-1) = (21.16 + 129.96 + 0.36 + 134.56 + 29.16)/(5-1) =
i=1

= 78.8
Company 2
x1 = (81 + 165 + 97 + 134 + 92 + 87 + 114)/7 = 110
7
s22 = (xi -x)2/(n-1) = (841 + 3025 + 169 + 576 + 324 + 529 + 16)/(7-1) =
i=1

= 913.33
1 2 but unknown

Hypothesis: H0: x2 -x1 = 10


H1: x2 -x1 > 10

(s21/n1 + s22/n2)2 (78.8/5 + 913.33/7)2


= --------------------------- = ---------------------------------
(s21/n1)2 (s22/n2)2 (78.8/5)2 (913.33/7)2
---------- + ----------- ---------- + --------------
n1 1 n2 1 4 6

ENGSTAT Notes of AM Fillone


Examples: Hypothesis Test

With = 0.10 level of significance and 8,


From Table A.4, t = t0.10 = 1.397

(x1 -x2) d0 (110 97.4) - 10


t = ------------------------ = -------------------------- = 0.215
(s21/n1) + s22/n2) 78.8/5 + 913.33/7

Since t < t0.10, do not reject H0.

ENGSTAT Notes of AM Fillone


Examples: Hypothesis Test

24/332) Five samples of a ferrous-type substance are to be used to


determine if there is a difference between a laboratory chemical analysis
and an X-ray fluorescence analysis of the iron content. Each sample was
split into two sub samples and the two types of analysis were applied.
Following are the coded data showing the iron content analysis;

Sample
Analysis 1 2 3 4 5
X-ray 2.0 2.0 2.3 2.1 2.4
Chemical 2.2 1.9 2.5 2.3 2.4

Assuming that the populations are normal, test at the 0.05 level of
significance whether the two methods of analysis give, on the average, the
same result.

Soln:
Hypothesis: H0: D = 0
H1: D 0

5
d = (x2i -x1i)/5
i=1

= [(2.2-2.0) + (1.9-2.0) + (2.52.3) + (2.3-2.1) + (2.4 2.4)] / 5 = 0.10


5
s d = (di -d)2 /(n-1) = 0.02: sd = 0.1414
2
i=1

d d0
t = ------------ = (0.10 0)/(0.1414/ 5) = 1.581
sd / n

= 0.05 level of significance and v = 5 1 = 4


From Table A.4, t/2 = t0.025 = 2.776

Since t < t0.025, Do not reject H0.

ENGSTAT Notes of AM Fillone


Examples: Hypothesis Test

28/333) In the study Comparison of Sorbic Acid in Country Ham Before


and After Storage conducted by the Department of Human Nutrition and
Foods at the Virginia Polytechnic Institute and State University in 1983, the
following data on the comparison of sorbic acid residuals in parts per
million in ham immediately after dipping in a sorbate solution and after 60
days of storage were recorded:

Sorbic Acid Residuals in Ham


Slice Before After Storage
Storage
1 224 116
2 270 96
3 400 239
4 444 329
5 590 437
6 660 597
7 1400 689
8 680 576

Assuming the populations to be normally distributed, is there sufficient


evidence, at the 0.05 level of significance, to say that the length of storage
influences sorbic acid residual concentrations?

Soln:
Hypothesis: H0: D = 0
H1: D > 0
8
d = (x1i -x2i)/8
i=1

= [(224-116) + (270-96) + (400-239) + + (680 576)] / 8 = 198.625


8
s d = (di -d)2 /(8-1) = 44169.41069: sd = 210.1652
2
i=1

d d0
t = ------------ = (198.625 0)/(210.1652/ 8) = 2.673
sd / n

ENGSTAT Notes of AM Fillone


Examples: Hypothesis Test

= 0.05 level of significance and v = 8 1 = 7


From Table A.4, t = t0.05 = 1.895

Since t > t, Reject H0

29/334) How large a sample is required in Exercise 2 if the power of our


test is to be 0.90 when the true mean is 21.3? Assume that = 1.42.

Given: Power of a test = 1- = 0.90


true = 21.3
= 1.42

From Table A.3


z = z0.05 = 1.645
z = z0.10 = 1.280

Since the alternative true = 21.3,


therefore = true - = 21.3 22.2 = -0.9

(z + z)2 2 (1.645 + 1.28)2(1.42)2


n = --------------------- = --------------------------------,
2 (-0.9)2
say n = 22.

ENGSTAT Notes of AM Fillone


Examples: Hypothesis Test

2/339) Suppose that, in the past, 40% of all adults favored capital
punishment. Do we have reason to believe that the proportion of adults
favoring capital punishment today has increased if, in a random sample of
15 adults, 8 favor capital punishment? Use a 0.05 level of significance.
Soln:
Given: p = 0.40
Hypothesis: H0: p = 0.40
H1: p > 0.40

At = 0.05 level of significance


Test statistic: Binomial variable Z with p = 0.4 and n = 15
Computations: x = 8, n = 15, np0 = 15(0.4) = 6. Therefore, From Table
A.1, the computed p-value is
P = P(X 8 when p = 0.4)
7
= 1 - b(x; 15, 0.4)
x=0

= 1 - .7869 = 0.2131

Since the P-value > , do not reject H0 @ p = 0.40.

ENGSTAT Notes of AM Fillone


Examples: Hypothesis Test

9/339) In a study to estimate the proportion of residents in a certain city and


its suburbs who favor the construction of a nuclear power plant, it is found
that 63 of 100 urban residents favor the construction while only 59 of 125
suburban residents are in favor. Is there a significant difference between the
proportion of urban and suburban residents who favor construction of the
nuclear plant? Make use of a P-value.
Soln:
p1 proportion of urban residents
p2 proportion of suburban residents

1. H0: p1 = p2
2. H1: p1 > p 2
3. Computations:
Urban: p1 = 63/100 = 0.63
q1= 37/100 = 0.37
Suburban: p2 = 59/125 = 0.472
q2 = 66/125 = 0.528

p = (62+59)/(100+125) = 0.542
q = 1 0.542 = 0.458

z = (0.63 0.472) / (0.458)(0.542)[1/100 + 1/125] = 2.364

P = P(Z > 2.364) = 0.0091

ENGSTAT Notes of AM Fillone


Examples: Hypothesis Test

11/340) A cigarette manufacturing firm distributes two brands of cigarettes.


If it is found that 56 of 200 smokers prefer brand A and that 29 of 150
smokers prefer brand B, can we conclude at the 0.06 level of significance
that brand A outsells brand B?
Soln:
pA proportion that prefers brand A
pB proportion that prefers brand B

1. H0: pA = pB
2. H1: pA > pB
3. = 0.06
4. Critical region: z > 1.555
5. Computations:
Brand A: pA = 56/200 = 0.28
qA = 144/200 = 0.72
Brand B: pB = 29/150 = 0.193
qB = 121/150 = 0.807

p = (56+29)/(200+150) = 0.243
q = 1 0.243 = 0.757

z = (0.28 0.193) / (0.243)(0.757)[1/200 + 1/150] = 1.878

Since z > z, reject H0. We can conclude that at .06 level of significance,
brand A outsells brand B.

ENGSTAT Notes of AM Fillone

You might also like