Mostly Harmless StatisticsXYZ Homework Edition

⇩ Download ▾

8.2 Type I and II Errors

How do you quantify really small? Is 5% or 10% or 15% really small? How do you decide? That depends on your field of study and the importance of the situation. Is this a pilot study? Is someone’s life at risk? Would you lose your job? Most industry standards use 5% as the cutoff point for how small is small enough, but 1%, 5% and 10% are frequently used depending on what the situation calls for.

Now, how small is small enough? To answer that, you really want to know the types of errors you can make in hypothesis testing.

The first error is if you say that H0 is false, when in fact it is true. This means you reject H0 when H0 was true. The second error is if you say that H0 is true, when in fact it is false. This means you fail to reject H0 when H0 is false.

Figure 8-4 shows that if we “Reject H0 ” when H0 is actually true, we are committing a type I error. The probability of committing a type I error is the Greek letter α\alpha, pronounced alpha. This can be controlled by the researcher by choosing a specific level of significance α\alpha.

Two-by-two decision table: reject H0 when H0 is true is a type I error; reject H0 when H0 is false is a correct decision; do not reject H0 when H0 is true is a correct decision; do not reject H0 when H0 is false is a type II error.

Figure 8-4

Figure 8-4 shows that if we “Do Not Reject H0 ” when H0 is actually false, we are committing a type II error. The probability of committing a type II error is denoted with the Greek letter β, pronounced beta. When we increase the sample size this will reduce β. The power of a test is 1 – β.

Controlling for Type I Error

The significance level used by the researcher should be picked prior to collection and analyzing data. This is called “a priori,” versus picking α after you have done your analysis which is called “post hoc.” When deciding on what significance level to pick, one needs to look at the severity of the consequences of the type I and type II errors. For example, if the type I error may cause the loss of life or large amounts of money the researcher would want to set α\alpha low.

Controlling for Type II Error

The power of a test is the complement of a type II error or correctly rejecting a false null hypothesis. You can increase the power of the test and hence decrease the type II error by increasing the sample size. Similar to confidence intervals, where we can reduce our margin of error when we increase the sample size. In general, we would like to have a high confidence level and a high power for our hypothesis tests. For a fixed sample size, test design, and alternative effect, decreasing the significance level α generally reduces the power. Increasing the sample size can improve power while retaining a small α. The probability of a type II error is calculated under a specified alternative model. The illustrative normal models below show this calculation; a general raw-data power analysis for every test is not developed here.

“‘That's right!’ shouted Vroomfondel, ‘we demand rigidly defined areas of doubt and uncertainty!’”

(Adams, 2002)

Visualizing α\alpha and β

If α\alpha increases that means the chances of making a type I error will increase. It is more likely that a type I error will occur. It makes sense that you are less likely to make type II errors, only because you will be rejecting H0 more often. You will be failing to reject H0 less, and therefore, the chance of making a type II error will decrease. Thus, as α increases, β will decrease, and vice versa. That makes them seem like complements, but they are not complements. Consider one more factor – sample size.

Consider if you have a larger sample that is representative of the population, then it makes sense that you have more accuracy than with a smaller sample. Think of it this way, which would you trust more, a sample mean of 890 if you had a sample size of 35 or sample size of 350 (assuming a representative sample)? Of course, the 350 because there are more data points and so more accuracy. If you are more accurate, then there is less chance that you will make any error.

By increasing the sample size of a representative sample, you decrease β.

When the sample size becomes large, point estimates become more precise and any real differences in the mean and null value become easier to detect and recognize. Even a very small difference would likely be detected if we took a large enough sample size. Sometimes researchers will take such a large sample size that even the slightest difference is detected. While we still say that difference is statistically significant, it might not be practically significant. Statistically significant differences are sometimes so minor that they are not practically relevant. This is especially important to research: if we conduct a study, we want to focus on finding a meaningful result. We do not want to spend lots of money finding results that hold no practical value.

The role of a statistician in conducting a study often includes planning the size of the study. The statistician might first consult experts or scientific literature to learn what would be the smallest meaningful difference from the null value. They also would obtain some reasonable estimate for the standard deviation. With these important pieces of information, they would choose a sufficiently large sample size so that the power for the meaningful difference is perhaps 80% or 90%. While larger sample sizes may still be used, the statistician might advise against using them in some cases, especially in sensitive areas of research.

