Breast cancer
Context
“Subjectivity (Ed, i.e., the prior) is sometimes seen as a deficiency of Bayesian inference. Others regard it as a powerful advantage; it permits us to express our personal experience mathematically and combine it with data in a principled and transparent way. Bayes’s rule informs our reasoning in cases where ordinary intuition fails us or where emotion might lead us astray. We will demonstrate this power in a situation familiar to all of us.
Suppose you take a medical test to see if you have a disease, and it comes back positive. How likely is it that you have the disease? For specificity, let’s say the disease is breast cancer, and the test is a mammogram.”
Representing the problem domain as a Bayesian network
We implement this example as a causal Bayesian network, which means the arc between and represents a causal relationship.
The resulting Bayesian network in XBL format is available here:
You can also experiment with this model via the WebSimulator:
Should I worry about a positive test result?
“Suppose a forty-year-old woman gets a mammogram to check for breast cancer, and it comes back positive. The hypothesis, D (for “disease”), is that she has cancer. The evidence, T (for “test”), is the result of the mammogram. How strongly should she believe the hypothesis? Should she have surgery?” (Pearl, p. 105)
Calculating the cancer risk with BayesiaLab
- We use the probabilities described by Pearl to set the parameters of the causal Bayesian network.
- For a typical forty-year-old woman, the probability of getting breast cancer in the next year is about one in seven hundred, 0.14%. We use that as our prior.
- The sensitivity (true-positive) of a mammogram is 73%.
- The specificity (true-negative) of a mammogram is 88%.
- Use Breast Cancer - Your Prior Estimate (initial belief) in the WebSimulator to set your initial belief that a patient has breast cancer.
- When you set for as Hard Evidence, the probability of increases from 0.14% to 0.86%.
Counterintuitive results
“The conclusion is startling. I think that most forty-year-old women who have a positive mammogram would be astounded to learn that they still have less than a 1 percent chance of having breast cancer. Figure 3.3 might make the reason easier to understand: the tiny number of true positives (i.e., women with breast cancer) is overwhelmed by the number of false positives.” (Pearl, p. 106)
Should I worry now?
“However, the story would be very different if our patient had a gene that put her at high risk for breast cancer—say, a one-in-twenty chance within the next year.
For a woman in this situation, the chances that the test provides lifesaving information are much higher. That is why the task force continued recommending annual mammograms for high-risk women.
This example shows that P(disease | test) is not the same for everyone; it is context-dependent (Ed: it depends on the prior). If you know that you are at high risk for a disease to begin with, Bayes’s rule allows you to factor that information in. Or if you know that you are immune, you need not even bother with the test!” (Pearl, pp. 107-108)
Recalculating the risk
- To answer this question with BayesiaLab, you can either modify the model by setting the prior for to 5% via the Node Editor, or you can set Probabilistic Evidence via the Monitor.
- In the WebSimulator, set the input Breast Cancer - Your Prior Estimate (initial belief) to 5%.
- When you set to , the probability of increases to 24.25%.
Visualizing the impact of the prior
- To illustrate the impact of the prior (or prevalence), we added a parent node to for defining such a prior. This is what we call a “hyperparameter.”
- The updated network, including the hyperparameter, is available here:
- You can now set for as Hard Evidence.
- With this evidence set, you can use Target Mean Analysis to explore a range of values for the prior, from 0% to 100%, by selecting Menus > Analysis > Visual > Target > Target's Posterior > Curves > Total Effects.
- You will obtain a plot in which the x-axis represents the prior probability of , which is the hyperparameter.
- The y-axis represents the updated probability of given a positive mammogram result.