Bayes' Formula: A Powerful But Counterintuitive Tool For Medical Decision-Making
Bayes' Formula: A Powerful But Counterintuitive Tool For Medical Decision-Making
doi: 10.1016/j.bjae.2020.03.002
Advance Access Publication Date: 19 April 2020
208
Descargado para Anonymous User (n/a) en Universidad El Bosque de ClinicalKey.es por Elsevier en junio 02, 2020.
Para uso personal exclusivamente. No se permiten otros usos sin autorización. Copyright ©2020. Elsevier Inc. Todos los derechos reservados.
Bayes’ formula, a tool for medical decision making
probability, then obtain information from the test and thereby present is the sensitivity of the test, and is written as P(TþjDþ).
update the prior probability with a posterior probability. The probability testing negative given that the disease is ab-
sent is the specificity of the test and is written as P(TejDe).
Because no test is perfect, we also have to deal with false
Joint and conditional probability negatives and false positives. The conditional probabilities
To understand Bayes’ formula, it is important to understand associated with each of these four outcomes are shown in
the concept of conditional probability. Consider a man with a Table 1.
fever. Alarmed, he searches the internet and discovers that When testing for disease, we are interested in P(DþjTþ), the
lymphoma is a cause of fever. He reads that 99% of patients probability of having the disease given a positive test, and
with lymphoma have a fever. Should he be worried? P(DejTe), the probability of not having the disease given a
Now, consider two independent events, A and B. Let A be ‘I negative test. P(DþjTþ) is called the positive predictive value
toss a coin and get heads’, and let B be ‘I roll a die and get a six’. (PPV) and P(DejTe) is called the negative predictive value (NPV).
The probability of both events occurring is simply (Strictly speaking, P(DþjTþ) and P(DejTe) are post-test proba-
bilities, whereas PPV and NPV refer to observable numbers
PðA and BÞ ¼ PðAÞ PðBÞ; (1) from populations who are tested. However, for defined pop-
ulations, the PPV is numerically equivalent to P(DþjTþ) and the
which, in this case, is 12 1
6 ¼ 1
12z0:083z8:3%. NPV is numerically equivalent to P(DejTe).) Notice that sensi-
However, for two events that are not independent, we tivity is the inverse conditional probability to PPV and speci-
must consider conditional probabilities. Consider two events, ficity is the inverse conditional probability to NPV.
A and B, where the probability of A occurring depends (i.e. is We can substitute into Bayes’ formula to develop an
conditional) on the probability of B occurring, and vice versa. equation for the PPV:
We have the probability of A occurring given B is true, which is
written as P(AjB), and the probability of B occurring given A is P Dþ P Tþ Dþ
true, which is written as P(BjA). PPV ¼ P Dþ Tþ ¼ (4)
P Tþ
Clearly, the probabilities of having a fever and having
lymphoma are related. P(feverjlymphoma) is the probability of
where P(Dþ) is the prevalence of the disease and P(TþjDþ)
having a fever given lymphoma, which we are told is 99%.
is the sensitivity of the test. To obtain a useful version of
However, what our man really wants to know is the inverse
equation (4), we need further define P(Tþ), the probability
conditional probability: P(lymphomajfever), the probability of
of a positive test. In Table 2, we have included a term for
having lymphoma given a fever. Because lymphoma is an
disease prevalence to the conditional probabilities. From
uncommon cause of fever, P(lymphomajfever) is low. Our
Table 2,
febrile man should not be unduly worried.
Bayes’ formula can help calculate P(lymphomajfever). P Tþ ¼ P Dþ P Tþ Dþ þ PðD Þ P Tþ D (5)
However, to do so we also need to know the prior, P(lymphoma),
which is the prevalence of lymphoma. We also need to know where P(TþjDe) is the probability of a false positive test
how good a test fever is for test for lymphomadthat is, we need result, which is 1especificity of the test, and P(De) is
to know the sensitivity and specificity for fever as a test for 1eprevalence of the disease.
lymphoma. In fact, we already know the sensitivity: 99%. Combining equations (4) and (5), we have
P Dþ P Tþ Dþ
Bayes’ formula and disease testing P Dþ Tþ ¼
P D þ
P Tþ Dþ þ PðD Þ þ P Tþ D
This section is quite technical; it is acceptable to skip the
mathematics. The rule for joint probability of two events, that
(6)
holds irrespective of the events being statistically indepen-
dent is
PðA and BÞ ¼ PðBÞ PðAjBÞ ¼ PðAÞ PðBjAÞ (2) Table 1 Probability table for disease testing
If two events are independent, then P(A) does not depend on B Disease present (Dþ) Disease absent (De)
occurring (and vice versa). So, P(A)¼P(AjB) and P(B)¼P(BjA), and
equation (2) simplifies to equation (1). Ignoring the left-hand Test P(TþjDþ) P(TþjDe)
term in equation (2) and dividing through by P(B) gives us positive (Tþ) Probability of a Probability of a
positive positive
Bayes’ formula:
test given the test given the
presence absence of
PðAÞ PðBjAÞ
PðAjBÞ ¼ (3) of disease disease
PðBÞ Sensitivity 1especificity
When we test for a disease, there are four possible outcomes, Test P(TejDþ) P(TejD)
depending on whether the test is positive (Tþ) or negative (Te) negative (Te) Probability of a Probability of a
negative test negative
and whether the disease is present (Dþ) or absent (De).
given the presence test given the
Ideally, we would only have two outcomes, a positive test of disease absence of
when the disease is present (a true positive result) and a 1esensitivity disease specificity
negative test when the disease is absent (a true negative
result). The probability of testing positive given the disease is
Descargado para Anonymous User (n/a) en Universidad El Bosque de ClinicalKey.es por Elsevier en junio 02, 2020.
Para uso personal exclusivamente. No se permiten otros usos sin autorización. Copyright ©2020. Elsevier Inc. Todos los derechos reservados.
Bayes’ formula, a tool for medical decision making
Table 2 Probability table for disease testing with prior probability (prevalence) included
PPV ¼
½prevalence sensitivity
: (7)
Applying Bayes’ formula to disease testing
½prevalence sensitivity þ ½ð1 prevalenceÞ ð1 specificityÞ
Consider a rare disease with a prevalence of one in a 100,000
Using the same approach, we can develop equations for (i.e. P(Dþ)¼0.00001) for which there is an excellent test
the NPV: (sensitivity 99%, specificity 99%). From equation (7), we have
Descargado para Anonymous User (n/a) en Universidad El Bosque de ClinicalKey.es por Elsevier en junio 02, 2020.
Para uso personal exclusivamente. No se permiten otros usos sin autorización. Copyright ©2020. Elsevier Inc. Todos los derechos reservados.
Bayes’ formula, a tool for medical decision making
from age 40.1 This strategy reduces mortality from breast respectively, then applying equation (7) to the immunoassay
cancer by 39.6% and averts 11.9 deaths per 1000 women.1 test, we have
These figures are in keeping with the (relatively) high
sensitivity and specificity of mammography of 87% and 0:01 0:90
PPV ¼
89%, respectively.2 Assuming a prevalence of breast can- 0:01 0:90 þ ð1 0:01Þ ð1 0:40Þ
cer of 0.01 (1%), we can substitute into equation (7) to 0:009
¼ z0:015:
obtain the PPV: 0:009 þ 0:594
0:01 0:87 Thus, the PPV of the immunoassay is only 1.5%. So, a
PPV ¼ randomly selected cardiac surgical patient who has a positive
0:01 0:87 þ ð1 0:01Þ ð1 0:89Þ
test is highly unlikely to have HIT.
0:0087
¼ z0:07: One way to improve the PPV for the immunoassay is to
0:0087 þ 0:1089
increase the pre-test probability. The 4T test is a simple clin-
Thus, the probability that a randomly selected, asymptomatic ical tool to evaluate the pre-test probability, based on the
woman who has a positive mammogram actually has breast timing and severity of the thrombocytopenia and the pres-
cancer is about 7%. Thus, even for a good screening test for a ence of other causes of low platelets.4 Each parameter is
common cancer, a woman who tests positive is much more scored 0, 1, or 2, with a total score of 6e8 indicating a pre-test
likely to not have cancer than to have cancer. Similarly, we probability of HIT of around 50%. Substituting this revised
can use equation (9) to calculate the NPV: prior probability of 0.5 into equation (7), we have:
Descargado para Anonymous User (n/a) en Universidad El Bosque de ClinicalKey.es por Elsevier en junio 02, 2020.
Para uso personal exclusivamente. No se permiten otros usos sin autorización. Copyright ©2020. Elsevier Inc. Todos los derechos reservados.
Bayes’ formula, a tool for medical decision making
The second insight relates to the probability that the wrong Bayesian statistical analysis
conclusion is drawn when a ‘statistically significant’ test
Bayesian inference can be used as an alternative to standard
result is obtained. It is a common error to assume that because
statistical analysis, described in the previous section. With the
alpha is 0.05, there is a 5% chance that the study hypothesis is
Bayesian approach, data (samples) are obtained and used to
false when a statistical test is positive. In fact, the probability
update a prior probability with a posterior probability. Typi-
the study hypothesis is false given a positive statistical test is
cally, the prior probabilities of two competing hypotheses (H1
typically much higher than 5%.
and H0) are compared using the odds ratio form of Bayes’
Alpha is the probability of a positive test (i.e. P0.05) given
formula:
the null hypothesis is true, which as a conditional probability is
P(TþjH0). Alpha is also the probability of a type I statistical error.
PðH1 jDÞ PðH1 Þ PðDjH1 Þ
Alpha relates to the test, and is analogous to 1especificity. It ¼ (14)
PðH0 jDÞ PðH0 Þ PðDjH0 Þ
tells us nothing about the hypothesis. If we are interested in the
probability the study hypothesis is false (i.e. the null hypoth-
where H is the hypothesis and D is the data (i.e. the find-
esis is true) given a positive test, we need to know P(H0jTþ), not
ings of the study). The left-hand term in equation (14) is
alpha. P(H0jTþ) is called the false positive risk (FPR).6 The FPR is
the posterior odds, which is the probability H1 is true given
a probability concerning the hypothesis. Notice that alpha and
the data divided by the probability H0 is true given the
the FPR are inverse conditional probabilities.
data. The first term on the right-hand side is the prior odds
We can use Bayes’ formula to calculate the FPR. (The
of H1 relative to H0, which is the prior probability H1 is true
derivation of equation (13) from Bayes’ formula is somewhat
divided by the prior probability H0 is true. The second term
technical. Interested readers are referred to Sidebotham for a
on the right hand-hand side is the likelihood ratio, which
full explanation.7):
is the probability of the data given H1 is true divided by the
probability of the data given that H0 is true.
Suppose a researcher decides, based on previous research,
½ð1 priorÞ alpha that P(H0)¼0.4 and P(H1)¼0.5, then the prior odds are:
FPR ¼ (13)
½ð1 priorÞ alpha þ ½prior power
0:5
Looking at equation (13), we see that to calculate the FPR we ¼ 1:25:
0:4
need to know alpha, power, and the prior probability the study
Once the study has been performed and the likelihood
hypothesis is true (the ‘prior’). Power is P(TþjH1), the proba-
ratio calculated, the posterior odds might increase to, say, 4.
bility of a positive test given the study hypothesis is true, and
This means that H1 predicts the data four times better than H0.
is analogous to sensitivity. Power is also 1ebeta. Beta is
Notice that unlike standard hypothesis testing, the Bayesian
P(TejH1), the probability of a negative test given the study
approach does not produce a binary outcome (positive or
hypothesis is true, and is analogous to 1esensitivity. Beta is
negative result). The reader decides if the posterior odds are
also the probability of a type II statistical error.
sufficiently high to adopt or abandon the treatment. There are
An alpha of 0.05 and power of 0.8 (beta 0.2) are reported
two main advantages of the Bayesian approach. First,
in virtually all medical research. If we assume the prior
compared with standard statistics, no preference is given to
probability of investigating a true hypothesis is 0.5 (50%), and
the null hypothesis. Second, the prior odds are updated
we use standard values for power (0.8) and alpha (0.05), then
continuously as further data are published. Thus, the
we have
Bayesian approach can be considered a dynamic process that
evolves over time. The main disadvantage of the Bayesian
approach is that in some circumstances the likelihood ratio is
ð1 0:5Þ 0:05 0:025 very complicated to calculate.
FPR ¼ ¼ z0:06
ð1 0:5Þ 0:05 þ 0:5 0:8 0:025 þ 0:4
Thus, the FPR is about 6%. However, this result assumes power
Bayesian interpretation of the EOLIA trial
is 0.8. In fact, the actual power of published studies is often
much less than the reported power of 0.8, particularly for small In 2018, the ECMO to Rescue Lung Injury in Severe ARDS (EOLIA)
discovery-orientated trials.7 Also, for a discovery-orientated trial was published in the New England Journal of Medicine, in
trial, investigating a ‘long shot’ hypothesis, the prior might which patients with acute respiratory distress syndrome
be much lower than 50%. Both of these effects (low power, low (ARDS) were randomised to either extracorporeal membrane
prior) dramatically increase the FPR. For instance, the prior is oxygenation (ECMO) or conventional treatment.10 EOLIA was a
0.2 and power is 0.2 (alpha 0.05), we have ‘negative’ trial, with 44/124 (35%) deaths in the ECMO group and
57/125 (45%) deaths in the control group (P¼0.09). However, a
previously published RCT11 was (weakly) positive for ECMO.11
ð1 0:2Þ 0:05 0:04 Other non-randomised data also indicated a benefit for
FPR ¼ ¼ ¼ 0:50 ECMO.12 Thus, the prior probability of a benefit for ECMO at the
ð1e0:2Þ 0:05 þ 0:2 0:2 0:04 þ 0:04
time EOLIA was published was greater than 0.5.
So, in this situation, the FPR is 50%. That is to say, there is a In 2019, Goligher and colleagues performed a Bayesian
50% probability that the study hypothesis is false (i.e. the null analysis of the EOLIA data, in which they assigned various
hypothesis is true) despite a statistically significant test result. priors to a beneficial effect of ECMO.13 They then calculated
Small, discovery-orientated RCTs commonly have an FPR the posterior probabilities for different outcomes. Using a
greater than 50%, despite using an alpha value of 5%.7,8 This ‘strongly enthusiastic prior’ the authors calculated a posterior
type of analysis is the basis of John Ioannidis’ famous paper, probability of 0.95 (odds of 19) of a 4% absolute mortality
‘Why most published research findings are false’.9 reduction for EMCO and a probability of 0.65 (odds of 1.8) of a
Descargado para Anonymous User (n/a) en Universidad El Bosque de ClinicalKey.es por Elsevier en junio 02, 2020.
Para uso personal exclusivamente. No se permiten otros usos sin autorización. Copyright ©2020. Elsevier Inc. Todos los derechos reservados.
Bayes’ formula, a tool for medical decision making
10% absolute mortality reduction for ECMO. Thus, using a cancer Randomized Trial (J-START): a randomised
Bayesian approach, the authors found a clinically important controlled trial. Lancet 2016; 387: 341e8
survival advantage for ECMO, despite the fact that with 4. Joseph J, Rabbolini D, Enjeti AK et al. Diagnosis and
standard statistical testing the trial was negative. management of heparin-induced thrombocytopenia: a
consensus statement from the Thrombosis and Haemo-
stasis Society of Australia and New Zealand HIT writing
Conclusions group. Med J Aust 2019; 210: 509e16
Not all the material covered here is easy to follow on first 5. Favaloro EJ, McCaughan G, Pasalic L. Clinical and labora-
reading, and the terminology can be confusing. However, tory diagnosis of heparin induced thrombocytopenia: an
Bayes’ formula provides a deep understanding the uncer- update. Pathology 2017; 49: 346e55
tainty inherent in the practice of medicine, and so we believe 6. Colquhoun D. The false positive risk: a proposal concern-
the effort to understand the principlesdif not every equa- ing what to do about p-values. Am Stat 2019; 73: 192e201
tiondis worth it. 7. Sidebotham D. Are most randomised trials in anaesthesia
For readers interested in developing their knowledge and critical care wrong? An explanation using Bayes’
further, we recommend two short books, one on Bayesian formula. Anaesthesia 7 April 2020. https://doi.org/10.1111/
inference and the other on medical-decision making.14,15 We anae.15029
also recommend two previous articles published in BJA Edu- 8. Colquhoun D. An investigation of the false discovery rate
cation, addressing clinical testing16 and hypothesis testing.16,17 and the misinterpretation of p-values. R Soc Open Sci 2014;
An analysis of hypothesis testing using Bayes’ formula is the 1: 140216
subject of a separate review by one of the authors.7 9. Ioannidis JP. Why most published research findings are
false. PLoS Med 2005; 2: e124
10. Combes A, Hajage D, Capellier G et al. Extracorporeal
Declaration of interests membrane oxygenation for severe acute respiratory
distress syndrome. N Engl J Med 2018; 378: 1965e75
The authors declare that they have no conflicts of interest.
11. Peek GJ, Mugford M, Tiruvoipati R et al. Efficacy and eco-
nomic assessment of conventional ventilatory support
MCQs versus extracorporeal membrane oxygenation for severe
adult respiratory failure (CESAR): a multicentre rando-
The associated MCQs (to support CME/CPD activity) will be
mised controlled trial. Lancet 2009; 374: 1351e63
accessible at www.bjaed.org/cme/home by subscribers to BJA
12. Davies A, Jones D, Bailey M et al. Extracorporeal mem-
Education.
brane oxygenation for 2009 influenza A(H1N1) acute res-
piratory distress syndrome. JAMA 2009; 302: 1888e95
13. Goligher EC, Tomlinson G, Hajage D et al. Extracorporeal
References
membrane oxygenation for severe acute respiratory
1. Monticciolo DL, Newell MS, Hendrick RE et al. Breast distress syndrome and posterior probability of mortality
cancer screening for average-risk women: recommenda- benefit in a post hoc Bayesian analysis of a randomized
tions from the ACR Commission on Breast imaging. J Am clinical trial. JAMA 2018; 320: 2251e9
Coll Radiol 2017; 14: 1137e43 14. Stone J. Bayes’ rule: a tutorial introduction to bayesian anal-
2. Lehman CD, Arao RF, Sprague BL et al. National perfor- ysis. Lexington, KY: Sebtel Press; 2013
mance benchmarks for modern screening digital 15. Sox HC, Higgins MC, Owens KO. Medical decision making.
mammography: update from the Breast cancer surveil- Chichester, UK: Wiley-Blackwell; 2013
lance consortium. Radiology 2017; 283: 49e58 16. Lalkhen AG, McCluskey A. Clinical tests: sensitivity and
3. Ohuchi N, Suzuki A, Sobue T et al. Sensitivity and speci- specificity. Contin Educ Anaesth Crit Care Pain 2008; 8: 221e3
ficity of mammography and adjunctive ultrasonography 17. Walker J. Hypothesis tests. BJA Educ 2019; 19: 227e31
to screen for breast cancer in the Japan Strategic Anti-
Descargado para Anonymous User (n/a) en Universidad El Bosque de ClinicalKey.es por Elsevier en junio 02, 2020.
Para uso personal exclusivamente. No se permiten otros usos sin autorización. Copyright ©2020. Elsevier Inc. Todos los derechos reservados.