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.
As a general note, be sure to keep a record of any resources that you use or refer to in the creation of your project. You will need to report your sources as part of the project submission.
What is our independent variable? What is our dependent variable?
R: Independent: Words congruence condition. Dependent: Naming time.
What is an appropriate set of hypotheses for this task? What kind of statistical test do you expect to perform? Justify your choices.
R: Where $\mu_{congruent}$ and $\mu_{incongruent}$ stand for congruent and incongruent population means, respectively: $H_0: \mu_{congruent} = \mu_{incongruent} $ — The time to name the ink colors doesn't change with the congruency condition
$H_A: \mu_{congruent} \neq \mu_{incongruent} $ — The time to name the ink colors changes with the congruency condition
To perform the test I will use a 2-tailed paired t-test. A t-test is apropriated since we don't the standard deviations of the population. A two-sample kind of t-test is necessary since we don't know the population mean. The sample sizes is below 30 (N=24), which is compatible with a t-test. I am also assuming that the population is normally distributed.
Now it’s your chance to try out the Stroop task for yourself. Go to this link, which has a Java-based applet for performing the Stroop task. Record the times that you received on the task (you do not need to submit your times to the site.) Now, download this dataset which contains results from a number of participants in the task. Each row of the dataset contains the performance for one participant, with the first number their results on the congruent task and the second number their performance on the incongruent task.
R: Central tendency: mean; measure of variability: standard deviation.
In [9]:
%matplotlib inline
import pandas
import matplotlib.pyplot as plt
plt.rcParams['figure.figsize'] = (16.0, 8.0)
df = pandas.read_csv('./stroopdata.csv')
In [5]:
df.describe()
Out[5]:
In [12]:
df.hist()
Out[12]:
R:
R: I'm going to perform the test for a confidence level of 95%, which means that our t-critical values are {-2.069,2.069}
In [31]:
import math
df['differences'] = df['Incongruent']-df['Congruent']
N =df['differences'].count()
print "Sample size:\t\t%d"% N
print "DoF:\t\t\t%d"%(df['differences'].count()-1)
mean = df['differences'].mean()
std = df['differences'].std()
tscore = mean/(std/math.sqrt(N))
print "Differences Mean:\t%.3f" % mean
print "Differences Std:\t%.3f" % std
print "t-score:\t\t%.3f" %tscore
We can reject the null hypothesis, since the t-score is greater than 2.069. In this case I have used $\alpha=0.05$, but a bigger confidence level could also reject $H_0$. This means that incongruency affects the naming time, which validates the evidence found in the histograms.
The effects observed are related with the reaction time of our brain. When there is congruency our brain does not need to make a conscient operation and the participant can trust in the first response provided by the brain. When there is incongruency, the participant has conscienscly go through the process of finding the color, which results in a longer response time. Another experiment would be writing with different types of keyboards (e.g., QWERTY, AZERTY, etc.)
In [ ]: