Accuracy, precision, recall, specificity and sensitivity answer different questions about classification performance. Accuracy measures the share of all predictions classified correctly. Precision asks how many predicted positive cases were actually positive according to the evaluation reference. Recall, also called sensitivity or the true-positive rate in binary classification, asks how many actual positive cases were found. Specificity, the true-negative rate, asks how many actual negative cases were correctly identified. Those formulas concern defined labels, data and a decision threshold; they are not universal descriptions of intelligence, scientific truth or fairness. A classifier can achieve impressive accuracy while overlooking most of a rare but consequential class.
To assess a model or public claim, begin with the positive-class definition, actual reference labels, four kinds of classification results, the threshold, sample composition and consequences of each error. Then zoom from a single email to a customer service, public warning, research dataset, AI platform and international evaluation. Classification precision must also be distinguished from measurement precision in metrology, which has a different technical meaning. The right score is the one that addresses the actual question and cost of error—not automatically the largest percentage in an advertisement.
- Accuracy: Correct predictions divided by all evaluated predictions.
- Precision: True positives divided by all predicted positives.
- Recall or sensitivity: True positives divided by all actual positives.
- Specificity: True negatives divided by all actual negatives.
- Threshold: A decision rule influencing which cases are labelled positive.
- Reference: Test labels can be imperfect; a good score is relative to their definitions and evidence.
- Practical response: Show the confusion matrix, sample sizes, confidence and deployment limits.
Chapter Index
- 1. Five Scores That Are Not Interchangeable
- 2. The Confusion Matrix Behind Every Percentage
- 3. Why High Accuracy Can Hide a Weak Classifier
- 4. Precision in Measurement Is a Different Word
- 5. Applications With Different Costs of Mistakes
- 6. Evaluate AI Without Overclaiming
- 7. From Individual Understanding to Civilisational Infrastructure
- 8. A Seven-Question Audit and Seven-Day Practice
- 9. Frequently Asked Questions
1. Five Scores That Are Not Interchangeable
What is classification accuracy?
In binary classification, accuracy is (true positives plus true negatives) divided by all evaluated examples. The Google Machine Learning Crash Course gives this formal definition and warns that class imbalance can make the number misleading. Imagine a dataset where nearly every record belongs to the negative class. A system predicting negative every time can score highly while failing its intended purpose of finding rare positive cases. Accuracy is a valid statistic but does not answer every relevant question.
What is precision in classification?
Classification precision is the share of predicted positive cases that are positive in the reference data: TP divided by TP plus FP. It asks, “Among cases we flagged, how many really met the definition?” A model that flags only a few highly obvious cases might have high precision while missing many relevant cases. Precision alone does not quantify those misses. In medical research, positive predictive value often corresponds to the same binary-classification calculation under the stated reference. Its meaning depends on prevalence, study sample and test conditions.
What is recall?
Recall is the proportion of actual positive cases that the model correctly identifies: TP divided by TP plus FN. It asks, “Of all the relevant cases, how many did we find?” In a system searching for rare environmental hazards, missing a case may be costly, so recall can be important. But a model can increase recall by flagging many additional cases, causing more false alarms. The Google metric explanation treats the choice as a trade-off shaped by the task and error costs.
Why is sensitivity another name for recall?
In binary testing and classification, sensitivity refers to the true-positive rate, TP divided by TP plus FN. This is the same formula as recall for the positive class. The words often appear in different professional contexts: a clinician may say sensitivity, and an information-retrieval specialist may say recall. Their equivalence is specific to that defined classification setting. A discussion of a person’s emotional sensitivity uses an entirely different meaning. Vocabulary engineering should record the domain rather than assume one everyday interpretation governs every use.
What is specificity?
Specificity is the true-negative rate, TN divided by TN plus FP. It asks, “Of all actual negative cases, how many were correctly left negative?” A detector with high specificity produces relatively few false positives among the actual negatives evaluated. However, specificity alone says nothing about how many positives were missed. It is related to the false-positive rate because specificity equals one minus that rate under the binary definition. Always report the reference and class distribution before generalising to a new population.
Why does ordinary language confuse the numbers?
In casual speech, accurate can mean correct, precise can mean detailed, sensitive can mean responsive, and specific can mean narrowly defined. Technical classification metrics use stricter formulas. A model can produce a very precise-looking numerical score without high classification precision. A medical device can be sensitive to a signal without the reported classifier having high sensitivity under an evaluation. A responsible writer uses the technical word only with its denominator and target class, rather than relying on familiar everyday associations.
2. The Confusion Matrix Behind Every Percentage
What is a true positive?
A true positive is a case classified positive when its reference class is positive. In an imaginary email system, it could be a spam message correctly flagged as spam. The definition depends on the actual class and reference labelling method. A recorded positive is not an independent declaration about the message’s creator or motives. If the reference label is incorrect, a calculation can still mechanically classify the result according to that flawed reference. The quality of labels deserves review as well as the model.
What is a false positive?
A false positive is a case classified positive when the reference class is negative. A legitimate email mistakenly labelled spam is one example. The practical cost could range from a minor inconvenience to a missed urgent message, depending on the workflow. A score describing false alarms is incomplete without considering how the service handles review and correction. A user may need a clear way to restore a mistakenly flagged item rather than having the classification treated as an accusation or irreversible fact.
What is a false negative?
A false negative is a positive case that the classifier misses and labels negative. In the spam example, an unwanted message left in the ordinary inbox is a false negative. In a safety-monitoring setting, a missed relevant signal may have different consequences from a false alarm. A negative prediction is not automatically proof of safety or absence. The reference definition, sensitivity and actual data coverage determine what the model has demonstrated, while authorised procedures determine the correct response to uncertainty.
What is a true negative?
A true negative is a case correctly classified as negative according to the reference. It matters because negative cases may greatly outnumber positives. A classifier can accumulate many true negatives and achieve high accuracy even when it detects few positives. That does not invalidate true negatives; it shows why the denominator affects interpretation. The reader needs to know how many negative examples were present, whether the sample resembles deployment and which mistakes were most consequential.
A fully worked example of 200 cases
Consider a fictional classifier evaluated on 200 examples with 40 actual positive cases and 160 actual negatives. Suppose the model correctly flags 32 positives, misses 8 positives, incorrectly flags 18 negatives, and correctly leaves 142 negatives unflagged. These numbers are invented for explanation, not measurements of a real product. They form a complete confusion matrix: TP = 32, FN = 8, FP = 18 and TN = 142. Each metric then answers a different question about these exact same 200 decisions.
Calculate the accuracy
Accuracy = (32 + 142) / 200 = 174 / 200 = 87%. This tells us that 87% of all evaluated classifications matched their reference labels. The number does not say that 87% of predicted positives were correct, and it does not mean the system found 87% of actual positives. Those questions use other denominators. The 200-example distribution also matters: evaluating a population with a much rarer positive class may yield different predictive values and practical costs.
Calculate the precision
Precision = 32 / (32 + 18) = 32 / 50 = 64%. Among the 50 cases the model labelled positive, only 32 were positive under the chosen reference. A headline saying “87% accurate” could lead readers to assume that nearly nine out of ten flags were correct; in this example that assumption would be wrong. Publishing the actual positive-prediction denominator makes the result interpretable. For serious decisions, a 36% share of false flags would deserve careful consideration.
Calculate the sensitivity or recall
Recall = 32 / (32 + 8) = 32 / 40 = 80%. The model identified four out of five actual positive cases in this hypothetical evaluation. It nevertheless missed eight positives. Whether that is acceptable depends on the use, costs and safeguards. The same detector might be useful for prioritising human inspection while unsuitable for making irreversible decisions automatically. Recall measures detection relative to its reference, not the wisdom of every downstream action.
Calculate the specificity
Specificity = 142 / (142 + 18) = 142 / 160 = 88.75%. Among reference-negative cases, the model correctly identified 142 of 160 as negative. Its false-positive rate is therefore 11.25% among actual negatives. That figure differs from the fraction of all positive predictions that were false, which is 18 / 50 = 36%. Confusing those denominators can produce incorrect public claims. A careful explanation names each base population before announcing its percentage.
3. Why High Accuracy Can Hide a Weak Classifier
The rare-event accuracy trap
Imagine 10,000 examples with only 100 actual positive cases. A system that predicts negative every time would classify 9,900 negatives correctly and miss all 100 positives. Its overall accuracy would be 99%, while recall for the positive class would be zero. This demonstrates why a statistic can be mathematically correct and practically useless for the intended task. The Google classifier evaluation guide explicitly warns about highly imbalanced datasets and the need to use other metrics.
Prevalence changes what positive predictions mean
Even with the same sensitivity and specificity, a model can produce very different positive predictive values when the target outcome is common versus rare. If an event is extremely rare, many flagged results may be false positives even with apparently strong detector performance. This is one reason not to transfer a performance claim from one population to another without examination. Precision in the deployed population cannot safely be inferred solely from a sensitivity number reported on a different sample.
A threshold changes the confusion matrix
A classifier may convert a continuous score into positive or negative using a selected threshold. Raising the threshold often reduces the number of predicted positives; that may increase precision under some circumstances while decreasing recall. The exact outcome depends on the model and dataset, so neither effect is an unconditional theorem about every threshold change. Google’s thresholding guide shows how moving the boundary changes true and false classifications. The threshold is a policy choice about consequences, not a proof of truth.
A 0.5 threshold is not universally best
Halfway through a probability scale may look like a natural decision boundary, but a real workflow must weigh the consequences of missed positives and false alarms. A system intended to send cases to a human reviewer can tolerate a different balance from one that automatically restricts someone’s service. A numerical threshold should be chosen with suitable evaluation and governance. Neither 0.5 nor any other number becomes ethically correct merely because it is easy for software to implement.
Precision may be undefined
If a classifier predicts zero positive cases, then TP + FP = 0. The usual precision formula has a zero denominator, so its value is mathematically undefined unless a reporting convention defines special handling. Some software can emit a warning or configured fallback. Reporting “100% precision” because no false positive occurred would conceal the fact that no positive prediction occurred either. The scikit-learn documentation discusses zero-division handling and why implementation conventions should be disclosed.
Recall may be undefined too
If the evaluation contains no actual positives, then TP + FN = 0. Recall cannot be calculated ordinarily for that class without a defined convention. Reporting zero or one as a fallback may be convenient for software aggregation, but it does not provide evidence about the model’s ability to identify positives. The evaluation lacks relevant cases. A quality report should state that limitation rather than treat a missing denominator as a model achievement.
4. Precision in Measurement Is a Different Word
Metrological precision is not positive predictive value
In measurement science, precision concerns closeness of agreement among repeated measured quantity values under specified conditions. It is not the proportion of predicted positive classifications that are correct. The International Vocabulary of Metrology documents specialised measurement terminology. A thermometer can provide very repeatable readings while being systematically offset from an appropriate reference. That illustrates the difference between precision and accuracy in measurement. It does not tell us how an AI classifier’s positive predictive value was calculated.
Accuracy and measurement error require a reference
Metrological accuracy concerns how close a measured quantity value is to a true value under the relevant definition; measurement uncertainty expresses limits of available knowledge. The terms have specialised uses that differ from classification accuracy. Saying an instrument is “95% accurate” without a defined quantity, comparison procedure and tolerances may be meaningless. Writers should not lift percentages from a classification benchmark and apply them to measurement uncertainty or vice versa. A common spelling is not a licence to merge unrelated metrics.
Repeatability does not guarantee validity
A test might assign the same label consistently across repeated trials while measuring the wrong underlying construct. Similarly, a gauge can show nearly identical values while a faulty calibration biases its results. Consistent performance is useful evidence about one property but not universal correctness. In AI, independently review the reference labels and intended use. In measurement, assess uncertainty, calibration and the actual measurand. The meaning of “reliable” must be separated into the relevant dimensions.
5. Applications With Different Costs of Mistakes
Spam filtering
An email filter may send predicted spam to a separate folder. A false positive can hide a legitimate message; a false negative can leave spam in the inbox. The balance depends on how easily users can recover messages and what harms follow from misclassification. Report both precision and recall rather than only overall accuracy. A convenient user-control mechanism for marking mistakes can help improve the workflow while preserving the distinction between a model’s guess and the true status of the email.
Conservation and environmental detection
A fictional model monitors camera images for a rare invasive species. Missing an early observation could delay a useful response, while an erroneous alert might only require an expert to inspect the image. The programme might therefore prioritise recall within an acceptable false-alarm burden. Its performance still depends on the image quality, species definitions and local deployment conditions. A model trained elsewhere should not be assumed equally suitable without relevant evaluation.
Medical screening as a terminology example
Sensitivity and specificity often appear in descriptions of diagnostic tests, but this article does not assess any personal medical results. The reference standard, target population and purpose of screening matter. A sensitive test can produce false positives, and a negative result cannot always rule out a condition. Relevant clinicians and evidence-based guidance determine the appropriate interpretation. The language lesson is to understand the denominators and uncertainty rather than treat a single score as an individual diagnosis.
Public-service eligibility
An AI model may flag applications for further review. A false positive can create unnecessary scrutiny; a false negative can mean someone who needs review is overlooked. Historical decisions used as labels may reflect old rules or errors. An evaluation should distinguish predicting past administrative outcomes from actually applying current law. Precision and recall help describe performance against the chosen reference, but they cannot settle whether the underlying policy is fair or legally appropriate.
Fraud monitoring
A suspicious-activity detector may identify rare transaction patterns. The positive class might be confirmed fraud in one dataset and referrals for investigation in another. Those labels are not equivalent. A model that accurately predicts referrals could merely reproduce old investigation choices. High precision against such a proxy should not become a public accusation. Human review, evidence and a legitimate decision process remain necessary before imposing consequential restrictions on a person.
Document search and information retrieval
In search, precision and recall can concern which documents are relevant to a query. A system that returns only one excellent page may have high precision while missing many useful pages. Another returns almost everything relevant but includes many irrelevant pages. Evaluation needs a defined set of queries, reference relevance judgments and search-result boundaries. The mathematical family resembles binary classification, but the user experience adds ranking and query-intent considerations beyond the five basic numbers.
6. Evaluate AI Without Overclaiming
A benchmark belongs to a version and test set
A model’s reported score depends on its architecture, data, threshold, test protocol and evaluated version. Reusing a number after a system changes can mislead readers. A refreshed dataset may change the class balance and the errors counted. A credible report identifies evaluation dates and relevant configurations. The earlier guide on AI testing and certification explains why a benchmark is evidence for a specific task, not a universal endorsement of an AI service.
Macro, micro and weighted averages differ
Multiclass evaluation can calculate separate precision and recall for each class and then aggregate. Macro averages give classes equal weight; weighted averages account for class support; micro averages aggregate counts. These methods need not produce the same result. The scikit-learn recall documentation describes such options. A public claim should specify its averaging method, especially when rare classes matter more than their frequency would suggest.
Calibration and discrimination are separate
A model may classify many examples correctly while attaching poorly calibrated probability estimates. Calibration asks whether predicted probabilities correspond to observed frequencies under relevant conditions. It is neither identical to accuracy nor guaranteed by a high AUC. An AI calibration guide explains these distinctions. Reporting multiple metrics is useful when each corresponds to a meaningful decision rather than adding impressive numbers without context.
Subgroup performance may differ
An aggregate precision or recall score can conceal weaker performance for underrepresented languages, devices, regions or users. Evaluation should consider the intended population and applicable privacy and fairness requirements. A global average does not imply that every user experiences the same error rate. When decisions affect people, identify relevant slices without reducing personal identity to unsupported stereotypes. The goal is to discover where the system does not work reliably and provide appropriate review and correction.
Changing the positive class changes the question
A model that detects spam uses spam as its positive class; another might define legitimate messages as positive. The same confusion-matrix numbers can yield differently named scores when the class of interest changes. Always state which class is positive before interpreting recall or specificity. The words do not carry an inherent moral judgement that positive means good. It is a modelling designation, not a description of the value or legitimacy of a person, event or outcome.
Reference labels can be wrong
A human-annotated dataset may contain mistakes, ambiguous examples and inconsistent instructions. Performance metrics compare predictions with those labels. The computation can be perfectly correct even when the reference is an imperfect representation of reality. A trustworthy evaluation documents annotation procedures and difficult cases, seeks independent checks where feasible and permits correcting erroneous labels. It should not describe a “ground truth” column as a mathematical proof of every underlying fact.
7. From Individual Understanding to Civilisational Infrastructure
Personal zoom: interpreting a score
When a website says “92% accurate”, ask what was counted as correct and which examples were tested. A number can be useful without answering your exact question. If the tool affects a consequential action, seek the relevant error types and the process for challenging mistakes. A score is not a verdict about a person. It is a summary of performance against an identified reference and procedure, subject to its limitations.
Team zoom: designing a useful dashboard
A team may report accuracy, recall, precision and specificity side by side, but should identify which ones matter to its actual objective. Add the confusion-matrix counts, total cases, class prevalence and threshold. For rare critical failures, aggregate accuracy alone may be misleading. Use real user outcomes and incident reports to guide revisions. The best metric panel is one that helps the team see its errors rather than merely protect a favourable headline.
Scientific zoom: preserving operational definitions
A research archive should preserve how positive and negative classes were defined, who assigned reference labels, which threshold was applied and how ambiguous cases were handled. Future readers can otherwise reproduce a number without understanding what it measured. If the reference definition changes, preserve earlier versions. This improves reproducibility and protects historical interpretation. Metric names do not have stable practical meaning without the task and evidence that generated them.
International zoom: comparable evaluation
Two organisations can both report 90% sensitivity yet evaluate different populations, procedures or reference standards. Comparing those percentages without checking compatibility can mislead. An international standard may help align measurement but does not guarantee that every local use has identical data quality. A sound crosswalk preserves the class definitions, test conditions and practical consequences of errors across languages and systems. Interoperability requires more than translating the metric’s name.
Ztime zoom: metrics after a rule change
If an institution changes what counts as an eligible case, the same classifier may appear to improve or deteriorate even if its predictions remain unchanged. The reference category has changed. A time-aware record preserves effective definitions and reporting periods. A model’s version history also matters, especially when its threshold or training data change. This prevents a governance decision from being mistaken for an unexplained alteration in underlying reality.
Civilisational zoom: avoiding misleading certainty
Future users of today’s AI archives may find scorecards whose percentages look exact but whose datasets and definitions were lost. The numbers would be intact while their interpretation becomes uncertain. Preserve test descriptions, confusion matrices, source labels, timestamps and known limitations. Such records make evaluation survivable across technology change. They do not prove permanent correctness, but allow later researchers to investigate the evidence rather than guess what “accuracy” once meant.
8. A Seven-Question Audit and Seven-Day Practice
Seven questions for any classification score
- Which class is defined as positive, and who defined it?
- What are the TP, FP, TN and FN counts?
- Is the reported number accuracy, precision, recall, sensitivity or specificity?
- Which threshold, prevalence and sample size produced the score?
- Were the reference labels and data collection methods appropriate?
- Which mistakes matter most for the real-world use?
- How will performance drift, corrections and subgroup differences be reviewed?
Day one: write a confusion matrix
Create a harmless fictional dataset with 20 positives and 80 negatives. Invent a classifier and record true positives, false negatives, false positives and true negatives. Check that the four counts sum to the total population. Note which cases were actually positive according to your chosen reference. The goal is not to guess which score is largest, but to keep the four types of result separate before any calculation.
Day two: calculate all four central metrics
Calculate accuracy, precision, recall and specificity from the same confusion matrix. Write the denominator beside each percentage in plain English. Explain why they differ. Treat sensitivity as another name for recall in this binary setting. If a denominator is zero, record the metric as undefined or use an explicitly described software convention rather than announce a perfect result.
Days three and four: vary prevalence and threshold
On day three, imagine applying the classifier to a population where positives are much rarer. Consider how precision and the burden of false alarms may change, even if sensitivity and specificity remain similar. On day four, change the classification threshold and trace which kinds of mistakes increase or decrease. Do not presume one threshold is optimal until you have specified the consequences of the errors.
Days five and six: test fairness and labels
On day five, identify a language variety, location or group that is underrepresented in the sample and propose an appropriate independent test. On day six, add a reference-label mistake to a fictional case and explain how the calculated metrics would depend on that flawed label. The exercise shows why a mathematically perfect score calculation is only one part of responsible evaluation.
Day seven: publish an honest metric explanation
Write a short report containing the test size, reference, threshold, confusion matrix and relevant uncertainty. State what the score does and does not establish. Include which mistakes need human review. Ask another reader whether the explanation lets them distinguish a model that detects most positive cases from one whose positive predictions are mostly correct. Success means clearer decisions, not the longest list of percentages.
9. Frequently Asked Questions
Is sensitivity another word for recall?
Yes, for binary classification under the usual positive-class definitions. Both are TP divided by TP plus FN. The word sensitivity also has other meanings in different contexts.
Is specificity the same as precision?
No. Specificity counts correctly identified negatives among actual negatives, while precision counts true positives among predicted positives.
Can a model be 99% accurate and still fail at its main task?
Yes. A rare-positive classifier predicting negative for every case can score very highly on accuracy while detecting no positive cases.
Does higher precision always mean better overall performance?
No. It may come with lower recall, and the appropriate balance depends on the application and consequences of errors.
Is measurement precision the same as classification precision?
No. Metrological precision concerns agreement among measured values under specified conditions; classification precision concerns the share of predicted positives that are positive.
Does a perfect test score prove every future AI answer is true?
No. It describes a result on defined data and conditions. New populations, label errors, changed thresholds and model drift can affect performance.
Continue the Vocabulary at Every Zoom Level
- AI confidence, probability and calibration
- AI test, benchmark, evaluation, audit and certification
- Construct, indicator, proxy, measure and outcome
- Threshold, limit, quota, capacity and target
- Training data, dataset, label and ground truth
- Observation, measurement, estimate, inference and prediction
Companion Articles in This Batch
Explore the companion articles to see how mathematical evaluation, causal evidence, meaningful permission and AI information pathways interact across individual, organisational and global zoom levels.
- Correlation, Causation, Confounding, Mediation and Counterfactual
- Consent, Assent, Opt-In, Opt-Out and Withdrawal
- Training, Fine-Tuning, Retrieval, Memory and Context in AI