We have updated our Privacy Policy as of September 22, 2023, for more information click here

Glossary

False Positive Rate

What is false positive rate, and how is it calculated? How does it compare to other measures of test accuracy, like sensitivity and specificity?

False positive rate (FPR) is a measure of accuracy for a test: be it a medical diagnostic test, a machine learning model, or something else. In technical terms, the false positive rate is defined as the probability of falsely rejecting the null hypothesis.

False Positive Definition

Imagine you have an anomaly detection test of some variety. Maybe it’s a medical test that checks for the presence or absence of a disease; maybe it’s a classification-based machine learning algorithm. Either way, there are two possible real-life truths: either the thing-being-tested-for is true, or it isn’t. The person is sick, or they aren’t; the image is a dog, or it isn’t. Because of this, there are also two possible test outcomes: a positive test result (the test predicts the person is sick or the image is a dog) and a negative test result (the test predicts the person is not sick or the image is not a dog).

Because there are two possible truths and two possible test results, we can create what’s called a confusion matrix with all possible outcomes.

Here are the possibilities:

  • True Positive: the truth is positive, and the test predicts a positive. The person is sick, and the test accurately reports this.
  • True Negative: the truth is negative, and the test predicts a negative. The person is not sick, and the test accurately reports this.
  • False Negative: the truth is positive, but the test predicts a negative. The person is sick, but the test inaccurately reports that they are not. Also called a Type II error in statistics.
  • False Positive: the truth is negative, but the test predicts a positive. The person is not sick, but the test inaccurately reports that they are. Also called a Type I error in statistics.

Measuring the Accuracy of a Test

By calculating ratios between these values, we can quantitatively measure the accuracy of our tests.

The false positive rate is calculated as FP/FP+TN, where FP is the number of false positives and TN is the number of true negatives (FP+TN being the total number of negatives). It’s the probability that a false alarm will be raised: that a positive result will be given when the true value is negative.

There are many other possible measures of test accuracy and error rate. Here is a short rundown of the most common ones:

The false negative rate — also called the miss rate — is the probability that a true positive will be missed by the test. It’s calculated as FN/FN+TP, where FN is the number of false negatives and TP is the number of true positives (FN+TP being the total number of positives).

The true positive rate (TPR, also called sensitivity) is calculated as TP/TP+FN. TPR is the probability that an actual positive will test positive.

The true negative rate (also called specificity), which is the probability that an actual negative will test negative. It is calculated as TN/TN+FP.

If you’re on the patient side of a medical test being analyzed like this, you may care a bit more about two additional metrics: positive predictive value and negative predictive value.

Positive predictive value is the likelihood that, if you have gotten a positive test result, you actually have the disease. It’s calculated as TP/TP+FP. Conversely, negative predictive value is the likelihood that, if you have gotten a negative test result, you actually don’t have the disease.

Want to Dive Deeper?

We have a lot to explore that can help you understand feature flags. Learn more about benefits, use cases, and real world applications that you can try.

Create Impact With Everything You Build

We’re excited to accompany you on your journey as you build faster, release safer, and launch impactful products.