Elements of fMRI Analysis — Interactive Tutorials¶
Welcome! This site provides hands-on, runnable tutorials accompanying the book Elements of Functional Magnetic Resonance Imaging by Tor D. Wager and Martin A. Lindquist.
The book is a guide for practitioners of fMRI across fields — covering the principles underlying acquisition and analysis of fMRI data, common errors and pitfalls, and emerging techniques. These tutorials turn those principles into practice: every one of the book’s 42 chapters has a companion page here, with concept summaries, worked examples in MATLAB (using CANlab tools) and Python (using nilearn and friends), thought questions for discussion, and quiz questions to check your understanding.
🧠 Learn by doing
Runnable code for every analysis concept — much of it executable right in your browser, no installation required.
🔬 Two languages
MATLAB and Python versions of exercises, side by side in tabs. Pick your language once; the whole site follows.
💭 Think it through
Every chapter ends with discussion questions and a self-quiz with click-to-reveal answers.
How the tutorials are organized¶
The tutorials follow the book’s seven parts — see the full table of contents:
Motivation — why fMRI, what it can and cannot do, imaging in society
Brain Mapping — inference about mind and brain, forward/reverse inference, valid and invalid conclusions
MRI Environment and MRI Signal — physics, BOLD physiology, resolution
Signal Processing and Analysis — preprocessing, the GLM, group analysis, multiple comparisons, meta-analysis
Experimental Design — causality, task design, power and sample size
Brain Connectivity — functional connectivity, PCA/ICA, networks, dynamic and causal models
Predictive Modeling — machine learning, training and testing models, biomarkers, AI
Start with How to use this site and the software setup guide, or jump straight to any chapter in the sidebar.
These tutorials are free to use for teaching and learning. If you use them in a course, we’d love to hear about it.
The book: Elements of Functional Magnetic Resonance Imaging — Wager & Lindquist, MIT Press