Access provided by

London Metropolitan University

Intended for healthcare professionals

• To understand how Bayesian methods update knowledge by incorporation of prior knowledge into the interpretation of research findings and summaries of evidence to date

• To gain an introduction to the application of Bayes’ theorem via examples of conditional probability and clinical applications

• To stimulate an understanding and interest in the Bayesian approach among nurse researchers to ensure its wider application in nursing research

**Background** The Bayesian approach to updating scientific knowledge involves using a probability distribution to describe a prior belief concerning an outcome of interest and combines this with some new information to create a posterior probability distribution to describe the updated current knowledge.

**Aim** To introduce the application of Bayes’ theorem, using the conditional probability example of the Monty Hall problem and two examples of the clinical application of a Bayesian approach.

**Discussion** Bayesian approaches enable the incorporation of prior knowledge into the interpretation of research findings and summaries of evidence to date. Bayesian approaches are being incorporated into most clinical trials.

**Conclusion** Bayesian approaches to interpreting the results of a diagnostic test and a clinical trial highlight the utility of these approaches to clinical nursing and the application of evidence-based practice.

**Implications for practice** Stimulation of an understanding and interest in the Bayesian approach among nurse researchers should lead to its wider application in nursing research.

**Nurse Researcher**.
** doi:** 10.7748/nr.2022.e1816

This article has been subject to external double-blind peer review and checked for plagiarism using automated software

None declared

Thi Mai H, He S, Alexandrou E et al (2022) An introduction to Bayes’ theorem and examples of its application to a diagnostic test and a clinical trial. Nurse Researcher. doi: 10.7748/nr.2022.e1816

Published online: 17 February 2022

Keywords :

The Bayesian approach to updating scientific knowledge involves using a probability distribution to describe our prior belief concerning an outcome of interest and combines this with some new information to create a posterior probability distribution to describe our updated current knowledge. The application of Bayesian thinking to nursing has been discussed previously (Thompson and Martin 2017), which highlights the decision-making utility of such an approach, given the inherent uncertainty of many complex clinical problems faced by nurses. A good example of the use of the approach is to evaluate the conditional probability of an event, given the occurrence of another event.

This article aims to provide an introduction to the application of Bayes’ theorem, using the conditional probability example of the Monty Hall problem and two examples of the clinical application of a Bayesian approach: the interpretation of the outcome of a diagnosis of delirium using the confusion assessment method, and the monitoring of a clinical trial of the BNT162b2 (Pfizer) mRNA COVID-19 vaccine (Polack et al 2020), using a superiority stopping rule based on the posterior probability of a given level of effectiveness.

• Bayesian approaches to interpreting the results of a diagnostic test or a clinical trial highlight the usefulness of these approaches to clinical nursing and the application of evidence-based practice

• Bayesian approaches allow the incorporation of prior knowledge into the interpretation of research findings and summaries of evidence to date

• A Bayesian prior to posterior analysis enables the results of a clinical trial to be assessed from a sceptical or optimistic view

The ‘Monty Hall problem’ is common to most introductory undergraduate courses in probability and is a well-known example of conditional probability. It involves a hypothetical game show in which the programme’s host, Monty Hall, shows a contestant three doors: A, B and C. Behind one door is an Aston Martin One-77 worth £1.4 million, while behind the two other doors are goats worth probably a bit less than £1.4 million. The contestant initially selects door A, hoping to win the car. At this stage, Monty opens one of the doors – for example, door C – to show a goat. The contestant may now stay with their original door (A) or switch to B to try to win the car. The question posed is: given Monty opens C and reveals a goat, will staying with A or switching to B give the contestant a higher probability of winning the car?

Most initial responses consider A and B to have equal probability of being the winning choice, so there is no advantage to switching choice. However, this is incorrect, as there are two pieces of information to consider: the initial probability of the correct choice of door and the revelation that the car is not behind one of the other doors.