Figure 8-6 separates the null and alternative sampling distributions into two labelled panels on the same standardized horizontal scale. The null distribution is normal with mean 0 and standard deviation 1; the illustrative alternative is normal with mean 1 and standard deviation 1. The blue null-distribution tail is α, while the red alternative-distribution area below the same cutoff is β. These illustrative distributions explain the trade-off between the two error rates; they are not a new observed dataset. Do you remember the difference between a sampling distribution, the distribution of a sample, and the distribution of the population? Revisit the Central Limit Theorem in Chapter 6 if needed.

If we start with α\alpha = 0.05, the right-tailed critical value is represented by the vertical dashed line at z1−αz_{1-\alpha} = 1.645. Then the blue shaded area to the right of this line represents α\alpha. The area under the alternative-distribution curve to the left of z1−αz_{1-\alpha} = 1.645 represents β.

Two vertically stacked normal-distribution panels use the same standardized scale. The null distribution has mean 0 and standard deviation 1; its blue upper tail beyond the dashed cutoff 1.645 has area alpha = 0.05. The illustrative alternative has mean 1 and standard deviation 1; the red area below the same cutoff is beta, approximately 0.7405. The unshaded alternative upper tail is the power, approximately 0.2595. Vertical axes show relative height with peak 1; shading marks fractions of total curve area.

Figure 8-6

Two vertically stacked normal-distribution panels use the same standardized scale. The null distribution has mean 0 and standard deviation 1; its blue upper tail beyond the dashed cutoff 2.326 has area alpha = 0.01. The illustrative alternative has mean 1 and standard deviation 1; the red area below the same cutoff is beta, approximately 0.9076. The unshaded alternative upper tail is the power, approximately 0.0924. Vertical axes show relative height with peak 1; shading marks fractions of total curve area.

Figure 8-7

If we change α\alpha from 0.05 to 0.01, the right-tailed critical value becomes z1−αz_{1-\alpha} = 2.326. Note that when α\alpha decreases, then β increases which means your power 1 – β decreases. See Figure 8-7.

The illustrative normal models above show how to compute β when the null and specified alternative distributions are given. This text does not develop a general raw-data power calculation for every test. You will need to be able to write out a sentence interpreting either the type I or II errors given a set of hypotheses. You also need to know the relationship between α\alpha, β, confidence level, and power.

Hypothesis tests are not flawless, since we can make a wrong decision in statistical hypothesis tests based on the data. For example, in the court system, innocent people are sometimes wrongly convicted and the guilty sometimes walk free, or diagnostic tests that have false negatives or false positives. However, the difference is that in statistical hypothesis tests, we have the tools necessary to quantify how often we make such errors. A type I Error is rejecting the null hypothesis when H0 is actually true. A type II Error is failing to reject the null hypothesis when the alternative is actually true (H0 is false).

We use the symbols α\alpha = P(Type I Error) and β = P(Type II Error). The critical value is a cutoff point on the horizontal axis of the sampling distribution that you can compare your test statistic to see if you should reject the null hypothesis. For a left-tailed test the critical value will always be on the left side of the sampling distribution, the right-tailed test will always be on the right side, and a two-tailed test will be on both tails. Use technology to find the critical values. Most of the time in this course the shortcut menus that we use will give you the critical values as part of the output.

8.2.1 Finding Critical Values

A researcher decides they want to have a 5% chance of making a type I error so they set α = 0.05. What z-score would represent that 5% area? It would depend on if the hypotheses were a left-tailed, two-tailed or right-tailed test. This z-score is called a critical value. Figure 8-8 shows examples of critical values for the three possible sets of hypotheses.

Three-column table of critical values: two-tailed test (H0: μ = μ0, H1: μ ≠ μ0) with a normal curve shading both tails green, right-tailed test (H1: μ > μ0) shading the right tail, and left-tailed test (H1: μ < μ0) shading the left tail.

Figure 8-8

Two-tailed Test

For a two-tailed test, split the total significance level α\alpha equally between the tails. In the positive upper-tail convention used here, zα/2=Φ−1(1−α/2)z_{\alpha/2}=\Phi^{-1}(1-\alpha/2). Reject when the z test statistic is at or below −zα/2-z_{\alpha/2} or at or above +zα/2+z_{\alpha/2}. At α=0.05\alpha=0.05, the cutoffs are approximately −1.96 and +1.96. Figure 8-9 shows these same tails; a left-tail-quantile notation labels the lower cutoff with cumulative area α/2\alpha/2 and the upper cutoff with cumulative area 1−α/21-\alpha/2.

Standard normal curve with both tails shaded green, bounded on the left by z sub α/2 and on the right by z sub 1−α/2; labels read area in lower tail = α/2, area in upper tail = α/2, and area between = 1 − α.

