Statistics Quest

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

ColumnTypeUnitSummaryDescription
hospital
Hospital
category2 levels: Hospital A, Hospital BTreating hospital (fictional).
severity
Severity
ordinal2 levels: mild, severeSeverity on admission.
patients
Patients
integerpatientsmean 250, median 250, SD 173.2, range 100–400Number of patients.
recovered
Recovered
integerpatientsmean 206.3, median 197.5, SD 145.3, range 70–360Number who recovered.
recovery_rate_pct
Recovery rate
number%mean 82.5, median 82.5, SD 11.9, range 70–95recovered ÷ 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

HospitalSeverityPatients (patients)Recovered (patients)Recovery rate (%)
Hospital Amild1009595
Hospital Asevere40030075
Hospital Bmild40036090
Hospital Bsevere1007070

Used in