STA-CM 121 Lecture 4
STA-CM 121 Lecture 4
J. N. Onyeka-Ubaka (Ph.D)
[email protected] +2348059839937
One-Sample test Cont’d
▪ We use Student t distribution when the sample size is small; and when
the variance of the distribution is not known with given datapoints less
than 30.
▪ Testing about the population mean, μ when variance ( 𝜎 2 ) is
unknown, we use Student t distribution with the test statistic
given as: t = x − 0 ~ 𝒕𝒏−𝟏 degrees of freedom (df)
s/ n
NB: You will see the Properties of t distribution on Page 187.
Example 1
In 12 test runs over a marked course, a newly designed motorboat
averaged 33.6 seconds with a standard deviation of 2.3 seconds.
Assuming that it is reasonable to treat the data as a random sample from
a normal population, test the null hypothesis μ = 35 and alternative
hypothesis μ < 35 at the 0.05 level of significance.
Solution
Given: n = 12, 𝑥ҧ = 33.6, s = 2.3
The null hypothesis 𝑯𝟎 : 𝝁 = 𝟑𝟓
against the alternative hypothesis 𝑯𝟏 : 𝝁 < 𝟑
𝐓𝐡𝐞 𝐥𝐞𝐯𝐞𝐥 𝐨𝐟 𝐬𝐢𝐠𝐧𝐢𝐟𝐢𝐜𝐚𝐧𝐜𝐞 𝜶 = 𝟎. 𝟎𝟓
ഥ−𝝁
𝒙
The sample size is small, so we use t statistic 𝒕 = 𝒔 ~ 𝒕𝒏−𝟏 df
𝒏
ഥ−𝝁
𝒙 𝟑𝟑.𝟔−𝟑𝟓
Computing the test statistic, we have 𝒕 = 𝒔 = 𝟐.𝟑 = -2.11
𝒏 𝟏𝟐
Decision: The computed value z = 2.16 does not fall in the rejection
region (-2.575 < 2.16 < 2.575), so the null hypothesis is not
rejected at 1% significance level.
Conclusion: The data does not give strong support to the claim that the
true average differs from the design value of 130.
Remarks:
(i) Critical Value for a hypothesis test is a threshold to which the value
of the test statistic in a sample is compared to determine whether or not
the null hypothesis should be rejected. It is obtained from statistical
table.
= (5.901, 37.899)
This interval is quite wide, indicating substantial uncertainty about fat
contents. Notice that the width of the PI is more than three times that
of the CI.
Tolerance Intervals
Let k be a number between 0 and 100. A tolerance interval for capturing at
least k% of the values in a normal population distribution with a confidence
level 95% has the form
x (tolerance critical value) s
n 2 = 50 x 2 = 8.0 s 2 = 2.1
( − ) − ( 1 − 2 ) − − *
t = =
S p2 S p2 1
+
1
+ Sp
m n m n
where S p2 =
( − ) 2
+ ( − ) 2
OR S p2 =
(m − 1) s12 + (n − 1) s 22
(m − 1) + (n − 1) m+n−2
Example 6
In a study of gain in weight of rats, 10 males and 9 females are
selected for study under special diet. The experiment yielded the
following information, assuming normality of gain in weight.
Females n1 = 9 x1 = 20 S1 = 1.2
(a) Test their equality of gain in weight for the two groups at 0.5% level
of significance. Assume equality of variance.
(b) Find the 95% confidence interval for difference of means of gain in
weight for the two groups.
solution
(a) This can be performed using pooled sample variance. Let (X) be
female and Y be male. The hypothesis to be tested is
Null hypothesis, 𝐻0 : 𝜇1 − 𝜇2 = 0
Alternative hypothesis, 𝐻1 : 𝜇1 − 𝜇2 ≠ 0
Significance level: 𝛼 = 0.005
Since both 𝜎12 and 𝜎22 are unknown but assumed to have equal
variance, the test statistic is
( − ) − ( 1 − 2 ) − − *
t= =
S p2 S p2 1
+
1
+ Sp
n1 n2 n1 n2
8(1.2) 2 + 9(1.5) 2
= = 1.87
17
Therefore, S p = 1.87 = 1.367
Substituting in the test statistic gives
− − * 20 − 16.5
t = = = 5.57
1 1 1 1
Sp + 1.367 +
n1 n2 9 10
Z cal =
( pˆ − pˆ ) − ( − )
pq pq
+
n n
Example 7
A trainer claims that 80 percent of his audience usually enjoys his teaching. His
supervisor is of the opinion that the claim cannot be true. He then selected a
sample of 40 persons from the trainer’s audience and found out that 35 persons
claim to enjoy the teaching. Can you conclude that the trainer’s claim is valid at
5 percent level of significance?
Solution
35
Given 𝑝 = 0.8; 𝑞 = 0.2; 𝑛 = 40; 𝑛𝑓 = 35 ⇒ 𝑝Ƹ = 40 = 0.875
𝐻0 : p = 0.8
𝐻1 : p ≠ 0.8
pˆ − =
0.875 − 0.8
=
0.075
= 1.186
Z cal = (0.8)(0.2) 0.0632
pq
40
n
From the alternative hypothesis, this is a two-tailed test, so
𝑍𝛼 = 𝑍0.05 = 𝑍0.025 = ±1.96
2 2
Since, the calculated statistic does not fall into the critical region, we fail to
reject the null hypothesis and conclude that the trainer’s claim is valid.
Example 8
A random sample of size 40 workers was selected from a group of
workers in company A and 8 of them were found to be performing below
expectation. A second sample of 50 workers was selected from a group
of workers in company B and 9 were found to be performing below
expectation. Test at 5% level of significance the hypothesis that the
proportion of workers performing below expectation in the two
companies is not the same.
Solution
8
n = 40; freq. of = 8; pˆ = = 0.2
40
9
n = 50; freq. of = 9; pˆ = = 0.18
50
Null hypothesis, 𝐻0 : 𝑃𝐴 = 𝑃𝐵
Alternative hypothesis, 𝐻1 :𝑃𝐴 ≠ 𝑃𝐵
Significance level: 𝛼 = 0.05
Test statistic Z = pˆ − pˆ =
0.2 − 0.18
cal
pq pq (0.2)(0.8) (0.18)(0.82)
+ +
n n 40 50
0.02 0.02
= = = 0.24
0.006852 0.0834
Since Zcal falls in the acceptance region, we fail to reject the null
hypothesis and conclude that the two proportions are the same
Questions and Answers
Conclusion
A test statistic is a statistic, calculated from the sample data which
is used to test the hypothesis.
The rejection region is those values of the test statistic that lead to
the rejection of the null hypothesis.