ΨPsychology, Built

Act X · When Minds Suffer

Part 43 of 62

The Replication

Psych 101 and the majorstarts at this level27 min of film17 chaptersprerequisites: none

Can you run a study that deserves to be believed?

The degree ends with a project: two classic effects replicated properly, on screen, with every tool the series has built. Verbal overshadowing, expected to hold, and ego depletion, in doubt, are re-analysed from the open lab-level data of their registered multi-lab replications; the viewer takes part in a third study, the Stroop task. The part chooses its targets, defines a direct replication, sets the smallest effect of interest, computes power and the small-telescopes benchmark, writes the preregistration as code and runs it on simulated labs, builds the experiment, asks for consent, runs the confirmatory analyses exactly as planned, applies three registered criteria and a replication Bayes factor, explores a labelled multiverse, and writes the report; then it looks back on the Ledger and the degree.

What you need. Parts 2 to 4 (the experiment, measurement and the false-positive lab) and Part 42's meta-analysis; the normal and t distributions, and simple numerical root finding.

Hook
one classic effect, run again
Ideas, models and mathematics
a registered replication from choice of target to report: power, preregistration, materials, exclusion rules, analysis, the write-up
Psyche gains
the capstone report
On you
take part in the replication

What you will be able to do

Psych 101 and the major

  • Choose a replication target and say what makes a replication direct.
  • Justify a sample size from the smallest effect of interest, and compute d33.
  • Run a registered confirmatory analysis and judge it by registered criteria.

Graduate

  • Write a preregistration as code and test it on simulated data before the real data.
  • Compute a replication Bayes factor and explain when the criteria disagree.
  • Build a small multiverse and label it as exploratory.

Research

  • Argue what a failed replication licenses, and design a test of a proposed hidden moderator.

Practice

  • Apply the workflow to a product experiment: metric, smallest effect, sample size and analysis fixed before launch.

Contents

Each chapter has a home level. Choose a track to see what to read and watch: Psych 101 and the major 24 min · Graduate 26 min · Research 27 min · Practice 26 min.

  1. 0The projectPsych 101 and the major3 min
  2. 1On you: colour words, and four predictionsPsych 101 and the major1 min
  3. 2What counts as the same studyPsych 101 and the major2 min
  4. 3How big, and how many?Psych 101 and the major2 min
  5. 4The plan, written as codePsych 101 and the major2 min
  6. 5Building the experimentPsych 101 and the major1 min
  7. 6Consent, and what participants are toldPsych 101 and the major1 min
  8. 7The dataPsych 101 and the major1 min
  9. 8The confirmatory analysisPsych 101 and the major2 min
  10. 9Was it a replication?Psych 101 and the major2 min
  11. 10Exploratory, and labelledPsych 101 and the major1 min
  12. 11The reportPsych 101 and the major2 min
  13. 12The degreePsych 101 and the major1 min
  14. 13The LedgerPsych 101 and the major
  15. 14In practice: decide before the dataPractice1 min
  16. 15Frontier: what a failure licensesResearch1 min
  17. Recap, problems, and the road aheadAll tracks3 min

Also on this page: Lecture · Key results · Try it · Lab · Problems · Notes and sources · Build the film.

Lecture

The text of each chapter is the film's narration, as it is spoken, so you can read along or revise without the film. The pictures are in the film. A dashed box stands for a number the film computes when it is rendered (hover over it to see what is computed); the README's figures for each chapter, where it lists them, follow the chapter's text.

The projectPsych 101 and the major3 min

A degree ends with a project. Forty-two parts have built a model subject, a laboratory, a measurement library, a false-positive lab, and a Ledger of findings. A degree ends the way research begins: with one study, done properly, from the choice of target to the report. This part replicates two classic effects, on screen, with every tool the series has built. The plan is written down before the data are read, and the narration of the results is computed from them.

Where to start? Four rows of the Ledger are marked not directly tested. The fear bridge of Part 29 is one: men who met a woman on a frightening bridge were said to be more attracted to her. A good target is important, genuinely uncertain, and feasible. A frightening bridge, and an interviewer to fall for, are hard to standardize across laboratories, so it's left for someone with a bridge.

So two targets are chosen. One expected to hold: verbal overshadowing, from Part 21. Describing a face you've just seen makes you worse at picking it out of a line-up. And one in doubt: ego depletion, from Part 28. A demanding task leaves less self-control for the next one. Both have open, lab-by-lab data from registered multi-lab replications, so the numbers in this film are real and fixed. And you can take part in a third, on the course site: the Stroop task, whose effect no one doubts.

So this part asks whether you can run a study that deserves to be believed. What counts as the same study, and how many people it needs. The plan, written as code and tested on simulated data. The experiment, the ethics, and the data. And then the confirmatory test, the verdict, the exploration, and the report.

This is Part 43 of Psychology, Built: the replication. We'll choose a target, and say what makes a replication direct. We'll set the smallest effect of interest, compute power, and meet the small telescopes. We'll write the preregistration as code, and run it on simulated data first. We'll build the experiment, ask for consent, and read open multi-lab data. We'll run the confirmatory analysis, with three criteria and a Bayes factor. And we'll explore, labelled as such, write the report, and look back on the degree.

What it does: The degree ends with a project; a row never tested; two targets; the question; objectives

1On you: colour words, and four predictionsPsych 101 and the major1 min

First, try this. Name the colours of the ink, as fast as you can, not the words. Now these. The second row is slower for nearly everyone. It's the Stroop effect, from 1935, replicated thousands of times. On the course site you can run it on yourself, as a participant in this part's third study.

Now four predictions to write down before the part answers them. One: describing a face before a line-up. Will twenty-two labs find fewer correct picks, and how many fewer per hundred people? Two: a demanding task, then a test of self-control. Will twenty-three labs find ego depletion? Three: how many people per group does a single study need for ninety-five percent power to detect an effect of zero point one? And four: the ego-depletion study the replication was based on had twenty-three and twenty-four people. What was its power for an effect of zero point two? Pause here, and write them down.

