Statistical Hypothesis Testing Guide
Statistical Hypothesis Testing Guide
Let us suppose that we are dealing with two independent random samples of size n1
and n2 from two normal populations having means µ1 and µ2 and known variances
σ12 and σ22 respectively and that we want to test the null hypothesis µ 1 - µ2 = δ0
where δ0 is a given constant, against one of the alternatives µ1 - µ2 ≠ δ0, µ1 - µ2 >
δ0, µ1 - µ2 < δ0. The test procedure is as follows:
Null Hypothesis, H0 ; µ1 - µ2 = δ0
Alternate Hypothesis, H1: µ1 - µ2 < δ0
or H1: µ1 - µ2 > δ0
or H1: µ1 - µ2 ≠ δ0
Sample sizes: n1 and n2 (both are greater than or equal to 30)
Sample means : x and y
Sample variances: s12 and s22
Level of significance, α (1% or 5%)
( X − Y ) − 0
Test Statistic, Z =
S12 S 22
+
n1 n 2
x2 = 0.083 ohm and s2 = 0.005 ohm. At the 0.05 level of significance, does this
= 2.65
Z0.05 = 1.645
Decision: Since z = 2.65 exceeds Z0.05 = 1.645, we have to reject the null
hypothesis. So, accept the alternate hypothesis.
Problem 19: A company claims that its light bulbs are superior to those of its main
competitor. If a study showed that a sample of n1 = 40 of its bulbs has a mean
lifetime of 1647 hours of continuous use with a standard deviation of 27 hours,
while a sample of n2 = 40 bulbs made by its main competitor has a mean lifetime of
1638 hours of continuous use with a standard deviation of 31 hours, does this
substantiate the claim at the 0.05 level of significance?
Solution:
Null Hypothesis, H0 ; µ1 - µ2 = 0
Alternate Hypothesis, H1: µ1 - µ2 > 0
Level of significance: α = 0.05
x1 =1647 x2 = 1638
s1 = 27 s2 = 31
n1 = 40 n2 = 40
( X1 − X 2 ) − 0
Test Statistic, Z =
S12 S 22
+
n1 n 2
(1647 − 1638)
=
27 2 312
+
40 40
= 1.38
Z0.05 = 1.645
Decision: Since z = 1.38 does not exceeds Z0.05 = 1.645, we have to accept the
null hypothesis. So, the difference between the two sample means is not
significant.
s1 = 19.3 s2 = 21.4
n1 = 75 n2 = 75
( X1 − X 2 ) − 0
Test Statistic, Z =
S12 S 22
+
n1 n 2
( 83.2 − 90.8 )
=
19.3 2 21.4 2
+
75 75
= -2.28
Z0.025 = 1.96
Decision: Since Z = - 2.28 < - Z0.025 = -1.96, we have to reject the null
hypothesis. So, accept the alternate hypothesis.
Problem 21: Studying the flow of traffic at two busy intersections between 4 P.M.
and 6 P.M. (to determine the possible need for turn signals), it was found that on
40 week-days there were on the average 247.3 cars approaching the first
intersection from the south that made left turns while on 30 weekdays there were
on the average 254.1 cars approaching the second intersection from the south that
made left turns. The corresponding sample standard deviations are s1 =15.2 and
s2 =18.7 Test the null hypothesis µ1- µ2 = 0 against the alternative hypothesis
µ1- µ2 ≠ 0 at the level of significance α = 0.01.
Solution:
Null Hypothesis, H0 ; µ1 - µ2 = 0
Alternate Hypothesis, H1: µ1 - µ2 ≠ 0
Level of significance: α = 0.01
x1 = 247.3 x 2 = 254.1
s1 = 15.2 s2 = 18.7
n1 = 40 n2 = 30
( X1 − X 2 ) − 0
Test Statistic, Z =
S12 S 22
+
n1 n 2
( 247.3 − 254.1 )
=
15.2 2 18.7 2
+
40 30
= -1.629
Z0.005 = 2.58
Decision: Since Z = - 1.629 which is not less than -Z0.05 = -2.58, we have to
accept the null hypothesis.
Large sample confidence interval for the difference of means:
The ( 1 – α)100% large sample confidence interval for the difference means is
given by
s12 s 22
( x − y ) z / 2 +
n1 n2
Problem 22: The dynamic modulus of concrete is obtained for two different
concrete mixes. For the first mix, n1 = 33, x = 115.1 and s1 = 0.47 psi. For the
second mix, n2 = 31, y = 114.6 and s2 = 0.38. Test with α = 0.05, the null
hypothesis of equality of mean dynamic modulus versus the two-sided alternative.
Also construct a 95% confidence interval of the difference in mean dynamic
modulus.
Solution:
Null Hypothesis, H0 ; µ1 - µ2 = 0
Alternate Hypothesis, H1: µ1 - µ2 ≠ 0
Level of significance: α = 0.05
x = 115.1 y = 114.6
s1 = 0.47 s2 = 0.38
n1 = 33 n2 = 31
( X − Y ) − 0
Test Statistic, Z =
S12 S 22
+
n1 n 2
( 115.1 − 114.6 )
=
0.47 2 0.38 2
+
33 31
= 4.69
Z0.025 = 1.96
Decision: Since Z = 4.69 > Z0.025 = 1.96, we have to reject the null hypothesis.
So, accept the alternate hypothesis
A 95% confidence interval of the difference in mean dynamic modulus is given by
s12 s 22
( x − y ) z / 2 +
n1 n2
0.47 2 0.382
(115.1− 114.6 ) z 0.025 +
33 31
0.47 2 0.38 2
(115.1− 114.6 ) 1.96 +
33 31
0.5 1.96 * 0.10655
0.291162 µ1 - µ2 0.708838
Comparisons -Two independent Small samples
Let us suppose that we are dealing with two independent random samples of size n1
and n2 (n1, n2 or both less than 30) from two normal populations having means µ1
and µ2 and variances σ12 and σ22 are unknown. We want to test the null hypothesis
µ1 - µ2 = δ0 where δ is a given constant, against one of the alternatives µ1 - µ2 ≠ δ,
µ1 - µ2 > δ, µ1 - µ2 < δ. The test procedure is as follows:
Null Hypothesis, H0 ; µ1 - µ2 = δ
Alternate Hypothesis, H1: µ1 - µ2 < δ
or H1: µ1 - µ2 > δ
or H1: µ1 - µ2 ≠ δ
Sample sizes: n1 and n2 (n1, n2 or both less than 30)
Sample means : X and Y
Sample variances: s12 and s22
Level of significance, α (1% or 5%)
( X − Y ) − (n1 − 1) S12 + (n2 −1) S 22
Test Statistic, t = where S p2 =
1 1 n1 + n2 − 2
Sp +
n1 n2
Use the 0.01 level of significance to test whether the difference between the means
of these two samples is significant.
Solution:
Null Hypothesis, H0 ; µ1 - µ2 = 0
Alternate Hypothesis, H1: µ1 - µ2 ≠ 0
Level of significance: α = 0.01
x = 8230 y = 7940
( 8230 − 7940)
=
1 1
114.31 +
5 6
= 4.19
t0.005 9 d.f = 3.250
Decision: Since t = 4.19 > t0.005 = 3.250, we have to reject the null hypothesis.
So, accept the alternate hypothesis.
Problem 24: Measuring specimens of nylon yarn taken from two spinning
machines, it was found that 8 specimens from the first machine had a mean denier
of 9.67 with a standard deviation of 1.81 while 10 specimens from the second
machine had a mean denier of 7.43 with a standard deviation of 1.48. Assuming
that the populations sampled are normal and have the same variance, test the null
hypothesis µ1 - µ2 =1.5 against the alternative hypothesis µ1 - µ2 > 1.5 at the 0.05
level of significance.
Solution:
Null Hypothesis, H0 ; µ1 - µ2 = 1.5
Alternate Hypothesis, H1: µ1 - µ2 > 1.5
Level of significance: α = 0.05
x = 9.67 y = 7.43
s1 = 1.81 s2 = 1.48
n1 = 8 n2 = 10
( X − Y ) − (n1 − 1) S12 + (n2 −1) S 22
Test Statistic, t = where S = 2
n1 + n2 − 2
p
1 1
Sp +
n1 n2
= 0.9555
t0.05 16 d.f = 1.746
Decision: Since t = 0.9555 is not greater than t0.05 = 1.746, we have to accept
the null hypothesis.
Problem 25: As a part of an industrial training program, some trainees are
instructed by method A, which is straight computer-based instruction, and some
are instructed by method B, which also involves personal attention of an instructor.
If random samples of size 10 are taken from large groups of trainees instructed by
each of the two methods, and the scores which they obtained in an appropriate
achievements test are
Method A 71 75 65 69 73 66 68 71 74 68
Method B 72 77 84 78 69 70 77 73 65 75
Use the 0.05 level of significance to test the claim that method B is more effective.
Assume that the populations sampled can be approximated closely with normal
distributions having the same variance.
Solution:
Null Hypothesis, H0 ; µ1 - µ2 = 0
Alternate Hypothesis, H1: µ1 - µ2 < 0
Level of significance: α = 0.05
x = 70 y = 74
s1 = 3.3665 s2 = 5.3995
n1 = 10 n2 = 10
( X − Y ) − (n1 − 1) S12 + (n2 −1) S 22
Test Statistic, t = where S p2 =
1 1 n1 + n2 − 2
Sp +
n1 n2
( 70 − 74 )
=
1 1
4.4993 +
10 10
= -1.9879
t0.05 18 d.f = 1.734
Decision: Since t = -1.9879 < - t0.05 = 1.734, we have to reject the null
hypothesis. So, accept the alternate hypothesis.
Problem 26: To compare two kinds of bumper guards, 6 of each kind, were
mounted on a certain kind of compact car. Then each car was run into a concrete
wall at 5 miles per hour and the following are the costs of the repairs ( in rupees)
Bumper Guard 1 407 448 423 465 402 419
Bumper Guard 2 434 415 412 451 433 429
Use the 0.01 level of significance to test whether the difference between the two
sample means is significant.
Solution:
Null Hypothesis, H0 ; µ1 - µ2 = 0
Alternate Hypothesis, H1: µ1 - µ2 ≠ 0
Level of significance: α = 0.01
x = 427.33 y = 429
n1 + n2 − 2
p
1 1
Sp +
n1 n2
( 427.33 − 429)
=
1 1
19.998 +
6 6
= - 0.1446
t0.005 10 d.f = 3.169
Decision: Since t = - 0.1446 > -t0.005 = - 3.169, we have to accept the null
hypothesis.
(5 −1)15750 + (6 −1)10920 1 1
( 8230 − 7940 ) t 0.005 +
9 5 6
290 ± 3.250 x 38.103 x 0.6055
290 ± 74.98
215.02 < µ1 - µ2 < 364.98
D − D,0 Di ( D − D)
i
2
SD / n n n −1
D − D,0 Di ( D − D)
i
2
SD / n n n −1
5.2 − 0
t=
4.08 / 10
t = 4.03
Decision: Since t = 4.03 exceeds t0.05 9 d.f = 1.833, we have to reject the null
hypothesis. So, accept the alternate hypothesis and hence we conclude that the
safety program is effective.
We know that The (1 – α)100% confidence interval for µD is given by
SD
D t / 2
n
Here α = 0.1so that α/2 = 0.05
SD S
The confidence interval is D − t / 2 D D + t / 2 D
n n
4.08 4.08
5.2 − t 0.05 D 5.2 + t 0.05
10 10
4.08 4.08
5.2 −1.833 D 5.2 +1.833
10 10
5.2 − 2.365 D 5.2 + 2.365
2.835 D 7.565
Problem 29: In a study of the effectiveness of physical exercise in weight
reduction, a group of 16 persons engaged in a prescribed program of physical
exercise for one month showed the following results:
Weight before Weight after
(pounds) (pounds)
209 196
178 171
169 170
212 207
180 177
192 190
158 159
180 180
170 164
153 152
183 179
165 162
201 199
179 173
243 231
144 140
Use the 0.01 level of significance to test whether the prescribed program of
exercise is effective.
Solution:
Null Hypothesis, H0: µD = 0
Alternate Hypothesis, H1: µD > 0
Sample size: 16
Level of significance = 0.01
Di = Xi - Yi , i = 1, 2, …, 16
So, Di : 13, 7, -1, 5, 3, 2, -1, 0, 6, 1, 4, 3, 2, 6, 12, 4
D = 4.125, S D = 4.064
n n
D − D,0 D i ( D − D)i
2
SD / n n n −1
4.125 − 0
t=
4.064 / 16
t = 4.06
( )
n
Let S 2 = 1
2
Xi − X be the sample variance based on a random sample from
n − 1 i =1
( X ) 2.
n
So, sample variance S 2 = 1
2
−X is an unbiased estimator of
n −1
i
i =1
2
( n − 1) S 2
2 /2 will be satisfied.
1− /2
2
Then (1-α)100% confidence interval for population variance 2 is
( n − 1) s 2 2 ( n − 1) s 2
2 /2 12− /2
Problem 1: Suppose that the refractive indices of 20 pieces of glass (randomly
selected from a large shipment purchased by the optical firm) have a variance of
1.20*10-4. Construct a 95% confidence interval for , the standard deviation of
the population sampled.
Solution: Here sample size n =20 then degrees of freedom 20-1=19
Since confidence is 95%, α=1-0.95=0.05 and hence α/2 =0.025.
From table 5, 0.975
2
= 8.907 and 0.025
2
= 32.852 , then 95% confidence interval for
2 is
( n − 1) s 2 2 ( n − 1) s 2
2 /2 12− /2
32.852 8.907
0.000069 2 0.000256
0.0083 0.0160
Hence the 95% confidence interval from 0.0083 to 0.0160 contains σ, the true
standard deviation of the refractive index.
Problem 2: A manufacturer claims that the average tar content of a certain kind of
cigarette is = 14.0 . In an attempt to show that it differs from this value, five
measurements are made of the tar content (mg per cigarette):
14.5, 14.2, 14.4, 14.3, 14.6
Construct a 99% confidence interval for the variance of the population sampled.
Solution:
From the sample data
(14.4 − 14.5) + (14.4 − 14.2 ) + (14.4 − 14.4 ) + (14.4 − 14.3) + (14.4 − 14.6 )
2 2 2 2 2
s 2
=
5 −1
= 0.025
s = 0.1581
Here α = 0.01, then 2 / 2 = 02.005 = 14.860 and 12− / 2 = 02.995 = 0.207 at 4 degrees of
freedom.
Hence 99% confidence interval for variance is
( n − 1) s 2 2 ( n − 1) s 2
2 /2 12− /2
( 5 − 1) 0.025 2 ( 5 − 1) 0.025
14.860 0.207
0.0067 0.4831
Alternative hypothesis, H1 : 2 02
(or ) 2 02
(or ) 2 02 .
Level of significance = α
Sample variance = s2
Sample size = n
( n − 1) S 2
The test statistic, =
2
.
02
=
( 0.50 )
2
= 22.94
( n − 1) S 2
Since = = 22.94 does not exceed 23.685, the value of 0.05
2 2
Decision: 2
0
for 14 degrees of freedom, the null hypothesis cannot be rejected. So, accept the
null hypothesis.
Problem 4: A random sample of 6 steel beams has a mean compressive strength
of 58,392 psi with a standard deviation of 648 psi. Test the null hypothesis
= 600 psi for the compressive strength of the given kind of steel against the
alternative hypothesis 600 psi. Use 0.05 level of significance.
Solution:
Null hypothesis: = 600
Alternative hypothesis: 600
Level of significance = 0.05
n = 6, = 600
s = 648
( n − 1) S 2
Test Statistic, =
2
2
0
( 6 − 1)( 648)
2
=
( 600 )
2
= 5.832
( n − 1) S 2
Since = = 5.832 does not exceed 11.07, the value of 0.05
2 2
Decision: 2
0
for 5 degrees of freedom, the null hypothesis cannot be rejected. So, accept the null
hypothesis.
Problem 5: If 12 determinations of the specific heat of iron have a standard
deviation of 0.0086, test the null hypothesis that = 0.010 for such
determinations. Use the alternative hypothesis 0.010 and the level of
significance = 0.01
Solution:
Null hypothesis: = 0.010
Alternative hypothesis: 0.010
level of significance = 0.01
n = 12, = 0.010
s = 0.0086
( n − 1) S 2
Test statistic, =
2
2
0
=
( 0.01)
2
= 8.1356
( n − 1) S 2
Since = = 8.1356 lies between 2.603 and 26.757 we can’t
2
Decision: 2
0
reject the null hypothesis where 0.095
2
= 2.603 and 0.005
2
= 26.757 with 11 degrees of
freedom.
Problem 6: Playing 10 rounds of gold on his home course, a golf professional
averaged 71.3 with a standard deviation of 1.32. Test the null hypothesis that the
consistency of his game on his home course is actually measured by = 1.20 ,
against the alternative hypothesis that he is less consistent. Use the level of
significance = 0.05 .
Solution:
Null hypothesis: = 1.20
Alternative hypothesis: 1.20
Level of significance = 0.05
n = 10, σ = 1.20
s = 1.32
=
2 ( n − 1) S 2
Test statistic,
0
2
(10 − 1)(1.32 )
2
=
(1.20 )
2
= 10.89
=
2 ( n − 1) S 2
= 10.89 does not exceed 16.919, the value of
Decision: Since
0
2
0.05
2
for 9 degrees of freedom, the null hypothesis cannot be rejected. So, accept
the null hypothesis.
Problem 7: Use the 0.01 level of significance to test the null hypothesis that
= 0.015 inch for the diameters of certain bolts against the alternative hypothesis
that 0.015 inch, given that a random sample of size 15 yielded s2=0.00011.
Solution:
Null hypothesis: = 0.015
Alternative hypothesis: 0.015
Level of significance = 0.01
n = 15, = 0.015
s2 = 0.00011
=
2 ( n − 1) S 2
Test statistic,
0
2
=
(15 − 1)( 0.00011)
( 0.015 )
2
= 6.8444
( n − 1) S 2
Decision: Since = = 6.8444
2
lies between 4.075 and 31.319 where
2
0
0.095
2
= 4.075 and 0.005
2
= 31.319 with 14 degrees of freedom, we can’t reject the null
hypothesis.
Problem : The security department of a large office building wants to test the null
hypothesis that = 2.0 minutes for the time it takes a guard to walk his round
against the alternative hypothesis that 2.0 minutes. What can it conclude at
the 0.01 level of significance if a random sample of size n = 31 yields s = 1.8
minutes?
Hypothesis concerning two variances
Consider two normal populations having the variances 12 and 22 respectively. To
test whether these two variances are equal or not we will take two random samples
of size n1 and n2 having the variances S12 and S 22 respectively from the two normal
populations. The test procedure is as follows:
Null Hypothesis, H0 ; 12 = 22
Alternate Hypothesis, H1: 12 22
or H1: 12 22
or H1: 12 22
Sample sizes: n1 and n2 (whatever may be the sizes)
Sample variances: S12 and S 22
Level of significance = α (1% or 5%)
S12
Test Statistic, F = 2
S2
S12
2
1
2
2
F = F > Fα(n1 – 1, n2 – 1)
S 22
S M2
12 22 F= F > Fα/2(nM – 1, nm – 1)
S m2
Finally we have to write the decision whether to accept or reject the null
hypothesis.
Solution:
Null Hypothesis, H0 ; 12 = 22
Alternate Hypothesis, H1: 12 22
0.062 2
=
0.035 2
= 3.14
F0.05(11, 11) = 2.82
Critical regions for testing H0: 12 = 22
4 .2 2
=
2.7 2
= 2.41
F0.01(20, 14) = 3.51
Critical regions for testing H0: 12 = 22
18.7 2
=
15.2 2
= 1.51
F0.01(29, 39) = 1.76
Critical regions for testing H0: 12 = 22
Decision: Since F = 1.51 does not exceed F0.05(29, 39) = 1.76, the null hypothesis
can’t be rejected. That is accept the Null hypothesis. The variability at both the
intersections are the same.
Problem 11: Measuring specimens of nylon yarn taken from two spinning
machines, it was found that 8 specimens from the first machine had a mean denier
of 9.67 with a standard deviation of 1.81 while 10 specimens from the second
machine had a mean denier of 7.43 with a standard deviation of 1.48. Assuming
that the populations sampled are normal and independent. Test the null hypothesis
that the two populations have equal variances. Use the 0.02 level of significance.
Solution:
Null Hypothesis, H0 ; 12 = 22
Alternate Hypothesis, H1: 12 22
Sample sizes: nM = 8 and nm =10 (whatever may be the sizes)
Sample variances: S12 =1.812 and S 22 = 1.482
Level of significance, α = 0.02
S M2
Test Statistic, F =
S m2
1.812
=
1.48 2
= 1.495
F0.02/2(7, 9) = F0.01(7, 9) =5.61
Critical regions for testing H0: 12 = 22
Decision: Since F = 1.495 does not exceed F0.01(7, 9) =5.61, the null hypothesis
can’t be rejected. That is accept the Null hypothesis. So, the populations variances
are equal.
Problem 12: The following random samples are measurements of the heat-
producing capacity ( in millions of calories per ton) of specimens of coal from two
mines:
Use the 0.02 level of significance to test whether it is reasonable to assume that the
variances of the two populations sampled are equal. Also construct a 98%
22
confidence interval for .
12
Solution:
Null Hypothesis, H0 ; 12 = 22
Alternate Hypothesis, H1: 12 22
Sample sizes: nM = 6 and nm =5 (whatever may be the sizes)
Sample variances: S12 =15,750 and S 22 = 10,920
Level of significance, α = 0.02
S M2
Test Statistic, F = 2
Sm
S12 15750
= = = 1.44
S 22 10920
Decision: Since F = 1.44 does not exceed F0.01(4, 5) = 11.392, the null hypothesis
can’t be rejected. That is accept the Null hypothesis. So, the populations variances
are equal.
22
Confidence interval for normal populations:
12
22
The (1 – α)100% confidence interval for 2 is given by
1
s 22 22 s22
F1 − / 2 (n1 − 1, n 2 −1) 2 < 2 < F / 2 (n1 −1, n2 −1) 2
s1 1 s1
Problem 13: One process of making green gasoline takes sucrose, which can be
derived from biomass, and converts it into gasoline using catalytic reactions. This
is not a process for making a gasoline additive but fuel itself, so research is still at
the pilot plant stage. At one step in a pilot plant process, the product consists of
carbon chains of length 3. Nine runs were made with each of two catalysts and the
product volumes (gal) are as follows:
Catalyst 1 0.63 2.64 1.85 1.68 1.09 1.67 0.73 1.04 0.68
Catalyst 2 3.71 4.09 4.11 3.75 3.49 3.27 3.72 3.49 4.26
The sample variances are respectively, 0.4548 and 0.1089. Obtain a 98%
confidence interval for σ22 / σ12.
Solution: Given n1 = n2 = 9, s12 = 0.4548, s22 = 0.1089 and (1 – α)100%= 98%
We know that F1-α(v1,v2) = 1/ Fα(v2,v1)
Now α = 0.02 and α/2 = 0.01
F0.01(9,9) = 6.03 and F0.99 = 1 / F0.01(9,9) = 1 / 6.03 = 0.16584
22
The (1 – α)100% confidence interval for is given by
12
s22 22 s22
F1− / 2 (n1 −1, n2 −1) F (
/2 1n − 1, n − 1)
s12 12
2
s12
0.1089 22 0.1089
F0.99 (9,9) 2 F 0.01 (9,9)
0.4548 1 0.4548
22
0.16584(0.23944) 2 6.03(0.23944)
1
22
0.04 2 1.44
1