Thinking out loud about statistics.
I'm Matthew Reda. I write about Bayesian modeling, causal inference and marketing measurement: notes worth sharing, things I'm building, and the bad stats I see in the wild.
Featured
-
mmm-framework 0.1.0 Is on PyPI
The first public release of mmm-framework — a Bayesian marketing-mix modeling library built on PyMC-Marketing, designed around methodological rigor instead of specification shopping. pip install mmm-framework.
-
Hello, world
Welcome to my corner of the internet. A quick note on what this blog is for.
Recent Posts
-
Did Ideology Move Candidates Off Their Polls? Date the Labels First
Commentators say moderate Democrats beat their polls and candidates further left fell short. With labels dated before the vote, 184 races of 2018 and 2022 show no gap, and labelling a dozen nominees after the result is enough to make one.
-
Population Pharmacokinetics Is a Compartment Model Inside a Hierarchy
A one-compartment drug model becomes the regression function of a hierarchical PyMC model. A worked example on theophylline shows a mirror-image posterior, what partial pooling does with two blood samples, and how the posterior ranks dosing regimens.
-
Hidden Markov Models: Marginalise the States, Then Sample What Is Left
NUTS cannot sample a sequence of discrete hidden states, so a hidden Markov model in PyMC sums them out with the forward algorithm. A worked example on 125 years of large earthquakes shows the recursion, the label-switching failure, and how weak the evidence for regimes turned out to be.
-
A Dirichlet Process Mixture Lets You Skip Choosing K, Not Defining It
A Dirichlet process mixture puts a prior on mixtures with an unbounded number of components, so nobody has to pick K. A worked example on 245 enzyme measurements shows that "the number of clusters" is then three different quantities, and the prior decides the one people usually mean.
Go deeper
The posts are the short version. These sites hold the worked examples, notes and interactive explainers behind them.
-
Bayesian Modelling in Practice
Worked examples and real-data challenges in Bayesian data analysis with PyMC, from the first prior predictive check to decisions made under uncertainty.
Open the site -
Second Brain
A structured knowledge base covering Bayesian statistics, econometrics, causal inference, and agent-based modeling.
Open the site -
Seeing vs. Doing: A Field Guide to Causal Identification
An interactive guide to DAGs, d-separation, do-calculus, causal discovery, Markov equivalence, and the trap of treating predictive models as causal.
Open the site -
Double Machine Learning
A scroll-through explainer of double/debiased machine learning with live in-browser simulations.
Open the site