What it does: The Stroop effect; four predictions

2What counts as the same studyPsych 101 and the major2 min

What counts as the same study? A direct replication repeats the procedure, the materials and the analysis in a new sample. It tests whether the finding was real. A conceptual replication tests the same idea another way. It asks whether the idea is general, but a failure is easy to explain away. In 2014 Mark Brandt and colleagues wrote a recipe for a convincing replication: define the effect, follow the original closely, get high power, report everything, and compare with the original. In 2018 Rolf Zwaan and colleagues argued for making replication mainstream, and answered the objections that replications are pointless, or hostile.

Both replications followed fixed protocols, written with the original authors. Verbal overshadowing: a film of a robbery, then twenty minutes of a filler task, then five minutes describing the robber's face, or listing countries and their capitals, and then a line-up. A first version, with the description straight after the film, had changed the order of the original study by mistake, and became a second report. Ego depletion: cross out every letter e in a text, with or without demanding extra rules, and then a conflict task, where the variability of response times measures self-control. Its protocol followed a single earlier study, chosen because a computer could run it identically in every lab.

What it does: Direct and conceptual replication; the two protocols

3How big, and how many?Psych 101 and the major2 min

How big an effect should the study be able to see? In 2022 Daniel Lakens argued that a sample size should be justified by the smallest effect that would matter, not by the effect you hope for. For ego depletion, the plan sets that at zero point one. A smaller effect wouldn't matter in practice. A single study would need about two thousand six hundred people per group for ninety-five percent power at it. Only many labs together come close. And the study the protocol followed, with twenty-three and twenty-four people, had only about ten percent power, even for an effect twice that size.

A second benchmark comes from astronomy. In 2015 Uri Simonsohn pointed out that a replication can't prove an effect is zero. But it can show the effect is too small for the original study to have seen. Call d thirty-three the effect the original study had a one-in-three chance to detect. If a replication rules out effects that large, the original telescope was too small to see what it claimed. For ego depletion's original, with twenty-three and twenty-four people, d thirty-three is about zero point four six. For verbal overshadowing's original, with forty-four people in each group, it's about sixteen fewer correct picks per hundred people.

Power is a curve, so draw it. The original depletion study had about ten percent power for an effect of zero point two, and needed an effect near zero point seven five for the usual eighty percent. So a significant result from it was always likely to overstate the effect: the winner's curse of Part 4. Pooled across its labs, the replication has good power down to effects of about zero point one five. For zero point one, one study would need two thousand six hundred people per group. Power is a curve, not a number. Always say which effect it's for.

What it does: The smallest effect of interest and power; small telescopes; power as a curve

4The plan, written as codePsych 101 and the major2 min

Next, the plan. Here it is, as code: the hypothesis, the outcome, its direction, the smallest effect of interest, the exclusion rule and the estimator, written down before the data are read. The three criteria for calling the result a replication are fixed in advance too, so the verdict can't be chosen afterwards. A registered report goes further. The journal accepts the plan, and publishes whatever it finds.

Before any real data, the plan is run on simulated data. Psyche simulates twenty-three labs, of forty-six people per group, two hundred times for each true effect, and runs the frozen analysis on each. With no effect, about one run in twenty comes out significant: the planned false-positive rate. At the smallest effect of interest, about seven runs in ten. At the original effect, every run. So the code runs, the error rates are what was promised, and any bug is found before it could be tempted to help.

Each line of the plan closes a fork in the garden of Part 4. The outcome: one primary measure, named, and the others listed as secondary. The direction, so the test is one-sided by plan, not by convenience. The exclusions: which people and which labs are dropped, by rules written before the data. The estimator, with its software and settings. The verdict: three criteria and a Bayes factor, with what each result would mean. And deviations: anything that had to change is reported as a change, with its reason.

What it does: Preregistration; a dry run before any real data; every fork closed in advance

5Building the experimentPsych 101 and the major1 min

Building the experiment means writing down every trial. For the Stroop task on the site: a fixation cross, a colour word that stays until a key is pressed, and brief feedback. Every timing is fixed in advance. Counterbalancing: congruent and incongruent trials in a random order, each colour used equally often as a word and as an ink, and the response keys swapped across participants. And the fixation lasts a random time, so no one can respond to the rhythm instead of the word. That's Part 1's foreperiod.

Checks are built in. Attention checks: an occasional trial with an obvious answer, and the rule for excluding people who miss them is fixed in advance. Timing: a browser's clock and screen add delay and jitter. Validate them with a light sensor on the screen, or a known stimulus, as Part 1 did. A pilot: run the whole pipeline on a few people to find the bugs, and set their data aside. And the experiment, its code and its materials are shared, so that anyone can run the same study.

What it does: The trial strip; checks built in

6Consent, and what participants are toldPsych 101 and the major1 min

Before anyone takes part. An ethics committee approves the protocol: its risks, its benefits, and who may take part. Consent: what will happen, how long it takes, that a person may stop at any time, and what's done with the data. What isn't said: the hypothesis is usually withheld, since knowing it changes behaviour, Part 2's demand effects. Withholding isn't lying. Debriefing: afterwards, the purpose is explained, and any deception undone. And the data: stored without names, and shared only as consent allows. This course's site stores and sends nothing at all.

Here's what consent looks like for this part's own study, the Stroop task on the course site. What will happen, and how long it takes. What to do, and that you may stop at any time, with nothing lost. What happens to the data: here, nothing leaves your browser. And a promise of a debriefing: what the task measures, and what one person's result can and can't say.

What it does: Before anyone takes part; the site's consent screen

7The dataPsych 101 and the major1 min

