Type I and Type II Errors
tags: #hypothesis_testing
There are two possible errors that need to be taken into consideration when conducting Null-Hypothesis Significance Testing (NHST):
- Type 1 Error (
) - Type 2 Error (
)
Type I Error - False Positive
Type 1 Error represents the probability of rejecting the null hypothesis when it is True.
Directly correlated to the alpha significance level:
- Alpha represents the maximum allowable probability of rejecting the null when it is True.
- When you set an alpha significance level, you are accepting the risk of making this error at that threshold.
- For example, if
with a 95% confidence level of making the right decision, then you have a chance of rejecting the null hypothesis when it is in fact True.
Type II Error - False Negative
Type II Error is directly correlated with statistical power.
This represents the average or proportion of times (probability) of failing to reject the null hypothesis when it is FALSE (therefore, you are falsely accepting the null).
Trade-off: Type I vs Type II Error
The Type I and Type II error rates influence each other.
This means there’s an important tradeoff between Type I and Type II errors; the lower the significance level, the higher the risk of type II error
Which Error is More Important?
Depending on the context - we may care about one kind of error more than than other
Example - Contagious Diseases (when cost of FN is high):
- High false negatives rate (failing to detect someone who is positive) are more costly for increasing the spread of diseases.
- In such cases, a HIGHER significance level (and therefore a lower Type II error rate) may be preferred, even if it means a higher risk of a false positive (Type I error).
- In this case:
and :
Type 1: Rejecting the Null when it is True (Has disease when they are NOT infected)
Type 2: Falsely Rejecting the Null when it is False (No disease when they ARE infected).
- Higher
= increased risk of False Positives (i.e., rejecting the null when it is false), therefore, detecting patients with disease even when they are NOT infected.
- However, this reduces the risks of FN/Type 2 (i.e., missing infected patients), which is important for preventing spread.