# What is Type I vs Type II error

Type I error is committed when the null hypothesis is true and we reject it, also known as a ‘False Positive’.

Type II error is committed when the null hypothesis is false and we accept it, also known as ‘False Negative’.

In the context of confusion matrix, We can say:
Type I error occurs when we classify a value as positive (1) when it is actually negative (0)
Type II error occurs when we classify a value as negative (0) when it is actually positive(1).

Let go through an example:

A life and death example of statistical errors

You are a paramedic and you approach the scene of a car accident. One victim is laying motionless on the road and you must assess whether the victim is dead or alive, and the victim will be treated accordingly. Based on this information which error rate results in the most costly mistake?

Null Hypothesis – The victim’s status equals a living person
Alternative Hypothesis – The victim’s status is not equivalent to a living person (i.e., they are dead)

Type I error – You reject the null hypothesis when the null hypothesis is actually true.
Type II error – You fail to reject the null hypothesis when the the alternative hypothesis is true.

Cost of Type I error – You erroneously presume that the victim is dead, and they do not receive an ambulance to the hospital for a life saving medical treatment.

Cost of Type II error – You erroneously send a dead person to the hospital in an ambulance.

Answer: As you can see, the Cost of the Type I error is tremendously worse than the cost of the Type II error.