Hands-On Causal Inference with Python
Published by O'Reilly Media, Inc.
From causal questions to identifiable and robust estimation
What you’ll learn and how you can apply it
- Formulate causal questions, represent them using causal graphs, and use those graphs to diagnose confounding and identifiability assumptions
- Apply Python-based causal inference workflows to estimate causal effects from observational data under different identification strategies
- Evaluate the validity of causal conclusions in the presence of complications such as missing data and unmeasured confounding, and determine when causal claims are not warranted
Course description
Many real-world data science and machine learning problems require understanding the impact of actions, policies, or interventions. When working with observational data, standard predictive models can produce misleading conclusions if causal assumptions are not carefully considered. Causal inference provides a framework for reasoning about these questions and for making more reliable decisions from data.
Razieh Nabi introduces you to modern causal inference methods, with a particular focus on challenges you may encounter in practice, including confounding, unmeasured variables, and missing data. With guided Python demonstrations and hands-on exercises, you’ll practice translating real-world questions into causal estimands, selecting appropriate identification strategies, and evaluating when causal conclusions are—and are not—warranted. Emphasis is placed on practical reasoning about assumptions and on integrating causal thinking into everyday data analysis and machine learning workflows.
This live event is for you because...
- You’re a data scientist or machine learning practitioner.
- You’re an applied analyst working with real-world, nonexperimental data.
- You work with observational datasets in business, health, policy, or technology settings.
- You work with regression and machine learning models used for decision-making.
- You want to determine when causal methods are appropriate for a problem.
- You want to understand and apply causal reasoning using Python-based workflows.
- You want to evaluate the validity of causal claims in real-world data analysis pipelines.
Prerequisites
- Access to a Python environment for running Jupyter notebooks (e.g., Anaconda or a similar distribution)
- Familiarity with Python for data analysis
- Working knowledge of probability and regression
- An understanding of basic machine learning models
- Basic experience using Python for data analysis (e.g., pandas, NumPy)
Recommended preparation:
- Required datasets and example notebooks will be provided prior to the course, along with instructions for installing any necessary Python packages.
Recommended follow-up:
- Read Causal Inference in Python (book)
Schedule
The time frames are only estimates and may vary according to how the class is progressing.
Introduction and motivation (35 minutes)
- Presentation: What causal inference is and why prediction is not enough; examples of decision-making pitfalls with observational data; overview of course goals and structure
- Q&A
From questions to causal graphs (55 minutes)
- Presentation: Translating applied questions into causal estimands; confounding and limitations of regression-based approaches; causal directed acyclic graphs (DAGs) and assumptions
- Hands-on exercise: Construct and interpret causal graphs for an applied scenario
- Q&A
- Break
Identification and estimation of causal effects (55 minutes)
- Presentation: Identifiability and causal effect parameters; back-door and front-door reasoning; overview of estimation strategies (g-computation, weighting, doubly robust ideas)
- Demonstration: Estimating causal effects using a Python-based workflow
- Q&A
- Break
Beyond ideal assumptions (50 minutes)
- Presentation: Unmeasured confounding and sensitivity analysis; missing data as a causal problem; recognizing when causal conclusions are not warranted
- Hands-on exercise: Diagnose threats to causal validity in an applied example
- Q&A
- Break
Integrating causal reasoning into practice (45 minutes)
- Presentation: Best practices for integrating causal reasoning into real-world data analysis and ML workflows; common pitfalls and practical takeaways
- Group discussion: How can you apply causal reasoning in your own projects?
- Q&A
Your Instructor
Razieh Nabi
Razieh Nabi is an endowed Rollins Assistant Professor of Biostatistics and Bioinformatics at Emory University, with a secondary appointment in Computer Science. Her research and teaching focus on causal inference, missing data, fairness, and semiparametric methods, with applications in machine learning and public health. She has extensive experience teaching causal inference at the undergraduate and graduate levels and has delivered short courses and tutorials at major international conferences. In recognition of her teaching, she received the Departmental Distinguished Teaching Award in Spring 2023. Her instruction emphasizes connecting causal theory to practical data analysis and real-world decision-making workflows.
Skills covered
- Python
- Regression Analysis
- Anomaly Detection
- Machine Learning