• Skip to secondary menu
  • Skip to main content
  • Skip to primary sidebar
  • My Store
  • Glossary
  • Home
  • About Me
  • Contact Me

Statistics By Jim

Making statistics intuitive

  • Graphs
  • Basics
  • Hypothesis Testing
  • Regression
  • ANOVA
  • Probability
  • Time Series
  • Fun
  • Calculators

Sensitivity vs Specificity: Definition, Formulas & Interpreting

By Jim Frost Leave a Comment

Sensitivity and specificity are two key metrics used to evaluate the performance of diagnostic tests or classification systems in statistics, medicine, and machine learning. These measures assess the intrinsic capabilities of a test.

Sensitivity (also called the true positive rate) measures how well a test correctly identifies positive cases. Specificity (the true negative rate) measures how well it correctly identifies negative cases. These values are crucial for determining a test’s capability to detect a condition or rule it out.

These calculations rely on a confusion matrix, which categorizes test results into four outcomes: true positives (TP), false positives (FP), true negatives (TN), and false negatives (FN).

A pregnancy test illustrates the concepts of sensitivity vs specificity.Pregnancy tests offer a practical example. These tests work by detecting the hormone hCG in urine, which is present during pregnancy. A highly sensitive test correctly identifies nearly all pregnant individuals, minimizing false negatives. For instance, many home pregnancy tests advertise sensitivities above 99% when used from the first day of a missed period.

Specificity, on the other hand, refers to how well the test avoids false positives in people who are not pregnant. Studies have shown that the specificity of these tests is also high, typically around 98% to 99%, indicating most non-pregnant users will correctly test negative.

In this post, you’ll learn what sensitivity and specificity mean, how to calculate and interpret them, how they apply in real-world examples like pregnancy tests, and their strengths and weaknesses relative to other metrics.

Sensitivity Definition

Sensitivity answers this question: Of all people who actually have the condition, what proportion does the test correctly detect as positive?

Sensitivity focuses on the ability to detect a condition when it is present. In other words, a highly sensitive test means that people with the condition will very likely have positive test results. A high ability to detect a condition is critical when failing to detect it is dangerous.

Sensitivity Formula

The formula for calculating sensitivity is the following:

Sensitivity = True Positives / (True Positives + False Negatives)

Sensitivity measures detection capability using a proportion. The numerator is the number of true positives, and the denominator includes everyone who has the condition—those correctly identified (TP) and those missed (FN).

In the sensitivity formula, note that it can be high only when false negatives in the denominator are low. In other words, a high detection rate means the test isn’t missing too many cases by producing false negatives.

Specificity Definition

Specificity in testing answers this question: Of all people who do not have the condition, what proportion does the test correctly identify as negative?

Specificity focuses on ruling out the condition. In other words, a highly specific test means that people without the condition will very likely have negative test results. A test that excels at ruling out the condition correctly classifies most healthy individuals as negative and avoids falsely labeling them as positive. High specificity is essential when the consequences of false positives, such as unnecessary treatment or anxiety, are significant.

Specificity Formula

The formula for calculating specificity is the following:

Specificity = True Negatives / (True Negatives + False Positives)

Specificity evaluates the ability to rule out the condition using a proportion. The numerator is the number of true negatives. The denominator contains the total number of people who do not have the condition. This total includes those who correctly test negative and those who get a false positive result (TN + FP).

In the specificity formula, note that it can be high only when false positives in the denominator are low. In other words, a high rate of ruling out the condition means the test isn’t missing too many true negatives by producing false positives.

Sensitivity vs Specificity Calculation Example

Suppose a study uses a new diagnostic test on 100 people, 40 of whom have a disease and 60 who do not. Let’s calculate the test’s sensitivity vs specificity.

The test correctly identifies 36 of them (true positives) but misses 4 (false negatives). It also correctly identifies 50 healthy individuals (true negatives) and incorrectly flags 10 healthy individuals as having the disease (false positives).

  • Sensitivity = 36 / (36 + 4) = 0.90 or 90%
  • Specificity = 50 / (50 + 10) = 0.83 or 83%

These results indicate the test is good at detecting disease when it’s present (high sensitivity) and fairly accurate at ruling it out when it’s not (moderate-to-high specificity).

Sensitivity vs Specificity Benchmark Values

