Sensitivity and Specificity Calculator
Sensitivity and specificity calculator. TPR, TNR, PPV, NPV, LR+, LRโ, Youden Index, confusion matrix
Why This Statistical Analysis Matters
Why: Statistical calculator for analysis.
How: Enter inputs and compute results.
Sensitivity & Specificity โ TPR, TNR, PPV, NPV, LR+, LRโ, Youden Index
From confusion matrix: Sensitivity, Specificity, PPV, NPV, LR+, LRโ, Youden, F1. Screening vs confirmatory.
Real-World Scenarios โ Click to Load
Confusion Matrix
TPR, TNR, PPV, NPV
Likelihood Ratios (LR+, LRโ)
ROC Space (Single Point)
Point: (1-Spec, Sens) = (0.6%, 90.0%)
Calculation Breakdown
For educational and informational purposes only. Verify with a qualified professional.
Key Takeaways
- โข Sensitivity (TPR) = TP/(TP+FN) โ how well the test detects disease when present (rule out)
- โข Specificity (TNR) = TN/(TN+FP) โ how well the test identifies healthy when absent (rule in)
- โข There is a trade-off: increasing sensitivity often decreases specificity (and vice versa)
- โข PPV and NPV depend on prevalence; sensitivity and specificity do not
- โข Screening tests prioritize sensitivity; confirmatory tests prioritize specificity
- โข LR+ > 10: strong rule-in. LRโ < 0.1: strong rule-out
Did You Know?
Expert Tips
Screening vs confirmatory
Screening: high sensitivity. Confirmatory: high specificity.
Prevalence matters for PPV
Low prevalence โ many false positives โ low PPV
Use Youden for cutoff
Maximize J = Sens + Spec - 1 for optimal threshold
LR for probability update
Post-test odds = Pre-test odds ร LR
Confusion Matrix Layout
| Predicted + | Predicted โ | |
|---|---|---|
| Actual + | TP | FN |
| Actual โ | FP | TN |
Screening vs Confirmatory Tests
| Aspect | Screening | Confirmatory |
|---|---|---|
| Goal | Cast wide net, miss few cases | Avoid false positives |
| Prioritize | High sensitivity | High specificity |
| Example | Mammography, Pap smear | Biopsy, culture |
| False negatives | Acceptable (follow-up) | Unacceptable |
| False positives | Acceptable (further testing) | Minimize |
Frequently Asked Questions
What is the difference between sensitivity and PPV?
Sensitivity = P(positive test | disease). PPV = P(disease | positive test). Sensitivity is fixed; PPV depends on prevalence.
Why does a 99% specific test have low PPV for rare diseases?
When prevalence is very low, the number of false positives (1% of many healthy people) can exceed true positives.
What is Youden's Index?
J = Sensitivity + Specificity - 1. Maximizing J finds the optimal cutoff on the ROC curve, balancing sens and spec.
When to use screening vs confirmatory tests?
Screening: cast a wide net, high sensitivity. Confirmatory: avoid false positives, high specificity.
What do LR+ and LRโ mean?
LR+ > 10: strong rule-in. LRโ < 0.1: strong rule-out. Multiply pre-test odds by LR to get post-test odds.
How does prevalence affect PPV?
Higher prevalence โ higher PPV. Lower prevalence โ lower PPV (more false positives relative to true positives).
When is accuracy misleading?
With severe class imbalance (e.g., 99% negative), a test that always predicts negative has 99% accuracy but zero sensitivity. Use F1 or AUC-ROC instead.
What is the relationship between LR+ and LRโ?
DOR = LR+ / LRโ. A good test has high LR+ and low LRโ. They are derived from the same sensitivity and specificity.
By the Numbers
Official Data Sources
Medical Disclaimer: This calculator is for educational purposes. It is not a substitute for clinical judgment or professional medical advice. Test performance varies by population and setting. Consult qualified healthcare providers for medical decisions.
Related Calculators
Post-Test Probability Calculator
Compute post-test probability from sensitivity, specificity, pre-test probability, and likelihood ratios using Bayes' theorem and Fagan nomogram.
StatisticsFalse Positive Paradox Calculator
Understand why a positive test for a rare condition is usually a false positive. Uses Bayes' theorem to compute PPV from sensitivity, specificity, and prevalence. Natural frequency table, charts, and educational content.
StatisticsAccuracy Calculator
Compute classification metrics from a confusion matrix: Accuracy, Precision, Recall, F1 Score, Specificity, MCC, and more. Essential for ML model evaluation.
StatisticsBayes' Theorem Calculator
Calculate posterior probabilities using Bayes' theorem. Input prior, likelihood, and evidence to update beliefs with step-by-step Bayesian reasoning.
StatisticsBertrand's Box Paradox
Interactive Bertrand's Box Paradox simulator. Explore why the probability of the other coin being gold is 2/3, not 1/2, with Monte Carlo simulation and Bayesian proof.
StatisticsBertrand's Paradox
Explore Bertrand's Paradox โ three valid methods for choosing a random chord give three different probabilities (1/3, 1/2, 1/4). Interactive simulation and visualization.
Statistics