fbpx

What are sensitivity and specificity and why should I care?

Data Literacy

A: Good question! Sensitivity and specificity are characteristics of a medical test that help us determine how useful that test is and how to interpret the result. But, they aren’t the be all and end all. We also want to know the positive and negative predictive value. Strap in for the ride and let’s talk stats!

Sensitivity tells us how often the test is positive for someone who actually has a disease (called a true positive). A very sensitive test will correctly identify most people who have the disease. The false-negative rate, which is when the test is negative even though that person does have the disease, will be low. If we have a test that is 99% sensitive, only 1% of people with the illness would be missed and incorrectly told they did not have the disease.

Specificity tells us how often the test is negative for someone who doesn’t have the disease (called a true negative). A highly specific test will correctly identify almost everyone who doesn’t have the disease and have a low false-positive rate. False positives are when the test is positive even though the person doesn’t have the disease. For example, a 99% specific test will incorrectly give a positive result to 1% of people who don’t have the disease.

Sensitivity and specificity are helpful when we are thinking about how to interpret a medical test result. No test is perfect, and all tests will have some false positives and false negatives, and it’s important to keep this in mind. False positives and negatives are the bane of testing because we don’t want to miss a disease and we don’t want to tell people they have a disease they don’t actually have.

“That’s fun,” you say. “How incredibly useful!” It is, but slow your roll. Sensitivity and specificity are important and although they usually get more attention, they are not the only test performance metrics that matter. The prevalence of a disease (how common it is in the population) really impacts how you interpret a test result because it impacts two other important measures of test performance: positive and negative predictive value.

Positive predictive value tells us how likely it is for someone who has a positive result on a test to actually have the disease. A positive predictive value of 99% means that if you got a positive test result, 99% of the time you truly do have the disease. Negative predictive value tells us how likely it is for someone who has a negative result to not have the disease. A negative predictive value of 99% means that if you got a negative test result, 99% of the time you don’t have the disease.

A little confusing, right? Let’s try an example to clarify.

We have 100 people in a room for a party and some of them are werewolves. We need a really good werewolf test, because we don’t want to miss any werewolves and we certainly don’t want to call someone a werewolf who isn’t. In addition to our new werewolf swab (patent pending), we also need a gold standard, or a foolproof way to identify a werewolf. In this case, we’ll wait for the full moon when the werewolves will all turn. First we swab everyone, then the moon reveals there are 50 people in the room who are werewolves! So the prevalence in this room is 50%. (Yikes!)

The test identifies 54 people as being werewolves: 49 of those are in fact werewolves (true positives) and 5 aren’t (false positives). The test was negative for 46 people: 1 who is a werewolf (false negative) and 45 who weren’t (true negative). Look at the Werewolf Party #1 table below.

When we do all the math, the sensitivity of the test is 98% and the specificity is 90%. The positive predictive value for this test is 90.7%, meaning there’s a 90.7% chance that someone with a positive test is actually a werewolf. Not too shabby. The negative predictive value for this test is 97.8%. There is a 97.8% chance that someone with a negative test result is not a werewolf. This test is really good at ruling OUT werewolfery.


But what if everyone invited a few non-werewolf friends to the gathering and now there are 500 people in the room? How does that change things? So now, the prevalence of werewolves is only 10% (50 of the 500 people are werewolves).Let’s look at the Werewolf Party #2 table.

The sensitivity and specificity of the test didn’t change. The positive and negative predictive values change significantly though! Now, the positive predictive value is only 49.5% (49 true positives out of 99 positive test results). That’s now about as useful as flipping a coin. The negative predictive value is now 99.8% (450 true negatives out of 451 negative test results). As the prevalence decreased, the test was less useful at telling if someone was a werewolf but more useful at ruling it out. This is why knowing the prevalence of a disease really matters.


So, while sensitivity and specificity of a test are important to screening for a disease or condition, their value depends on the prevalence of the disease or condition and other test performance metrics.

Stay safe. Stay well. Enjoy stats. Avoid werewolves.

Those Nerdy Girls

Want more fun with this? Check out these links:

National Library of Medicine: Understanding and using sensitivity, specificity and predictive values

New York State Department of Health: Disease Screening – Statistics Teaching Tools

Link to Original Substack Post