Benchmark values for sensitivity and specificity can vary depending on the field and the test’s purpose. For example, a screening test for a severe disease might prioritize high sensitivity to minimize missed cases, while a confirmatory test might aim for high specificity to avoid false positives. There is no universal cutoff for what counts as “high” or “low,” but the table below shows commonly accepted interpretations:

Value Interpretation
90–100% Excellent
80–89% Good
70–79% Fair
60–69% Poor
Below 60% Very poor

These are general guidelines—context matters. A “poor” sensitivity might be acceptable if the condition is rare and confirmatory testing follows. Conversely, even a “good” specificity may lead to too many false alarms in a low-prevalence setting.

Strengths and Weaknesses of Sensitivity and Specificity

While sensitivity and specificity help assess a test’s performance under controlled conditions, they have limitations. Most importantly, they do not account for how common the condition is in the population.

The prevalence of a condition in a population can lead to misleading impressions when applying sensitivity and specificity for tests to individual results, especially in screening contexts for rare diseases.

For example, a test with high specificity can still return many false positives when practitioners use it widely in a population with low prevalence. This phenomenon is the false positive paradox. It can produce an odd situation where most people who get a positive result don’t actually have the condition. Learn about the False Positive Paradox and the Base Rate Fallacy.

This problem underscores the importance of considering additional metrics like positive predictive value (PPV) and negative predictive value (NPV) that incorporate prevalence when interpreting individual test results. Learn more in my post: Positive Predictive Value: Meaning, Formula, and Interpretation.

In short, sensitivity and specificity describe the test’s intrinsic ability to detect or rule out a condition across populations with and without the condition in a controlled setting. They are ideal for evaluating and comparing the inherent quality of diagnostic tests, helping researchers and clinicians determine which test better detects or rules out a condition. If you want to compare the accuracy across different tests and choose between them, sensitivity and specificity are the best measures.

In contrast, PPV and NPV indicate what a test result means for a specific individual by taking into account how common the condition is in the population. These measures estimate the likelihood that a specific positive or negative result reflects a person’s actual condition.

Share this:

  • Tweet

Like this:

Like Loading…

Related

Filed Under: Basics Tagged With: analysis example, conceptual, formula, interpreting results, test accuracy

Reader Interactions

Comments and QuestionsCancel reply

Primary Sidebar

Meet Jim

I’ll help you intuitively understand statistics by focusing on concepts and using plain English so you can concentrate on understanding your results.

Read More...

Buy My Introduction to Statistics Book!

Cover of my Introduction to Statistics: An Intuitive Guide ebook.

Buy My Hypothesis Testing Book!

Cover image of my Hypothesis Testing: An Intuitive Guide ebook.

Buy My Regression Book!

Cover for my ebook, Regression Analysis: An Intuitive Guide for Using and Interpreting Linear Models.

Subscribe by Email

Enter your email address to receive notifications of new posts by email.

    I won't send you spam. Unsubscribe at any time.

    Buy My Thinking Analytically Book!

    Cover for my book, Thinking Analytically: An Guide for Making Data-Driven Decisions.

    Top Posts

    • F-table
    • Cronbach’s Alpha: Definition, Calculations & Example
    • Z-table
    • How To Interpret R-squared in Regression Analysis
    • Accuracy vs Precision: Differences & Examples
    • Box Plot Explained with Examples
    • Interpreting Correlation Coefficients
    • How to Interpret P-values and Coefficients in Regression Analysis
    • Multicollinearity in Regression Analysis: Problems, Detection, and Solutions
    • T-Distribution Table of Critical Values

    Recent Posts

    • Data Collection Methods: Step-By-Step Guide with Examples
    • ANOVA Calculator
    • Positive Predictive Value: Meaning, Formula, and Interpretation
    • Median Absolute Deviation Calculator
    • Median Absolute Deviation: Definition, Finding & Formula
    • Outlier Calculator

    Recent Comments

    • Skata na fas on Comparing Regression Lines with Hypothesis Tests
    • Jim Frost on Comparing Regression Lines with Hypothesis Tests
    • Skata na fas on Comparing Regression Lines with Hypothesis Tests
    • Skata na fas on Comparing Regression Lines with Hypothesis Tests
    • Jim Frost on Pareto Chart: Making, Reading & Examples

    Copyright © 2026 · Jim Frost · Privacy Policy

    %d