top of page
Inaugurated by IN-SPACe
ISRO Registered Space Tutor

S3-SA3-0451

What is Sensitivity and Specificity?

Grade Level:

Class 9

AI/ML, Data Science, Physics, Economics, Cryptography, Computer Science, Engineering

Definition
What is it?

Sensitivity and Specificity are two important measurements used to check how good a test or prediction model is. Sensitivity measures how well a test correctly identifies positive cases (true positives), while Specificity measures how well it correctly identifies negative cases (true negatives). Think of them as how good a test is at finding 'yes' answers when they are actually 'yes', and 'no' answers when they are actually 'no'.

Simple Example
Quick Example

Imagine you have a special app that tries to guess if a photo shows a dog or not. If there are 10 photos with dogs, and the app correctly identifies 8 of them as dogs, its sensitivity for finding dogs is 8/10 or 80%. If there are 10 photos without dogs, and the app correctly identifies 9 of them as 'not a dog', its specificity for finding 'not a dog' is 9/10 or 90%.

Worked Example
Step-by-Step

Let's say a new alarm system is installed in a school to detect if someone tries to break in after hours. Out of 10 times someone actually tries to break in (positive cases): The alarm rings 9 times (True Positives). The alarm does not ring 1 time (False Negatives).

Out of 90 times no one tries to break in (negative cases): The alarm does not ring 85 times (True Negatives). The alarm rings 5 times (False Positives).

Step 1: Calculate Sensitivity. Sensitivity = True Positives / (True Positives + False Negatives).
---Step 2: Plug in the numbers for Sensitivity. Sensitivity = 9 / (9 + 1) = 9 / 10.
---Step 3: Calculate the percentage for Sensitivity. Sensitivity = 0.9 or 90%.
---Step 4: Calculate Specificity. Specificity = True Negatives / (True Negatives + False Positives).
---Step 5: Plug in the numbers for Specificity. Specificity = 85 / (85 + 5) = 85 / 90.
---Step 6: Calculate the percentage for Specificity. Specificity = 0.944 or approximately 94.4%.

Answer: The alarm system has a Sensitivity of 90% and a Specificity of 94.4%.

Why It Matters

These concepts are super important in AI/ML, Data Science, and Computer Science to evaluate how well models predict outcomes. For example, doctors use them to check how reliable medical tests are, and engineers use them to make sure security systems are effective. Understanding them can open doors to careers in fields like AI engineering and data analysis.

Common Mistakes

MISTAKE: Confusing Sensitivity with Specificity, thinking they both measure the same thing. | CORRECTION: Remember Sensitivity focuses on correctly finding positive cases, while Specificity focuses on correctly finding negative cases. They are distinct measures.

MISTAKE: Using the total number of items tested in the denominator for both calculations. | CORRECTION: For Sensitivity, the denominator is (True Positives + False Negatives), which is the total number of actual positive cases. For Specificity, the denominator is (True Negatives + False Positives), which is the total number of actual negative cases.

MISTAKE: Not understanding what 'False Positives' and 'False Negatives' mean. | CORRECTION: A False Positive is when the test says 'yes' but it's actually 'no' (e.g., alarm rings, but no break-in). A False Negative is when the test says 'no' but it's actually 'yes' (e.g., no alarm, but there was a break-in).

Practice Questions
Try It Yourself

QUESTION: A spam filter correctly identifies 90 out of 100 actual spam emails. It also correctly identifies 480 out of 500 actual non-spam emails. What is the Sensitivity of the spam filter? | ANSWER: Sensitivity = 90 / (90 + 10) = 90/100 = 0.9 or 90%

QUESTION: Using the same spam filter data: 90 true spam, 10 false non-spam (missed spam), 480 true non-spam, 20 false spam (wrongly marked as spam). Calculate the Specificity of the spam filter. | ANSWER: Specificity = 480 / (480 + 20) = 480/500 = 0.96 or 96%

QUESTION: A weather app predicts rain. On 20 days when it actually rained, the app predicted rain 18 times. On 80 days when it did not rain, the app predicted no rain 75 times. Calculate both the Sensitivity and Specificity of the app's rain prediction. | ANSWER: Sensitivity = 18 / (18 + 2) = 18/20 = 0.9 (90%). Specificity = 75 / (75 + 5) = 75/80 = 0.9375 (93.75%)

MCQ
Quick Quiz

Which statement best describes Sensitivity?

The ability of a test to correctly identify negative cases.

The ability of a test to correctly identify positive cases.

The total number of correct predictions divided by total predictions.

The percentage of times a test gives a wrong positive result.

The Correct Answer Is:

B

Sensitivity specifically measures how well a test finds the true positive cases. Option A describes Specificity, while C is overall accuracy, and D relates to false positives.

Real World Connection
In the Real World

When you use face unlock on your phone, the system uses principles similar to Sensitivity and Specificity. The phone needs high Sensitivity to correctly unlock for you (a true positive) and high Specificity to not unlock for a stranger (a true negative). Similarly, when banks use fraud detection systems for UPI transactions, these systems are fine-tuned using Sensitivity and Specificity to catch fraudulent transactions (true positives) without blocking too many legitimate ones (false positives).

Key Vocabulary
Key Terms

True Positive: Correctly identified as positive | True Negative: Correctly identified as negative | False Positive: Incorrectly identified as positive | False Negative: Incorrectly identified as negative | Prediction: An educated guess about a future event or outcome

What's Next
What to Learn Next

Great job understanding Sensitivity and Specificity! Next, you can explore 'Accuracy' and 'Precision' in prediction models. These concepts build on what you've learned and will help you get an even fuller picture of how to evaluate different types of tests and predictions.

bottom of page