To examine the problem, let’s first tabulate all the possible outcomes of the Monty Hall game, based on the various possible locations of the car behind the three doors, Monty revealing a door with a goat, and the contestant staying or switching doors. Table 1 shows the various options, with ‘choice’ representing the contestant’s initial choice of door, ‘open (goat)’ meaning Monty opens this door to show a goat, ‘car’ indicating the car is behind the door, and ‘win’ or ‘lose’ being the outcome of the contestant’s decision to stay with their first choice or switch to another door. Staying with the original choice, the contestant wins three out of nine times; switching to the other door, they win twice as often: six out of nine times.

Now let’s use Bayes’ Theorem to determine *p*(*H*|*G*) – the probability of our hypothesis, H, that the car is behind door A is true, given Monty opens door C to reveal a goat (G).

$$p(H|G)=\frac{p(H)p(G|H)}{p(H)p(G|H)\text{\hspace{0.17em}}+\text{\hspace{0.17em}}p(not\text{\hspace{0.17em}}H)\text{\hspace{0.17em}}p(G|not\text{\hspace{0.17em}}H)}$$

*p*(H) is the probability the car is behind A. There is a one in three chance, as there are three doors, so *p*(H)=1/3. *p*(not H) is the probability the car is not behind A. This is 1-*p*(H), which is 2/3

Monty always opens a door with a goat. Therefore, *p* (G | H) – the probability Monty reveals a goat, given the car is behind A – and *p* (G | not H) – the probability Monty reveals a goat, given the car is not behind A – are both 1.

This gives us that:

$$p(H|G)=\frac{1/3\text{\hspace{0.17em}}*\text{\hspace{0.17em}}1}{1/3\text{\hspace{0.17em}}*\text{\hspace{0.17em}}1+2/3*\text{\hspace{0.17em}}1}=\text{\hspace{0.17em}}\frac{1/3}{1}=\text{\hspace{0.17em}}1/3.$$

Bayes’ Theorem thus confirms the probability of winning the car is 2/3 if the contestant switches door and 1/3 if they stay with their original choice.

The aim of scientific enquiry is to update our beliefs regarding an outcome of interest when new information is provided (Welton 2012). An example is if we believe a patient has a disease and we receive the result of a diagnostic test – we update our knowledge about the true status of the disease, based on that result (Welton et al 2012).

The Bayesian approach follows this logic by starting with a probability distribution to describe our prior belief concerning the outcome of interest. There are two mutually exhaustive and exclusive hypotheses to consider in the above example:

Only one can be true.

Let the prior probabilities for the two hypotheses be *p*(H_{0}) and *p*(H_{1}) respectively. As *p*(H_{0}) is the general probability of having the disease in the population, *p*(H_{1}) is 1-*p*(H_{0}).

Now we receive the results of a diagnostic test. The probabilities of receiving positive results from the test for these hypotheses are *p*(y|H_{0}) and *p*(y|H_{1}) respectively: p(y|H_{0}) is the probability the patient is diagnosed as positive using the test, given they genuinely have the disease; and p(y|H_{1}) is the probability the patient is diagnosed as positive using the test, despite not having the disease (Spiegelhalter et al 2004). These are related to two pieces of information about a test: p(y|H_{0}) corresponds to the test’s ‘sensitivity’, which is the proportion of those who have the disease who receive a positive result from the test; the test’s ‘specificity’, which is the proportion of those who do not have the disease who receive a negative result, is equal to 1-p(y|H_{1}).

Now let’s consider the example of assessing the accuracy of the confusion assessment method (CAM) to determine if someone has delirium (Inouye et al 1990). The prevalence of the disease is 30%, while CAM’s sensitivity is 0.80 (80%) and its specificity is 0.95 (95%) (Shi et al 2013). That means that of 1,000 individuals assessed with this test, 300 (30%) will have the disease, while 700 (70%) will not; of those 300 with the disease, 240 (80%) will receive a positive result, while of the 700 who do not have the disease, 665 (95%) will receive a negative result. Table 2 shows the corresponding outcomes for all situations.

We can use those values to determine CAM’s ‘positive predictive value’, *p*(H_{0}|y), which is the proportion of those who have the disease (*n*=240) out of everyone who tests positive (*n*=275): 240/275 or 87.27%.

Applying Bayes’ Theorem to produce a posterior probability for delirium given a positive result from the test also gives us:

