Stroop task

Published on September 17, 2021

At the end of this guide you will be able to…

  • Run a Stroop task in Testable starting from our ready-made template
  • Customise key parameters to adapt this task to your needs
  • Collect data and interpret the results

If you never worked with Testable before, you can check out our 10-minute introduction video here

Try the demo

What is the Stroop task and how can you use it in your own research?

The Stroop effect is one of the most widely known psychological phenomena. It describes the difficulty to name the font color of a word, if that word itself names a different color. In experienced readers, reading happens automatically and effortlessly. Therefore, it takes mental effort to suppress the meaning we gather from the word to instead focus on its color. (If you never experienced it yourself you should try our demo experiment here!)

The mental effort we experience when trying to ignore the meaning of the word is what psychologists call ‘inhibition’. We can say that we need to ‘inhibit’ the automatic response of reading the word so we can give the more unusual response of naming the font color. Our brain’s ability to inhibit automatic responses is crucial to taking deliberate actions. It allows for our behavior to not just be governed by our habits and reflexes. Mental disorders, such as Schizophrenia, depression, or addictions can be both the cause and effect of a loss of inhibitory ability. This makes the study of cognitive inhibition an important focus of research. The Stroop task, among other tools, remains a reliable and widely used instrument to measure it.

Our Testable experiment template includes both a keyboard as well as a voice version of the basic Stroop colour-word task. Read below to learn how to use it in your own research and easily create variations of the task.

The Stroop effect describes the response delay that is caused when an automatic process, like reading and understanding the meaning of a word, competes with a more deliberate task, like naming a word’s font color.

The ability to inhibit and override automatic processes lies at the heart of our rational and deliberate thought and action. Various mental disorders, such as Schizophrenia, depression or addiction, can affect the brain’s inhibitory function. The Stroop word-color task is one of the most reliable ways to measure inhibition ability in a way that is sensitive to individual differences and experimental treatments.

How does the Stroop task work?

In this simplified Stroop Colour-Word task, participants either see congruent color-words, meaning that are either displayed in the same color they name (e.g. the word ‘Red’ displayed in a red font), or incongruent words that have a different color (e.g. the word ‘Red’ displayed in a green font). On each trial, a random word is selected from either the congruent or incongruent group. Participants must then ignore the meaning of the word and just focus on and name the font color.

There are various ways in which participants can respond, and the demo task shows two:

  1. Voice responses: Participants can simply name the color once they see the word show on screen. Testable automatically records the response and moves on to the next trial
  2. Keyboard responses: Participants have to use the keyboard to indicate the color they see. They can use the ‘y’ key for yellow words, the ‘r’ key for red words or the ‘g’ key for green words. Other key mappings (like using the arrow keys or numbers) are also doable.

Participants will experience that it is quite difficult to ignore the meaning of the word in incongruent trials. They will likely take longer to respond and make more errors, i.e. by mistakenly reading the word out loud. This difficulty of handling incongruent trials is the Stroop effect.

Run this experiment in Testable from our ready-made template


We have created a template for the Stroop Color-Word task in Testable that you can access from our Library. It is set up and ready to go and you can start collecting data straight away by sending the experiment link to your participants after importing it to your projects. Experiments in Testable will run in every browser, which makes it very easy to collect data both in the lab as well as online.

How to customise key parameters and play around with different options

Experiments in Testable are fully customisable and you will not need to write a single line of code to edit them. The heart of each experiment is what we call the trial file. The trial file contains all information that Testable needs to run the experiment in a simple spreadsheet, that you can edit with any spreadsheet editor you like, such as Google Sheets, Excel or Testable’s in-built preview editor.

To change any part of your experiment, you only need to change the values in the trial file.

Once you have made your changes, you can save and upload the modified trial file to your experiment’s trial file section.

Screenshot of the trial file underlying the stroop task in Testable
Stroop task trial file

Here are a few examples of changes you might want to make to the Stroop task:

Create an emotional Stroop-variant

There are countless variations of the Stroop task, which all rely on the basic interference effect. One example is the emotional Stroop task, where participants need to name the color of emotion words (e.g. anger, grief, happiness). The strength of the interference effect can be evidence of the strength and automaticity of emotive processing, which can differ for individuals with affective disorders, such as depression or anxiety.

To change the stimuli in Testable, all you need to do is to change the values in the stim1 column of the spreadsheet. For word stimuli, there is also a dedicated column called textColor that allows you to easily control the presentation color for each word that is presented.

Finally, you can use the condition1 column to mark trials according to the experimental condition they belong to (i.e. congruent/incongruent or emotional/neutral). This column won’t affect the logic of the experiment but will help you to analyse your results later on.

Collect data by sending the experiment link to your participants

After importing this template to your library, you can collect data for your experiment by sharing the unique experiment link (i.e. tstbl.co/xxx-xxx) with your participants. Once participants complete the experiment, their results will appear in the ‘Results’ section of your experiment.

Working with results from the Stroop task

The simplified Stroop paradigm automatically measures the response time needed to name the word color on each trial. The keyboard response version also automatically stores the accuracy on each trial (correct vs. incorrect responses). You will need to decode the accuracy for the voice-response version manually by listening to the recorded words and comparing them with the trial file.

By grouping the response times (in the RT column of the result file) and the accuracies (in the correct column, where 1 is correct and 0 is incorrect) by consistent and inconsistent stimuli using the condition1 column, you can compute the mean response time and mean accuracy for each condition.

You should see that participants take significantly longer to respond in inconsistent trials (e.g. naming green font that spells the word “Red”) than consistent trials (e.g. naming the green font that spells the word “Green”). For the keyboard response version of the task, you can compute the equivalent accuracies for consistent and inconsistent trials. Usually, participants tend to make significantly more errors in inconsistent trials, although trade-offs between speed and accuracy can occur which dampen the error rate.

You could also confirm that the errors that participants made were indeed caused by interference caused by automatic reading. To do that you can compare errors where the color that participants named didn’t match the color of the font, but did match the color named by the word. You should find that most errors are interference errors, rather than random errors.

Screenshot of a portion of the results from the stroop task
Stroop task results

Once you have collected data from multiple participants, you can also use Testable’s ‘wide format’ feature, that allows you to automatically collate all individual result files into a single file. In wide format results every participant’s data is represented as one row in the data file. This makes it easily compatible with statistical analysis packages like R or SPSS where you can assess the statistical significance of any differences you may find.

Try the demo

 

Reference list:

Stroop, J. R. (1935). Studies of interference in serial verbal reactions. Journal of experimental psychology, 18(6), 643.

Golden, C. J., & Freshwater, S. M. (1978). Stroop color and word test.

Jensen, A. R., & Rohwer Jr, W. D. (1966). The Stroop color-word test: a review. Acta psychologica, 25, 36-93.