Scene 01

The Billing Black Box

Marcus recovers from a severe diabetic episode, relieved that the physical danger has passed. Then the hospital bill arrives.

Healthcare pricing is notoriously opaque. When we map out standard medical conditions like Diabetes, Asthma, and Heart Disease, the distribution of costs is astonishingly wide. A routine procedure that costs one patient a reasonable deductible can bankrupt another.

Scene 02

Where Do Shocks Happen?

Is this variance just a matter of being uninsured or not? Not entirely.

Looking at the variance matrix, we see that the nature of the admission disrupts standard pricing tiers. When patients enter through Emergency or Trauma pathways, they lose the ability to "shop around." Price transparency vanishes, and the variance in billing across all insurance networks explodes.

Scene 03

The Baseline Cost (Doubly Robust AIPW Model)

To separate correlation from causation, we deployed Augmented Inverse Probability Weighting (AIPW) — a doubly robust causal design that stays consistent if either the propensity-score model or the outcome model is correctly specified, without leaning on an instrument that has to satisfy an untestable exclusion restriction.

Comparing patients with an extended stay (11.6 more days, on average) to otherwise-similar patients without one, the model estimates a Doubly Robust Average Treatment Effect of Loading... — an implied marginal cost of roughly Loading... per additional day, squarely inside typical US acute-care inpatient benchmarks.

So if the physical days in a bed price out at a defensible, in-range daily rate, what causes the catastrophic medical bills?

Scene 04

The Unexplained Residuals

By comparing each patient's actual bill to their AIPW counterfactual — what someone with the same age, condition, severity, insurance, and admission type would typically be charged — we isolate the Residuals.

The highlighted points on this chart represent the top 1% of statistical anomalies—patients like Marcus. Their bills run far above what their observable characteristics predict. Some of this gap is legitimate: unobserved clinical severity, complications, or procedures the model can't see. But a residual this large, this consistently, on top of a doubly robust baseline is also where opaque, hard-to-justify pricing hides — the closest thing this data can show to financial toxicity.

Scene 05

A Note on Data & Governance

The dataset driving this analysis (Nicolybgs/healthcare_data via Hugging Face) is entirely synthetic. Due to HIPAA regulations and strict internal governance, the highly granular patient-level billing and diagnostic data I work with daily cannot be publicly shared.

In the real world, the distribution of costs is influenced by complex, negotiated payer-provider contracts, and the resulting narrative might look different. I built this project using synthetic data specifically to highlight my technical ability to engineer scalable cloud data pipelines, apply rigorous econometric causal inference (Doubly Robust AIPW), and translate complex actuarial outputs into human-centric, data narratives.

Loading interactive charts...