Every color word (RED, GREEN, BLUE, YELLOW) is printed in one of four ink colors. On congruent trials the ink matches the word ("RED" in red); on incongruent trials it doesn't ("RED" in blue). Your job is always to report the ink color, never the word -- reading the word is automatic and hard to suppress, so on incongruent trials it fights your color-naming response. That measurable slowdown is the Stroop effect, and every reaction time here is a real performance.now() measurement of your own click, not a canned number.
The drift-diffusion model (DDM) explains why incongruent trials are slower. It treats a decision as noisy evidence v accumulating over time toward one of two boundaries:
v(t+dt) = v(t) + drift*dt + noise*sqrt(dt)*N(0,1)
respond "correct" when v >= +boundary
respond "error" when v <= -boundary
RT = decision time + non-decision time (encoding + motor)
This is a genuine stochastic (Wiener-process) simulation, stepped in real code every trial -- not a lookup table. Congruent trials get a higher drift rate: the ink color's evidence accumulates cleanly. Incongruent trials get a lower drift rate because the automatically-read word keeps injecting competing evidence, so the same random walk needs more time (and drifts off-target more often) to reach the boundary. The live trace panel replays the model's random walk for the condition of your last response; the histograms compare the model's simulated RT distribution against your own, for both conditions.
- Drift rate -- average speed of evidence accumulation. Higher = faster, more reliable decisions.
- Noise (σ) -- trial-to-trial randomness in the accumulation. Higher noise widens the RT distribution and raises the error rate.
- Boundary separation -- how much evidence is required before responding. Wider boundaries are slower but more accurate (the classic speed/accuracy trade-off).
- Non-decision time -- fixed overhead for stimulus encoding and the motor response, added on top of the decision time.