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
| Column | Type | Unit | Summary | Description |
|---|---|---|---|---|
person_idPerson | id | Anonymous participant code. | ||
age_groupAge group | ordinal | 3 levels: 18-39, 40-59, 60+ | Age band in years. | |
sexSex | category | 2 levels: Female, Male | Sex. | |
has_conditionHas condition | boolean | 2 levels | True condition status from the definitive reference test. | |
test_positiveTest positive | boolean | 2 levels | Result 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
| Person | Age group | Sex | Has condition | Test positive |
|---|---|---|---|---|
| S0001 | 18-39 | Male | false | false |
| S0002 | 18-39 | Female | false | false |
| S0003 | 60+ | Female | false | false |
| S0004 | 18-39 | Male | false | false |
| S0005 | 18-39 | Male | false | false |
| S0006 | 18-39 | Male | false | false |
| S0007 | 18-39 | Female | false | false |
| S0008 | 40-59 | Male | false | false |
| S0009 | 18-39 | Female | false | false |
| S0010 | 40-59 | Male | false | false |
| S0011 | 60+ | Female | true | true |
| S0012 | 60+ | Female | false | false |
Used in
- Conditional probability · Probability
- Bayes' theorem · Probability
- Theory versus simulation · Probability
- Interval for a proportion · Estimation and Confidence Intervals
- Rates and proportions in public health · Applied Statistics for Professionals
- Bayesian thinking: prior, likelihood, posterior · Advanced Foundations
- Evaluating classifiers · Advanced Foundations
- Evaluating a screening programme · Case