Download as pdf or txt
Download as pdf or txt
You are on page 1of 15

Hypothesis Testing Type I and

Type II Errors

WK 1
Relationship between Type of Errors
• 𝛼 = Probability of a Type I error (rejecting 𝐻0 when it is true)
• 𝛽 = Prob. of a Type II error (not rejecting 𝐻0 when it is false)
• There is a 𝛽 value for each for population value for which
the null hypothesis is false
• 1 − 𝛽 = Power of the test
• The probability of rejecting 𝐻0 if it is actually false
• 𝜷 and power can only be calculated if we knew the actual
hypothesis or fix a value for the true population parameter
(before the sample is taken)
• If we decrease 𝛼, 𝛽 increases (power decreases)
• If we increase 𝛼, 𝛽 decreases (power increases)
• If we increase the sample size, alpha decreases, beta decreases
and power increases
• See: http://rpsychologist.com/d3/NHST/
• http://shiny.stat.tamu.edu:3838/eykolo/power/
Example: find the Probability of Type II Error 𝛽

Westberg has developed a new energy-saving light


bulb to last more than 700 hours on average. What is
𝛽, if the true value of 𝜇 is 701 hours? (𝜎 = 15 hours
and 𝛼 = 0.05) Hypothesized distribution
• 𝐻0 : 𝜇 ≤ 700
• 𝐻𝐴 : 𝜇 > 700
1. Find the
corresponding critical
value 𝒙

WK 9
Example: find the Probability of Type II Error 𝛽

Westberg has developed a new energy-saving light


bulb to last more than 700 hours on average. What is
𝜷, if the true value of 𝝁 is 701 hours? (𝜎 = 15 hours
and 𝛼 = 0.05, n=100) Hypothesized distribution
• 𝐻0 : 𝜇 ≤ 700
• 𝐻𝐴 : 𝜇 > 700
1. Find the
corresponding critical
value 𝒙𝜶

WK 10
𝜷 for 𝝁 = 𝟕𝟎𝟏?

Hypothesized
Distribution 2. Find 𝒛 for 𝒙 using
the “True” distribution
𝝁 = 𝟕𝟎𝟏

𝑯𝟎 is false
“True” Distribution

𝛽 = 0.5 + 0.3365
= 0.8365

WK 11
𝜷 for 𝝁 = 𝟕𝟎𝟒?
Find 𝒛 for 𝒙 using
the “True” distribution
𝝁 = 𝟕𝟎𝟒

WK 12
Ex 9-55.
Consider the following hypotheses:
• 𝐻0 : 𝜇 = 30
• 𝐻𝐴 : 𝜇 ≠ 30
• A sample of size 50 is to be taken from a population
with a standard deviation of 13. The hypothesis test
is to be conducted using a significance level of 0.05.
Determine the probability of committing a Type II
error when
a. 𝜇 = 22
b. 𝜇 = 29

WK 13
Ex 9-55
Solution

𝒙𝑳 𝟑𝟎 𝒙𝑼

Reject 𝑯𝟎 if 𝒙 ≤ 𝟐𝟔. 𝟑𝟗𝟔𝟔 or 𝒙 ≥ 𝟑𝟑. 𝟔𝟎𝟑𝟒


a. For 𝝁 = 𝟐𝟐:
𝜷 = 𝒑(𝟐𝟔. 𝟑𝟗𝟔𝟔 < 𝒙 < 𝟑𝟑. 𝟔𝟎𝟑𝟒 | 𝝁 = 𝟐𝟐)
xL   26.3966  22 xU   33.6034  22
z   2.3914 z    6.31
/ n 13 / 50 / n 13 / 50

WK 14
Ex 9-55
Solution

𝒙𝑳 𝟑𝟎 𝒙𝑼

Reject 𝑯𝟎 if 𝒙 ≤ 𝟐𝟔. 𝟑𝟗𝟔𝟔 or 𝒙 ≥ 𝟑𝟑. 𝟔𝟎𝟑𝟒


b. For 𝝁 = 𝟐𝟗:
𝜷 = 𝒑(𝟐𝟔. 𝟑𝟗𝟔𝟔 < 𝒙 < 𝟑𝟑. 𝟔𝟎𝟑𝟒 | 𝝁 = 𝟐𝟗)
xL   26.3966  29 xU   33.6034  29
z   –1.4161 z    2.5039
/ n 13 / 50 / n 13 / 50

