Skip to content
Tutorials Center
My learning

Topics

Lesson 39 of 44 ยท Projects and Practice

Capstone Project: Run and Analyze a Stroop Experiment

Plan, run and analyze a within-subjects Stroop experiment: hypotheses, design, a live in-browser task, a paired t-test with effect size and a short write-up.

You now have every ingredient of a complete study. This project puts them together in one small experiment you can run on yourself in a few minutes: the Stroop task. In 1935 John Ridley Stroop showed that naming the ink color of a word is slower when the word spells a different color ("RED" printed in blue) than when the word and the ink agree. The effect is large, reliable and cheap to measure, which is why it has been replicated thousands of times and is a favorite for teaching. A review by Colin MacLeod (1991) summarized half a century of work on it.

Three Stroop trial types: the word GREEN in green (congruent), a row of X letters in green (neutral) and the word GREEN in red (incongruent), with reaction time bars that grow from left to right.
Naming the ink color is fastest when the word agrees, slower with a neutral string, and slowest when the word clashes. The bar lengths are illustrative.

What you will learn

  • To turn a research question into hypotheses, operational definitions and a design.
  • To run a within-subjects reaction-time experiment.
  • To analyze the data with a paired t-test, effect size and confidence interval.
  • To write the main parts of a short report.
  • To spot the limits of a browser-based experiment.

Key terms

Congruent trial: the word names the ink color (GREEN in green).

Incongruent trial: the word names a different color (GREEN in red).

Neutral trial: a string with no color meaning (XXXXX in green).

Stroop effect: the extra time needed on incongruent trials compared with congruent trials.

Reaction time (RT): the time from stimulus onset to response.

d_z: an effect size for paired data: the mean of the differences divided by their standard deviation.

Step 1: The question and hypotheses

Research question: Does a word that names a conflicting color slow people down when they name ink colors?

Hypothesis (directional, justified by decades of prior work): mean reaction time will be longer in the incongruent condition than in the congruent condition.

Operational definitions: the independent variable is trial type (congruent, neutral, incongruent), manipulated within subjects. The dependent variable is reaction time in milliseconds on correct trials, with accuracy as a secondary outcome.

Step 2: Design decisions

  • Within-subjects. Everyone sees all three trial types. This is sensitive (Chapter 5) and efficient.
  • Order. Trial types are mixed in random order, which handles order and practice effects better than blocks that could carry over.
  • Controls. Same screen, same response buttons for every trial, the same fixation mark (+) before each word.
  • Sample size. A paired test needs far fewer people than a two-group one. The calculator below shows that around ten to twenty participants would be enough to detect a large effect with high power. Your own run, a sample of one, shows the effect within a person but cannot support a population claim. State that limit.
  • Ethics. Participants read what the task involves, take part voluntarily and may stop at any time. No personal data are collected here.
  • Preregistration. Write down the hypothesis, the exclusion rules (for example, drop trials faster than 150 ms or slower than 3,000 ms and drop incorrect trials), and the main test (a paired t-test of mean incongruent minus mean congruent RT) before you look at any data.

Step 3: Run the task

The task below runs entirely in your browser. A "+" appears, then a word in color. Click the button that names the ink color (ignore what the word says) as quickly and accurately as you can. It presents 18 trials and then summarizes your own mean reaction times by trial type. It is a demonstration: a browser timer is accurate to a few milliseconds at best, and mouse clicking is slower than a dedicated response box, but the Stroop effect is large enough to show.

A Stroop task you can run on yourself

Step 4: Analyze a full dataset

One person's data cannot test a hypothesis about people. Real studies pool participants. The code below creates a simulated dataset of 24 participants (made-up numbers with realistic structure: people differ in baseline speed, and incongruent trials are slower) and runs the planned analysis: a paired t-test on each person's mean incongruent minus congruent RT, with an effect size and a 95% confidence interval. The plot shows every participant's change; nearly all lines slope upward.

Python Paired analysis of simulated Stroop 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.

How many people would a real study need? This calculator finds the smallest number of participants for a paired t-test to reach 90% power at several assumed effect sizes.

Python Sample size for a paired design

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.

Step 5: Write it up

Using the previous chapter, draft these pieces in your own words.

  1. Introduction (about 150 words). The Stroop task, why interference matters, your hypothesis.
  2. Method. Participants (even if it is one person, say so), materials (the three colors, three trial types), design (within-subjects, 18 randomized trials), procedure (fixation, response by click), exclusions.
  3. Results. Means for each condition, the paired test, effect size and interval, formatted in APA style.
  4. Discussion. Does the pattern match your hypothesis? Limits: a browser timer, mouse responses, a sample of one or a few, a screen that may not show colors accurately, people with color-vision differences.

Honest limits matter more than impressive claims. A modest report that says exactly what was done earns more trust than a bold one that does not.

Common misconceptions

"My run proves the Stroop effect." One person's data show the effect in that person. Population claims need a sample and an inferential test.

"Faster reactions mean better thinking." Reaction times reflect many things, including strategy, practice, motivation and the response device.

"The Stroop effect is about reading being automatic, full stop." Automatic reading is the standard account, but the mechanisms of Stroop interference (including attention and response conflict) are still debated.

Check your understanding

Quick check ยท 5 questions

of 5 answered You scored / 5 ยท perfect!

  1. 1. In the Stroop task, which trial type should produce the SLOWEST naming of ink color?

    When the word names a conflicting color, reading interferes with naming the ink.
  2. 2. Why is a paired t-test used for this design?

    Within-subjects data call for a paired analysis.
  3. 3. Why are trial types presented in random order?

    Randomized or counterbalanced order prevents position from lining up with condition.
  4. 4. Which exclusion rule should be decided in advance?

    Fixed, preregistered rules prevent analysis choices from following the data.
  5. 5. What limits a browser-based reaction-time task?

    Browser timing and hardware add noise, though the Stroop effect is large enough to survive it.

Summary

  • The Stroop task is a compact experiment: a within-subjects manipulation (congruent, neutral, incongruent) with reaction time as the DV.
  • Plan the hypothesis, exclusions and main test before collecting data.
  • Analyze with a paired t-test, an effect size (d_z) and a confidence interval, and plot every participant.
  • Write up the report with the hourglass structure and honest limits.

Next: Capstone project: a p-hacking simulation