Week 12
Hypothesis Testing
Definition: When a sample is selected from a population, the information extracted from this
sample is used to estimate the parameters of the population under investigation. Point
estimations and confidence estimations are employed to estimate the parameters of the
population. Even though the parameters of the population would not change in the short run,
they are not fixed values. For example, they change in the due time. Hence, they need to be
checked whether they are kept fixed or are changed due to some alterations occurring in due
time.
Ex: A company producing various types of candies sell them in the market with a standard
package of 250 gr. Due to various reasons such as the issues related to machinery, operator, raw
material and so on, the company wants to know that the produced packages differ from the
standard package of 250 gr. Then, the company choses a random sample of size n to determine
whether the standard packages would differ or not by running hypothesis testing
Ex: A factory buys a large quantity of raw material to be used in the production process. Each
group consists of 1000 items. The firms knows that if each group consisting of 1000 items has
defective items whose percentage is greater than 5 percent (more than 20 items) , then its cost
for each item increase 1 percent. The firm decides that if the proportion of defective items is
greater than 5 percent then this group of items would be rejected and be sent back to the
producer.
So to test those circumstances, a method called hypothesis testing would be run to assess the
population parameter whether the parameter is changed or not.
There are two types of errors occurring when running hypothesis testing. They are called Type
I error and Type II error.
While Type I error would be occurred when the true Null Hypothesis (H0) is rejected, Type II
error would be occurred when the false Null Hypothesis (H0) is accepted.
Table 1: States of Nature and Decisions on Null Hypothesis, with associated probabilities of
making the decision, given particular states of nature
The Decisions regarding H0 States of Nature
hypothesis
Null Hypothesis True Null Hypothesis False
Accept Correct Decision, Type II Error, Probability=𝛽
Probability=1-𝛼
Reject Type I Error Correct Decision
Probability=𝛼 Probability=1 − 𝛽
(𝛼 is called (1 − 𝛽) is called Power
Significance
Level)
Definition (Null Hypothesis-H0): A maintained (suggested) hypothesis that is assumed to be
true until a sufficient piece of contrary evidence is found.
1
Ex: 𝐻 : 𝜇 = 80, 𝐻 : 𝜇 = 𝜇 , 𝐻 : 𝜎 = 3.4𝐻 : 𝑃 = 0.36, 𝐻 : 𝑃 = 𝑃
Definition (Alternative Hypothesis-H1): A constructed hypothesis that would be tested against
Null Hypothesis, if Null Hypothesis would be rejected, then H1 would be accepted.
Ex:
𝐻 : 𝜇 ≠ 80, 𝐻 : 𝜇 > 𝜇 , 𝐻 : 𝜎 < 3.4, 𝐻 : 𝑃 < 0.36, 𝐻 : 𝑃 > 𝑃
Definition (Simple Hypothesis): If the parameter expressed in the Null Hypothesis has a single
value, then it would be called as a simple hypothesis.
Ex: 𝐻 : 𝜇 = 80, 𝐻 : 𝜎 = 3.4, 𝐻 : 𝑃 = 0.36
Definition (Composite Hypothesis): If the parameter expressed in the Null Hypothesis has an
interval value, then it would be called as composite hypothesis.
Ex:𝐻 : 𝜇 ≥ 80, 𝐻 : 𝜇 ≤ 𝜇 , 𝐻 : 𝜎 < 3.4𝐻 : 𝑃 > 0.36, 𝐻 : 𝑃 ≤ 𝑃
Definition (One-Sided Alternative Hypothesis): An Alternative Hypothesis that would be tested
against a simple Null Hypothesis has a value either less than or greater than that value would
be called One-Sided Alternative Hypothesis.
Ex:
𝐻 : 𝜇 < 80, 𝐻 : 𝜇 ≤ 𝜇 , 𝐻 : 𝜎 ≥ 3.4, 𝐻 : 𝑃 ≥ 0.36, 𝐻 : 𝑃 > 𝑃
Definition (Two-Sided Alternative Hypothesis): An Alternative Hypothesis involving all
possible values of a population parameter other than the value specified by a simple Null
Hypothesis.
Ex:
𝐻 : 𝜇 ≠ 80, 𝐻 : 𝜇 ≠ 𝜇 , 𝐻 : 𝜎 ≠ 3.4, 𝐻 : 𝑃 ≠ 0.36, 𝐻 : 𝑃 ≠ 𝑃
Definition (Hypothesis Test Decision): A decision rule is formulated, leading the investigator
to either accept or reject the Null Hypothesis on the basis of sample evidence.
Definition (Type I Error): The rejection of a true Null Hypothesis
Definition (Type II Error): The acceptance of a false Null Hypothesis
Definition (Significance Level): The probability of rejecting a Null Hypothesis that is true (this
probability is sometimes expressed as a percentage, so a test of significance level α is referred
to as a 100α percent-level test)
Definition (Power): The probability of rejecting a Null Hypothesis that is false.
2
1.Tests of The Mean of A Population of A Normal Population Distribution: Variance
Known
Suppose that we have a random sample of n observations from a normal population with mean
𝜇 and variance 𝜎 . The sample size of n is denoted by x1, x2,…,xn. If the observed sample
mean is 𝑥̅ , then a test with significance level α of the null hypothesis and the corresponding
hypothesis are given as follows:
1.If the Null Hypothesis is simple
𝐻 : 𝜇 = 𝜇 (𝜇 is a fixed value)
2. If the Null Hypothesis is composite
𝐻 : 𝜇 ≥ (>/</≤) 𝜇
Alternative Hypothesis:
1.If Alternative Hypothesis is One-Sided,
1: 𝜇 ≥ (>/</≤ 𝜇 ( 𝜇 is a fixed value)
2.If Alternative Hypothesis is Two-Sided,
1: 𝜇 ≠ 𝜇 (𝜇 is a fixed value)
Test statistics is expressed as:
𝑥̅ − 𝜇
𝑧 =
𝜎/√𝑛
The table values are expressed as:
𝑧 = 𝑧 (One-Sided)
𝑧 =𝑧 / (Two-Sided)
Ex: When a process producing ball bearings is operating correctly, the weights of the ball
bearings have a normal distribution with mean 5 units and standard deviation 0.1 unit. An
adjustment has been made to the process, and the plant manager suspects that this has raised
the mean weight of ball bearings produced, leaving the standard deviation unchanged. A
3
random sample of sixteen ball bearings is taken, and their mean weight is found to be 5.038
unit. Test at significant levels of 0.05 the null hypothesis that the population mean weight is 5
unit against the alternative that is bigger and interpret the result.
𝜇 = 5, 𝑛 = 16, 𝑥̅ = 5.038, 𝛼 = 0.05, 𝜎 = 0.1
𝐻 :𝜇 = 5
𝐻 :𝜇 > 5
Test statistics is expressed as:
𝑥̅ − 𝜇
𝑧 =
𝜎/√𝑛
𝑥̅ − 𝜇 5.038 − 5
𝑧 = = = 1.52
𝜎/√𝑛 0.1/√16
𝛼 = 0.05 and Alternative Hypothesis is One-Sided. 𝑧 = 𝑧 = 𝑧 . = 1.645 is obtained.
1.52<1.645 implying that 𝑧 < 𝑧 leads H0 to be accepted.
Remark: At 0.05 significance level, the population mean weight of the ball bearings produced
could not be not greater than 5 unit.
Ex: A drill, as part of an assembly-line operation, is used to drill holes in sheet metal. When
drill is functioning properly, the diameters of these holes have a normal distribution with mean
2 unit and standard deviation of 0.06 unit. Periodically, to check that the drill is function
properly, the diameters of a random sample of holes are measured. Assume that the standard
deviation does not vary. A random sample of nine measurements yielded mean diameter 1.95
unit. Test the null hypothesis that the population mean is 2 unit against the alternative that it is
not using 5 percent significance level and interpret the result.
𝜇 = 2, 𝑛 = 9, 𝑥̅ = 1.95, 𝛼 = 0.05, 𝜎 = 0.06
𝐻 :𝜇 = 2
𝐻 :𝜇 ≠ 2
𝑥̅ − 𝜇 1.95 − 2
𝑧 = = = −2.50
𝜎/√𝑛 0.06/√9
4
𝛼 = 0.05 and Alternative Hypothesis is Two-Sided. 𝑧 = 𝑧 = 𝑧 . = ±1.96 is obtained.
-2.50<-1.96 implying that 𝑧 < 𝑧 leads H0 to be rejected, which means that H1 is accepted.
Remark: At 0.05 significance level, the mean diameter of the drill holes in population could be
less than 2 unit.
1.2 Tests of The Mean of A Normal Distribution: Population Variance Unknown
Suppose that we have a random sample of n observations from a normal population with mean
𝜇. The sample size of n is denoted by x1, x2,…,xn. If the observed sample mean and standard
deviation are 𝑥̅ and 𝑠 then a test with significance level α of the null hypothesis and the
corresponding hypothesis are given as follows:
1.If the Null Hypothesis is simple
𝐻 : 𝜇 = 𝜇 (𝜇 is a fixed value)
2. If the Null Hypothesis is composite
𝐻 : 𝜇 ≥ (>/</≤) 𝜇
Alternative Hypothesis:
1.If Alternative Hypothesis is One-Sided,
1: 𝜇 ≥ (>/</≤ 𝜇 ( 𝜇 is a fixed value)
2.If Alternative Hypothesis is Two-Sided,
1: 𝜇 ≠ 𝜇 (𝜇 is a fixed value)
Test statistics is expressed as:
𝑥̅ − 𝜇
𝑧 =
𝑠/√𝑛
The table values are expressed as:
𝑇 = 𝑡( ), (One-Sided)
𝑇 = 𝑡( ), / (Two-Sided)
5
Ex: A retail chain knows that on average, sales in its stores are 20 percent higher in December
than November. For the current year, a random sample of six stores was selected. Their
percentage December sales increases were found to be
19.2/18.4/19.8/20.2/20.4/19.0
Assuming a normal population distribution, test the null hypothesis that the true mean
percentage sales increase is 20, against the two-sided alternative at 0.10 significance level and
interpret the result.
𝜇 = 20, 𝑛 = 6, 𝑥̅ = 19.5, 𝛼 = 0.05, 𝜎 𝑢𝑛𝑘𝑛𝑜𝑤𝑛, 𝑠 = 0.588
𝐻 : 𝜇 = 20
𝐻 : 𝜇 ≠ 20
𝑥̅ − 𝜇 19.5 − 20
𝑡 = = = −1.597
𝑠/√𝑛 0.588/√6
𝛼 = 0.05 and Alternative Hypothesis is Two-Sided. 𝑡( ), / =𝑡 =𝑡 , . = ±2.015 is
obtained.
-2.015<-1.597 implying that 𝑡 > 𝑡 leads H0 to be accepted.
Remark: At 0.10 significance level, the null hypothesis that the true mean percentage increase
is 20 percent is accepted.
1.3 Tests for The Mean: Large Sample Sizes
Suppose that we have a random sample of n observations from a normal population with mean
𝜇 and variance 𝜎 . The sample size of n is denoted by x1, x2,…,xn. If the sample size is large,
the test procedures developed for the case where the population variance is known can be
employed when it is unknown, replacing 𝜎 by 𝑠 . Moreover, these procedures remain
approximately valid even if the population distribution is not normal. Then a test with
significance level α of the null hypothesis and the corresponding hypothesis are given as
follows:
1.If the Null Hypothesis is simple
𝐻 : 𝜇 = 𝜇 (𝜇 is a fixed value)
2. If the Null Hypothesis is composite
𝐻 : 𝜇 ≥ (>/</≤) 𝜇
6
Alternative Hypothesis:
1.If Alternative Hypothesis is One-Sided,
1: 𝜇 ≥ (>/</≤ 𝜇 ( 𝜇 is a fixed value)
2.If Alternative Hypothesis is Two-Sided,
1: 𝜇 ≠ 𝜇 (𝜇 is a fixed value)
Test statistics is expressed as:
𝑥̅ − 𝜇
𝑧 =
𝑠/√𝑛
The table values are expressed as:
𝑧 = 𝑧 (One-Sided)
𝑧 =𝑧 / (Two-Sided)
Ex: 541 consumers that are selected randomly are asked to assess the remark of “an upper bound
limit must be applied to compensate defective products that customers would buy.” For this
study, customers choose one of the remarks that are classified as follows: 1-Strongly disagree,
2-disagree, 3-Neutral- 4-Agree, 5-Strongly Agree. The sample mean and standard deviation are
found 3.68 and 1.21. If the population mean is 3.75 and greater then, it implies that customers
support this idea. Test the null hypothesis that the population mean is at least 3.75 at 0.05
significance level and interpret the result.
𝜇 = 3.75, 𝑛 = 541, 𝑥̅ = 3.68, 𝛼 = 0.05, 𝜎 𝑢𝑛𝑘𝑛𝑜𝑤𝑛, 𝑠 = 1.21
𝐻 : 𝜇 ≥ 3.75
𝐻 : 𝜇 < 3.75
3.68 − 3.75
𝑧 = = −1.35
1.21/√541
7
𝛼 = 0.10 and Alternative Hypothesis is One-Sided. 𝑧 = 𝑧 = 𝑧 . = −1.645 is obtained.
-1.645<-1.35 implying that 𝑧 < 𝑧 leads H0 to be accepted.
Remark: At 0.05 significance level, customers do not agree with imposing an upper bound for
the defective products.