Unit 4 - STATISTICAL HYPOTHESES
Unit 4 - STATISTICAL HYPOTHESES
Required Readings
Anderson, David, Dennis J. Sweeney & Thomas A. Williams (2011): Statistics for Business
and Economics, 9th edition, CENGAGE Learning.
Venkatesh, Seshamani & Ndhlovu Obrien (2016): Statistical Methods for Economic Analysis,
Printech Ltd.
Spiegel, Murray, John Schiller & R. Alu Srinivasan (2012): Probability and Statistics, 4th
edition, Schaum’s outline series, McGraw-Hill.
Spiegel, Murray, & Stephens J. Larry (2008): Theory and Problems of Statistics, 4th edition,
Schaum’s outline series, McGraw-Hill.
By the time you finish working through this unit, you should be able to;
1
1.4 Contents list
1. Tests of hypotheses and significance; Type I and Type II errors; level of significance;
one-tailed and two-tailed tests; P value;
2. Large sample tests for variables and attributes-tests based on normal distribution; small
sample tests for variables and attributes-tests based on t-distribution and chi-square
distribution
2
This is the failure to reject 𝐻0 when 𝐻1 is true. Or accepting 𝐻0 when 𝐻0 is false.
The table below shades more light on the two types of errors.
Population Condition
𝐻0 True 𝐻𝑎 True
Accept Correct
𝐻0 Conclusion Type II error
Conclusion
Reject Correct
𝐻0 Type I error Conclusion
Type I error, also called the level of significance can be expressed as:
𝛼 = 𝑃(𝑇𝑦𝑝𝑒 𝐼)
= 𝑃(𝑟𝑒𝑗𝑒𝑐𝑡 𝐻0 𝑔𝑖𝑣𝑒𝑛 𝑡ℎ𝑎𝑡 𝐻0 𝑖𝑠 𝑡𝑟𝑢𝑒)
= 𝑃(reject 𝐻0 |𝐻0 is true)
On the other hand, type II error can be expressed as:
𝛽 = 𝑃(𝑇𝑦𝑝𝑒 𝐼𝐼)
= 𝑃(reject 𝐻0 |𝐻1 is true)
Under hypothesis testing, the two possible conclusions are:
1. If you reject 𝐻0 , conclude that 𝐻1 is probably true
2. If you fail to reject 𝐻0 , conclude that there is no sufficient evidence from the sample
data to support the claim (𝐻1 ).
Note that hypotheses are always statements about the population distribution of interest and
not statements about the sample.
Note further that the probability of correctly rejecting 𝐻0 when 𝐻0 is false is called the power
of the test, expressed as 1 − 𝛽. In other words, 1 − 𝛽 is the probability of correctly rejecting
𝐻0 is one minus the probability of making type II error.
3
2. Select an appropriate test statistic. The test statistic is used as basis for deciding
𝜎 2
𝑋 −𝜇 ̅
whether 𝐻0 should be rejected. For example, for 𝑋̅~𝑁(𝜇, 𝑛 ), 𝑍 = 𝜎⁄ 𝑛 is the test
√
𝑋−𝜇
statistic assuming 𝜎 is known. Or for 𝑋~𝑁(𝜇, 𝜎 2 ), 𝑍 = is the test statistic.
𝜎
3. Determine the rejection region. This consist of a set of values for the test statistic that
lead to the rejection of 𝐻0 .
a) For a two-tailed test, at the level of significance 𝛼, the rejection regions are as
shown below.
Note that −𝑍𝛼⁄2 and 𝑍𝛼⁄2 are called the critical values because they separate the
rejection and non-rejection regions.
b) For a one-tailed test at 𝛼 level of significance, rejection regions are shown below:
(i) Left-tailed. That is, 𝐻0 : 𝜇 = 𝜇0 vs 𝐻1 : 𝜇 < 𝜇0
Rejection region
Acceptance region
−𝑍𝛼
Rejection region
Acceptance region
𝑍𝛼
4
3. Draw conclusion
1.6.3 One-tailed and two tailed tests
One tailed tests
With one-tailed tests, the rejection region is either on the lower or upper tail of the sampling
distribution. By rejection region, we mean the area corresponding to the level of significance
of , for example, 𝛼 = 0.1,0.05,0.01, etc. Recall that we use information contained in the
sample to establish a claim or conjecture. For example, to test the claim that the mean height
of all UNZA students (𝜇) is greater than 1.5m, you can assess whether the observed sample
mean (𝑋̅) falls in the upper tail of the sampling distribution by computing a test statistic
which is given by
𝑋̅−𝜇0
𝑍= 𝜎⁄√𝑛
𝑋̅−𝜇0
} for large sample case.
𝑍= 𝑠⁄√𝑛
Note that in the above example, the direction of the claim is one side because it specifies that
the value of 𝜇 is above or on one side of 1.5.
The null hypothesis (𝐻0 ) in this case or opposite is 𝜇 is equal or less than 1.5. note that it is
customary to have 𝐻0 specify that there is no difference and thus an equal(=) sign will be
used. In the above example, the two competing hypotheses are:
𝐻0 : 𝜇 = 𝜇0
⇒ 𝐻0 : 𝜇 = 1.5 vs
𝐻1 : 𝜇 > 1.5.
Two-tailed tests
Unlike under a one-tailed hypothesis test, the two sided tailed tests have rejection regions in
both the lower and upper tails of the sampling distribution. In this case, the direction of the
claim is unknown. Thus the two competing hypotheses are:
𝐻0 : 𝜇 = 𝜇0 vs 𝐻1 : 𝜇 ≠ 𝜇0
For a statement where 𝐻1 or 𝐻𝑎 is 𝜇 ≠ 𝜇0
In conclusion, the rules are:
1. One-tailed test: left tailed
𝐻0 : 𝜇 ≥ 𝜇0
𝐻1 : 𝜇 < 𝜇0
𝑋̅ −𝜇0
𝑍= assuming 𝜎 is known
𝜎⁄√𝑛
𝑋̅ −𝜇0
𝑍= 𝜎 estimated by 𝑠.
𝑠⁄√𝑛
5
Rejection rule
Using test statistic: reject 𝐻0 if 𝑍 < −𝑍𝛼 and using p-value: reject 𝐻0 if p-value< 𝛼
2. One-tailed test: right tailed
𝐻0 : 𝜇 ≤ 𝜇0
𝐻1 : 𝜇 > 𝜇0
𝑋̅ −𝜇0
𝑍= assuming 𝜎 is known
𝜎⁄√𝑛
𝑋̅ −𝜇0
𝑍= 𝜎 estimated by 𝑠.
𝑠⁄√𝑛
Rejection rule
Using test statistic: reject 𝐻0 if 𝑍 > 𝑍𝛼 and using p-value: reject 𝐻0 if p-value> 𝛼
3. Two-tailed test:
𝐻0 : 𝜇 = 𝜇0
𝐻1 : 𝜇 ≠ 𝜇0
𝑋̅ −𝜇0
𝑍= assuming 𝜎 is known
𝜎⁄√𝑛
𝑋̅ −𝜇0
𝑍= 𝜎 estimated by 𝑠.
𝑠⁄√𝑛
Rejection rule
Using test statistic: reject 𝐻0 if 𝑍 < 𝑍−𝛼/2 or if 𝑍 > 𝑍𝛼/2 and using p-value: reject 𝐻0
if p-value< 𝛼.
6
Decision rule: if the confidence interval contains the hypothesized value, do not reject 𝐻0
otherwise reject 𝐻0 .
Example: Large sample statistical test
A quality control manager believes that 12-gram box of breakfast cereal should contain an
average of 6 gram of bran. He measures a random sample of 60 booles of a popular cereal for
bran content. Suppose the data yield a sample mean of 5.9 gram of bran and a sample
standard deviation of 0.37 gram of bran. Does the data suggest that the bran content differs
from 6 grams?
Solution
1. Hypothesis
This is a two-tailed test
𝐻0 : 𝜇 = 6 𝑣𝑠 𝐻1 : 𝜇 ≠ 6
2. Test statistic
𝜎2
𝑋̅~𝑁(𝜇, )
𝑛
𝑋̅ −𝜇
Now since 𝑛 = 60 > 30 we use 𝑍 = 𝜎⁄ if 𝜎 is given. But since 𝜎 is unknown, we
√𝑛
−𝑍𝛼⁄2 𝑍𝛼⁄2
7
5. Conclusion
Since 𝑍 < −𝑍𝛼⁄2 that is -2.09<-1.96 we reject 𝐻0 and conclude that there is some
evidence that the mean bran content differs from 6 grams.
Small-sample test with unknown 𝝈
One-tailed Two-tailed
𝐻0 : 𝜇 = 𝜇0 𝐻0 : 𝜇 = 𝜇0
𝐻1 : 𝜇 < 𝜇0 (𝑜𝑟 𝜇 > 𝜇0 ) 𝐻1 : 𝜇 ≠ 𝜇0
Test statistic
𝑋̅ −𝜇 𝑋̅ −𝜇0
𝑡 = 𝑠⁄ 𝑡=
√𝑛 𝑠⁄√𝑛
Rejection region
𝑡 < −𝑡𝛼,𝑛−1 𝑡 < −𝑡𝛼/2,𝑛−1
Or 𝑡 > −𝑡𝛼,𝑛−1 𝑡 > 𝑡𝛼/2,𝑛−1
Note that the variability of the sampling distribution for a t-distribution depends on the
sample size n-1, and recall that the n-1 was what we referred to as the degrees of freedom.
Example
TOYOTA wants to test a new engine to see whether it meets new air pollution standards. The
mean emissions 𝜇 of all engines of this type must be less than 20 parts per million carbon.
Ten engines are manufactured for testing purposes, and the mean and standard deviation of
the emissions of the sample engines are determined to be 17.1 and 3 parts per million carbon
respectively. Do the data supply sufficient evidence to allow the manufacturer(TOYOTA)
conclude that this type of engine meets pollution standards? Assume the manufacturer is
willing to risk a type I error of 1% (i.e with probability 0.01).
Solution
1. Hypothesis
This is a one-tailed test
𝐻0 : 𝜇 = 20 𝑣𝑠 𝐻1 : 𝜇 < 20
2. Test statistic
8
𝜎2
𝑋̅~𝑁(𝜇, )
𝑛
𝑋̅ −𝜇
Now since 𝑛 = 10 < 30 we use 𝑡 = 𝜎⁄ if 𝜎 is given. But since 𝜎 is unknown, we
√𝑛
3. Rejection region
𝛼 = 0.01 and since it is one-tailed −𝑡𝛼,𝑛−1 = −𝑡0.01 = −2.821.
Rejection region
−𝑡𝛼,𝑛−1
4. Decision rule
Reject 𝐻0 if 𝑡 < −𝑡𝛼,𝑛−1
−2.821
5. Conclusion
Since 𝑡 < −𝑡𝛼,𝑛−1 that is -3.06<-2.821 we reject 𝐻0 and conclude that there is some
evidence that the mean emission of all engines are less than 20 parts per million
carbon. That is, the manufacturer concludes that 𝜇 < 20 meets the pollution
standards.
9
𝐻𝑎 : 𝑝 < 𝑝0 𝐻𝑎 : 𝑝 > 𝑝0 𝐻𝑎 : 𝑝 ≠ 𝑝0
𝑝0 − 𝑝
𝑍=
𝜎𝑝̅0
𝑝(1 − 𝑃)
𝜎𝑝̅0 = √
𝑛
Reject 𝐻0 is 𝑍 < 𝑍𝛼 for 𝐻𝑎 : 𝑝 < 𝑝0 and 𝑍 > 𝑍𝛼 for 𝐻𝑎 : 𝑝 > 𝑝0 and for 𝐻𝑎 : 𝑝 ≠ 𝑝0 , reject 𝐻0
if 𝑍 < −𝑍𝛼⁄2 or 𝑍 > 𝑍𝛼⁄2 .
P-VALUE APPROACH
This is another approach that is used to draw conclusions when conducting a hypothesis test.
In other words, conclusions can be drawn based on a probability called a p-value. The p-
value is also known as the observed level of significance. We can therefore define the p-value
as the observed area to the right of the computed/observed test statistic.
DECISION RULES WHEN USING THE P-VALUE APPROACH
1. For a one-tailed test
(a) Reject 𝐻0 if the p-value< 𝛼, meaning the test statistic is in the rejection
region.
(b) Fail to reject 𝐻0 if the p-value> 𝛼, meaning that the test statistic is not in
the rejection region.
2. For a two-tailed test
(a) Reject 𝐻0 if the p-value< 𝛼/2, meaning the test statistic is in the rejection
region.
(b) Fail to reject 𝐻0 if the p-value> 𝛼/2, meaning that the test statistic is not
in the rejection region.
For a two-tailed test, one can also use an alternative method that involves doubling the p-
value and then comparing it to the given level of significance 𝛼. That is, if 2(p-value) > 𝛼,
one fails to reject 𝐻0 whereas if 2(p-value) < 𝛼, one rejects 𝐻0 .
HYPOTHESIS TESTS ABOUT THE DIFFERENCE BETWEEN THE MEANS OF
TWO POPULATIONS: INDEPENDENT SAMPLES
We can use independent simple random samples to estimate the difference between two
population means (𝜇1 − 𝜇2 ). Recall that 𝑋̅1 − 𝑋̅2 represents the point estimator of the
difference between the means of the two populations. Thus to estimate 𝜇1 − 𝜇2 we select a
simple random sampling of size 𝑛1 observations from population 1 and a simple random
10
sampling of size 𝑛2 observations from population 2 to compute 𝑋̅1 and 𝑋̅2 respectively.
Recall that the standard deviation of the difference between two population means is:
𝜎12 𝜎22
𝜎𝑋̅1 −𝑋̅2 = √ +
𝑛1 𝑛2
Assuming 𝜎12 and 𝜎22 are known. If 𝜎12 and 𝜎22 are unknown, we use the sample standard
deviations as estimates of the population standard deviations and estimate 𝜎𝑋̅1 −𝑋̅2 using
𝑠12 𝑠22
𝑆𝑋̅1 −𝑋̅2 = √ +
𝑛1 𝑛2
But since 𝜎12 and 𝜎22 are unknown, we estimate them with 𝑠12 and 𝑠22 . Therefore,
(𝑋̅1 − 𝑋̅2 ) − (𝜇1 − 𝜇2 )
𝑍=
𝑠12 𝑠22
√
𝑛1 + 𝑛2
Rejection region
One tailed test
Reject 𝐻0 if
𝑍 > 𝑍𝛼 (right tailed)
𝑍 < −𝑍𝛼 (left tailed)
Two-tailed test
11
Reject 𝐻0 if 𝑍 < −𝑍𝛼⁄2 or 𝑍 > 𝑍𝛼⁄2 .
Example
A university investigation, conducted to determine whether car ownership affects
academic achievement, was based on two random samples of 100 male students, each
drawn from the student body. The grade point average for 𝑛1 = 100 nonowners of
cars had an average and variance equal to 𝑋̅1 = 2.7 and 𝑠12 = 0.36 as opposed to
𝑋̅2 = 2.54 and 𝑠12 = 0.4 for 𝑛2 = 100 cars owners. Do the data provide sufficient
evidence to indicate that a difference in the mean achievement between car-owners
and non-car owners. Test using 𝛼 = 0.1.
Solution
We wish to detect a difference if it exists between the mean academic achievement for
non-car owners 𝜇1 and car owners 𝜇2 .
𝜇1 𝜇2
𝑛1 = 100 𝑛2 = 100
𝑋̅1 = 2.7 𝑋̅2 = 2.54
𝑠12 = 0.36 𝑠12 = 0.4
1. Hypotheses
𝐻0 : 𝜇1 − 𝜇2 = 0 vs 𝐻1 : 𝜇1 − 𝜇2 ≠ 0
This is a two tailed test.
2. Test statistic
𝑛1 and 𝑛2 are large i.e (𝑛1 and 𝑛2 ≥ 30)
𝜎12 𝜎22
∴ 𝑋̅1 − 𝑋̅2 ~𝑁 (𝜇1 − 𝜇2 , + )
𝑛1 𝑛2
(𝑋̅1 − 𝑋̅2 ) − (𝜇1 − 𝜇2 )
⇒𝑍=
𝜎12 𝜎22
√
𝑛1 + 𝑛2
(2.7 − 2.54) − 0
=
√0.36 + 0.4
100 100
𝑍 ≈ 1.34
12
3. Rejection region
It is two tailed therefore 𝛼 = 0.1, 𝛼/2 = 0.05. and this implies that
𝑍𝛼⁄2 = 𝑍0.05 = 1.645
Reject 𝐻0 if 𝑍 < −𝑍𝛼⁄2 or 𝑍 > 𝑍𝛼⁄2
-1.645 1.645
4. Conclusion
Since 𝑍 > 𝑍0.05 that is 1.84 > 1.645 we reject 𝐻0 and conclude that there is some
evidence of difference in the academic performance between the two groups.
b) Small sample case
𝐻0 : 𝜇1 − 𝜇2 = 𝐷0 or 𝐻0 : 𝜇1 = 𝜇2
One-tailed test
Right tailed Left tailed
𝐻1 : 𝜇1 − 𝜇2 > 𝐷0 𝐻1 : 𝜇1 − 𝜇2 < 𝐷0
Two tailed
𝐻1 : 𝜇1 − 𝜇2 ≠ 𝐷0
Test statistic
(𝑋̅1 − 𝑋̅2 ) − (𝜇1 − 𝜇2 )
𝑡=
1 1
√𝑆 2 ( + )
𝑛1 𝑛2
(𝑛1 −1)𝑠12 +(𝑛2 −1)𝑠22
Where 𝑠 2 = 𝑛1 +𝑛2 −2
Rejection region
One tailed test
Reject 𝐻0 if
𝑡 > 𝑡𝛼,𝑛1 +𝑛2 −2 (right tailed)
13
𝑡 < −𝑡𝛼,𝑛1 +𝑛2 −2 (left tailed)
Two-tailed test
Reject 𝐻0 if 𝑡 > 𝑡𝛼,𝑛1 +𝑛2 −2 or 𝑡 < −𝑡𝛼,𝑛1 +𝑛2 −2 .
2
∑𝑛𝑖=1(𝑋𝑖 − 𝑋̅)2
𝑠 =
𝑛−1
Was used as the point estimator of the population variance 𝜎 2 . To make inferences about the
population variance using the sample variance, we make use of the sampling distribution of
the quantity
(𝑛 − 1)𝑠 2
χ2 =
𝜎2
therefore, whenever a sample random sample of size n is selected from a normally distributed
(𝑛−1)𝑠2
population, the sampling distribution of χ2 = follows a chi-square distribution with n-
𝜎2
(𝑛−1)𝑠2
1 degrees of freedom. Since the sampling distribution of χ2 = follows a chi-square
𝜎2
distribution, we can employ the chi-square distribution to develop interval estimates and
carry out hypothesis tests about a population.
With 2 df
With 5 df
With 10 df
0 (𝑛 − 1)𝑠 2
𝜎2
INTERVAL ESTIMATION OF 𝝈𝟐
Recall that each simple random sample generates different sample estimates. We cannot
therefore expect the sample variance to provide the exact value of the population variance.
14
Instead, we can expect the interval estimate to contain all possible values of the population
variance. Note that the notation χ2𝛼,𝑛−1𝑑𝑓 denotes the chi-square critical value that provides an
area or probability of 𝛼 to the right of the stated χ2𝛼,𝑛−1𝑑𝑓 .
Area or probability
0 χ2𝛼
2
The area to the left of χ2𝛼 is therefore χ1−𝛼 . Combining the above two critical chi-square
values, we can say that the 1 − 𝛼 confidence interval containing χ2 can be written as
2 2 2
χ1−𝛼 ⁄2,𝑛−1 ≤ χ ≤ χ𝛼⁄2,𝑛−1
(𝑛−1)𝑠2 .
But we know that χ2 = 𝜎2
2
(𝑛 − 1)𝑠 2
χ1−𝛼 ⁄2,𝑛−1 ≤ ≤ χ2𝛼⁄2,𝑛−1
𝜎2
To find the interval estimate for 𝜎 2 , we perform some algebraic manipulation on the
inequality. Performing algebraic manipulation on the leftmost inequality, we get:
2
(𝑛 − 1)𝑠 2
χ1−𝛼 ⁄2,𝑛−1 ≤
𝜎2
2
𝜎 2 χ1−𝛼 ⁄2,𝑛−1 ≤ (𝑛 − 1)𝑠
2
15
(𝑛 − 1)𝑠 2 2
(𝑛 − 1)𝑠 2
≤𝜎 ≤
χ2𝛼⁄2,𝑛−1 2
χ1−𝛼 ⁄2,𝑛−1
We can therefore conclude that the respective (1 − 𝛼)100% confidence interval for the
population variance (𝜎 2 ) and population standard deviation(𝜎) are:
(𝑛 − 1)𝑠 2 2
(𝑛 − 1)𝑠 2
≤𝜎 ≤
χ2𝛼⁄2,𝑛−1 2
χ1−𝛼 ⁄2,𝑛−1
(𝑛 − 1)𝑠 2 (𝑛 − 1)𝑠 2
√ ≤𝜎≤√
χ2𝛼⁄2,𝑛−1 2
χ1−𝛼 ⁄2,𝑛−1
16
1) χ2𝑜𝑏𝑠 > χ2𝛼,𝑛−1 (right tailed)
χ2𝛼,𝑛−1
χ2𝛼,𝑛−1
Two tailed test
Reject 𝐻0 if
2
χ2𝑜𝑏𝑠 < χ1−𝛼/2 or χ2𝑜𝑏𝑠 > χ2𝛼/2 or reject 𝐻0 if p-value< 𝛼.
the difference in the two population variances (𝜎12 − 𝜎22 ). We can therefore conclude that
whenever independent random samples of size 𝑛1 and 𝑛2 are chosen from two normal
𝑠2
populations with equal variances, the sampling distribution of 𝐹 = 𝑠12 has an F-distribution
2
with 𝑛1 − 1 degrees of freedom in the numerator and 𝑛2 − 1 degrees of freedom for the
denominator, with 𝑠12 from a random sample of size 𝑛1 from population 1 and with 𝑠22 from a
random sample of size 𝑛2 from population 2.
17
Note that 𝐹𝛼,𝑛1 −1,𝑛2 −1 is the critical value for the F-distribution that gives an area or
probability of 𝛼 to the right of the stated F-value.
0 𝐹𝛼,𝑛1 −1,𝑛2 −1
Below is the summary of test procedures on differences between two population variances.
Note that in hypothesis tests with 𝐻0 : 𝜎12 = 𝜎22 , the population with a larger variance is
denoted as population 1 so that we are guaranteed that the rejection of 𝐻0 will only occur in
the upper tail of the F-distribution. Although deciding to denote the population with the larger
variance as population 1 is not common in practice, deciding which population to denote as
population 1 or population 2 is necessary.
Summary
We can compute the lower tail.
F-value (𝐹1−𝛼,𝑑𝑓1 ,𝑑𝑓2 ) using the upper tail
F-value (𝐹𝛼,𝑑𝑓1 ,𝑑𝑓2 ) using the following relationship:
1
𝐹(1−𝛼),𝑑𝑓1 ,𝑑𝑓2 =
𝐹𝛼,𝑑𝑓1 ,𝑑𝑓2
That is, 𝐹(1−𝛼),𝑑𝑓1 ,𝑑𝑓2 is the reciprocal of the 𝐹𝛼 value with 𝑑𝑓1 in the numerator and 𝑑𝑓2 in the
denominator.
18
𝐻1 : 𝜎12 > 𝜎22 Or if p-value< 𝛼
Left tailed
𝑠2
𝐻0 : 𝜎12 = 𝜎22 𝐹 = 𝑠12 𝐹𝑜𝑏𝑠 < 𝐹1−𝛼/2,𝑛1 −1,𝑛2 −1 or
2
Sample size 10 12
Sample mean 35 31
19
Sample Std 4.9 4.5
Deviation
This unit defined and discussed type I and type II error, and thereafter conducted hypothesis
tests for small sample as well as large samples. The unit concluded by considering inferences
about a population variance.
20