Introduction
The numerical Stroop task is a great and popular task. Officially, it is called the Size Congruency Effect. The effect was first described by Besner and Coltheart (1979). Another nice early study on the effect was by Henik and Tzelgov (1982). There is a good review by Reike and Schwarz (2017).
In this study, subjects were asked to judge which of two digits (e.g., 3 5) was larger either in physical or in numerical size. Reaction times were facilitated when the irrelevant dimension was congruent with the relevant dimension and were inhibited when the two were incongruent (size congruity effect). Although judgments based on physical size were faster, their speed was affected by the numerical distance between the members of the digit pair, indicating that numerical distance is automatically computed even when it is irrelevant to the comparative judgment being required by the task. This finding argues for parallel processing of physical and semantic information in this task.
In short, you are repeatedly shown a pair of numbers. One is physically larger than the other. You need to figure out which one is the physically larger of the pair. If the left one is larger, you press the A key (which is left on the keyboard) and if the right one is larger, you press the L key (which is right under the keyboard).
This can be confusing, because a number can be numerically smaller, yet physically larger. Look at the image below to see some examples.
The difference between how fast you respond in congruent and incongruent trials is the Size Congruency Effect.
Similar to the "real" Stroop task, you respond to stimuli that are sometimes containing "confusing information"
Here is a comparison of the two
Numerical Stroop | Original Stroop | |
---|---|---|
Stimuli |
Numbers |
Colour Words |
Task |
Look which number is physicall largers |
Look what the ink color of a word is |
Congruent |
The smaller number is lower in value than higher value |
The ink color and word meaning are the same |
Incongruent |
The smaller number is higher in value than smaller number |
The ink color and word meaning do not match |

For an indepth analysis of response time distributions in this task, see the excellent Master thesis of Kristen Bowman (2020). |
About this implementation
This version can be used with the mouse only. Participants need to click or tap the larger number on the screen. Note that in this PsyToolkit implementation, we draw two rectangles behind the numbers so that people do not need to click/tap exactly on the number, but can also tap close to it.
We do not use any images in this task. Everything is simply text. You can make the task more exciting by adding some images.
Also, in this task we do not use a "table" as we do in many other tasks.
Run the demo
Data output file
In PsyToolkit, the data output file is simply a textfile. The save line of the PsyToolkit experiment script determines what is being saved in the data output file. Typically, for each experimental trial, you would have exactly one line in your text file, and each number/word on that line gives you the information you need for your data analysis, such as the condition, response speed, and whether an error was made. |
Meaning of the columns in the output datafile. You need this information for your data analysis.
Colum | Meaning |
---|---|
1 |
block number (1=training, 2=real data) |
2 |
Condition name (congruent or incongruent) |
3 |
Condition number (1=congruent or 2=incongruent) |
4 |
Response time (milliseconds) |
5 |
Status (1=correct, 2=wrong, 3=timeout) |
6 |
The left number on the screen |
7 |
The right number on the screen |
8 |
The left font (2 = smaller font, 3 = larger font) |
9 |
The right font (2 = smaller font, 3 = larger font) |
PsyToolkit code
Click to expand the PsyToolkit script code (part of zip file below)
options
background color EEEEEE
fonts
instructions arial 30 # font 1
small arial 100 # font 2
big arial 120 # font 3
task sce
text color black
#------------------------ set up condition
set $leftNumber random 1 9
set &&a range 1 9
set &&a remove position $leftNumber
set $rightNumber &&a use random
set $leftright random 1 2
if $leftright = 1 ## left = small
set $leftfont 2
set $rightfont 3
set $correctResponse 5 # this is the stimulus number on right side
else ## left = big
set $leftfont 3
set $rightfont 2
set $correctResponse 3 # this is the stimulus number on left side
fi
#----------------------- determine con/inc
if $leftNumber < $rightNumber and $leftfont = 2
set %conditionName "congruent"
set $conditionNumber 1
fi
if $leftNumber < $rightNumber and $leftfont = 3
set %conditionName "incongruent"
set $conditionNumber 2
fi
if $leftNumber > $rightNumber and $leftfont = 2
set %conditionName "incongruent"
set $conditionNumber 2
fi
if $leftNumber > $rightNumber and $leftfont = 3
set %conditionName "congruent"
set $conditionNumber 1
fi
#--------------------------------- show stimuli
show rectangle 0 0 100 10 black # 1
show rectangle 0 0 10 100 black # 2
delay 500
clear -1 -2
font $leftfont
show rectangle -200 0 400 400 238 238 238 # equals background color # 3
show text $leftNumber -200 0 # 4
font $rightfont
show rectangle 200 0 400 400 238 238 238 # equals background color # 5
show text $rightNumber 200 0 # 6
readmouse l $correctResponse 3000 range 3 6
clear range 3 6
#--------------------------------- response feedback
font small
if STATUS = CORRECT
show text "Well done"
delay 500
fi
if STATUS = WRONG
show text "Wrong"
font instructions
show text "Click or tap the physically larger number" 0 100
delay 3000
fi
if STATUS = TIMEOUT
show text "Too slow"
delay 1000
fi
clear screen
delay 500
save BLOCKNUMBER %conditionName $conditionNumber RT STATUS $leftNumber $rightNumber $leftfont
block training
text "You see two numbers, one left and one right" 0 -200 black
text "Look which number if physically largest" 0 -100 black
text "Click or tap the physically larger number" 0 100 black
text "Click or tap here to start" 0 200 black
wait_for_key mouse
task sce 10
feedback
set &congruentTrials mean c4 ; select c1 == 1 && c3 == 1 && c5 == 1
set &incongruentTrials mean c4 ; select c1 == 1 && c3 == 2 && c5 == 1
text color black
text align left
text -390 -200 &congruentTrials ; prefix "Congruent" ; postfix "ms"
text -390 -100 &incongruentTrials ; prefix "Incongruent" ; postfix "ms"
text -390 0 "Click or tap to continue for real block"
wait_for_key mouse
end
block real
text align center
text "The same task, but now for real" 0 -200 black
text "Remember:" 0 -100 black
text "Click or tap the physically larger number" 0 100 black
text "Click or tap here to start" 0 200 black
wait_for_key mouse
task sce 40
feedback
set &congruentTrials mean c4 ; select c1 == 2 && c3 == 1 && c5 == 1
set &incongruentTrials mean c4 ; select c1 == 2 && c3 == 2 && c5 == 1
text color black
text align left
text -390 -200 &congruentTrials ; prefix "Congruent" ; postfix "ms"
text -390 -100 &incongruentTrials ; prefix "Incongruent" ; postfix "ms"
text -390 0 "Click/tap to continue"
wait_for_key mouse
end
Download
If you have a PsyToolkit account, you can upload the zipfile directly to your PsyToolkit account. Watch a video on how to do that. If you want to upload the zipfile into your PsyToolkit account, make sure the file is not automatically uncompressed (some browsers, especially Mac Safari, by default uncompress zip files). Read here how to easily deal with this. |
Further reading
-
Besner, D., & Coltheart, M. (1979). Ideographic and alphabetic processing in skilled reading of English. Neuropsychologia, 17, 467–472. Link
-
Bowman, K.A. (2020). Response Time modeling for the size congruity effect: Early vs. late interaction. Link
-
Henik, A., & Tzelgov, J. (1982). Is three greater than five: The relation between physical and semantic size in comparison tasks. Memory & Cognition, 10, 389–395. Link
-
Reike, D., Schwarz, W. Exploring the origin of the number-size congruency effect: Sensitivity or response bias?. Attention, Perception, & Psychophysics, 79, 383–388 (2017). DOI