Clinical trials assessing the superiority of an intervention often incorporate interim analysis so the researchers can stop the trial early if there is convincing evidence for the intervention’s effectiveness before the planned total sample size is completely enrolled. A common approach to stopping is based on the concept of ‘alpha spending’ (Pocock 1976). One of the disadvantages of using a traditional *p*-value as statistical evidence for superiority during repeated interim analysis of the trial data is the risk of a Type I error: mistaken rejection of the null hypothesis (the treatment has no effect) and acceptance of the alternative hypothesis (the treatment has an effect). To reduce this risk, stopping rules in alpha spending are usually based on very low *p*-values with the standard Type I error rate (*p*=0.05) used over several analyses – for example, a significance level for stopping after two interim analyses would be set at 0.0125 and would be set at 0.025 for the final analysis.

However, repeated Bayesian estimation of a posterior probability of effectiveness does not result in the risk of a Type I error. Therefore, Bayesian approaches have increasingly become the method used to monitor clinical trials (Spiegelhalter et al 1999, 2004).

For example, in the BNT162b2 (Pfizer) mRNA COVID-19 vaccine trial (Polack et al 2020), the stopping rule for superiority was based on a posterior probability of at least 99% (*p*=0.01) that the vaccine is more than 30% effective (Polack et al 2020). This approach is different to a traditional frequentist approach to a stopping rule for superiority, which is the probability of the observed results, given no treatment effect; this *p*-value could be set as low as 0.0125 at an interim analysis but repeat analysis will increase the chance of a spurious low *p*-value.

A Bayesian approach estimates the posterior probability by combining the prior data and the observed data (Spiegelhalter et al 2004). Table 3 shows the number of COVID-19 cases at least seven days following the second dose of vaccine (Polack et al 2020) among participants without evidence of prior infection.

The trial reported an overwhelming benefit in terms of preventing COVID-19 disease among the vaccine group, compared to the control. Using the values from Table 3, we can determine the ratio of the rates of clinical disease was 0.44/8.84=0.05 (95% CI: 0.025, 0.102), which gives the 95% efficacy for the vaccine that Polack et al (2020) reported.

A traditional frequentist analysis of the study’s results produces a *p*-value of less than 0.001. This is the probability of observing the results given the treatment has no effect – a rate ratio of 1. However, the posterior probability is the probability of the treatment reducing the risk of getting the disease by 30% or more, which corresponds to a rate ratio of 0.70 or less.

Figure 1 shows a Bayesian approach to combining a sceptical prior and the observed trial data – which is often referred to as a ‘prior to posterior’ analysis – from the BNT162b2 (Pfizer) mRNA COVID-19 vaccine trial in Polack et al (2020). The weighted average of the prior and trial data can be calculated using a natural logarithmic transformation of the two distributions, using inverse-variance weighting; however, in most cases, a Markov chain Monte-Carlo approach is used to estimate the posterior distribution (Spiegelhalter et al 2004).

The prior distribution is based on there being no treatment effect (a rate ratio of 1.0), with a less than 5% (*p*=0.05) chance of there being a rate ratio of 0.70. The distribution of the trial results shows a rate ratio of 0.05 (95% CI: 0.025, 0.102). The posterior distribution is the weighted mean of these two distributions – 99% of its tail corresponds to a rate ratio of 0.70 or less (a vaccine efficacy of 30%).

We have provided a brief introduction to using Bayes’ theorem to assess the results of a diagnostic test and to monitor trial results when evidence may be required to stop a trial due to overwhelming evidence of benefit before all planned participants have been included in the study. We hope this paper will stimulate interest in Bayesian thinking among nurse researchers and lead to its wider application in nursing research.

**The biology of cancer**

Cancer research is moving fast. Understanding of the biology...

**Involving service users in an inclusive research project**

This article describes how people with learning disabilities...

**Credit where it is due: clients’ contribution to academic research**

When the contributions of a group of people with autism and...

**Enhancing service users’ capacity and capability**

This article describes the implementation of an eight-week...

**The social history of learning disability**

Purple Patch Arts is an organisation based in Bradford, West...