Statistics

Confusion Matrix

Students sort colored cards into a two-by-two organizer.

Confusion Matrix definition

A confusion matrix is a table of counts that compares predicted classes with actual classes.

In Spanish
matriz de confusión
Topic
Classification and evaluation

Confusion Matrix in a picture

Confusion Matrix diagramThis example has 8 true positives, 2 false negatives, 4 false positives, and 86 true negatives.Pred. +Pred. −Actual +Actual −82486
This example has 8 true positives, 2 false negatives, 4 false positives, and 86 true negatives.

How it works

For two classes, one cell counts true positives, one false negatives, one false positives, and one true negatives. One axis shows actual classes and the other shows predictions. Read the axis labels because published tables use both orientations.

Worked examples

How many actual positives are in the diagram?

8 + 2 = 10.

How many items received positive predictions?

8 + 4 = 12.

How many of the 100 predictions match reality?

8 + 86 = 94.

Common mistake

Identify the actual and predicted axes before naming an off-diagonal count.

Quick check

What does the diagonal count when labels appear in the same order?

Show answer

Correct predictions.

How many cells does a binary table have?

Show answer

Four.

Can it summarize three classes?

Show answer

Yes, with a 3 × 3 table.

Sources

Flashcard

Confusion Matrix

Reveal the definition

A confusion matrix is a table of counts that compares predicted classes with actual classes.

Effortless Math. “Confusion Matrix.” Math Dictionary.