The film can't collect its own data, so it uses two registered multi-lab replications whose data are open. Verbal overshadowing: twenty-two laboratories, about two thousand people, each lab's difference in correct line-up picks between those who described the face and those who didn't. Ego depletion: twenty-three laboratories, about two thousand one hundred people, each lab's standardized difference in self-control after the demanding or the easy task. Each line is one laboratory, with its interval. The data are fetched from the archive, checked on first use, and fixed. The plan was written before this chapter.

Look at the labs themselves. They ranged from about fifty to about one hundred and eighty people each. Every one was larger than either original study. Each ran the same protocol, in its own language and setting, with its own experimenters. Pooling weights each lab by its precision, so no lab's result alone decides. And the variation between labs is a finding in itself: how far an effect travels.

What it does: Two registered multi-lab replications; forty-five laboratories, lab by lab

8The confirmatory analysisPsych 101 and the major2 min

Verbal overshadowing first. As registered: random-effects pooling of each lab's difference in correct picks, a one-sided test, and every lab that ran the protocol. The result: people who described the face made fewer correct picks per hundred, with an interval from to . That's . The original study found fewer per hundred, with forty-four people in each group.

Now ego depletion. As registered: random-effects pooling of each lab's standardized difference, a one-sided test, and every lab that ran the protocol. The result: an effect of , with an interval from to . That's . The study the protocol followed found , with twenty-three and twenty-four people.

One more question for the confirmatory analysis: how much do the labs differ? The random-effects model lets each lab have its own true effect, spread with a standard deviation tau. For verbal overshadowing, tau is estimated at zero. The labs differ no more than chance would make them. For ego depletion, there's some spread, around an average near zero. So a prediction interval for one new lab's result runs from about minus zero point three to plus zero point three five. A single lab could find either sign. The hidden-moderator objection, in chapter fifteen, needs exactly this number to be large.

What it does: Verbal overshadowing; ego depletion; how much the labs differ

9Was it a replication?Psych 101 and the major2 min

Was it a replication? The plan fixed three questions in advance. Significance: is the pooled effect significant in the predicted direction? Consistency: does the replication's interval contain the original estimate? Small telescopes: does the interval reach d thirty-three, the effect the original could have seen? And a fourth, from Josine Verhagen and Eric-Jan Wagenmakers in 2014: the replication Bayes factor, which weighs the new data under the original's estimate against no effect at all. The three can disagree. An effect can be real, and smaller than first reported.

Here's the verdict. Verbal overshadowing meets of the three criteria. The effect is significant, but smaller than the original's, whose estimate falls outside the interval. The Bayes factor: . Ego depletion meets of the three. The interval stops short of the effect the original study could have seen. The Bayes factor: . So one effect replicated, smaller than reported, and one did not.

One more thing the plan fixed in advance: what each possible result would mean. Significant, with the original estimate inside the interval: replicated, about as large as reported. Significant, with the original above the interval: replicated, smaller. That's verbal overshadowing. Not significant, with an interval that excludes the effect the original could have seen: failed. That's ego depletion. And not significant, with an interval that includes it: inconclusive. The study couldn't tell. Because the table was written before the data, the verdict was a lookup, not a judgment made after seeing the result.

What it does: Three questions and a fourth; the verdict; what each result would have meant

10Exploratory, and labelledPsych 101 and the major1 min

After the confirmatory test, exploration is allowed, as long as it's labelled. Exploratory analyses suggest; they don't test. Here is a small multiverse for ego depletion: every combination of estimator, exclusion rule and subset of labs, shown at once. In the English-speaking labs, the estimate rises to between and . That's a hypothesis for a new registered study, not a finding. Eight forks are already the start of Part 4's garden.

Why label it? Psyche runs the whole replication three hundred times, with no effect at all. The planned analysis comes out significant in about four percent of runs: the promised five, within noise. But let an analyst choose afterwards among fourteen defensible analyses, and something comes out significant about twelve percent of the time. That's why the multiverse is labelled exploratory. Its best result is a hypothesis for the next study.

What it does: A small multiverse; the garden, simulated

11The reportPsych 101 and the major2 min

Last, the report. A registered report comes in two stages. In stage one, the introduction, methods, planned analysis and power are reviewed and accepted before the data exist. In stage two come the results as registered, any deviations listed, a labelled exploratory section, and links to the data and code. Chris Chambers and Loukia Tzavella reviewed the format's first decade in 2022. Here's the abstract this part would write. In twenty-two laboratories, describing a face reduced correct line-up identifications by per hundred, a smaller effect than first reported. In twenty-three laboratories, the depletion manipulation had no detectable effect on self-control, and effects as large as the original's were ruled out. Both analyses were registered in advance, and the data and code are open.

Before the report is sent, a last check. Deviations: every change from the plan, with its reason and its effect on the result. Everything: every registered outcome reported, including the dull ones. Labels: exploratory results marked as exploratory, in the text and in the abstract. Open: data, code and materials linked, with a frozen version that reproduces every number. This part's own code does that. Who did what: each author's contribution, and any conflict of interest. And limits: what the study can't say, about its population, its setting and its measures.

What it does: A registered report; before it is sent

12The degreePsych 101 and the major1 min

Look back at the degree. The Ledger now holds findings, each with its original study, its record and its sources. hold, some smaller than first reported, or misremembered in the textbooks. are argued. failed, or were withdrawn. The failures cluster where Part 4 predicted: small samples, flexible analyses, and surprising claims.

And the map. Acts One to Ten were the undergraduate degree, from Kant's wager to the evidence for therapy. Act Eleven is the graduate toolkit: latent variables, item response theory, scaling, people over time, models of behaviour and of the brain's data, and the weight of evidence. Act Twelve is psychology at work: human factors, design, organizations, learning, behaviour change, law and health. And Act Thirteen is the frontier: the predictive brain, computational psychiatry, minds and machines, and a dissertation.

