Controls
Presets
Parameters
Quality
Camera
Model checks
The science
The base-rate trap. A screening test is described by its sensitivity Se (the share of people with the condition who test positive) and its specificity Sp (the share of healthy people who test negative). What a patient wants to know is different: given a positive result, how likely is the condition? That is the positive predictive value, and Bayes’ rule gives PPV = Se p / (Se p + (1 − Sp)(1 − p)) for prevalence p. When the condition is rare, even a good test produces more false positives than true ones: with p = 1 %, Se = Sp = 95 % only about 16 % of positives are real. The negative predictive value NPV = Sp(1 − p) / (Sp(1 − p) + (1 − Se)p) is the mirror image.
Odds form and confirmation. Bayes’ rule is simpler in odds: posterior odds = prior odds × LR+, with the likelihood ratio LR+ = Se/(1 − Sp). A confirmatory second test with independent errors multiplies the odds again, so Se2 = Se2 and 1 − Sp2 = (1 − Sp)2; the page lets you require 1-3 positive tests. The PPV is exactly 50 % at the prevalence p* = (1 − Sp)/((1 − Sp) + Se). The number needed to screen to find one case is 1/(Se p).
Numerical checks. (1) A Monte-Carlo cohort of 400 000 people reproduces the PPV and NPV with a 4-sigma tolerance; (2) the odds form and a natural-frequency table of 109 people agree; (3) two explicitly simulated sequential tests give the PPV from Se2 and (1 − Sp)2; (4) the break-even prevalence from the closed form equals the root found by bisection.
Simplifications. Sensitivity and specificity are treated as fixed numbers for everyone (in reality they depend on disease stage and population), repeated tests are assumed to have independent errors (often untrue: the same biology can fool the same test twice), and costs, harms of overdiagnosis and the value of earlier treatment are not modelled. The 400 figures are a visual sample of the screened cohort. This is an educational probability model, not medical advice.