This tutorial examines what is know as type 1 and type 2 errors in statistics.
If you have ever wondered what type I and type II, you have come to the right place. Although this is a fairly technical topic, an attempt will be to present the information in the clearest and easiest way to understand as possible.
We will begin, of course, by defining the terms succinctly before we go further into them.
What Are Type I and Type II Errors?
The terms type I and type II are used in the context of statistical hypothesis testing, so before we can go into the differences between type I and type II errors, we should talk a little bit about statistical hypotheses.
A statistical hypothesis is also referred to as confirmatory data analysis. So if you’ve heard that term, know that they are one and the same thing.
So, statistical hypothesis testing is what they call when a process is shaped through some random variables and that hypothesis is tested.
We could go into a lot more detail about statistical hypothesis testing, but going back to type I and type II errors have to do with a null hypothesis.
What is a null hypothesis? Often, a null hypothesis is how we refer to how a statement has no effect so it does not make any difference at all. Null hypotheses can be used in all kind of experiments, so we can give you an example that has nothing to do with computers. For example, “This workout routine does not have any impact on people’s fitness.”
So, in other words, we could say that a null hypothesis is a false hypothesis.
Having said all that, let’s now look into type I and type II error separately.
Type I error, which is also sometimes referred to as an error of the first kind is what you would call when you reject a null hypothesis that it is actually true. So, if you reject a hypothesis on the basis that you have not even checked that the hypothesis you are testing meets the basic requirements to be valid. If you do this, your hypothesis will lead to a type I error or an error of the first kind.
Type II error, which is also sometimes referred to as an error of the second kind is in a way the opposite to type I error. Because that may not be too clear, let’s go into what that means. This error is the result of not rejecting a false null hypothesis. Obviously, we are talking about rejecting the hypothesis knowingly but rather when testing the hypothesis does not go the way is supposed to and, therefore, it will reject the hypothesis erroneously.
What Are Null Hypotheses?
Hypothesis testing is used across a large number of different disciplines including the social and natural sciences, although many people may think of hypothesis testing as something that only relates to statistics.
Because both errors are in a way unavoidable by design, it is really important to be aware of them so you can better plan your design before it is too late. It is the only way of avoiding them from happening and, therefore, drawing the wrong conclusion.
“There are two possible outcomes: if the result confirms the hypothesis, then you’ve made a measurement. If the result is contrary to the hypothesis, then you’ve made a discovery.” – Enrico Fermi
Let’s go back to exploring null hypotheses. A null hypothesis can only be true or false. In fact, it is all too often assume that a null hypothesis is true until such time when evidence to the contrary is encountered.
In statistical models, a null hypothesis is used to for comparison purposes in order to determined it is likely that the results that have been obtained are determined.
What Is the Difference Between These Two Errors?
Now that we have given you the most basic of definitions for both error types, it is now time to go a little bit deeper. To do so, we will go to the background to expand on it before we go back to each individual error.
A type I error or error of the first kind occurs when a null hypothesis is rejected even though it is actually true. Let’s see an example so we can understand this better. If we were testing a new product and rejected the null hypothesis, but the null hypothesis turned out to be true, we would be making a type I error or an error of the first kind. For instance, if we were testing our new product for a specific function and the null hypothesis was that the product cannot perform that function when, in fact, the product could, we would be making a type I error. In other words, we would be making a false claim about the functions that our product is able to perform.
A type II error or error of the second kind occurs when a null hypothesis is not rejected even though it is actually false. As we saw with type I error, let’s see a simple example so we can understand type II error. If we were testing a new product and we accept the null hypothesis, but the null hypothesis turned out to be false, we would be making a type II error or an error of the second type. For instance, if we were testing our new product for a specific function and the null hypothesis was that the product can perform that function when, in fact, the product could actually not, we would be incurring in a type II error. So, like in the example of a type I error we would be making a false claim about the functions that our product is able to perform.
More Examples of Type I Error
Now that we have been through the definitions and have seen one general (and, I’ll admit it, fairly abstract, as well) example for each error type, it might be a good idea to detail a few more specific examples for each error type.
With all that said, let begin by looking at some more examples of type I error.
As the Investopedia website put it, the type I error or error of the first kind is also known as a “false positive”. I find that this simple way of looking at this kind of error is very illuminating.
The above-mentioned article in Investopedia also has a great example of a Type I error, which is the following: in a criminal investigation, the null hypothesis would be that the accused is actually innocent, which would make the alternative that he or she would be guilty. So, what would be a type I error in this specific scenario? Well, because in a type I error we reject the null hypothesis and, in this case, as we have said, the null hypothesis is that this person is innocent, this would mean that he or she would be found guilty and sent to prison. Why is this an error? Because the null hypothesis that he or she was innocent and that we rejected was actually true.
The next example has been taken from the website Though Co. Let’s imagine that we are testing whether an experimental drug could be effective in treating a specific disease. In this example, the null hypothesis would be that the drug is not effective in curing this disease. If we rejected, we would be claiming that this drug is indeed effective but if we reject the null hypothesis we would be claiming that this drug we’re experimenting with could cure the disease when in fact it would be totally ineffectual in doing so. Again, this would be a type I error.
More Examples of Type II Error
We could present instances of type II errors simply by reversing the examples for type I error. In other words, if we made the null hypothesis false and the alternative right (so the opposite of the scenarios above) but in both the example about the criminal investigation and the one about the experimental drug, you neglected to reject the null hypothesis (for example, that person was guilty or that the drug was ineffectual), you would still be sending the wrong person to jail or claiming that the drug was effective but your error would be of the second type.
Things To Remember About Type I and Type II Errors
In conclusion, there are a few things that you must remember about type I and type II errors:
- Error Type I is a false positive. In it, a null hypothesis that happens to be true is wrongly rejected.
- Error Type II is wrongly taking two things that you observe as one and the same when they are nothing but.
- These two types of errors occur while you are testing a hypothesis and need to be avoided at all times.
- The problem is that when we reduce the probability of a type I error from happening we’d effectively be increasing the probability of a type II error from happening and vice versa.
- The best way to avoid these two kinds of type of errors is to apply the hypotheses in the real world as much as positive.
In some ways, type I and type II errors can be said to be two sides of the same coin. I hope my explanation of type I and type II errors has been clear enough but if there is anything that you’d like to add or if you have any useful examples of your own, please feel free to share them with our readers in the comments section below!
Ryan is a computer enthusiast who has a knack for fixing difficult and technical software problems. Whether you’re having issues with Windows, Safari, Chrome or even an HP printer, Ryan helps out by figuring out easy solutions to common error codes.