What it does: The Ledger so far; the map

13The LedgerPsych 101 and the major

And the two targets. Verbal overshadowing, Part 21's row: this part's estimate agrees with its status, replicated, and smaller. Ego depletion, Part 28's row: this part's estimate agrees with its status, failed. And the Stroop effect, Part 18's row: your own run, on the site, joins the thousands that hold.

What it does: Two rows, and the two targets

14In practice: decide before the dataPractice1 min

This workflow isn't only for replications. A product experiment, an A/B test, names its metric, the smallest effect worth shipping, and its sample size before launch. Peeking at results and shopping among metrics are its forking paths. Clinical trials are registered before the first patient, with a statistical analysis plan and outcomes that can't be switched afterwards. Field experiments in economics and government use pre-analysis plans. And your own work: write the plan as code, run it on simulated data, freeze it, and only then look.

Here's the same workflow in a product team. A shop converts five percent of its visitors. A new checkout is worth shipping only if it adds at least half a percentage point. At the usual error rates, that's about thirty-one thousand visitors per arm, fixed before launch. Half the effect needs four times the people. Double it, a quarter. Peeking every day and stopping at the first significant one is Part 4's optional stopping. Plan the looks, or use a sequential test built for them. It's the same plan as the replication: metric, smallest effect, sample size and analysis, and only then the data.

What it does: The same workflow, everywhere; a product test, planned

15Frontier: what a failure licensesResearch1 min

What does a failed replication license? In 2020 Brian Nosek and Timothy Errington defined a replication as a study whose outcome would count as evidence about a claim. What it shows depends on the theory that says the two studies are the same. Hidden moderators: a failure might mean the effect depends on a setting. But Many Labs 2 found little variation across settings for most effects, so the burden is on whoever names the moderator. Replication at scale: many small labs running one protocol, as here, give power that no single lab has. And a failed replication licenses less confidence in a claim, not the claim's opposite.

So, open questions. Which findings deserve the cost of a multi-lab replication, and who decides? When is a conceptual replication worth more than a direct one? Can theory say in advance which differences between two studies matter? Will registered reports change which questions get asked, or only how they're answered? And what would make a field's findings trustworthy without replicating each one?

What it does: What a failure licenses; open questions

Recap, problems, and the road aheadAll tracks3 min

First, your four predictions. Describing a face cost correct picks per hundred. Ego depletion, in twenty-three labs: no. One study would need about two thousand six hundred people per group for ninety-five percent power at an effect of zero point one. And the original depletion study had about ten percent power for an effect of zero point two. One effect held, smaller; one did not; and the plan said in advance what each result would mean.

Part forty-three in eleven lines. A good target is important, uncertain and feasible. A direct replication repeats the procedure, the materials and the analysis. The smallest effect of interest sets the sample size. D thirty-three is the effect the original could have seen. The plan is code, run on simulated data before any real data. Trial strips, counterbalancing, checks, consent and debriefing make the experiment. Open multi-lab data came from twenty-two and twenty-three laboratories. Verbal overshadowing held, smaller; ego depletion did not. Three criteria and a Bayes factor can disagree. Exploration is labelled, and makes hypotheses, not findings. And the report is registered, with its data and code open.

Kant's wager, at the end of the degree. The first objection, that mathematics can't apply to the mind, met power, d thirty-three, random effects, a replication Bayes factor and a multiverse, all computed. The second, that the mind can't be experimented on, met two registered replications in forty-five laboratories, and you as a participant. And the third, about introspection: the outcomes here are behaviour, a line-up choice and response times, not reports. Where the measure allows, the objection is met. Green.

Where this comes back. Act Eleven starts next, with latent variables, in Part 44. People over time are Part 47. Reading a whole literature is Part 50. And the series ends with a dissertation, Part 62, built the way this part was.

Seven problems, with full solutions in this part's README. One finds d thirty-three. One finds an original study's power. One sizes a single study. One computes a replication Bayes factor. One pools two labs. One counts a multiverse and its false positives. And the last, with the star, asks you to write a preregistration for the Stroop study on the site. Pause here if you'd like to try them.

The books and papers behind this part are listed here and in the README. Chris Chambers's The Seven Deadly Sins of Psychology tells why the reforms were needed; Daniel Lakens's online book teaches the statistics of this part; and the published protocols of the multi-lab replications are models of how to plan a study.

The degree is complete. Forty-three parts, from Kant's wager to a study that deserves to be believed. Act Eleven begins the graduate toolkit, with the question under every questionnaire in the series: what does it measure, and how would you know? Part 44: latent variables.

Where it goes next. Act XI begins with latent variables in Part 44; people over time are Part 47, the weight of evidence Part 50, and the dissertation Part 62.

Key results

The part's results in one place, for revision.

Two-group power\(\displaystyle 1 - \beta = P\big(|T_{\nu, \delta}| > t_{1-\alpha/2}\big), \quad\allowbreak \delta = d\sqrt{n_1 n_2/(n_1 + n_2)}\)
Small telescopes\(\displaystyle \text{power}(d_{33}; n_1, n_2) = 1/3\)
Replication Bayes factor\(\displaystyle \mathrm{BF}_{r0} = \frac{N(\hat d_r; \hat d_o, \mathrm{se}_o^2 + \mathrm{se}_r^2)}{N(\hat d_r; 0, \mathrm{se}_r^2)}\)
Sample size\(\displaystyle n \approx \frac{2 (z_{1-\alpha/2} + z_{1-\beta})^2}{d^2}\)

Try it

Lab 43 · The Replication

Freeze a plan, check its power and the small-telescopes benchmark, run it on simulated labs, then apply it once to the open data of the verbal-overshadowing and ego-depletion replications, judge the results by the registered criteria, and explore a labelled multiverse.

