Recovery at two hospitals — summary table
The aggregated 2 × 2 × 2 table behind hospital_outcomes: for each fictional hospital and severity, the number of patients, the number recovered and the recovery rate. Four rows that are enough to discover Simpson's paradox by hand.
- Rows
- 4
- Columns
- 5
- One row is
- one hospital × severity group
- Version
- v1
Data dictionary
| Column | Type | Unit | Summary | Description |
|---|---|---|---|---|
hospitalHospital | category | 2 levels: Hospital A, Hospital B | Treating hospital (fictional). | |
severitySeverity | ordinal | 2 levels: mild, severe | Severity on admission. | |
patientsPatients | integer | patients | mean 250, median 250, SD 173.2, range 100–400 | Number of patients. |
recoveredRecovered | integer | patients | mean 206.3, median 197.5, SD 145.3, range 70–360 | Number who recovered. |
recovery_rate_pctRecovery rate | number | % | mean 82.5, median 82.5, SD 11.9, range 70–95 | recovered ÷ patients × 100. |
What it is good for
- Combine strata to get overall rates and see the reversal.
- Compute weighted averages of stratum rates with different weights.
Methods: proportions, weighted average, stratification, direct standardisation.
Data quality notes
- Aggregated data: 4 rows representing 1 000 patients.
- No missing values.
Provenance and licence
Exact counts fixed for teaching; they equal the row counts in hospital_outcomes.
Synthetic data · CC0-1.0 (synthetic data generated by Statistics Quest) · generated deterministically (seed 20241021). It does not describe real people or organisations; any resemblance is coincidental.
Preview
Dataset
Recovery at two hospitals — summary table
4 rows · one row = one hospital × severity group · synthetic data
| Hospital | Severity | Patients (patients) | Recovered (patients) | Recovery rate (%) |
|---|---|---|---|---|
| Hospital A | mild | 100 | 95 | 95 |
| Hospital A | severe | 400 | 300 | 75 |
| Hospital B | mild | 400 | 360 | 90 |
| Hospital B | severe | 100 | 70 | 70 |
Used in
- Confounding and causation · Statistical Thinking
- Simpson's paradox · Resampling and Statistical Reasoning
- Rates and proportions in public health · Applied Statistics for Professionals
- Causal inference: potential outcomes and causal diagrams · Advanced Foundations