Sensitivity and specificity are statistical measures of the performance of a binary classification test, also known in statistics as classification function. Sensitivity (also called the true positive rate, or the recall rate in some fields) measures the proportion of actual positives which are correctly identified as such (e.g. the percentage of sick people who are correctly identified as having the condition). Specificity measures the proportion of negatives which are correctly identified as such (e.g. the percentage of healthy people who are correctly identified as not having the condition, sometimes called the true negative rate). These two measures are closely related to the concepts of type I and type II errors. A perfect predictor would be described as 100% sensitive (i.e. predicting all people from the sick group as sick) and 100% specific (i.e. not predicting anyone from the healthy group as sick); however, theoretically any predictor will possess a minimum error bound known as the Bayes error rate.
For any test, there is usually a tradeoff between the measures. For example: in an airport security setting in which one is testing for potential threats to safety, scanners may be set to trigger on lowrisk items like belt buckles and keys (low specificity), in order to reduce the risk of missing objects that do pose a threat to the aircraft and those aboard (high sensitivity). This tradeoff can be represented graphically as a receiver operating characteristic curve.
Definitions
Imagine a study evaluating a new test that screens people for a disease. Each person taking the test either has or does not have the disease. The test outcome can be positive (predicting that the person has the disease) or negative (predicting that the person does not have the disease). The test results for each subject may or may not match the subject's actual status. In that setting:
 True positive: Sick people correctly diagnosed as sick
 False positive: Healthy people incorrectly identified as sick
 True negative: Healthy people correctly identified as healthy
 False negative: Sick people incorrectly identified as healthy
In general, Positive = identified and negative = rejected.
Therefore:
 True positive = correctly identified
 False positive = incorrectly identified
 True negative = correctly rejected
 False negative = incorrectly rejected
Sensitivity
Sensitivity relates to the test's ability to identify positive results.
The sensitivity of a test is the proportion of people that are known to have the disease who test positive for it.
This can also be written as:
 $\backslash begin\{align\}$
\text{sensitivity} & = \frac{\text{number of true positives}}{\text{number of true positives} + \text{number of false negatives}} = \frac{\text{number of true positives}}{\text{total number of sick individuals in population}} \\ \\
& = \text{probability of a positive test, given that the patient is ill}
\end{align}
Again, consider the example of the medical test used to identify a disease.
A 'bogus' test kit that always indicates positive regardless of the disease status of the patient will achieve, from a theoretical point of view, 100% sensitivity.
This is because in this case there are no negatives at all, and false positives are not accounted for in the definition of sensitivity.
Therefore, sensitivity alone cannot be used to determine whether a test is useful in practice.
However, a test with high sensitivity can be considered as a reliable indicator when its result is negative, since it rarely misses true positives among those who are actually positive.
For example, a sensitivity of 100% means that the test recognizes all actual positives – i.e. all sick people are recognized as being ill. Thus, in contrast to a high specificity test, negative results in a high sensitivity test are used to rule out the disease.
Sensitivity is not the same as the precision or positive predictive value (ratio of true positives to combined true and false positives), which is as much a statement about the proportion of actual positives in the population being tested as it is about the test.
The calculation of sensitivity does not take into account indeterminate test results.
If a test cannot be repeated, indeterminate samples either should be excluded from the analysis (the number of exclusions should be stated when quoting sensitivity) or can be treated as false negatives (which gives the worstcase value for sensitivity and may therefore underestimate it).
A test with a high sensitivity has a low type II error rate.
In nonmedical contexts, sensitivity is sometimes called recall.
Specificity
Specificity relates to the test's ability to identify negative results.
Consider the example of the medical test used to identify a disease.
The specificity of a test is defined as the proportion of patients that are known not to have the disease who will test negative for it.
This can also be written as:
 $\backslash begin\{align\}$
\text{specificity} & = \frac{\text{number of true negatives}}{\text{number of true negatives} + \text{number of false positives}}= \frac{\text{number of true negatives}}{\text{total number of well individuals in population}} \\ \\
& = \text{probability of a negative test given that the patient is well}
\end{align}
From a theoretical point of view, a 'bogus' test kit which always indicates negative regardless of the disease status of the patient, will achieve 100% specificity, since there are no positive results and false negatives are not accounted for by definition.
However, highly specific tests rarely miss negative outcomes, so they can be considered reliable when their result is positive.
Therefore, a positive result from a test with high specificity means a high probability of the presence of disease.^{[1]}
A test with a high specificity has a low type I error rate.
Graphical illustration
High sensitivity and low specificity
Low sensitivity and high specificity
Medical examples
In medical diagnostics, test sensitivity is the ability of a test to correctly identify those with the disease (true positive rate), whereas test specificity is the ability of the test to correctly identify those without the disease (true negative rate).
If 100 patients known to have a disease were tested, and 43 test positive, then the test has 43% sensitivity. If 100 with no disease are tested and 96 return a negative result, then the test has 96% specificity. Sensitivity and specificity are prevalenceindependent test characteristics, as their values are intrinsic to the test and do not depend on the disease prevalence in the population of interest.^{[2]} Positive and negative predictive values, but not sensitivity or specificity, are values influenced by the prevalence of disease in the population that is being tested.
Misconceptions
It is often claimed that a highly specific test is effective at ruling in a disease when positive, while a highly sensitive test is deemed effective at ruling out a disease when negative.^{[3]}^{[4]} This has led to the widely used mnemonics SPIN and SNOUT, according to which a highly SPecific test, when Positive, rules IN disease (SPPIN), and a highly 'SeNsitive' test, when Negative rules OUT disease (SNNOUT). Both rules of thumb are, howevever, inferentially misleading, as the diagnostic power of any test is determined by both the sensitivity and specificity.^{[5]}^{[6]}^{[7]}
Worked example
 Relationships among terms

 A worked example
 A diagnostic test with sensitivity 67% and specificity 91% is applied to 2030 people to look for a disorder with a population prevalence of 1.48%
