A gentle introduction to causal inference

That we find out the cause of this effect,

Or rather say, the cause of this defect,

For this effect defective comes by cause.

-Hamlet by William Shakespeare

A few years back I stumbled upon the world of causality. Two things became immediately clear. First, it is a fascinating topic spanning some of the greatest scholars in philosophy, logic and statistics. Second, and most unfortunately, the literature on it tends to be a dense, uninviting tome.

The more I read, the more I realized that the central concepts are actually very simple. And beneath all the heated arguments about definitions of causality and frameworks for inferring it, the goals and principles of causal inference are one and the same. I wondered, and still wonder, why different disciplines choose to passionately accept one way of thinking about causality versus another. Especially as a computer scientist, I wondered why causal inference is not taught at all even in a graduate program, at a time when computers are affecting all walks of life.

As an outsider, I wished there was an easier way to describe the fundamentals of causal inference.

Last week I got an opportunity do just that. I gave a tutorial on causal inference at the International Conference on Computational Social Science (IC2S2). Here's my attempt at describing causal inference in an intuitive way, the way I have learnt it and the way I still understand it.

Hope this is useful. If it piques your interest, I also prepared sample code to play with recommender system data and methods for causal inference. Find it here: https://github.com/amit-sharma/causal-inference-tutorial

From prediction to causation: Causal inference in online systems from Amit Sharma