Figure produced by Lab 43: The Replication
Produced by the lab below, seed 0, in 0.4 s.
python -m videos.psychology.labs 43 needs numpy, scipy, matplotlib · download lab43.py · source on GitHub
ego depletion: original g (SE); d33; n per group for 95% power at 0.1      0.68 (0.30); 0.46; 2600
dry run, 23 labs of 46: share significant with no effect; at 0.1           0.02; 0.71
ego depletion, 23 labs: g; 95% interval; one-sided p                       0.037; -0.070 to 0.144; 0.249
criteria met; replication Bayes factor                                     0 of 3; 0.025
verbal overshadowing, 22 labs: difference per 100; interval; criteria met  -16.3; -20.5 to -12.1; 2 of 3
multiverse (exploratory): range of ego-depletion estimates                 0.034 to 0.145 over 8 analyses

A plan frozen as code, checked on simulated data, applied once: verbal overshadowing replicates with a smaller effect than reported; ego depletion does not; the multiverse is a source of new hypotheses, labelled as such.
The code (79 lines; it asserts its own result)
"""Lab 43: the capstone pipeline: a frozen plan, power and d33, a dry run on simulated labs, the confirmatory
analysis of two registered multi-lab replications, the verdict, and a labelled multiverse."""

import numpy as np

from videos.coursekit import labs
from explainer.psychology import capstone as C
from explainer.psychology import opendata

TITLE = "The Replication"
GOAL = ("Freeze a plan, check its power and the small-telescopes benchmark, run it on simulated labs, then apply it "
        "once to the open data of the verbal-overshadowing and ego-depletion replications, judge the results by the "
        "registered criteria, and explore a labelled multiverse.")
TASKS = [
    "Raise the smallest effect of interest for ego depletion to 0.2. How does the dry run's power change, and would "
    "the verdict change?",
    "Run the verbal-overshadowing plan on the first study (description straight after the film). Which criteria does "
    "it meet?",
    "Add a third estimator to the multiverse (pool only labs with at least 100 people). Does it move the estimate?",
]


def run(seed=0):
    out = labs.Lab()

    e = opendata.ego_depletion_rrr()
    orig = e["original"]
    data = {k: e[kk][~orig] for k, kk in (("m1", "m_dep"), ("s1", "sd_dep"), ("n1", "n_dep"), ("m2", "m_ctl"),
                                           ("s2", "sd_ctl"), ("n2", "n_ctl"))}
    g, v = C.hedges_g(e["m_dep"][orig], e["sd_dep"][orig], e["n_dep"][orig], e["m_ctl"][orig], e["sd_ctl"][orig],
                      e["n_ctl"][orig])
    plan = C.Plan("ego depletion", "g", 1, float(g[0]), float(np.sqrt(v[0])), 0.1)
    d33 = C.d33(int(e["n_dep"][orig][0]), int(e["n_ctl"][orig][0]))
    out.row("ego depletion: original g (SE); d33; n per group for 95% power at 0.1",
            f"{plan.original:.2f} ({plan.original_se:.2f}); {d33:.2f}; {C.n_per_group(0.1, 0.95)}")
    dry = C.dry_run(plan, 23, 46, effects=(0.0, 0.1), reps=100, seed=seed)
    out.row("dry run, 23 labs of 46: share significant with no effect; at 0.1", f"{dry[0.0]:.2f}; {dry[0.1]:.2f}")
    assert dry[0.0] < 0.12
    r = C.analyse(data, plan)
    vd = C.verdict(r, plan, d33)
    out.row("ego depletion, 23 labs: g; 95% interval; one-sided p", f"{r['est']:.3f}; {r['lo']:.3f} to {r['hi']:.3f}; "
            f"{r['p_one']:.3f}")
    out.row("criteria met; replication Bayes factor", f"{vd['n_met']} of 3; {vd['bf_r0']:.3f}")

    d = opendata.overshadowing_rrr(2)
    vdat = {"k1": d["verbal"][:, 0], "n1": d["verbal"][:, 1], "k2": d["control"][:, 0], "n2": d["control"][:, 1]}
    o = d["original"]
    rd, rv = C.risk_difference(o[0, 0], o[0, 1], o[1, 0], o[1, 1])
    vplan = C.Plan("verbal overshadowing", "rd", -1, float(rd), float(np.sqrt(rv)), 0.05)
    vr = C.analyse(vdat, vplan)
    vv = C.verdict(vr, vplan, C.d33_rd(o[1, 0] / o[1, 1], int(o[0, 1]), int(o[1, 1])))
    out.row("verbal overshadowing, 22 labs: difference per 100; interval; criteria met",
            f"{100 * vr['est']:.1f}; {100 * vr['lo']:.1f} to {100 * vr['hi']:.1f}; {vv['n_met']} of 3")
    assert vv["significant"] and not vd["significant"]

    mv = C.multiverse(data, plan, {"all": np.ones(len(data["n1"]), bool),
                                   "English": e["language"][~orig] == "English"})
    out.row("multiverse (exploratory): range of ego-depletion estimates",
            f"{min(m['est'] for m in mv):.3f} to {max(m['est'] for m in mv):.3f} over {len(mv)} analyses")

    out.note = ("A plan frozen as code, checked on simulated data, applied once: verbal overshadowing replicates "
                "with a smaller effect than reported; ego depletion does not; the multiverse is a source of new "
                "hypotheses, labelled as such.")

    fig, ax = labs.figure(2, size=(11, 4.0))
    for a_, (res, scale, name, col) in zip(ax, ((vr, 100, "verbal overshadowing (per 100)", labs.GREEN),
                                                 (r, 1, "ego depletion (g)", labs.RED))):
        y, se = res["y"] * scale, np.sqrt(res["v"]) * scale
        order = np.argsort(y)
        a_.errorbar(y[order], np.arange(len(y)), xerr=1.96 * se[order], fmt="o", color=col, ms=3)
        a_.axvline(0, color="grey", ls=":")
        a_.axvline(res["est"] * scale, color=col)
        a_.set(title=name, xlabel="effect", yticks=[])
    out.fig = fig
    return out


