πŸ”₯Kareem Carr πŸ”₯
πŸ”₯Kareem Carr πŸ”₯

@kareem_carr

12 Tweets Feb 03, 2023
Never confuse "sensitivity" and "specificity" again!
Here's how I keep them straight. πŸ‘‡
First some background. There are four categories of test results:
[Skip this tweet if you already know this part!]
TP: Tested positive, Infected
FP: Tested positive, Uninfected
FN: Tested negative, Infected
TN: Tested negative, Uninfected.
Sensitivity is how "sensitive" the test is meaning "does it pick up all the cases?" What's another name for the cases detected by the test? The true positives! Therefore, another name for the sensitivity is the *true positive* rate. It's the percent of cases detected by the test.
Now ask yourself, what's the easiest way of making sure you pick up all the cases? Just say everything is a positive! Why is that bad? Because it would lead to a bunch of false positives. A good test needs to be *specific*. So specificity and *false positives* are linked.
So just to recap:
1. The sensitivity is about being sensitive enough to pick up all the cases
2. The specificity is about making sure the test is *specific* to the cases and doesn't pick up a lot of non-cases as well
If you don't care about the math. You can stop here.
There's a twist that you just have to memorize. The specificity *is* related to the false positive rate (FPR)* but* it's 1 - FPR. In my opinion, it's misnamed, but it does technically contain all the information we need to see how specific the test is.
OK. So sensitivity is the TPR and specificity is 1-FPR. What can we do with that? Well if you memorize just one more thing. You can write down the formulas for each pretty quickly.
Here's my trick for remembering the TPR, FPR, etc. First, the numerator will always just be the named category. So for TPR, the numerator is "TP". Second, the denominator is always the named category plus its complete opposite (T to F and P to N). So the denominator is TP+FN.
This is a general trick. As soon as I see FPR, I know FP will be in the numerator right away. I can immediately follow that up by writing FP in the denominator plus the complete opposite of FP which is TN.
Now that I have the FPR. I can get specificity since it's just 1-FPR. So, that's it. That's my thought process for quickly remembering the difference between specificity and sensitivity, and writing down the formulas.
Extra Credit: If you simplify the formula for 1-FPR, you might notice it's the same as the formula for the TNR. The negative sign in 1-FPR means we should reverse the categories. The T becomes an F and the P becomes an N. Therefore, TNR = 1-FPR. (This is another general rule).
Once you realize the specificity is just the TNR, we can use our trick again to quickly write down the formula (which is the same as the specificity).

Loading suggestions...