Module 8: Tests of Hypotheses For A Single Sample: Statistical Decisions Statistical Hypothesis
Module 8: Tests of Hypotheses For A Single Sample: Statistical Decisions Statistical Hypothesis
How do you test that the assumption/hypothesis you made about a population
is true? Write your answers in the space below.
Statistical Decisions
Making decisions about populations on the basis of sample information.
Statistical Hypothesis
Assumptions (or guesses) about the populations involved, which may or
may not be true. They are generally statements about the probability
distributions of the populations.
Hypothesis Testing
• The intent of hypothesis testing is to formally examine two opposing
conjectures (hypotheses).
• These two hypotheses are mutually exclusive and exhaustive so that one is
true to the exclusion of the other.
• An evidence is accumulated - sample information is collected and
analyzed - for the purpose of determining which of the two hypotheses is
true and which of the two hypotheses is false.
Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited.
The Null and Alternative Hypotheses
The null hypothesis, H0:
States the assumption (numerical) to be tested
Begin with the assumption that the null hypothesis is TRUE
Always contains the ‘=’ sign
The alternative hypothesis, H1:
• Opposite of the null hypothesis
• Challenges the status quo
• Never contains just the ‘=’ sign
• Generally, it the hypothesis that is believed to be true by the
researcher.
Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited.
Power of a Test
o The power of a test is the probability of rejecting H0 given that a
specific alternative is true.
𝑃𝑜𝑤𝑒𝑟 𝑜𝑓 𝑎 𝑇𝑒𝑠𝑡 = 1 – 𝛽
Important Properties of a Test of Hypothesis
1. The type I error and type II error are related. A decrease in the probability
of one generally results in an increase in the probability of the other.
2. The size of the critical region, and therefore the probability of committing
a type I error, can always be reduced by adjusting the critical value(s).
3. An increase in the sample size n will reduce α and β simultaneously.
4. If the null hypothesis is false, β is a maximum when the true value of a
parameter approaches the hypothesized value. The greater the distance
between the true value and the hypothesized value, the smaller β will be.
One- and Two-Tailed Tests
One-tailed test: A test of any statistical hypothesis where the alternative is
one sided, such as
𝐻0 : 𝜃 = 𝜃0 ,
𝐻1 : 𝜃 > 𝜃0 or perhaps 𝜃 < 𝜃0
Two-tailed test: A test of any statistical hypothesis where the alternative is two
sided, such as
𝐻0 : 𝜃 = 𝜃0 ,
𝐻1 : 𝜃 ≠ 𝜃0 ,
Since the critical region is split into two parts, often having equal probabilities,
in each tail of the distribution of the test statistic. The alternative hypothesis
𝐻1 : 𝜃 ≠ 𝜃0 states that either θ < θ0 or θ > θ0 .
Example 1: A certain type of cold vaccine is known to be only 25% effective after a
period of 2 years. To determine if a new and somewhat more expensive
vaccine is superior in providing protection against the same virus for a longer
period of time, suppose that 20 people are chosen at random and
inoculated. If more than 8 of those receiving the new vaccine surpass the 2-
year period without contracting the virus, the new vaccine will be
considered superior to the one presently in use. (a) Determine the probability
of committing a type I and type II error. What happens to the values of α and
β when (b) we change our critical value to 7, and (c) the random sample is
100 individuals and the critical value is 36? (Test the null hypothesis that p =
1/4 against the alternative hypothesis that p > 1/4.)
Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited.
Solution:
H0: p = 0.25 (the new vaccine is as powerful as the present vaccine)
H1: p > 0.25 (the new vaccine is superior compared to the present vaccine)
The test statistic on which we base our decision is X, the number of individuals
in our test group who receive protection from the new vaccine for a period of
at least 2 years. The possible values of X, from 0 to 20, are divided into two
groups: those numbers less than or equal to 8 and those greater than 8. All
possible scores greater than 8 constitute the critical region. The last number
that we observe in passing into the critical region is called the critical value. In
our illustration, the critical value is the number 8. Therefore, if x > 8, we reject H0
in favor of the alternative hypothesis H1. If x ≤ 8, we fail to reject H0. This decision
criterion is illustrated in the figure below.
a. i. Type I error will occur when more than 8 individuals inoculated with the
new vaccine surpass the 2-year period without contracting the virus and
researchers conclude that the new vaccine is better when it is actually
equivalent to the one in use. Hence, if X is the number of individuals who
remain free of the virus for at least 2 years,
20
We say that the null hypothesis, p = 1/4, is being tested at the α = 0.0409
level of significance. A critical region of size 0.0409 is very small, and
therefore it is unlikely that a type I error will be committed. Consequently, it
would be most unusual for more than 8 individuals to remain immune to a
virus for a 2-year period using a new vaccine that is essentially equivalent
to the one now on the market.
Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited.
when it is false. We simply find the probability of obtaining 8 or fewer in the
group that surpass the 2-year period when p = 1/2. In this case,
8
1 1
𝛽 = 𝑃(𝑡𝑦𝑝𝑒 𝐼𝐼 𝑒𝑟𝑟𝑜𝑟) = 𝑃 (𝑋 ≤ 8 𝑤ℎ𝑒𝑛 𝑝 = ) = ∑ 𝑏(𝑥; 20, )
2 2
𝑥=0
8
20
𝛽 = ∑( ) (0.5)𝑥 (0.5)20−𝑥 = 0.2517
𝑥
𝑋=0
Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited.
c. If the random sample is 100 individuals and the critical value is 36
i. To determine the probability of committing a type I error, we can use
the normal curve approximation with
𝜇 = 𝑛𝑝 = (100)(0.25) = 25 𝑎𝑛𝑑 𝜎 = √𝑛𝑝𝑞 = √(100)(0.25)(0.75) = 4.33
The corresponding z-value is
(36 + 0.5) − 25
𝑧= = 2.66
4.33
From the normal distribution curve table, we find that
𝛼 = 𝑃(𝑡𝑦𝑝𝑒 𝐼 𝑒𝑟𝑟𝑜𝑟) = 𝑃(𝑋 > 36 𝑤ℎ𝑒𝑛 𝑝 = 0.25) ≈ 𝑃(𝑍 > 2.66)
𝛼 = 1 − 𝑃(𝑍 < 2.66) = 1 − 0.9961 = 0.0039.
ii. If H0 is false and the true value of H1 is p = 1/2, we can determine the
probability of a type II error using the normal curve approximation with
𝜇 = 𝑛𝑝 = (100)(0.5) = 50 𝑎𝑛𝑑 𝜎 = √𝑛𝑝𝑞 = √(100)(0.5)(0.5) = 5
The probability of a value falling in the non-rejection region when H0 is
true is given by the area of the shaded region to the left of x = 36.5. The
z-value corresponding to x = 36.5 is
(36 + 0.5) − 50
𝑧= = −2.7
5
From the normal distribution curve table, we find that
𝛽 = 𝑃(𝑡𝑦𝑝𝑒 𝐼𝐼 𝑒𝑟𝑟𝑜𝑟) = 𝑃(𝑋 ≤ 36 𝑤ℎ𝑒𝑛 𝑝 = 0.5) ≈ 𝑃(𝑍 ≤ −2.7)
𝛽 = 0.0035.
Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited.
probability of wrongly accepting H0 (i.e., the value of β) when the true
situation represents some important deviation from H0. A value for the
sample size can usually be determined for which there is a reasonable
balance between the values of α and β computed in this fashion.
TEST PROCEDURES
A. Single Sample
The z-Test
1. Population Parameter
a. If the population variance is known and 𝒏 ≥ 𝟑𝟎, use:
̅ − 𝝁𝟎
𝒙
𝒛= (𝑪𝒆𝒏𝒕𝒓𝒂𝒍 𝑳𝒊𝒎𝒊𝒕 𝑻𝒉𝒆𝒐𝒓𝒆𝒎)
𝝈/√𝒏
𝑥̅ = 𝑠𝑎𝑚𝑝𝑙𝑒 𝑚𝑒𝑎𝑛
𝜎
𝑠𝑡𝑎𝑛𝑑𝑎𝑟𝑑 𝑒𝑟𝑟𝑜𝑟 𝑜𝑓 𝑡ℎ𝑒 𝑚𝑒𝑎𝑛, 𝜎𝑀 =
√𝑛
Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited.
Solution:
1. Hypotheses:
H0: μ = 70 years
H1: μ > 70 years
2. Level of Significance:
𝜶 = 𝟎. 𝟎𝟓
3. Critical region (at 𝑧 > 𝑧𝛼 , refer to the table above):
To determine the critical region (at 𝑧 > 𝑧𝛼 ), find z-value such that
the area on its right (since 𝑧 > 𝑧𝛼 ) is 𝜶 = 𝟎. 𝟎𝟓. That would be now:
P(Z > 𝑧𝛼 ) = 1 – P(Z < 𝑧𝛼 ) = 0.05
P(Z < 𝑧𝛼 ) = 1 - 0.05 = 0.95
But looking at the normal distribution curve table, we don’t have z-
value with area on its left exactly equal to 0.95. The closest values
are:
P(Z <1.64) = 0.9495 and P(Z <1.65) = 0.9505
The P(Z < 𝑧𝛼 ) = 0.95 is exactly at the middle of these two z-values, so
by interpolation we get
P(Z <1.645) = 0.95
Therefore, the critical region is at
z > 1.645
Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited.
The P-value is less than or equal to the 0.05 level of significance
(𝑃 − 𝑣𝑎𝑙𝑢𝑒 ≤ 𝛼). As a result, the evidence to reject H0 in favor of
H1 is even stronger than that suggested by a 0.05 level of
significance.
Solution:
1. Hypotheses:
H0: μ = 8 kg
H1: μ ≠ 8 kg
2. Level of Significance:
𝜶 = 𝟎. 𝟎𝟏
3. Critical region (𝑧 < −𝑧𝛼/2 𝑜𝑟 𝑧 > 𝑧𝛼/2 ):
P(Z < −𝑧𝛼/2 ) = α/2 = 0.01/2 = 0.005
P(Z < -2.575) = 0.005 (Use interpolation, same concept as the
previous example)
Therefore, the critical region is at
z < -2.575 or z > 2.575
5. Decision
Since 𝑧 < −𝑧𝛼/2 (-2.83 < -2.575), reject H0 and conclude that the
average breaking strength is not equal to 8 but is, in fact, less than 8
kilograms.
Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited.
Or using the P-Value Approach to make decision:
Since the test in this example is two tailed (µ ≠ µ0), the desired P-value
is twice the area to the left of z = −2.83. Therefore, we have
P = P(|Z| > 2.83) = 2P(Z < −2.83) = 0.0046,
which allows us to reject the null hypothesis that μ = 8 kilograms at a
level of significance smaller than 0.01.
𝑛
1
𝑠 = 𝑠𝑎𝑚𝑝𝑙𝑒 𝑠𝑡𝑎𝑛𝑑𝑎𝑟𝑑 𝑑𝑒𝑣𝑖𝑎𝑡𝑖𝑜𝑛 = √ ∑(𝑥𝑖 − 𝑥̅ )2
𝑛−1
𝑖=1
Solution:
1. Hypotheses:
H0: μ = 5 hrs.
H1: μ ≠ 5 hrs.
2. Level of Significance:
𝜶 = 𝟎. 𝟎𝟓
3. Critical region (𝑧 < −𝑧𝛼/2 𝑜𝑟 𝑧 > 𝑧𝛼/2 ):
P(Z < −𝑧𝛼/2 ) = α/2 = 0.05/2 = 0.025
P(Z < -1.96) = 0.025
Therefore, the critical region is at
z < -1.96 or z > 1.96
Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited.
4. Calculate the z-value and compare it with the critical value
𝑥̅ − 𝜇
𝑧=
𝑠/√𝑛
where:
9+8+7+4+8+6+8+8+7+10+8+10+6+7+7+8+9+6+5+8+5+6+8+7+8+5+5+8+7+6+6+4+5
𝑥̅ = 33
𝑥̅ = 6.9394
1 1
𝑖=1(𝑥𝑖 − 6.9394) = 1.5952
𝑠 = √𝑛−1 ∑𝑛𝑖=1(𝑥𝑖 − 𝑥̅ )2 = √33−1 ∑33 2
6.9394 − 5
𝑧=
1.5952/√33
𝒛 = 𝟔. 𝟗𝟖
5. Decision
Since 𝑧 > 𝑧𝛼/2 (6.98 > 1.96), reject H0 and conclude that the average
hours per week is not equal to 5 but is, in fact, more than 5 hours.
2. Population Proportion
If 𝒏𝒑 ≥ 𝟓 𝒂𝒏𝒅 𝒏𝒒 ≥ 𝟓, use
𝒙 − 𝒏𝒑𝟎 ̂ − 𝒑𝟎
𝒑 𝑥
𝒛= = 𝑤ℎ𝑒𝑟𝑒: 𝑝̂ =
√𝒏𝒑𝟎 𝒒𝟎 √𝒑𝟎 𝒒𝟎 /𝒏 𝑛
𝑵𝒐𝒕𝒆: 𝑨𝒑𝒑𝒍𝒚 𝒄𝒐𝒏𝒕𝒊𝒏𝒖𝒊𝒕𝒚 𝒄𝒐𝒓𝒓𝒆𝒄𝒕𝒊𝒐𝒏 (±𝟎. 𝟓) 𝒊𝒏 𝒓𝒂𝒏𝒅𝒐𝒎 𝒗𝒂𝒓𝒊𝒂𝒃𝒍𝒆 𝑿.
Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited.
determine whether the results are significant at the (a) 0.05 and (b)
0.01 levels.
Solution:
1. Hypotheses:
If p is the probability of the subject choosing the color of a card
correctly, then we have to decide between two hypotheses:
H0: p = 0.5, and the subject is simply guessing (the results are due to
chance).
H1: p > 0.5, and the subject has powers of ESP.
2. Level of Significance:
𝒂. 𝜶 = 𝟎. 𝟎𝟓
𝒃. 𝜶 = 𝟎. 𝟎𝟏
3. Critical regions (𝑧 > 𝑧𝛼 ):
a. P(Z > 𝑧𝛼 ) = 1 - P(Z < 𝑧𝛼 ) = 0.05
z > 1.645
b. P(Z > 𝑧𝛼 ) = 1 - P(Z < 𝑧𝛼 ) = 0.01
P(Z < 𝑧𝛼 ) = 1 – 0.01 = 0.99
z > 2.33 (2.33 is the closest to 0.99)
Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited.
The t-Test
1. Population Parameter
If sample size is small (𝑛 < 30), use
̅ − 𝝁𝟎
𝒙
𝒕=
𝒔/√𝒏
𝐷𝑒𝑔𝑟𝑒𝑒 𝑜𝑓 𝑓𝑟𝑒𝑒𝑑𝑜𝑚, 𝒗 = 𝒏 − 𝟏
𝑛
1
𝑠 = 𝑠𝑎𝑚𝑝𝑙𝑒 𝑠𝑡𝑎𝑛𝑑𝑎𝑟𝑑 𝑑𝑒𝑣𝑖𝑎𝑡𝑖𝑜𝑛 = √ ∑(𝑥𝑖 − 𝑥̅ )2
𝑛−1
𝑖=1
Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited.
Example 6: The Edison Electric Institute has published figures on the number
of kilowatt hours used annually by various home appliances. It is
claimed that a vacuum cleaner uses an average of 46 kilowatt hours
per year. If a random sample of 12 homes included in a planned
study indicates that vacuum cleaners use an average of 42 kilowatt
hours per year with a standard deviation of 11.9 kilowatt hours, does
this suggest at the 0.05 level of significance that vacuum cleaners
use, on average, less than 46 kilowatt hours annually? Assume the
population of kilowatt hours to be normal.
Solution:
1. Hypotheses:
H0: µ = 46 kWh
H1: µ < 46 kWh
2. Level of Significance:
𝜶 = 𝟎. 𝟎𝟓
3. Critical region (𝑡 < −𝑡𝛼 ):
P(T < −𝑡𝛼 ) = 0.05
Looking t-Distribution Table at 𝛼 = 0.05 and with degree of freedom,
v =12-1=11, we have
t < -1.976
Note: The curve is symmetrical at t = 0, t > 1.976 is the same as t < -
1.976.
4. Calculate the t-value and compare it with the critical value
𝑥̅ − 𝜇0
𝑡=
𝑠/√𝑛
42 − 46
𝑡=
11.9/√12
𝒕 = −𝟏. 𝟏𝟔
5. Decision
Since the computed t-value (-1.16) is NOT less than the critical value
(t < -1.976), do not reject H0 and conclude that the average number
of kilowatt hours used annually by home vacuum cleaners is not
significantly less than
46.
Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited.
1. A random sample of 400 voters in a certain city are asked if they favor an
additional 4% gasoline sales tax to provide badly needed revenues for
street repairs. If more than 220 but fewer than 260 favor the sales tax, we
shall conclude that 60% of the voters are for it. (a) Find the probability of
committing a type I error if 60% of the voters favor the increased tax. (b)
What is the probability of committing a type II error using this test
procedure if actually only 48% of the voters are in favor of the additional
gasoline tax?
2. An electrical firm manufactures light bulbs that have a lifetime that is
approximately normally distributed with a mean of 800 hours and a
standard deviation of 40 hours. Test the hypothesis that μ = 800 hours
against the alternative, μ ≠ 800 hours, if a random sample of 30 bulbs has
an average life of 788 hours. Use a P-value in your answer. Use 0.05 level
of significance.
3. Test the hypothesis that the average content of containers of a particular
lubricant is 10 liters if the contents of a random sample of 10 containers
are 10.2, 9.7, 10.1, 10.3, 10.1, 9.8, 9.9, 10.4, 10.3, and 9.8 liters. Use a 0.01
level of significance and assume that the distribution of contents is normal.
Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited.