Tutorials › Introduction to Statistics › Bayesian Updating in Multi-Stage Screening

Conditional Probability and Bayes’ Rule · Tutorial 347 of 996

Bayesian Updating in Multi-Stage Screening

Follow a screening sequence step by step and use the relevant conditional probabilities to update disease risk after each result.

Beginner 10 min read

What You'll Learn

  • Treat the probability after one screening result as the starting probability for the next stage.
  • Apply Bayes’ rule using probabilities conditional on the screening history so far.
  • Distinguish the probability of a sequence of results from the probability of disease after those results.
  • Calculate disease probability after positive and negative results at successive stages.
  • Recognize when conditional test probabilities, rather than an independence assumption, are needed.

Why Screening Probabilities Must Be Updated in Stages

A person may receive an initial screening test and, depending on its result, a confirmatory test. The probability of disease changes as each result arrives. In particular, the probability after the first test is not the original prevalence: it is the starting probability for evaluating the next result.

The key is to condition on the complete history available at each stage. If the first result is \(A\) and the second is \(B\), the quantity of interest after both results is \(P(D\mid A,B)\), where \(D\) denotes disease. To calculate it, use the probability of the second result among people with disease who had the first result, and among people without disease who had the first result. Those conditional probabilities need not equal the test’s overall sensitivity or specificity.

Definition: In multi-stage screening, sequential Bayesian updating means using the posterior probability after one result as the prior probability for the next update. For disease event \(D\), first-stage result \(A\), and later-stage result \(B\), the update from \(P(D\mid A)\) is $$ P(D\mid A,B) = \frac{P(B\mid D,A)P(D\mid A)} {P(B\mid D,A)P(D\mid A)+P(B\mid D^c,A)P(D^c\mid A)}. $$ Here \(D^c\) means no disease. The probabilities for \(B\) are conditional on the first result \(A\); this formulation does not require assuming the two tests are independent.

How the Update Works

Let \(q=P(D\mid A)\), the disease probability after the first result. Let \(u=P(B\mid D,A)\) and \(v=P(B\mid D^c,A)\). Among people who have already had result \(A\), the probability of both disease and result \(B\) is \(uq\), while the probability of no disease and result \(B\) is \(v(1-q)\). These are the two ways to have result \(B\) after \(A\). Dividing the disease-and-\(B\) probability by the total probability of \(B\) gives the update:

$$ P(D\mid A,B) = \frac{uq}{uq+v(1-q)}. $$

This is Bayes’ rule applied within the group that had result \(A\). The denominator is essential: it includes everyone who could produce the observed next result, both people with disease and people without it. If there are several possible results at a stage, use the conditional probabilities for the particular result observed.

A tree diagram gives the same calculation. First split the population by disease status and the first result. Then, on each relevant branch, split by the next result. The joint branch probabilities for the observed sequence are multiplied along each path; the final posterior is the disease branch divided by the sum of all branches matching the observed results.

Worked Example: An Initial Positive Followed by a Negative Confirmation

Suppose a hypothetical population has disease prevalence \(0.02\). An initial screening test has sensitivity \(0.90\) and specificity \(0.95\). A person tests positive initially, then receives a confirmatory test and tests negative. For people who tested positive initially, suppose the conditional probability of a negative confirmation is \(0.04\) if they have disease and \(0.98\) if they do not. Find the disease probability after both results.

First update on the initial positive. The probability of disease and an initial positive is \(0.02(0.90)=0.018\). The probability of no disease and an initial positive is \(0.98(1-0.95)=0.049\). Thus

$$ P(D\mid A) = \frac{0.018}{0.018+0.049} = 0.2686567 \approx 0.2687. $$

So, after the initial positive, the disease probability is about \(26.87\%\). Now use that updated probability as the starting probability for the negative confirmation. Write \(B\) for a negative confirmation. The specified conditional probabilities are \(P(B\mid D,A)=0.04\) and \(P(B\mid D^c,A)=0.98\). Using the rounded first-stage probability and rounding the branch weights as shown:

$$ P(D\mid A,B) = \frac{0.04(0.2687)} {0.04(0.2687)+0.98(1-0.2687)} = \frac{0.01075}{0.01075+0.7167} \approx 0.01478. $$

After the initial positive and negative confirmation, the estimated disease probability is about \(1.478\%\) using the displayed rounded branch weights. The negative confirmation sharply reduces the risk because, in this hypothetical example, a negative result is much more likely among people without disease than among people with disease.

Updating After Different Sequences

A sequence may contain results that push risk in opposite directions. A negative result can lower the probability, while a later positive result can raise it again. The second update starts from the probability after the first result, not from the original prevalence. Also, the conditional probabilities supplied for a later result must match the history being analyzed. If the second-stage test behaves differently among people selected by an earlier positive or negative result, using its overall test rates would not be justified.

Worked Example: An Initial Negative Followed by a Positive Test

In a hypothetical setting, prevalence is \(0.05\). An initial test has sensitivity \(0.90\) and specificity \(0.95\). A person tests negative. A second test is then performed; among people with this initial negative result, suppose the second test is positive with probability \(0.80\) for those with disease and \(0.10\) for those without disease. Find the disease probability after the sequence.