Figure 8-9

For a two-tailed test with α=0.05\alpha=0.05, each tail has area 0.025. Find the signed left and right cutoffs using the following technology.

Excel: The left cutoff is NORM.S.INV(0.025) = –1.96 and the right cutoff is NORM.S.INV(0.975) = 1.96. Using the confidence-interval convention, the positive upper-tail critical multiplier is zα/2=1.96z_{\alpha/2}=1.96; the two cutoffs are −zα/2-z_{\alpha/2} and +zα/2+z_{\alpha/2}.

TI-Calculator: The left cutoff is invNorm(0.025,0,1) = –1.96 and the right cutoff is invNorm(0.975,0,1) = 1.96. Using the confidence-interval convention, the positive upper-tail critical multiplier is zα/2=1.96z_{\alpha/2}=1.96; the two cutoffs are −zα/2-z_{\alpha/2} and +zα/2+z_{\alpha/2}.

Since the normal distribution is symmetric, you only need to find one side’s z-score and we usually represent the critical values as ± zα/2z_{\alpha / 2}.

Most of the time we will be finding a probability (p-value) instead of the critical values. The p-value and critical values are related and tell the same information so it is important to know what a critical value represents.

Right-tailed Test

If we are doing a right-tailed test then the α\alpha = 5% area goes into the right tail. We denote this critical value z1−αz_{1-\alpha}. When the sample data finds a z-score more than z1−αz_{1-\alpha} then we would reject H0, reject H0 if the test statistic is ≥ z1−αz_{1-\alpha}. The area to the right of the critical value z1−αz_{1-\alpha} is called the critical region. See Figure 8-10.

Normal curve with the upper tail beyond the critical value z sub 1−α shaded green; labels read area in lower tail = 1 − α and area in upper tail = α.

Figure 8-10

When α\alpha = 0.05 then the critical value z1−αz_{1-\alpha} is found using the following technology.

Excel: z1−αz_{1-\alpha} =NORM.S.INV(0.95) = 1.645 Figure 8-10

TI-Calculator: z1−αz_{1-\alpha} = invNorm(0.95,0,1) = 1.645

Left-tailed Test

If we are doing a left-tailed test then the α\alpha = 5% area goes into the left tail. If the sampling distribution is a normal distribution then we can use the inverse normal function in Excel or calculator to find the corresponding z-score. We denote this critical value zαz_{\alpha}.

When the sample data finds a z-score less than zαz_{\alpha} then we would reject H0, reject Ho if the test statistic is ≤ zαz_{\alpha}. The area to the left of the critical value zαz_{\alpha} is called the critical region. See Figure 8-11.

Normal curve with the lower tail below the critical value z sub α shaded green; labels read area in lower tail = α and area in upper tail = 1 − α.

Figure 8-11

When α\alpha = 0.05 then the critical value zαz_{\alpha} is found using the following technology.

Excel: zαz_{\alpha} =NORM.S.INV(0.05) = –1.645

TI-Calculator: zαz_{\alpha} = invNorm(0.05,0,1) = –1.645

The Claim and Summary

The wording on the summary statement changes depending on which hypothesis the researcher claims to be true. We really should always be setting up the claim in the alternative hypothesis since most of the time we are collecting evidence to show that a change has occurred, but occasionally a textbook will have the claim in the null hypothesis. Do not use the phrase “accept H0” since this implies that H0 is true. The lack of evidence is not evidence of nothing.

Caution! If we fail to reject the null this does not mean that there was no change, we just do not have any evidence that change has occurred. The absence of evidence is not evidence of absence. On the other hand, we need to be careful when we reject the null hypothesis we have not proved that there is change.

When we reject the null hypothesis, there is only evidence that a change has occurred. Our evidence could have been false and lead to an incorrect decision. If we use the phrase, “accept H0” this implies that H0 was true, but we just do not have evidence that it is false. Hence you will be marked incorrect for your decision if you use accept H0, use instead “fail to reject H0” or “do not reject H0.”

Adapted from Mostly Harmless Statistics by Rachel Webb (Portland State University, https://mostlyharmlessstat.wixsite.com/webpage), © Rachel Webb, licensed under CC BY-SA 4.0. Changes were made. License: CC-BY-SA-4.0.

These eBooks are a prerelease and are not yet certified conformant with WCAG 2.1 AA or any other accessibility standard. Every page is built against an automated accessibility gate, and our target for the published editions is WCAG 2.2 Level AA. If something is unusable, please tell us.