Sensitivity vs. Specificity: What’s the Difference?

Sensitivity vs. Specificity: What’s the Difference?

3 mins read3.3K Views Comment
Vikram
Vikram Singh
Assistant Manager - Content
Updated on Oct 13, 2023 15:30 IST

Sensitivity and Specificity are often used interchangeably, but they are two different concepts. Sensitivity refers to the ability of a test to identify those with the disease correctly. In contrast, Specificity refers to the ability of a test to identify those without the disease correctly. Both measures are important in determining the accuracy of a diagnostic test. In this article, we will discuss the difference between Sensitivity and Specificity.

2022_10_Copy-of-Feature-Image-Templates-2.jpg

Sensitivity and Specificity are similar to precision and recall, which evaluate the model performance. In the data science community, while evaluating the model performance, precision and recall are mainly used, but in the medical world, Sensitivity and Specificity are used to evaluate the medical test. In medical terms, Sensitivity indicates the ability to detect the disease, while Specificity refers to the percentage of people who don’t actually have the disease are tested negative. This article will briefly discuss Sensitivity vs. Specificity in full detail.

This article will use the confusion matrix’s True Positive, True Negative, False Positive, and False negative. So before proceeding further:

Must Check: Confusion Matrix

Must Check: Type-1 vs. Type-2 Error

Table of Content

Difference between Sensitivity and Specificity

Sensitivity Specificity
Definition It measures how likely you will get a positive result when you test for something. It measures the proportion of True Negative, which is correctly identified by the model. 
Referred as True Positive Rate False Negative Rate
Imbalanced Data More likely to be affected Less affected
When to Use Classification of positives are high priority. Classification of negatives is a high priority.
Formula TP / (TP + FN) TN / (TN + FP)

Must Check: Top Statistics for Data Science Courses and Certificates

Must Check: Free Statistics for Data Science Courses and Certificates

Sensitivity

Definition

Sensitivity measures how well a machine learning model can detect positive instances. In other words, it measures how likely you will get a positive result when you test for something.

  • It is also known as a True Positive Rate or Recall.
  • The model with high Sensitivity will have significantly fewer False Negatives.
  • The higher the Sensitivity better the model.

Formula

Sensitivity = True Positive (TP) / True Positive (TP) + False Negative (FN)

Example

For example, let’s say you’re testing for a disease. A high sensitivity means that the test is very likely to detect the disease if it’s present. Low Sensitivity means the test is less likely to detect the disease if it’s present. So that’s what Sensitivity is all about—detecting the presence of something.

Difference Between Type 1 and Type 2 Error
Difference Between Type 1 and Type 2 Error
Type – 1 error is known as false positive, i.e., when we reject the correct null hypothesis, whereas type -2 error is also known as a false negative, i.e., when...read more
Difference between Accuracy and Precision
Difference between Accuracy and Precision
Precision refers to the closeness of multiple reading of the same quantity, whereas accuracy refers to the measured value to the true value. In this article we will discuss difference...read more
Standard Error vs. Standard Deviation
Standard Error vs. Standard Deviation
Standard Error quantifies the variability between sample drawn from the same population, whereas the standard deviation quantifies the variability of values in a dataset. In this article we will discuss...read more

Specificity

Definition

Specificity measures the proportion of True Negative which are correctly identified by the model. 

  • It is also called a True Negative Rate (TNR).
  • The Sum of the True Negative Rate and False Negative Rate is 1.
  • The higher Specificity of the model indicates that the model correctly identifies most of the negative results.
    • A lower specificity value indicates the model misled the negative results as positive.
  • In Medical terms, Specificity is a measure of the proportion of people not suffering from the disease who got predicted correctly as those not suffering from the disease.

Formula

Specificity = True Negative (TN) / True Negative (TN) + False Positive (FP)

Example

A blood test that screens for all possible infections will be less specific than a blood test that screens for just one type of infection.

Also Read: Difference between Covariance and Correlation

Also Read: Difference between Correlation and Regression

Key Differences and Similarities between Sensitivity and Specificity

  • Sensitivity is affected by the prevalence of the positive class, whereas Specificity is affected by the prevalence of the negative class.
  • Compared to Specificity, Sensitivity is more likely to be affected by imbalanced data.
  • Sensitivity and Specificity are inversely related, i.e., when sensitivity increases, specificity decreases and vice versa.

Read Also: Skewness in Statistics

Read Also: Difference between Variance and Standard Deviation

Conclusion

This article briefly discussed Sensitivity and Specificity with examples.
Sensitivity and Specificity are the two critical parameters used in the medical world in tests. Sensitivity is the ability of a test to correctly identify a patient with a disease, whereas Specificity is the ability of a test to identify people with diseases correctly.
They are used to plot the ROC curve, and the area under it determines the model performance.
I hope you will like the article.
Keep Learning!!
Keep Sharing!!

Also Read: Difference between Null and Alternative Hypothesis

About the Author
author-image
Vikram Singh
Assistant Manager - Content

Vikram has a Postgraduate degree in Applied Mathematics, with a keen interest in Data Science and Machine Learning. He has experience of 2+ years in content creation in Mathematics, Statistics, Data Science, and Mac... Read Full Bio