2. Hypothesis Test for the difference between means.
Statisticians follow a formal process to determine whether to
reject a null hypothesis, based on sample data. This process
called hypothesis testing.
1. State the hypotheses.
This involves stating the null and alternative hypotheses. The
hypotheses are stated in such a way that they are mutually
exclusive. That is, if one is true, the other must be false.
Set Null hypothesis Alternative
hypothesis Number of tails
1 μ1 - μ2 = d μ1 - μ2 ≠ d 2
2 μ1 - μ2 > d μ1 - μ2 < d 1
3 μ1 - μ2 < d μ1 - μ2 > d 1
3. 2. Level of significance:
α = 0.01, 0.05 or any given value
2 21 2
1 2
2 2
1 2
1 2
1 2
1. Z= and known
X X
when
n n
2 21 2
1 2
2 2
1 2
1 2
1 2
1, 22. Z= and unknown and n 30
X X
when
n n
n
S S
2 21 2
1 2
1 2
1 2
1, 23. t = and unknown and n <
1 1
30
p
X X
when
n n
n
S
3. Test Statistic
4. 4. Critical Region:
The set of values outside the region of acceptance is called
the region of rejection. If the test statistic falls within the region
of rejection, the null hypothesis is rejected. In such cases, we say
that the hypothesis has been rejected at the α level of
significance. The following steps are use to find the critical
region.
For Test statistic (1) and (2)
Z > Zα/2 and Z< - Zα/2 When H1: μ1 - μ2 ≠ d
Z > Zα When H1: μ1 - μ2 > d
Z< - Zα When H1: μ1 - μ2 < d
For Test statistic (3)
t > tα/2,υ and t < - tα/2,υ When H1: μ1 - μ2 ≠ d
t > tα, υ When H1: μ1 - μ2 > d
t < - tα, υ When H1: μ1 - μ2 < d ;Where v = n1+n2 - 2
5. 5. Computation:
Find the value of the test statistic
6. Conclusion:
If the calculated value of test statistic falls in the
area of rejection, we reject the null hypothesis
otherwise accept it.
6. Test Concerning Double Means
Example-1:
Two independent samples of observations were
collected for the first sample of 60 elements, the mean
was 86 and the standard deviation 6. The second sample
of 75 elements had a mean of 82 and a standard
deviation of 9. Using α=0.01, test whether the two
samples can reasonably be considered to have come
from populations with the same mean.
7. Solution:
n1=60 n2=75
s1=6 s2=9
𝑥1=86 𝑥2=82
α = 0.01
1. Hypothesis H0: 𝜇1 − 𝜇2 = 0
H1: 𝜇1 − 𝜇2 ≠ 0
2. Level of significance α = 0.01
3. Test statistic 1 2 1 2
2 2
1 2
1 2
X X
z
S S
n n
8. 4. Critical Region
In case of two tail test i.e. H1 𝑖𝑠 ≠.
Reject H0, if 𝑍 𝑐𝑎𝑙 ≤ −𝑍𝑡𝑎𝑏 or 𝑍 𝑐𝑎𝑙 ≥ 𝑍𝑡𝑎𝑏.
Where 𝑍𝑡𝑎𝑏 = 𝑍 𝛼
2
= 𝑍0.01
2
= 𝑍0.005 = 2.58
𝑍 𝑐𝑎𝑙 ≤ −2.58 or 𝑍 𝑐𝑎𝑙 ≥ 2.58.
(Using inverse area of normal table)
5. Computation
2 2
(86 82) (0)
6 9
60 75
Z
=Zcal= 3.09
6. Conclusion: Reject H0.
2.58 –0– 2.58
9. Example-2:
A manufacturer claims that the average tensile strength of thread
A exceeds the average tensile strength of thread B by at least
12kg. To test this claim 50 pieces of each thread are tested under
similar condition. Type A thread had an average tensile strength
of 80kg with a standard deviation of 5kg. While type B thread
had an average tensile strength of 70kg. With a standard deviation
of 4kg. Test the manufacturer’s claim using 0.01 level of
significance.
10. Solution:
n1 = 50 n2 = 50
s1 = 5 s2 = 4
𝑥1 = 80 𝑥2 = 70
α = 0.01
1. Hypothesis H0: 𝜇1 − 𝜇2 ≥ 12
H1: 𝜇1 − 𝜇2 < 12
2. Level of significance α = 0.01
3. Test statistic 1 2 1 2
2 2
1 2
1 2
X X
z
S S
n n
11. 4. Critical Region
5. Computation
2 2
(80 70) (12)
2.21
5 4
50 50
Z
6. Conclusion: Accept H0.
2.33 –0–
In case of lower tail test i.e. H1 𝑖𝑠 ˂.
Reject H0, if 𝑍 𝑐𝑎𝑙 ≤ −𝑍𝑡𝑎𝑏
Where 𝑍𝑡𝑎𝑏 = 𝑍 𝛼 = 𝑍0.01 = −2.33
𝑍 𝑐𝑎𝑙 ≤ −2.33
(Using inverse area of normal table)
12. Example-3:
A course in mathematics is taught to 12 students by the
conventional classroom procedure. A second group of
10 students was given the same course by means of
programmed materials. At the end of the semester the
same examination was given each group. The 12
students meeting in the classroom made an average
grade of 85 with a standard deviation of 4, while the 10
students using programmed materials made an average
of 81 with a standard deviation of 5. Test the hypothesis
that the two methods of learning are equal using a 0.10
level of significance. Assume the populations to be
approximately normal with equal variances.
13. Solution:
n1 = 12 n2 = 10
s1 = 4 s2 = 5
𝑥1 = 85 𝑥2 = 81
α = 0.10
1 .Hypothesis
H0: 𝜇1 − 𝜇2 = 0
H1: 𝜇1 − 𝜇2 ≠ 0
2. Level of significance α = 0.10
3. Test statistic 1 2 1 2
1 2
1 1
p
X X
t
n n
S
14. 1.725 –0– 1.725
4. Critical Region
In case of two tail test i.e. H1 𝑖𝑠 ≠.
Reject H0, if 𝑡 𝑐𝑎𝑙 ≤ −𝑡𝑡𝑎𝑏 or 𝑡 𝑐𝑎𝑙 ≥ 𝑡𝑡𝑎𝑏.
Where 𝑡𝑡𝑎𝑏 = 𝑡 𝛼
2
,(𝑛1+𝑛2−2) = 𝑡0.10
2
,(12+10−2)
= 𝑡0.05,20 = 1.725
𝑡 𝑐𝑎𝑙 ≤ −1.725 or 𝑡 𝑐𝑎𝑙 ≥ 1.725.
15. 5. Computation 2 2
1 1 2 2
1 2
1 1
2
n s n s
sp
n n
2 2
12 1 10 1
12 10 2
(4) (5)
4.478
85 81 0
1 1
4.478
12 10
2.07cal
sp
t
t
6. Conclusion: Reject H0.