Introduction

In a Stroop task, participants are presented with a list of words, with each word displayed in a color of ink. The participant’s task is to say out loud the color of the ink in which the word is printed. The task has two conditions: a congruent words condition, and an incongruent words condition. In the congruent words condition, the words being displayed are color words whose names match the colors in which they are printed: for example RED, BLUE. In the incongruent words condition, the words displayed are color words whose names do not match the colors in which they are printed: for example PURPLE, ORANGE. In each case, we measure the time it takes to name the ink colors in equally-sized lists. Each participant will go through and record a time from each condition.

Our dataset is a sample of a larger population, made up of 24 individuals.

Dependent and independent variables

Our independent variable is the color matching (does the color match the word or not). Our dependent variable is the time it takes to name the ink color.

Null and alternative hypotheses

Null and alternative hypothesis in words

We can hypothesize that the distribution will be normal: the time to name should fall around a certain value in both conditions. However, we can also hypothesize that it will take longer to name the color in an incongruent condition, because the situation is more confusing.

  • Our null hypothesis is that there is no difference in population means of response time under incongruent and congruent scenarios.
  • Our alternative hypothesis is that the population mean of response time under the incongruent scenari is higher than the population mean of response time under the congruent scenari.

We are going to test these hypotheses to check if there is enough evidence to infer that the condition is true for the entire population.

Null and alternative hypothesis in mathematical terms

In mathematical terms, let’s define:

  • \(\mu C\) as the population mean of the Congruent sample
  • \(\mu I\) as the population mean of the Incongruent sample

\(\ H_0: \mu C = \mu I\) \(\ H_1: \mu C < \mu I\)

Descriptive statistics

Summary statistics

library(ggplot2)
library(reshape2)

stroop = read.csv('stroopdata.csv')
summary(stroop)
##    Congruent      Incongruent   
##  Min.   : 8.63   Min.   :15.69  
##  1st Qu.:11.90   1st Qu.:18.72  
##  Median :14.36   Median :21.02  
##  Mean   :14.05   Mean   :22.02  
##  3rd Qu.:16.20   3rd Qu.:24.05  
##  Max.   :22.33   Max.   :35.26

IQR for Congruent colors

IQR(stroop$Congruent)
## [1] 4.3055

IQR for Incongruent colors

IQR(stroop$Incongruent)
## [1] 5.33475

Variance for Congruent colors

var(stroop$Congruent)
## [1] 12.66903

Variance for Incongruent colors

var(stroop$Incongruent)
## [1] 23.01176

Standard deviation for Congruent colors

sd(stroop$Congruent)
## [1] 3.559358

Standard deviation for Incongruent colors

sd(stroop$Incongruent)
## [1] 4.797057

Visualization

Histograms and density kernels

ggplot(stroop, aes(x=Congruent)) + 
    geom_histogram(aes(y=..density..),
                   binwidth=2,
                   colour="black", fill="#ADD8E6") +
    geom_density(alpha=.5, fill="#FFE4B5") +
    xlab('seconds') +
    ggtitle('Distribution for congruent colors')

The distribution for congruent colors is normal as expected.

ggplot(stroop, aes(x=Incongruent)) + 
    geom_histogram(aes(y=..density..),
                   binwidth=2,
                   colour="black", fill="#ADD8E6") +
    geom_density(alpha=.5, fill="#FFE4B5") +
    xlab('seconds') +
    ggtitle('Distribution for incongruent colors')

The distribution for incongruent colors is actually right skewed. We could consider these values as outsiders, but we should consider the fact that incongruent colors really confuses a small part of the population.

Boxplots

boxplot(stroop, staplelty=0, col="#ADD8E6", main="Boxplots of response time per condition", 
    xlab="Color matching", ylab="Seconds to answer")

From the boxplots alone, it does seem like incongruent color matching results in longer response time overall. The two higher values we discussed above while commenting the Incongruent distribution are considered as outsiders here.

Expected statistical test

We must choose our statistical test according to our situation. We want to know if, in general, it takes longer to name a color when the word is incongruent, compared to when the word is congruent. Therefore, we need to compare means or medians. Here are the other information at our disposal:

Because we don’t know the popoluation standard deviation, and because our samples contain less than 30 individuals, a t-test is preferable to a z-test. Also, because the samples are normally distributed, a t-test is preferable to a Wilcoxon signed-rank test.

The t-test will allow us to determine if the two sets of data are significantly different from each other. We will actually use a paired t-test: this is perfect to compare two samples before and after a specific event (here, switching from congruent to incongruent colors). We will make it one-tailed, because we suspect the incongruent variable makes reading slower, not faster.

Paired t-test

t.test(stroop$Congruent, stroop$Incongruent, paired=TRUE)
## 
##  Paired t-test
## 
## data:  stroop$Congruent and stroop$Incongruent
## t = -8.0207, df = 23, p-value = 4.103e-08
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -10.019028  -5.910555
## sample estimates:
## mean of the differences 
##               -7.964792

Our p-value is less than 0.05, we reject our null hypothesis (the idea that there is no relation between color congruence and time). We can conclude that there is a definite correlation between reading time and color congruence.

Conclusion

I believe the confusion between the meaning of the word and its actual color is responsible for the effect observed. If the words written are not colors but animals or fruits, then the reading process is smoother. A somehow similar effect may be obtained by matching a direction to a movement instead of an orientation. If the arrow is pointed up but moves to the right, the subject should swipe right, but it’s not so intuitive.