# Bayes' Theorem

## Calculate the probability of an outcome based on clinical conditions and diagnostic tests

Bayes' Theorem is a statistical method used in applied practice to predict the probability of an outcome or event based on 1) the pretest probability of the outcome or event based on demographic, prognostic, and clinical factors and 2) the effectiveness or ability of diagnostic tests (sensitivity and specificity).

With Bayes' Theorem, the pretest probability is likelihood of an event or outcome based on demographic, prognostic, and clinical factors prior to diagnostic testing. In order to calculate the post-test probability, one must know the likelihood of having either a positive or negative test result in the current clinical situation. The likelihood ratio of a positive diagnostic finding is calculated with the following formula.

With Bayes' Theorem, the pretest probability is likelihood of an event or outcome based on demographic, prognostic, and clinical factors prior to diagnostic testing. In order to calculate the post-test probability, one must know the likelihood of having either a positive or negative test result in the current clinical situation. The likelihood ratio of a positive diagnostic finding is calculated with the following formula.

If the likelihood ratio for a positive test is above 1, then there is an increased probability that a study participant with a positive result has the disease state or outcome/event. If the likelihood ratio is below 1, then there is a decreased probability that the patient has the disease or outcome/event.

In other diagnostic instances with Bayes' Theorem, negative test results are the focus of the diagnostic study or treatment regimen. The likelihood ratio of a negative diagnostic test result can be found with the following formula.

In other diagnostic instances with Bayes' Theorem, negative test results are the focus of the diagnostic study or treatment regimen. The likelihood ratio of a negative diagnostic test result can be found with the following formula.

When interpreting the likelihood ratio for a negative diagnostic test, if the ratio is above 1, then there is an increased chance that a study participant with a negative test result has the disease state or outcome/event. If the likelihood ratio is below 1, then there is a decreased probability that a study participant has the disease given the negative test result.

Most diagnostic tests provide an outcome that is dichotomous for "positive" or "negative" for a given disease state or outcome/event. However, if the diagnostic test uses a continuous scale to produce diagnostic results, then researchers can generate the positive likelihood ratio for each different cut-off along the numerical continuum. There are three steps to calculating these likelihood ratios according to Bayes' Theorem:

1. Convert the pretest probability to pretest odds with the first formula below.

2. Multiply the pretest odds by the likelihood ratio to get the post-test odds (second formula below).

3. Convert the post-test odds back into a probability with the third formula below.

Most diagnostic tests provide an outcome that is dichotomous for "positive" or "negative" for a given disease state or outcome/event. However, if the diagnostic test uses a continuous scale to produce diagnostic results, then researchers can generate the positive likelihood ratio for each different cut-off along the numerical continuum. There are three steps to calculating these likelihood ratios according to Bayes' Theorem:

1. Convert the pretest probability to pretest odds with the first formula below.

2. Multiply the pretest odds by the likelihood ratio to get the post-test odds (second formula below).

3. Convert the post-test odds back into a probability with the third formula below.

One of the primary benefits of using likelihood ratios with Bayes' Theorem is that they can be used to calculate the post-test probability of a disease state or outcome/event based on the results of several diagnostic tests (and their respective likelihood ratios). All one has to do is multiply the pretest probability by each likelihood ratio for each diagnostic test. Below is an example of how the post-test probability can be calculated using the likelihood ratios of two different diagnostic tests.

## Hire A Statistician - Statistical Consulting for Professionals

**DO YOU NEED TO HIRE A STATISTICIAN?**

Eric Heidel, Ph.D. will provide statistical consulting for researchers, professionals, and organizations at $100/hour. Secure checkout is available with Stripe, Venmo, Zelle, or PayPal.

- Statistical Analysis
- Research Design
- Sample Size Calculations
- Diagnostic Testing and Epidemiological Calculations
- Survey Design and Psychometrics