Measurement · Experimentation · Causal Inference

Measurement, experimentation, and causal inference for product.

Paid-media measurement, A/B and causal inference case studies, the experiment-toolkit Python package, and short essays on the methods behind each one.

5
paid-media case studies
6
causal-inference case studies
1
Python package on PyPI
9
essays on the methods

Work

Each one is end-to-end, tested, and reviewable.

Five case studies on paid-media measurement: DMA-level geo lift with synthetic control, multi-touch attribution (rule-based vs Markov vs Shapley), matched-market incrementality, media-mix modeling (MAP + Bayesian), and a web-attribution deep dive that accounts for cookie loss and iOS ATT. Synthetic data, recovered ground truth, decision memos.

  • Geo lift · synthetic control
  • MTA · Markov · Shapley
  • Incrementality · conversion lift
  • MMM · adstock + Hill
  • Cookie loss · ATT

Six worked case studies covering A/B with CUPED, propensity-score methods, difference-in-differences (including Callaway-Sant'Anna), synthetic control, sequential testing, and switchback designs. Each paired with a short memo and the diagnostics that back it.

  • A/B + CUPED
  • PSM · AIPW
  • DiD · CS staggered
  • Synthetic control
  • mSPRT

experiment-toolkit

PyPI · v0.2.0

A small, typed, tested Python package. Sample size and MDE (CUPED-aware), sequential testing (mSPRT), ratio-metric delta method, staggered DiD, and observational sensitivity analysis. Each function cites the paper it implements.

  • pip install experiment-toolkit
  • numpy · scipy
  • 28 tests

SQL-first product analytics case studies. Funnels, retention cohorts, engagement segmentation, and a memo proposing a defensible north-star metric under Goodhart's law.

  • SQL-first
  • DuckDB · Spark SQL
  • Cohorts & funnels
  • NSM memo

analytics-sandbox

Reference

Eighteen SQL problems in the style of large consumer-tech interview loops. Windowed aggregations, sessionisation, retention curves, cohort funnels, with notes on pitfalls and dialect differences.

  • Window functions
  • Sessionisation
  • Retention math
  • Interview prep

Side projects

For fun — algorithms and puzzles outside the day job.

games

Play

Twelve classic and logic-puzzle browser games built with vanilla HTML, CSS, and JavaScript. Generators, solvers, daily-seed puzzles, mobile-first retro-terminal aesthetic. No frameworks, no build step.

  • 12 games
  • Constraint solvers
  • Daily puzzles
  • Play →

Writing

Short essays on the methods behind the case studies.

  1. Last-touch attribution systematically under-credits upper funnel

    The structural bias in LTA, why it compounds into budget, and what to reach for instead.

  2. Geo holdouts as paid-media A/B

    Cluster randomisation at the DMA level, synthetic control as its observational cousin, and MDE before you commit.

  3. MMM vs incrementality: what each answers and what neither does

    A measurement stack that earns credibility: MMM for allocation, geo for calibration, incrementality for campaigns.

  4. When TWFE lies: staggered rollouts and what Callaway-Sant'Anna buys you

    Why the default DiD regression is biased under staggered adoption, and what to reach for instead.

  5. E-values: a one-number sensitivity check for observational memos

    Quantifying robustness to unmeasured confounding, with Rosenbaum bounds as the matched-pair companion.

  6. CUPED inside sequential testing: two variance reductions that compound

    When and how to combine CUPED with mSPRT without breaking the always-valid guarantee.

  7. Finding (and fixing) a 17% Type-I error bug in an mSPRT implementation

    A case for property-based tests in statistical code.

  8. LaLonde, revisited: what a replication tells you about PSM, IPW, and AIPW

    What overlap, double robustness, and a known experimental benchmark look like on a classic dataset.

  9. Picking a north-star metric when every candidate has a tradeoff

    A framework for metric selection under Goodhart's law.

Contact

The projects above are the fastest way in. Open an issue and I'll see it.