MLCrack

    PROBABILITY & STATISTICS · INTERVIEW QUESTION

    What is the difference between Type I and Type II errors? How do they relate to precision and recall?

    🟡 intermediate · Statistical Inference

    Hint: Type I = false positive, Type II = false negative. Think about the confusion matrix.

    Answer

    Type I and Type II errors represent the two fundamental ways a statistical test can be wrong.

    Definitions

    ErrorNameWhat HappensSymbol
    Type IFalse PositiveReject a true H0H_0α\alpha
    Type IIFalse NegativeFail to reject a false H0H_0β\beta

    Power = 1−β1 - \beta (probability of correctly detecting a real effect).

    Connection to Classification

    • Precision = 1−FDR1 - \text{FDR} (related to Type I)
    • Recall = 1−FNR1 - \text{FNR} (related to Type II)

    Practical Trade-offs

    There is a fundamental tradeoff: reducing one error type increases the other.

    • Medical testing: Type II (missing disease) is worse → optimize for recall
    • Spam filtering: Type I (blocking good email) may be worse → optimize for precision
    • Justice system: Type I (convicting innocent) is considered worse

    The threshold controls this trade-off. ROC and precision-recall curves help visualize it.