WK 15
Example: find Type II Error for Two-Tailed Test
The ideal Maple tree diameter for shipment is 2.25
inches. If the diameter is too large or small, it seems
to affect the trees’ ability to survive transport and
planting. 𝑛 = 20, 𝜎 = 0.005, 𝛼 = 0.05. How likely, if
we conducts a hypothesis test, we will conclude that
the mean diameter is equal to 2.25 inches when, in
fact, the mean equals 2.255 inches.
1. Population parameter of interest: Mean diameter
of Maple tree.
2. Null / alternative hypothesis:
• 𝐻0 : 𝜇 = 2.25
• 𝐻𝐴 : 𝜇 ≠ 2.25
3. Significance level: 𝛼 = 0.05
WK 16
Example: find Type II Error for Two-Tailed Test
4. Determine the lower and upper critical values:
(𝐿)
• 𝑧𝛼 = − 𝑧0.025 = −1.96
2
(𝑈)
• 𝑧𝛼 = + 𝑧0.025 = +1.96
2
5. Find corresponding lower and upper 𝑥 values
(based on 𝜇0 = 2.25):
𝜎 0.05
• 𝒙(𝑳) = 𝜇0 − 𝑧0.025 = 2.25 − 1.96 = 2.2478
𝑛 20
(𝑼) 𝜎 0.05
• 𝒙 = 𝜇0 + 𝑧0.025 = 2.25 + 1.96 = 2.2522
𝑛 20
6. Specify the rejection region:
• The null hypothesis will be rejected if:
• 𝑥 < 2.2478 or 𝑥 > 2.22522
WK 17
Example: find Type II Error for Two-Tailed Test
7. Compute the z-values based on the stipulated
mean: 𝜇 = 2.255
𝑥 (𝐿) −𝜇 2.2478−2.255
• 𝑧 (𝐿) = = = −6.44
𝜎/ 𝑛 0.005/ 20
𝑥 (𝑈) −𝜇 2.2522−2.255
• 𝑧 (𝑈) = = = −2.50
𝜎/ 𝑛 0.005/ 20
8. Find 𝛽 and reach a conclusion
• 𝛽 is the probability from the normal distribution
between 𝑧 = −6.44 and 𝑧 = −2.50:
𝛽 = 𝑝 𝑧 ≤ −2.50 − 𝑝 𝑧 ≤ −6.44
= 0.5 − 0.4938 − 0 = 0.0062
There is a small chance (0.0062) that this test will fail to
detect the diameter shift from 2.25 to 2.255.
WK 18
Example: find Type II Error for Proportion

• A Wall Street Journal online article stated that


more than 30% of all new businesses in 2014
were started by women. Suppose the Economic
Development office said the percentage was
closer to 25%. Conduct a test to determine if the
percentage of small businesses started by women
was less than 30%. Find 𝛽 if the if the true
percentage was 25%. A simple random sample of
500 small businesses will be selected. (𝛼 = 0.025).

WK 19
Example: find Type II Error for Proportion
1. Population parameter of interest:
• the proportion of female-started small businesses, p
2. Null and alternative hypotheses:
• 𝐻0 : 𝑝 ≥ 0.3
• 𝐻𝐴 : 𝑝 < 0.3
3. Determine the critical value for 𝛼 = 0.025:
𝑧𝛼 = 𝑧0.025 = −1.96
4. Calculate the critical value 𝑝𝛼 :
The null hypothesis will be
rejected if 𝒑 < 𝟎. 𝟐𝟓𝟗𝟖

WK 20
Example: find Type II Error for Proportion
5. 𝛽 = 𝑃 𝑝 ≥ 𝑝𝛼 = 0.2598 𝑝 = 0.25)
• Compute the z-value based on the stipulated population
proportion (𝑝 = 0.25):

• 𝛽 = 𝑃 𝑧 ≥ 0.51 = 0.5 − 0.1950 = 0.3050


• There is a 0.3050 chance that the hypothesis test will
not reject the null hypothesis (that the percentage of
women-started small businesses is ≥ 30%) if in fact the
true percentage is only 25%.
• Need to increase the sample size.

WK 21

You might also like