How to use this book
A/B Testing, Causal Inference, Causal Time Series Analysis, Data Science, Difference-in-Differences, Directed Acyclic Graphs, Econometrics, Impact Evaluation, Instrumental Variables, Heterogeneous Treatment Effects, Potential Outcomes, Power Analysis, Sample Size Calculation, Python and R Programming, Randomized Experiments, Regression Discontinuity, Treatment Effects
The scope and structure of this book
Wherever you work, you’ve probably faced questions like “does doing ‘this’ really cause more of ‘that’?”. And you may have realized that most learning resources on causal inference are either too academic or hard to access. That’s why I designed this book to be an approachable introduction to the topic. Here you will find the essential concepts you need to start applying causal thinking in your everyday work. The book is divided in three parts:
- Part I: Foundations. We’ll explore why data alone isn’t enough for causal questions, introducing some of the core concepts needed to reason about cause and effect. You’ll learn to spot biases and practice applying foundational ideas.
- Part II: Estimating impacts. We’ll dive into methods like randomized experiments, regression, instrumental variables, RDD, and DiD. You’ll see how to design studies, calculate power, and measure effects in different settings.
- Part III: Useful, credible estimates, and next steps. We’ll focus on ensuring your findings are actionable. You’ll learn to stress-test results (falsification), explore mechanisms, and translate statistical effects into business metrics.
And rest assured: You don’t need any advanced background to master the ideas here. Every concept is broken down step-by-step, with relatable examples. My main goal is for you to feel supported. Stay patient with yourself, let the examples sink in, and trust me. By the end, you’ll surprise yourself with how much you understand and enjoy the journey into causal thinking.
Data and code examples in Python and R
To keep things practical, this book uses the data structure you see every day: tabular data (think of it as a spreadsheet).
- Rows represent individuals (customers, users, products).
- Columns hold variables (age, purchase amount, group assignment).
- Data is synthetic, ensuring you can replicate every example yourself.
All data we’ll use are available in the repository. You can download it there or load it directly by passing the raw URL to read.csv() in R or pd.read_csv() in Python.
You can read this book without running the code, but following along with the exercises is a great way to practice. If you do, you’ll need R or Python installed. If you need a setup guide, see the “Intro” chapter of R for Data Science for R or “Preliminaries” in Python for Data Analysis for Python.
Recommended resources
While each part of this book aims to be self-contained, this is not a comprehensive statistics, machine learning, or advanced formal course in causal inference. Instead, think of this book as a friendly starting point to help you gain confidence and decide if you want to explore the field more deeply later on.
For formal courses, consult these books (green indicates freely available online):
- Intuition-first: Facure (2020), Facure (2023), Huntington-Klein (2023).
- Classic/theoretical: Cunningham (2021), Wooldridge (2015).
- Non-technical foundations: Thomke (2020), Pearl and Mackenzie (2018).
- Econometrics training: James et al. (2013) (R), James et al. (2023) (Python). Materials and videos here.
Legal notice
Copyright © 2025 by Robson Tigre. All rights reserved. You may read, share official links, and cite short excerpts of this work for learning purposes, provided you credit the source. However, you may not reproduce, redistribute, or use any part of this book (including text and code) to train AI systems without explicit permission.
This content is for educational purposes only and does not constitute professional advice. All code is provided “as is,” without warranty. The author disclaims all liability for outcomes based on this material. The full legal notice is available here.
