liveBook · Manning

Error rate

As explained in Statistics Every Programmer Needs

A defect rate is the number of defects divided by the number of inspected units or other relevant inspection opportunities.

Error rate measures how often an inspection, classifier, or process produces an incorrect result. For classification, the misclassification rate is the number of false predictions divided by the total number of records: (false positives + false negatives) / n × 100. It is the inverse of accuracy, so accuracy + error rate is approximately 100%. section 5.2.4

For quality control, defect rate divides observed defects by the number of inspected units or other inspection opportunities. A c-chart tracks defect counts when each unit may contain multiple defects; a u-chart normalizes defects by the number of units, making samples of different sizes comparable. section 14.1.8

Raisin classification

A logistic regression classified 397 Kecimen observations correctly and 384 Besni observations correctly, with 53 false positives and 66 false negatives. Therefore, accuracy was 86.78% and the misclassification rate was 13.22%. In Python, calculate it as misclassification_rate = ((fp + fn) / n) * 100. Interpret the result alongside sensitivity, specificity, and AUC rather than treating it as a complete model assessment. section 5.2.4 section 5.3

Table 5.1 Confusion matrix for raisin classification. A confusion matrix stores classification metrics from a regression with actual and predicted binary outcomes.
Predicted
Kecimen (0)
Besni (1)
Actual
Kecimen (0)
tn
fp
Besni (1)
fn
tp

Use the confusion matrix to identify true positives, true negatives, false positives, and false negatives before calculating error rate. section 5.2.4

How Statistics Every Programmer Needs covers it

How deep it goes
Defines formulas, computes rates from a confusion matrix, and distinguishes count-based from sample-size-normalized quality monitoring.
Examples
Uses raisin predictions with 53 false positives and 66 false negatives, plus manufacturing samples containing scratches and dents.
What it assumes
Assumes familiarity with binary predictions and inspected units while defining false-positive, false-negative, defect-count, and normalization concepts.
What you can do after
Evaluate classification or process quality by calculating incorrect-result rates and interpreting them with related performance measures.
How it connects
Connects error rate to accuracy, confusion matrices, sensitivity, specificity, ROC curves, AUC, logistic regression, c-charts, and u-charts.

Also explained in

Compare how 6 books explain error rate →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Statistics Every Programmer Needs. The section links point to the parts of the book it draws on.