A single-subject t-map answers a question about one person. Saying anything about people requires a second level, and the choice you make there decides whether your result generalises or only describes the sixteen volunteers who happened to walk into your scanner. This workbench simulates a group study end to end, runs both analyses on the same data, and then measures how often each one is wrong.
This sets the true group effect to exactly zero while leaving the between-subject variability alone, then runs 2000 complete studies, each with a freshly recruited sample. It reports how often each analysis declared a population-level effect at p < 0.05. The random-effects test should land near 5%. Watch what the fixed-effects test does, and then note how routinely its answer gets reported as though it were about people.
The two levels, and the question each one answers:
1. The first level fits the GLM inside each participant's own time series and returns one number per voxel per person, β̂i, along with the standard error attached to it. That standard error reflects scanner noise, physiology and how long you scanned: it is a statement about how precisely you measured that person. It says nothing at all about how much people differ from each other, and mistaking the one for the other is the entire subject of this demo.
2. Fixed-effects analysis pools every participant's data as though it came from one enormous subject, weighting each estimate by its precision. Its standard error reflects total scanning time across the whole study, so with sixteen people it is about four times smaller than any individual's. The catch is what it is a statistic about. Fixed effects answers: in this particular set of participants, averaged together, is the effect non-zero? That is a legitimate question, and occasionally the one you want, in a single-case study or a pilot. It is not the question anyone writing a paper thinks they are asking.
It is worth being precise about how big the error is, because the usual telling exaggerates it. The true variance of the pooled mean is σb2/N + σw2/N, while fixed effects only counts the second term, so its t is too large by a factor of √(1 + σb2/σw2). In the default scenario here that factor is about 1.7, which is not a dramatic-looking number and is exactly why the mistake survives peer review. Run the audit and you will see what a factor of 1.7 does to a tail probability: the false-positive rate goes from the claimed 5% to roughly 28%. The visible giveaway is not the t but the degrees of freedom, which fixed effects reports in the thousands because it is counting scan volumes, when the number that actually constrains a claim about people is N − 1.
3. Random-effects analysis (the summary-statistics approach used by SPM and FSL) throws away almost everything and runs a one-sample t-test on the N values of β̂i. Because the spread of those numbers already contains both sources of variation, the test automatically accounts for the fact that a new sample of people would give different numbers. Its degrees of freedom are N − 1, not the tens of thousands that fixed effects claims, and that is the honest price of a population claim. Run the audit: with no group effect at all, random effects sits at its nominal 5% and fixed effects does not, because it is confidently measuring the mean of the particular sixteen people you happened to recruit.
4. Why scanning longer stops helping. The variance of β̂i is σb2 + σw2, and only the second term falls when you scan for longer, as σw ∝ 1/√T. The Between-Subject Share readout is σb2 / (σb2 + σw2): the fraction of your group-level variance that more scanner time cannot touch. Once it passes about two-thirds, doubling every session buys you almost nothing, and the three power curves collapse onto each other. Recruiting is then the only lever you have, because group-level precision improves as √N no matter what. Push σb to zero and the opposite happens: the curves separate sharply and scanning longer becomes the efficient move.
5. What summary statistics assumes. Collapsing each participant to a single number is exactly right when the design is balanced and the first-level standard errors are similar, which is why it survives as the default. When they are not, for instance when one participant moved so much that half their run was censored, the one-sample test weights that person equally with everyone else. Proper mixed-effects tools (FSL's FLAME, SPM's ReML) carry each first-level variance up to the second level instead. Widen the within-subject spread in this simulation and compare the two summary rows in the forest plot: the fixed-effects estimate moves toward the precisely-measured participants while the random-effects estimate does not.
6. What this leaves out. One voxel, not a whole brain, so nothing here corrects for searching across space; that is the job of the Whole-Brain Thresholding demo, and in a real group analysis you need both corrections at once. The simulation also assumes every participant is drawn from one population with one variance, and assumes their first-level estimates are unbiased, which quietly presumes that registration to a common template worked. Each participant's β̂i here is a draw from the model rather than the output of an actual time-series fit: the GLM Studio shows where that number comes from.