if __name__ == "__main__":
    print(run())

Now change it

  1. Raise the smallest effect of interest for ego depletion to 0.2. How does the dry run's power change, and would the verdict change?
  2. Run the verbal-overshadowing plan on the first study (description straight after the film). Which criteria does it meet?
  3. Add a third estimator to the multiverse (pool only labs with at least 100 people). Does it move the estimate?

Problems, with solutions

Try each problem before opening its solution.

  1. d33 for 20 per group. Using the normal approximation, find \(d_{33}\) for an original study with 20 people per group.

    Solution

    Power 1/3 needs d/SE = z(0.975) - z(2/3) = 1.96 - 0.43 = 1.53, with SE = √(2/20) = 0.316: d33 ≈ 0.48 (the noncentral t gives 0.50).

  2. The original's power. An original study has 23 and 24 people. Find its power, two-sided at 5%, for \(d = 0.2\).

    Solution

    SE = √(1/23 + 1/24) = 0.292, so d/SE = 0.685 and power ≈ P(Z > 1.96 - 0.685) = P(Z > 1.275) ≈ 0.10.

  3. One study at d = 0.1. How many people per group does one study need for 95% power at \(d = 0.1\)? Use the normal approximation.

    Solution

    n = 2 (1.96 + 1.645)² / 0.1² = 2 × 12.99 / 0.01 ≈ 2,600 per group.

  4. The replication Bayes factor. An original reports \(d = 0.68\) (SE 0.30); a replication finds \(d = 0.04\) (SE 0.055). Compute the replication Bayes factor in its normal form.

    Solution

    Under the original: N(0.04; 0.68, 0.30² + 0.055²), sd 0.305, z = -2.10, density 0.0442/0.305 = 0.145. Under no effect: N(0.04; 0, 0.055²), z = 0.73, density 0.306/0.055 = 5.57. BF = 0.145/5.57 ≈ 0.026: about 38 to 1 for no effect.

  5. Pooling two labs. Lab A: 30 of 60 correct after describing, 40 of 60 without; lab B: 50 of 100 and 62 of 100. Pool the risk differences with fixed-effect weights.

    Solution

    A: RD = 0.500 - 0.667 = -0.167, v = 0.25/60 + 0.222/60 = 0.00787 (w = 127); B: RD = 0.50 - 0.62 = -0.12, v = 0.25/100 + 0.2356/100 = 0.00486 (w = 206). Pooled: (-0.167 × 127 - 0.12 × 206)/333 = -0.138, SE 1/√333 = 0.055: about 14 fewer correct per 100.

  6. A multiverse. A multiverse has 3 estimators, 4 exclusion rules and 5 subsets of labs. How many analyses? If each had an independent 5% false-positive rate, how likely is at least one significant result?

    Solution

    3 × 4 × 5 = 60 analyses; with independent 5% false-positive rates, 1 - 0.95⁶⁰ = 0.95. The analyses share data, so the true rate is lower, but well above 5%: one more reason to register one of them.

  7. ★ A Stroop preregistration. Write a preregistration for a Stroop replication run on the course site: hypothesis, smallest effect of interest, sample size, exclusions and analysis.

    Solution

    Hypothesis: incongruent trials are slower than congruent ones (one-sided). Smallest effect of interest: 20 ms, the smallest interference reported in standard versions. With trial-level SD around 100 ms and 48 trials per condition, one person's SE is about 20 ms; a group of 30 gives a within-person dz far above what is needed for 95% power. Exclusions, fixed in advance: trials faster than 200 ms or slower than 2,000 ms, errors, and people below 80% accuracy or failing two attention checks. Analysis: each person's mean incongruent minus congruent time, a one-sided t test against zero, and the effect size with its interval; the script is run on simulated participants before any real data.

Notes and sources

Sources

  • V. K. Alogna et al., Registered replication report: Schooler and Engstler-Schooler (1990), Perspectives on Psychological Science 9 (2014) 556-578, data at osf.io/ybeur; J. W. Schooler and T. Y. Engstler-Schooler, Verbal overshadowing of visual memories, Cognitive Psychology 22 (1990) 36-71.
  • M. S. Hagger, N. L. D. Chatzisarantis et al., A multilab preregistered replication of the ego-depletion effect, Perspectives on Psychological Science 11 (2016) 546-573, data at osf.io/jymhe; C. Sripada, D. Kessler and J. Jonides, Methylphenidate blocks effort-induced depletion of regulatory control in healthy volunteers, Psychological Science 25 (2014) 1227-1234.
  • M. J. Brandt et al., The replication recipe: what makes for a convincing replication? Journal of Experimental Social Psychology 50 (2014) 217-224; R. A. Zwaan, A. Etz, R. E. Lucas and M. B. Donnellan, Making replication mainstream, Behavioral and Brain Sciences 41 (2018) e120.
  • U. Simonsohn, Small telescopes: detectability and the evaluation of replication results, Psychological Science 26 (2015) 559-569; D. Lakens, Sample size justification, Collabra: Psychology 8 (2022) 33267.
  • J. Verhagen and E.-J. Wagenmakers, Bayesian tests to quantify the result of a replication attempt, Journal of Experimental Psychology: General 143 (2014) 1457-1475.
  • B. A. Nosek and T. M. Errington, What is replication? PLoS Biology 18 (2020) e3000691; C. D. Chambers and L. Tzavella (2022); C. Allen and D. M. A. Mehler (2019); A. M. Scheel, M. R. M. J. Schijen and D. Lakens (2021).
  • J. J. Van Bavel et al. (2016); R. A. Klein et al. (2018); A. Olsson-Collentine, J. M. Wicherts and M. A. L. M. van Assen (2020).
  • J. R. Stroop, Studies of interference in serial verbal reactions, Journal of Experimental Psychology 18 (1935) 643-662.
