Statistics Quest

Population screening test

Results of a fictional community screening programme for a silent condition, using a rapid test, in 5 000 adults. Each row is one person: age group, sex, whether they truly have the condition (established later by a definitive reference test) and the rapid test result. With prevalence around 2%, sensitivity ≈0.92 and specificity ≈0.95, most positive results are false positives — the classic setting for Bayes' theorem, positive predictive value and the base-rate fallacy.

Rows
5,000
Columns
5
One row is
one screened person
Version
v1

Data dictionary

ColumnTypeUnitSummaryDescription
person_id
Person
idAnonymous participant code.
age_group
Age group
ordinal3 levels: 18-39, 40-59, 60+Age band in years.
sex
Sex
category2 levels: Female, MaleSex.
has_condition
Has condition
boolean2 levelsTrue condition status from the definitive reference test.
test_positive
Test positive
boolean2 levelsResult of the rapid screening test.

What it is good for

  • Build a 2×2 table of test result vs true condition.
  • Compute sensitivity, specificity, PPV and NPV, and explain why PPV is low when prevalence is low.
  • Apply Bayes' theorem and check it against the observed table.
  • Show how PPV changes across age groups with different prevalence.

Methods: contingency table, conditional probability, Bayes' theorem, sensitivity and specificity, predictive values, confidence interval for a proportion.

Data quality notes

  • Only about 2% have the condition, so the observed sensitivity rests on roughly 100 people and is imprecise.
  • PPV is below 30% overall even though the test is 'accurate'.
  • Fictional programme and condition; no missing values.

Provenance and licence

Age group: 18–39 (45%), 40–59 (35%), 60+ (20%). True condition ~ Bernoulli with age-specific prevalence 0.8%, 2.0%, 4.5% (≈2% overall). Test positive ~ Bernoulli(0.92) if the condition is present, Bernoulli(0.05) if absent.

Synthetic data · CC0-1.0 (synthetic data generated by Statistics Quest) · generated deterministically (seed 20241015). It does not describe real people or organisations; any resemblance is coincidental.

Preview

Dataset

Population screening test

5,000 rows · one row = one screened person · synthetic data

PersonAge groupSexHas conditionTest positive
S000118-39Malefalsefalse
S000218-39Femalefalsefalse
S000360+Femalefalsefalse
S000418-39Malefalsefalse
S000518-39Malefalsefalse
S000618-39Malefalsefalse
S000718-39Femalefalsefalse
S000840-59Malefalsefalse
S000918-39Femalefalsefalse
S001040-59Malefalsefalse
S001160+Femaletruetrue
S001260+Femalefalsefalse

Used in