DEEPCHECKS GLOSSARY

# Type 1 Error

A Type I error, when it comes to mathematical hypothesis testing, is the refusal of the valid null hypothesis. The false-positive error is another name for the type I error. To put it another way, it implies the nature of a non-existent phenomenon.

It’s significant to mention also that type I error doesn’t quite mean that we’ve made a mistake.

## So, what is a type 1 error?

• A type I occurs when the null hypothesis is rejected when it is actually true. It entails claiming that results are statistically significant when they were obtained only by chance or due to unrelated variables

The alphaÂ of a hypothesis test determines the likelihood of making an error. The alpha represents the likelihood of rejecting the genuine null hypothesis incorrectly. An alpha level of 0.06, for example, indicates that the true null hypothesis has a 6% chance of being rejected.

## Type 2 error

When the null hypothesis is wrong but not rejected, it is referred to as a type II error. A type II error, often known as a false negative, occurs when a test result shows that a condition has failed when it has not. When we fail to believe a true condition, we commit a Type II error.

## How to reduce type 1 error or how to control type 1 error?

In hypothesis testing, it is impossible to totally exclude the possibility of type I. There are, however, ways to reduce the chances of getting error results.

Minimizing the alpha of a hypothesis test is among the most popular ways to reduce the likelihood of a false positive mistake. The alpha can be adjusted because it is determined by the researcher. The alpha, for example, can be reduced to 2%. (0.02). This means that rejecting the null hypothesis mistakenly has a 2% of probability for type 1 error.

## Type 1 error examples

Let’s look at a few examples and use a simple form to assist us to grasp the implications and how to find type 1 and type 2 errors.

This error is defined as “imprisoning an innocent citizen” while a type II error is defined as “allowing a guilty person to go free.”

Null HypothesisType I ErrorType II Error
The individual is not guilty of the offense.When a person is found guilty even if they did not commit the crime, they are sentenced to prison.When a person is found not guilty, although they did not commit the offense.

Since it’s impossible to say whether a type I or type II error in ML is worse (because it depends so much on the null hypothesis statement), let’s look at which error is more “costly” and for which I might want to undertake further testing. In this particular case, considering that the life of a person is at the stake, both types of errors are extremely harmful. On one hand, the social costs of imprisoning an innocent person and depriving them of their personal freedoms are regarded as practically unbearable in our era. Type II error allows a criminal to wander the streets and commit new crimes.

Testing. CI/CD. Monitoring.

## Conclusion

Making a type I error results in adjustments or interventions that are unneeded, wasting time and other resources.

When change is required, Type II errors usually result in the status quo (i.e., interventions remain the same).

Type I and Type II error rates have an impact on each other. This is because statistical power is inversely connected to the Type II error rate and is affected by the alpha (the Type I error rate).

This implies that Type I and Type II mistakes have a significant tradeoff.

• Setting a lower significance level reduces the probability of Type I errors while increasing the chance of Type II errors
• Increasing the test’s power reduces the chance of Type II errors while increasing the risk of Type I errors

The phrasing or positioning of the null hypothesis has a big impact on type I and type II mistakes. Type I and type II mistakes can flip roles depending on where the null hypothesis is placed.

It’s difficult to say that this error is always worse than a type II error, or vice versa. In other words, Type I is usually worse for statisticians. In practice, though, depending on your research environment, either form of inaccuracy could be worse.