Related calculations
 False positive rate (α) = type I error = 1 − specificity = FP / (FP + TN) = 180 / (180 + 1820) = 9%
 False negative rate (β) = type II error = 1 − sensitivity = FN / (TP + FN) = 10 / (20 + 10) = 33%
 Power = sensitivity = 1 − β
 Likelihood ratio positive = sensitivity / (1 − specificity) = 66.67% / (1 − 91%) = 7.4
 Likelihood ratio negative = (1 − sensitivity) / specificity = (1 − 66.67%) / 91% = 0.37
Hence with large numbers of false positives and few false negatives, a positive screen test is in itself poor at confirming the disorder (PPV = 10%) and further investigations must be undertaken; it did, however, correctly identify 66.7% of all cases (the sensitivity). However as a screening test, a negative result is very good at reassuring that a patient does not have the disorder (NPV = 99.5%) and at this initial screen correctly identifies 91% of those who do not have cancer (the specificity).
Estimation of errors in quoted sensitivity or specificity
Sensitivity and specificity values alone may be highly misleading. The 'worstcase' sensitivity or specificity must be calculated in order to avoid reliance on experiments with few results. For example, a particular test may easily show 100% sensitivity if tested against the gold standard four times, but a single additional test against the gold standard that gave a poor result would imply a sensitivity of only 80%. A common way to do this is to state the binomial proportion confidence interval, often calculated using a Wilson score interval.
Confidence intervals for sensitivity and specificity can be calculated, giving the range of values within which the correct value lies at a given confidence level (e.g. 95%).^{[8]}
Terminology in information retrieval
In information retrieval, the positive predictive value is called precision, and sensitivity is called recall.
The Fscore can be used as a single measure of performance of the test. The Fscore is the harmonic mean of precision and recall:
 $F\; =\; 2\; \backslash times\; \backslash frac\{\backslash text\{precision\}\; \backslash times\; \backslash text\{recall\}\}\{\backslash text\{precision\}\; +\; \backslash text\{recall\}\}$
In the traditional language of statistical hypothesis testing, the sensitivity of a test is called the statistical power of the test, although the word power in that context has a more general usage that is not applicable in the present context. A sensitive test will have fewer Type II errors.
See also
Terminology and derivations
from a confusion matrix
 true positive (TP)
 eqv. with hit
 true negative (TN)
 eqv. with correct rejection
 false positive (FP)
 eqv. with false alarm, Type I error
 false negative (FN)
 eqv. with miss, Type II error
 sensitivity or true positive rate (TPR)
 eqv. with hit rate, recall
 $\backslash mathit\{TPR\}\; =\; \backslash mathit\{TP\}\; /\; P\; =\; \backslash mathit\{TP\}\; /\; (\backslash mathit\{TP\}\; +\; \backslash mathit\{FN\})$
 false positive rate (FPR)
 eqv. with false alarm rate, fallout
 $\backslash mathit\{FPR\}\; =\; \backslash mathit\{FP\}\; /\; N\; =\; \backslash mathit\{FP\}\; /\; (\backslash mathit\{FP\}\; +\; \backslash mathit\{TN\})$
 accuracy (ACC)
 $\backslash mathit\{ACC\}\; =\; (\backslash mathit\{TP\}\; +\; \backslash mathit\{TN\})\; /\; (\backslash mathit\{TP\}\; +\; \backslash mathit\{TN\}\; +\; \backslash mathit\{FP\}\; +\; \backslash mathit\{FN\})$
 specificity (SPC) or True Negative Rate
 $\backslash mathit\{SPC\}\; =\; \backslash mathit\{TN\}\; /\; N\; =\; \backslash mathit\{TN\}\; /\; (\backslash mathit\{FP\}\; +\; \backslash mathit\{TN\})\; =\; 1\; \; \backslash mathit\{FPR\}$
 positive predictive value (PPV)
 eqv. with precision
 $\backslash mathit\{PPV\}\; =\; \backslash mathit\{TP\}\; /\; (\backslash mathit\{TP\}\; +\; \backslash mathit\{FP\})$
 negative predictive value (NPV)
 $\backslash mathit\{NPV\}\; =\; \backslash mathit\{TN\}\; /\; (\backslash mathit\{TN\}\; +\; \backslash mathit\{FN\})$
 false discovery rate (FDR)
 $\backslash mathit\{FDR\}\; =\; \backslash mathit\{FP\}\; /\; (\backslash mathit\{FP\}\; +\; \backslash mathit\{TP\})$
 Matthews correlation coefficient (MCC)
 $\backslash mathit\{MCC\}\; =\; (\backslash mathit\{TP\}\backslash mathit\{TN\}\; \; \backslash mathit\{FP\}\backslash mathit\{FN\})/\; \backslash sqrt\{P\; N\; P\text{'}\; N\text{'}\}$
Source: Fawcett (2004).

References
Further reading
External links
 Vassar College's Sensitivity/Specificity Calculator
This article was sourced from Creative Commons AttributionShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and USA.gov, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for USA.gov and content contributors is made possible from the U.S. Congress, EGovernment Act of 2002.
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a nonprofit organization.