About this partfrom its README

The degree ends as a degree does, with a project. Forty-two parts built a model subject, a laboratory, a measurement library, a false-positive lab and a Ledger of findings; this part uses them to replicate two classic effects properly, on screen, from the choice of target to the report. The plan is written as code and run on simulated data before the real data are read, and the narration of the results is computed from them.

A row of the Ledger marked "not directly tested" (the fear bridge, Part 29) shows what makes a target feasible. Two targets are chosen: verbal overshadowing (Part 21), expected to hold, and ego depletion (Part 28), in doubt; the viewer takes part in a third, the Stroop task, on the course site. Then what counts as the same study and the two registered protocols; the smallest effect of interest, power and the small-telescopes benchmark d33 (computed); the preregistration as code and a dry run on simulated labs; the trial strip, counterbalancing, checks and timing; consent and debriefing; the open lab-level data of the two registered multi-lab replications; the confirmatory analyses exactly as planned; the three registered criteria and the replication Bayes factor; a labelled small multiverse; the report in registered-report form; and the degree looked back on: the Ledger so far, the map, and the three acts still to come.

A note on the targets

The syllabus planned a Stroop variant as the effect expected to hold. The film needs real, fixed, open lab-level data for both targets, and the Archive holds them for two registered multi-lab replications whose original authors helped write the protocols: verbal overshadowing (Alogna et al. 2014, its second study, which followed the original's order) and ego depletion (Hagger et al. 2016). The Stroop task is kept as the viewer's own study on the course site. Both target effects were met earlier in the series (Parts 21 and 28); this part re-analyses them from the lab-level data with its own frozen pipeline, and its results agree with the statuses those parts entered.

What is computed and built
  • explainer/psychology/capstone.py: the preregistration as a frozen Plan, two-group power by the noncentral t, d33 for a standardized and for a binary outcome, sample size for a power target, the replication Bayes factor, per-lab effects, fixed and random-effects pooling, simulated labs, the dry run, the confirmatory analysis, the verdict and the multiverse. Tested in tests/psychology/test_capstone.py.
  • The Ledger gains two rows about replication itself.
  • The course's interactive is the Stroop task: congruent and incongruent colour words, timed, with the viewer's own effect shown against the planned smallest effect of interest (no score is kept or sent).
Chapter notes
# Chapter What it does
0 The project The degree ends with a project; a row never tested; two targets; the question; objectives
1 On you: colour words, and four predictions The Stroop effect; four predictions
2 What counts as the same study Direct and conceptual replication; the two protocols
3 How big, and how many? The smallest effect of interest and power; small telescopes; power as a curve
4 The plan, written as code Preregistration; a dry run before any real data; every fork closed in advance
5 Building the experiment The trial strip; checks built in
6 Consent, and what participants are told Before anyone takes part; the site's consent screen
7 The data Two registered multi-lab replications; forty-five laboratories, lab by lab
8 The confirmatory analysis Verbal overshadowing; ego depletion; how much the labs differ
9 Was it a replication? Three questions and a fourth; the verdict; what each result would have meant
10 Exploratory, and labelled A small multiverse; the garden, simulated
11 The report A registered report; before it is sent
12 The degree The Ledger so far; the map
13 The Ledger Two rows, and the two targets
14 In practice: decide before the data The same workflow, everywhere; a product test, planned
15 Frontier: what a failure licenses What a failure licenses; open questions
Recap, problems, and the road ahead Your predictions; eleven lines; Kant's three objections; payoffs; problems; references; Part 44
NotesWhere the numbers come from
What Source
The original estimates: verbal overshadowing 25 fewer correct identifications per 100 (17 of 44 against 28 of 44; SE 10.3 per 100); ego depletion, the study the protocol followed, g = 0.68 (SE 0.30; 23 and 24 people) the original rows of the two open datasets, via explainer.psychology.opendata
d33: 16 per 100 for verbal overshadowing (control rate 64%, 44 per group, normal approximation); 0.46 for ego depletion (23 and 24 people, noncentral t) capstone.d33_rd, capstone.d33, item plans
The smallest effect of interest for ego depletion, d = 0.1: 2,600 per group for 95% power in one study; the original's power for d = 0.2: 10% capstone.n_per_group, capstone.power2, item plans
The dry run: 23 simulated labs of 46 per group, 200 runs per true effect: significant in 4.5% with no effect, 69% at d = 0.1, 100% at the original's 0.68 capstone.dry_run, item dryrun
Verbal overshadowing, 22 labs, 2,055 people: 16 fewer correct picks per 100 (95% interval 12 to 20), one-sided p below 10⁻¹⁴, τ² = 0 capstone.analyse on the open data, item confirm
Ego depletion, 23 labs, 2,141 people: g = 0.04 (95% interval -0.07 to 0.14), one-sided p = 0.25, τ² = 0.023 capstone.analyse on the open data, item confirm
The verdicts: verbal overshadowing meets 2 of 3 criteria (significant, reaches d33; the original's 25 lies outside the interval), replication Bayes factor about 10¹²; ego depletion meets 0 of 3, Bayes factor 0.025 (about 40 to 1 for no effect) capstone.verdict, item verdict
The multiverse: 8 analyses each; ego depletion from 0.03 to 0.04 in all labs and 0.13 to 0.15 in the English-speaking labs; verbal overshadowing 16 per 100 in the second study and 4 per 100 in the first (no filler) capstone.multiverse, item multiverse
Power curves: the original study (23 and 24) 10% at d = 0.2 and 52% at 0.6; the pooled labs (about 1,070 per group as one study) 64% at d = 0.1 and above 99% at 0.2; 2,600 per group 95% at 0.1 capstone.power2, item powercurve
Lab sizes: verbal overshadowing 60 to 150 people (22 labs, 2,055), ego depletion 50 to 181 (23 labs, 2,141) the open data, item labs
Heterogeneity: verbal overshadowing τ = 0, I² = 0; ego depletion τ = 0.15, I² = 35%, 95% prediction interval for a new lab -0.28 to 0.36 item confirm
The garden: 300 simulated replications with no effect (23 labs of 23 per group): the planned analysis significant in 4%; the best of 14 analyses (two estimators; all labs or either half of three splits) in 12% capstone.simulate_labs, capstone.multiverse, item garden
A product test: 5% conversion, a lift of 0.5 points, two-sided 5%, 80% power: 31,231 per arm; 122,121 for half the lift, 8,155 for double item abtest
The Ledger so far: counts by status of every row in Parts 1 to 43 ledger.counts
Notes
Finding Original Status
Studies accepted for publication before their results are known report positive results far less often than standard articles do Allen and Mehler 2019 replicated
Replications often fail because of hidden moderators: effects depend strongly on the setting and the sample Van Bavel and colleagues 2016 contested

Shown without a row, with the reason recorded in explainer/psychology/ledger.py: Brandt and colleagues, Zwaan and colleagues; Nosek and Errington; Simonsohn; Verhagen and Wagenmakers. The two targets' rows are Part 21's and Part 28's; Alogna and colleagues and Hagger and colleagues are in their records.

Notes

The web-search budget for this session was spent on earlier parts, so the facts below come from the standard literature and the open data's own documentation, and were not re-checked online today: the order of the original verbal-overshadowing procedure and of the two replication studies; the letter-crossing and conflict-task procedure and the reasons the protocol followed Sripada et al.; the review and approval of both protocols by the original authors; Brandt et al.'s recipe; Zwaan et al.'s arguments; Simonsohn's definition of d33 and his one-sided test (this part uses the 95% interval's upper end); Lakens's sample-size justification; Verhagen and Wagenmakers's replication Bayes factor (this part uses its normal approximation, not their t-based version); Allen and Mehler's and Scheel et al.'s figures (44% against 96%); Van Bavel et al.'s analysis; Many Labs 2's findings on heterogeneity; Olsson-Collentine et al.'s; Nosek and Errington's definition; Chambers and Tzavella's review; the history of the fear bridge row; and every page range in Sources.

Companion material in this repository

The syllabus's plan for this partfrom SYLLABUS.md, the plan of record
  1. Hook: a row of the Ledger marked not directly tested. Choosing a target: importance, uncertainty, feasibility. Two targets are run: one expected to hold (a Stroop variant) and one in doubt.
  2. What counts as the same study: direct and conceptual replication; contacting the original authors; materials.
  3. The smallest effect of interest; power analysis; the "small telescopes" rule; the sample size, justified.
  4. Preregistration, written on screen: hypotheses, exclusion rules, the analysis script run on simulated data from the Pool before any real data exist.
  5. Building the experiment: the trial strip, counterbalancing, attention checks, browser timing validation.
  6. Ethics and consent; what participants are told.
  7. Data collection: the viewer takes part on the site; the film uses an open multi-site dataset for the same paradigm so that its numbers are real and fixed.
  8. The confirmatory analysis, exactly as registered. Effect size and interval.
  9. Was it a replication? Three criteria (significance, the original inside the interval, small telescopes) can disagree; a replication Bayes factor.
  10. Exploratory analysis, labelled; robustness (a small multiverse).
  11. The report: a registered-report layout; open data and code.
  12. The degree: the Ledger so far, the Homunculus so far, and the entry points to Acts XI, XII and XIII.

Psyche: the capstone pipeline: preregistration as code, a simulated run on the Pool, the frozen analysis applied to open multi-site data; the report generated from the result. On you: take part in the replication on the site. Ledger: the two target effects, with this part's estimate added to their rows. In practice: this is the workflow of a product experiment or a clinical trial: decide the analysis before the data. Frontier: what a failed replication licenses; hidden moderators; replication at scale by many small labs. Reading: Simonsohn 2015; Brandt et al. 2014 (the replication recipe); Lakens 2022 (sample size justification); Nosek & Errington 2020; Chambers & Tzavella 2022; Zwaan et al. 2018.


Build the film

python -m videos.psychology.psych43.compute        # the part's numbers, into .cache/psych43
python tools/build.py psych43                  # render and assemble the film
EXPLAINER_TTS=silent python tools/qa_scene.py psych43 Hook   # one chapter, silent, with a contact sheet

Scenes: videos/psychology/psych43. Setup: see the course page. Source of these notes: the README and the scenes' narration.

Build it
python -m videos.psychology.psych43.compute            # the plans, the dry run, then the real data (a minute)
python tools/qa_scene.py psych43 Confirm               # one chapter, silent, at 480p, with a contact sheet
EXPLAINER_TTS=silent python tools/build.py psych43 -q l   # the whole part, silent preview
python tools/build.py psych43                          # 1080p30 with narration
python tools/qa_scene.py psych43 Verdict --lang zh     # the Chinese edition of one chapter
python tools/make.py psych43                           # both editions, with the checks a long build needs
python -m videos.psychology.labs 43                    # the lab: the whole pipeline
python tools/check_ledger.py psych43                   # every study shown has its Ledger row, or a reason
python -m pytest tests/psychology                      # the capstone pipeline, the Ledger, the Archive

The Chinese edition is zh_lines.py (the narration, line by line, with the result sentences as templates over the computed values) and the series table videos/psychology/psychology_text_zh.json (the text on screen); the terms are in PSYCHOLOGY_ZH_GUIDE.md.