Statistical inference can be difficult and counterintuitive. My impression is that too often people treat statistics as if it’s a kind of magic—perhaps a dark magic. For all our efforts as educators, we haven’t made satisfying progress toward helping people understand how to think about and handle data. It’s tempting to affirm results we want to believe by treating raw correlation as causation or to deny results we don’t want to believe by saying “correlation isn’t causation.” Fortunately, statisticians and economists and others who handle data have done a very good job developing the tools we need to reasonably infer causality from observational and non-experimental data.

One such economist is Cal State-Fullerton economist Nick Huntington-Klein, who has created a website that explains the technical and intuitive details behind a lot of different techniques for causal inference. His site does more than this, though: he has created short animations that allow us to very clearly visualize exactly what is going on when someone deploys a particular technique.

If you are trying to learn (or trying to teach) techniques of causal inference, Dr. Huntington-Klein’s animations will, I hope, be revelatory. He has also posted his animations on Twitter, and you can watch them below. In addition, he has generously made available all of the statistical code he has used to create the animations.

These struck me for a few reasons. First, they’re beautifully and brilliantly done, and I expect they will help generations of scholars, teachers, and students better understand exactly what is going on when they enter commands into programs like Stata and Excel or write code in R. Second, it’s an outstanding example of service to the economics profession specifically and service to the academic project more generally. In addition to these causal inference animations, Dr. Huntington-Klein has also created a lot of other economics instructional videos that I’m sure help his students at CSUF and that will, I think, be of substantial use to people looking for creative, innovative, and intuitive ways to help people master the economic way of thinking.

In addition to Huntington-Klein’s videos and animations, people interested in econometrics and statistics would also do well to consult Causal Inference: The Mixtape by Baylor University economist Scott Cunningham. It’s a $0 online book along with examples and exercises that use the popular statistics program Stata. Stata and similar programs are pricey, but resources like R are open to anyone. The kind of work that used to be possible only for people with university mainframes and armies of research assistants can now be done by just about anyone with access to a reasonably-priced computer.

At the moment, I don’t teach courses in quantitative methods. The next time I do, however, I plan to use these resources. The academy would be a better place if we followed the examples of Drs. Huntington-Klein and Cunningham and created more open resources others can use in their teaching and scholarship.