An initial negative occurs with probability \(0.10\) among people with disease and \(0.95\) among those without disease. Therefore

$$ P(D\mid A) = \frac{0.05(0.10)} {0.05(0.10)+0.95(0.95)} = \frac{0.005}{0.9075} \approx 0.005510. $$

After the initial negative, the disease probability is about \(0.5510\%\). Let \(B\) denote a positive result on the second test. Applying the conditional probabilities for people with the initial negative result gives

$$ P(D\mid A,B) = \frac{0.80(0.005510)} {0.80(0.005510)+0.10(1-0.005510)} = \frac{0.004408}{0.004408+0.09945} \approx 0.04244. $$

The probability after both results is about \(4.244\%\). The second positive result raises the probability relative to the \(0.5510\%\) after the first negative. It does not restore the probability to the original \(5\%\) prevalence: both observed results remain part of the evidence.

Worked Example: Two Positive Results

Consider another hypothetical screening sequence. Prevalence is \(0.20\), and the initial test has sensitivity \(0.85\) and specificity \(0.90\). A person tests positive. Among people with that initial positive result, suppose the second test is positive with probability \(0.95\) if they have disease and \(0.05\) if they do not. Find the disease probability after both positive results.

The first positive gives

$$ P(D\mid A) = \frac{0.20(0.85)} {0.20(0.85)+0.80(1-0.90)} = \frac{0.17}{0.25} = 0.68. $$

Thus the probability after the initial positive is \(68\%\). For the second positive \(B\), use the stated conditional probabilities among people with the initial positive:

$$ P(D\mid A,B) = \frac{0.95(0.68)} {0.95(0.68)+0.05(1-0.68)} = \frac{0.646}{0.646+0.016} = \frac{0.646}{0.662} \approx 0.9758. $$

After both positive results, the disease probability is about \(97.58\%\). The second positive is strong evidence in this example because its conditional probability is much greater for people with disease than for people without disease. This interpretation depends on the specified conditional rates, not merely on the fact that two tests were positive.

Assumptions and Interpretation

A calculation is only as appropriate as its probability inputs. For the first update, prevalence and the first test’s sensitivity and specificity must describe the relevant population and test conditions. For a later update, the conditional probabilities must describe the next result among people with each disease status and the screening history already observed. In the examples, those conditional rates were stated directly. In an application, they must be justified by data or a suitable model.

Conditional independence is one possible model assumption, not a requirement of sequential updating. If a later test is conditionally independent of an earlier result given disease status, then its result probabilities conditional on disease status do not change with that earlier result. If this independence is not justified, use the probabilities conditional on the observed history, such as \(P(B\mid D,A)\). Repeating the same test can produce correlated results, so simply applying its overall sensitivity and specificity again may give an incorrect posterior.

After more than two stages, the same operation repeats. After results \(A\) and \(B\), calculate \(P(D\mid A,B)\); use that value as the starting disease probability when incorporating a third result \(C\), together with probabilities conditional on disease status and the history \(A,B\). Equivalently, multiply the appropriate conditional probabilities along each disease and no-disease path, then compare the disease path weight with the total weight for the observed sequence.

Why the Stage-by-Stage View Matters

The update separates a screening sequence into understandable steps: what the evidence established so far, and what the next result adds. This helps communicate residual risk after a negative result, assess the impact of confirmatory testing, and identify which conditional rates are needed. The final probability always refers to the complete observed history and the population model used to begin the calculation.

  • Use the posterior after the latest result as the prior for the next stage.
  • For a later test, use probabilities conditional on the history when those rates differ from overall rates.
  • Include both disease and no-disease paths matching the observed sequence in the denominator.
  • Interpret the result as a conditional disease probability under the stated model, not as certainty about an individual.

Common Mistake

A common mistake is to restart each update from the original prevalence or to treat a second test’s positive rate as the probability of disease after a positive result. The prevalence is only the starting point. Once a result is observed, it changes the probability used for the next step. Likewise, a test-result probability is not itself a posterior: Bayes’ rule compares the disease and no-disease paths that could have produced the full observed sequence.

For example, after an initial negative in the second worked example, the starting probability for the next update is about \(0.005510\), not \(0.05\). The proper denominator includes both \(0.80(0.005510)\) and \(0.10(1-0.005510)\). Using the original prevalence or omitting either branch answers a different probability question.

Key takeaway: In a multi-stage screen, update in sequence. Each posterior becomes the next stage’s starting probability, and every later likelihood must match the observed screening history.

Check Your Understanding

For each question, identify the relevant conditional probabilities before calculating or explaining the update.

  1. After a positive first test, what probability should serve as the starting disease probability for a second test?
  2. Why does the denominator in \(P(D\mid A,B)\) include a no-disease term?
  3. A second test’s overall sensitivity is known, but its result may depend on the first test result even among people with disease. Which probability is needed for updating after the first result?
  4. Explain why a positive result at the second stage can raise disease probability after an initial negative without necessarily raising it above the original prevalence.
  5. What additional conditional probabilities are needed to update after a third result \(C\), once results \(A\) and \(B\) have occurred?