---
title: "Measures from confusion matrix (152, 130)"
subject: "Data Mining"
chapter: 3
key: "semester_7/data_mining:confusion-matrix-152-130"
source: https://www.bctengineer.com/q/semester_7/data_mining/confusion-matrix-152-130
site: BCT Engineering
---

# Measures from confusion matrix (152, 130)

Data Mining · Chapter 3: Classification

- Asked in: year not given
- Video: [Confusion Matrix Solved Example Accuracy Precision Recall F1 Score Prevalence by Mahesh Huddar](https://www.youtube.com/watch?v=_CGTbkHwUHQ) — Mahesh Huddar
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_7/data_mining/confusion-matrix-152-130
- Whole chapter: https://www.bctengineer.com/md/semester_7/data_mining/chapter-3

## Question

Given the following confusion matrix, determine Accuracy, Error rate, Sensitivity, Specificity, Precision, Recall, Positive Predictive Value and Negative Predictive Value, TPR, TNR, FPR, FNR of the classifier model.

| Actual \ Predicted | + ve | - ve |
| --- | --- | --- |
| + ve | 152 | 130 |
| - ve | 88 | 630 |

## Short answer

Accuracy 78.2%, error rate 21.8%, sensitivity/recall/TPR 53.9%, specificity/TNR 87.7%, precision/PPV 63.3%, NPV 82.9%, FPR 12.3%, FNR 46.1%.

## Answer

Taking "+ve" as the positive class (rows are actual, columns are predicted):

TP = 152, FN = 130, FP = 88, TN = 630.
Total = 152 + 130 + 88 + 630 = 1000. Actual positives P = 282, actual negatives N = 718. Predicted positives = 240, predicted negatives = 760.

| Measure | Formula | Calculation | Value |
| --- | --- | --- | --- |
| Accuracy | (TP + TN)/total | (152 + 630)/1000 = 782/1000 | **0.782 (78.2%)** |
| Error rate | (FP + FN)/total | 218/1000 | **0.218 (21.8%)** |
| Sensitivity = Recall = TPR | TP/(TP + FN) | 152/282 | **0.539** |
| Specificity = TNR | TN/(TN + FP) | 630/718 | **0.877** |
| Precision = PPV | TP/(TP + FP) | 152/240 | **0.633** |
| NPV | TN/(TN + FN) | 630/760 | **0.829** |
| FPR | FP/(FP + TN) | 88/718 | **0.123** |
| FNR | FN/(FN + TP) | 130/282 | **0.461** |

Checks: TPR + FNR = 1 and TNR + FPR = 1; error rate = 1 − accuracy.

The F₁ score = 2·0.633·0.539/(0.633 + 0.539) = 0.582.

**Answer: accuracy 78.2%, error rate 21.8%, sensitivity = recall = TPR = 53.9%, specificity = TNR = 87.7%, precision = PPV = 63.3%, NPV = 82.9%, FPR = 12.3%, FNR = 46.1%.** The classifier finds only about half of the positive cases.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. In this matrix (rows actual), what is FN?
   A. 130
   B. 88
   C. 152
   D. 630
   Answer: A. Actual positive predicted negative = 130. (Key point: Identify cells)

2. Accuracy is:
   A. 0.633
   B. 0.782
   C. 0.877
   D. 0.539
   Answer: B. (152 + 630)/1000. (Key point: Accuracy)

3. Recall (TPR) is:
   A. 152/240 = 0.633
   B. 630/718 = 0.877
   C. 152/282 = 0.539
   D. 152/218
   Answer: C. Actual positives = 282. (Key point: Recall)

4. Precision is:
   A. 152/282
   B. 630/760
   C. 88/718
   D. 152/240 = 0.633
   Answer: D. Predicted positives = 152 + 88 = 240. (Key point: Precision)

## Close variants set in other exams

- [Measures from cancer confusion matrix](https://www.bctengineer.com/question.md?key=semester_7%2Fdata_mining%3Aconfusion-matrix-cancer) — Data Mining, chapter 3
- [Confusion matrix and performance measures](https://www.bctengineer.com/question.md?key=semester_7%2Fdata_mining%3Aconfusion-matrix-measures) — Data Mining, chapter 3

## Related in Data Mining

- [Inverse relation of precision and recall](https://www.bctengineer.com/question.md?key=semester_7%2Fdata_mining%3Aprecision-recall-inverse) — Data Mining, chapter 3

## Related in other subjects

- [Accuracy, precision, sensitivity, resolution](https://www.bctengineer.com/question.md?key=semester_4%2Finstrumentation_and_measurement%3Aaccuracy-precision-sensitivity-resolution) — Instrumentation and Measurement, chapter 3
