Posts
Deriving Gradient Boosting from a Single Decision Tree
From the best constant to one tree to boosting: what a gradient means for a function, the second-order leaf and split score, and what separates XGBoost, LightGBM and CatBoost.
Endogeneity in Media Mix Models: Why a Budget Is Not an Experiment
Why a media mix model can credit advertising with demand that was coming anyway: endogeneity derived from a covariance identity, three ways it arises, and what controls and instruments repair.
Deriving Matching and Difference-in-Differences from Potential Outcomes
Potential outcomes, causal graphs, matching for the effect on the treated and difference-in-differences, derived from the missing half of every customer, with a playbook and two worked cases.
A/B Tests and Quasi-Experiments from First Principles
A coin flip, a pre-test covariate, a nudge, a cutoff and a before-and-after comparison, derived from potential outcomes with one trick: subtract what the groups share, divide by how far the design moved the treatment.
Deriving the Distributions from a Coffee Shop, Part 1: The Customers
One shop, one coin and one clock: binomial, Poisson, exponential, gamma, beta and negative binomial derived from them, then used to decide how many baristas to staff and how many croissants to bake.
Deriving the Distributions from a Coffee Shop, Part 2: The Money
The normal, lognormal and compound Poisson from sums, products and random counts of baskets, and the range for tomorrow's revenue.
Deriving the Distributions from a Coffee Shop, Part 3: The Promotion
What a discount does to the clock, the coin, the queue and the margin, and what a short trial says about whether it pays.
Deriving the Prior-Data Fitted Network
From Bayesian prediction to tabular in-context learning, Do-PFN, and time-series forecasting. With figures you can move.