Post-Test Probability Calculator

Created by Łucja Zaborowska, MD, PhD candidate
Reviewed by Anna Szczepanek, PhD
Last updated: Jan 25, 2022

The post-test probability calculator does not only supply you with its titular calculation; it also computes the pretest probability and works with the likelihood ratio formulas.

This tool will shortly explain all the magic behind the pre-test and post-test probability / odds calculations β€” we'll discuss all the little aspects connected to the subject, from the beginning to the end. πŸ§™

So, hop on board this Bayesian calculator β€” it's time to do some math!

Sensitivity, specificity, and likelihood ratio formulas

πŸ’‘ Don't forget to check our sensitivity and specificity and accuracy calculators. They're both tools designed for this very specific topic.

Let's get through all the basic descriptions:

  • Sensitivity β€” the number of people with the disease who received a positive test result, compared to the total number of people with the disease (regardless of test status). Measures how good the test is when we're looking for the disease.

    sensitivity = TP / (TP + FN)

  • Specificity β€” the number of people without the disease who received a negative test result, compared to the total number of people without the disease. Measures how good the test is when we want to exclude the disease.

    specificity = TN / (FP + TN)

specificity and sensivity table
  • Likelihood ratio β€” we recognize two different types of likelihood ratios.

    • The positive likelihood ratio (LR+) answers the question: What are the chances that a sick person will test positive?

      positive likelihood ratio = sensitivity / (1 – specificity)

    • The negative likelihood ratio (LR–) tells us: What are the chances that a healthy person will test negative?

      negative likelihood ratio = (1 – sensitivity) / specificity

  • Prevalence β€” also called the pre-test probability. We usually understand it as the percentage of people in a population who suffer from a certain disease.

Having discussed the basics, we are now ready to deal with the pre-test and post-test probability. Let's go!

πŸ’‘ Despite their negative and positive names, both likelihood ratios can only take values greater than or equal to 0.

How do I calculate pre-test probability (prevalence)?

It's much easier than it seems! 😱

Let's take a look at the equation we used in our post-test probability calculator:

prevalence = (TP + FN) / (TP + FN + FP + TN)

Where:

  • TP stands for true positive cases. The patient has the disease and tested positive.
  • FN is false negative. The patient has the disease, yet tested negative.
  • TN is true negative. The patient does not have the disease and tested negative.
  • FP is false positive. The patient does not have the disease, yet tested positive.

How do I calculate post-test probability?

We'll need a few steps and up to 5 equations.

  1. Find out the prevalence (pre-test probability) and the likelihood ratio.

πŸ’‘ If you need to calculate any of these variables, check out the specific tutorials featured in Omni's post-test probability calculator.

  1. Calculate the pre-test odds

    pre-test odds = prevalence / (1 – prevalence)

  2. Calculate the post-test odds.

    post-test odds = pre-test odds Γ— likelihood ratio

  3. ..and finally, compute the post-test probability!

    post-test probability = post-test odds / (1 + post-test odds)

FAQ

What's the difference between the pre-test odds and pre-test probability?

Pre-test probability is also called prevalence β€” it tells us how often a specific thing occurs in different situations.

E.g., The prevalence of hypertension is 29% β€” every 29 out of 100 people suffer from hypertension.

On the other hand, pre-test odds inform us about the ratio of how often the event occurs, versus how often the event doesn't occur.

E.g., The odds of having hypertension are 3.5 β€” you're over three times more likely to develop hypertension than not to develop it.

How do I calculate pre-test odds?

That'll be quick:

  1. Find the prevalence (pre-test probability).

  2. Transform the probability to odds, using the equation featured in our post-test probability calculator:

    pre-test odds = prevalence / (1 – prevalence)

  3. Hey, you're done. πŸŽ‰

How do I calculate post-test odds?

To calculate the post-test odds, follow these steps:

  1. Find the prevalence (pre-test probability).

  2. Calculate the pre-test odds using the equation:

    pre-test odds = prevalence / (1 – prevalence)

  3. Find the desired likelihood ratio.

  4. Use the very last equation:

    post-test odds = pre-test odds Γ— likelihood ratio

  5. That'd be it! It's all ready. πŸŽ‚

Łucja Zaborowska, MD, PhD candidate
Prevalence
Do you know the prevalence?
Yes
Prevalence
%
Likelihood ratio
Do you know the likelihood ratio?
Yes
Likelihood ratio (LR)
Results
Post-test probability
%
Check out 21 similar risk & probability calculators 🎲
AccuracyBayes theoremBirthday Paradox… 18 more
People also viewed…

Box plot

The box plot calculator is here to show you a graphic analysis of your dataset in the form of a box-and-whisker plot.

Christmas tree

Welcome to the Christmas tree calculator, where you will find how to decorate your Christmas tree in the best way. Take a look at the perfect Christmas tree formula prepared by math professors and improved by physicists. Plan in advance how many lights and decorations you'll need!

Sunbathing

Do you always remember to put on sunscreen before going outside? Are you sure that you use enough? The Sunbathing Calculator β˜€ will tell you when's the time to go back under an umbrella not to suffer from a sunburn!

p-value

The p-value calculator can help you find the p-value and evaluate how compatible your data is with the null hypothesis.
Omni Calculator
Copyright by Omni Calculator sp. z o.o.
Privacy policy & cookies
main background