DeepLLM Quiz
Machine Learning

Confusion matrices, error types and ROC curves

10 questions on true and false positives, type 1 and type 2 errors, false discovery rate, thresholds, ROC curves and area under the curve.

  • 10 questions
  • Stopwatch
  • Instant feedback

Shown publicly with your score. Don’t use your full real name.

Sample questions

Play now ↑

Answers stay hidden. Start the quiz to play them.

  1. Sample 1

    A system flags 50 items, and 40 of them turn out to be truly defective. What is the false discovery rate?

    • 80%
    • 20%
    • 10%
  2. Sample 2

    The threshold above which a case is flagged is raised. What typically happens?

    • Fewer false alarms but more missed problems
    • More false alarms and fewer missed problems
    • Both kinds of error fall at the same time

How it works

  • One question per screen. An answer is final once sent.
  • You see right away whether you were right, with a short explanation.
  • The stopwatch runs: on equal scores, the faster player ranks first.
  • Only your best attempt counts, so replaying is never risky.

About this quiz

Most classifiers don't output a verdict. They output a score, and somebody has to choose a threshold above which a case is flagged. That choice quietly decides how many guilty parties are caught and how many innocent ones are accused. Move the bar and the balance between real problems caught and innocent cases accused changes. Evaluating a classifier honestly therefore means looking at the whole range of thresholds, not at a single number such as accuracy.

This quiz gives you the vocabulary and the picture. You will start with the four possible outcomes for every case: a correct alarm, a false alarm, a correct all-clear and a missed problem. You will learn what statisticians call the two kinds of error, and how the confusion matrix counts all four outcomes in a small table. You will then distinguish ratios that sound alike but answer different questions, such as the share of real problems that are found, the share of normal cases that are wrongly flagged and the share of flagged cases that turn out to be fine.

The second half introduces the ROC curve, a plot that shows the trade-off between catching real problems and raising false alarms as the threshold sweeps from one extreme to the other. You will learn how to read it: where a perfect classifier would sit, what the diagonal line means, how to compare two classifiers, and how a single number, the area under the curve, summarises the picture. The quiz also points out when that single number can mislead, because curves can cross.

Several mistakes are very common. People report accuracy for rare events, confuse the false positive rate with the false discovery rate, forget that every threshold is a different classifier, and assume that a higher area under the curve always means a better choice for their application. Understanding the picture protects against all of them. A good habit after this quiz is to ask, whenever a classifier is reported, at which threshold the numbers were measured, and what the curve looks like at other thresholds. A single point on a curve is a very incomplete description of a classifier's behaviour.

The quiz suits students, analysts and decision-makers who read evaluation reports. It follows the quiz on decisions with unequal costs, but it can be taken on its own, and it avoids repeating the general quiz on overfitting and evaluation. There are 10 questions, each with an explanation, and the quiz takes about four minutes.

Questions and answers

›How long does the quiz take?

About 3 to 4 minutes for 10 questions, at roughly 20 seconds each. An explanation appears after every answer.

›Do I need to know the formulas for precision and recall?

No. The questions describe each quantity in words, and the numbers in the examples are small so you can work them out by counting. If you have met the idea of a false alarm, you have enough background.

›What are true and false positives and negatives?

A positive is a case the classifier flags. If the case really does have the property, the positive is true, and otherwise it is false. A negative is a case the classifier does not flag, and it is true if the case really lacks the property and false if the case has it. Counting the four kinds gives the confusion matrix.

›What are type 1 and type 2 errors?

A type 1 error is a false positive, flagging something that is not there. A type 2 error is a false negative, missing something that is. Which one is worse depends on the application: a smoke alarm tolerates false alarms, while a screening programme must worry far more about misses.

›What is the difference between the false positive rate and the false discovery rate?

The false positive rate takes all the genuinely normal cases and asks what fraction was wrongly flagged. The false discovery rate takes all the flagged cases and asks what fraction was in fact normal. The first depends on how the classifier treats normal cases, and the second also depends on how common real problems are.

›Why is accuracy a poor summary for rare events?

When almost every case is normal, a classifier that never flags anything is right nearly all the time, yet it is useless. Accuracy then mostly reflects the mix of cases and not the quality of the classifier. Rates computed separately for each kind of case say much more.

›What is an ROC curve?

The name comes from radar engineering, where such curves were first used to compare receivers. For a classifier that produces scores, it shows how the proportion of real problems found changes against the proportion of false alarms as the threshold is moved. Each point on the curve is one threshold, which means one confusion matrix.

›What does the area under the curve tell me?

It condenses the whole curve into one number between zero and one, where one half corresponds to random guessing and one to a perfect classifier. It lets you compare classifiers without choosing a threshold. It can hide the fact that two curves cross, in which case the better classifier depends on the operating point you need. Remember also that the curve describes the classifier on the data it was tested on. If the proportion of real problems in the world differs from the test set, the false positive rate stays the same but the false discovery rate can change dramatically, which is why both should be reported.

More quizzes