Skip to content
Tutorials Center
My learning

Topics

Lesson 39 of 43 ยท Projects and Practice

Project: Run Your Own Stroop Experiment

Run a Stroop task in your browser, then analyze simulated data with a paired test and effect size, and learn how real experiments control order, practice and bias.

In 1935 John Ridley Stroop published a deceptively simple finding. When people name the ink color of a word, they are slower and make more errors if the word spells a different color ("RED" printed in blue ink) than if the word matches the ink or is neutral. Reading is so automatic that it interferes with the color-naming task you actually want to do. The Stroop effect is one of the most replicated results in psychology and a standard tool for studying attention and cognitive control.

In this project you will run a small version yourself, analyze data the way a researcher would, and learn what a careful design adds.

Four steps of one trial: fixation, stimulus, response and recording.
The structure of one Stroop trial.

What you will learn

  • How a reaction-time experiment is built from trials.
  • How to compare two conditions with a paired test and an effect size.
  • What controls a real study needs, and what your demo lacks.

Key terms

Congruent trial: the word and the ink color match.

Incongruent trial: the word names a different color from the ink.

Interference: the extra time needed on incongruent trials.

Within-subject design: every participant does every condition.

Effect size: the size of a difference in standard deviation units, such as Cohen's d.

Step 1: Run the task

The widget below runs 12 trials in random order, half congruent and half incongruent. Click or press the key for the ink color: R, G, B or Y. Try to be fast and accurate. This is a demonstration of the method. Twelve trials on one person is far too little to establish anything, and your browser's timing is not laboratory-grade.

A mini Stroop task

If you ran the task, you probably found the incongruent trials slower. Averages over many people typically show an interference of tens of milliseconds up to well over a hundred, depending on the exact task. With only six trials per condition, your own numbers will wobble a lot.

Step 2: Analyze data like a researcher

A real study has many participants, each with a mean for each condition. Here is a simulated data set of 30 participants, so we can practice the analysis. The assumed effect of 80 ms is made up for the exercise, not a measured value.

Python Paired test and effect size on simulated data

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The paired test asks whether the average within-person difference is distinguishable from zero. The effect size tells you how large that difference is relative to the variability across people. The confidence interval gives a range of plausible values.

Step 3: What a careful design adds

Your demo cuts several corners. A real experiment would include:

  • Many more trials per condition, often 100 or more, with practice trials first.
  • Balanced and randomized order, with each color and word equally often, and limits on repeats (the same stimulus twice in a row is easier).
  • A neutral baseline, such as colored patches or non-color words, to see whether the effect is interference, facilitation or both.
  • Accurate timing, since screen refresh rate and browser timing add noise, and careful experiments check it.
  • Preregistration: stating the analysis plan before data collection to avoid choosing tests after seeing the result.
  • Ethics and consent, even for a harmless task, when working with other people.

Common misconceptions

"The Stroop effect proves I am bad at focusing." It appears in nearly everyone, because reading is automatic.

"A small p-value means a big effect." The p-value says how surprising the data would be if there were no effect. The effect size tells you how large the effect is.

Check your understanding

Quick check ยท 5 questions

of 5 answered You scored / 5 ยท perfect!

  1. 1. In a Stroop task, an incongruent trial is one where:

    Incongruent means the word and ink color conflict.
  2. 2. Why is the design called within-subject?

    Every participant provides data for both congruent and incongruent trials.
  3. 3. What does a paired t-test compare here?

    It tests whether the mean of the paired differences differs from zero.
  4. 4. Why include a neutral baseline?

    Without a neutral condition you cannot tell interference from facilitation.
  5. 5. What is preregistration for?

    It reduces the chance of choosing analyses to fit the result.

Summary

  • The Stroop effect shows that automatic reading interferes with color naming.
  • A simple trial structure, fixation, stimulus, response and recording, builds the experiment.
  • Paired tests, effect sizes and confidence intervals summarize condition differences.
  • Real studies add many trials, balanced order, baselines, accurate timing and preregistration.

Next: Project: a Hopfield memory