NBack Task - 2-Choice Responding

Technical Manual

Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com), Millisecond

Credits:
Millisecond thanks Dr. Susanne Jaeggi for kindly providing original instruction materials, stimuli,
as well as assistance!

as well as assistance!

Created: March 01, 2012

Last Modified: July 17, 2026 by K. Borchert (katjab@millisecond.com), Millisecond

Script Copyright © Millisecond Software, LLC

Background

This script implements a basic shape n-back procedure. The n-back task is a go/nogo working-memory performance task with increasing levels of difficulty and provides two explicit response keys for the go and the nogo trials, respectively.

The implemented procedure is based on Jaeggi et al (2010).

References

Jaeggi, Susanne M.; Studer-Luethi, Barbara; Buschkuehl, Martin; Su, Yi-Fen; Jonides, John; Perrig, Walter J. (2010). The relationship between n-back performance and matrix reasoning - implications for training and transfer. Intelligence, 38, 625–635.

Adjustments to z-scores as recommended by: Gregg, A. & Sedikides, C. (2010). Narcissistic Fragility: Rethinking Its Links to Explicit and Implicit Self-esteem, Self and Identity, 9:2, 142-161 (p.148)

Duration

15 minutes

Description

In the 1-key single n-back task, participants are shown a sequence of stimuli (here: a sequence of yellow shapes on a black background) and are asked to indicate whether the currently presented stimulus fulfills the following criteria:

For N=0 trials: - is the shape the same as the shape '1.gif'? If so (it's a target), and press "A". If not, press the "L" key.

For N=1 trials: - is the shape the same as the one that preceded it? If so (it's a target), and press "A". If not, press the "L" key.

For N=2 trials: - is the shape the same as the one presented two trials before? If so (it's a target), and press "A". If not, press the "L" key.

For N=3 trials: - is the shape the same as the one presented three trials before? If so (it's a target), and press "A". If not, press the "L" key.

Etc. for increasing levels of N

Procedure

Practice
- After instructions, participants receive 10 trials of practice per level N tested (here: N = 2 to N = 4),
edit list.nextN_practice to change levels of N practiced

Test
- once practice is done, participants get the option to repeat practice (see parameters.allowPracticeRepeat)

- After practice, participants receive 3 blocks per level of N tested. By default, the level of N increases from
1 to 3.
edit list.Nlevel to change a) N levels tested b) number of testblocks c)selection of N-levels

Block Information:
- Each single n-task block consists of 20+ trials using 8 different shapes.
=> + trials are the N trials that cannot display target shapes yet (=start trials). Their numbers vary depending on N.
The data collected during these start trials are NOT included in performance counts for Correct Rejections/False Alarms.
=> Of the actual 20 experimental trials, 6 present a target and 14 do not (3:7 ratio).
To change the ratio, you need to change the relevant code under block.Test
- The computer selects randomly
a) whether it is a target trial or not and
b) what shape to show if it is not a target trial

Trial Information:
- Each trial presents the shape for 500ms and waits another 2500ms before presenting the next shape in the sequence
The trialduration can be edited by experimenter.
- Participants have the entire 3000ms to respond by pressing "A" if they detect a target or "L".

Stimuli

8 Shapes, See Section Editable Stimuli

Instructions

provided by Millisecond - can be edited under section Editable Instructions
in script 'singlenbacktask_shapes_2keys_instruct_inc.iqjs'

Scoring

Summary Variables
the summary variables always exclude the start trials
(even if parameters.excludeStartTrialfromPerformanceMeasure = false)

Definition Of Hits And False Alarms In This 2-Key Script
HIT = hitting 'A' for targets (no responses and incorrect responses are both treated as 'misses' for this analysis)
FALSE ALARM = hitting 'A' for nontargets (correct rejections and no responses are treated as 'correct' for this analysis)

Z-Score Calculations:
z-score calculations use the following adjustments for extreme hit and false alarm rate
(see Gregg & Sedikides, 2010, p.148)
If the hit rate/FA rate is 0 => 0.005 is used instead (aka 0.005 is added to the hitFA rate)
IF the hit rate/FA rate is 1.0 => 0.995 is used instead (aka 0.005 is subtracted from the hitFA rate)

Summary Data

File Name: singlenbacktask_shapes_2_keys_summary*.iqdat

Data Fields

NameDescription
startDate Date the session was run
startTime Time the session was run
subjectId Participant ID
groupId Group number
sessionId Session number
elapsedTime Session duration in ms
inquisit.version Inquisit version number
computer.platform Device platform: win | mac |ios | android
computer.touch 0 = device has no touchscreen capabilities; 1 = device has touchscreen capabilities
computer.hasKeyboard 0 = no external keyboard detected; 1 = external keyboard detected
completed 0 = Test was not completed
1 = Test was completed
round The total number of experimental blocks run
propCorrect Overall proportion correct (across all test blocks)
targetTrialCountOverall The overall count of target trials runs (across all levels of N)
nrRateTargetOverall The overall proportion of No Response target trials (across all levels of N)
hitRateOverall Overall hit rate (across all levels of N)
hitRTOverall Mean response time (in ms) of correctly responding to target trials (across all levels of N)
errorRTTargetOverall Mean response time (in ms) of pressing the incorrect response key to targets (across all levels of N)
nontargetTrialCountOverall The overall count of nontarget trials runs (across all levels of N)
nrRateNontargetOverall The overall proportion of No Response nontarget trials (across all levels of N)
faRateOverall Overall False Alarm/Commission Error Rate (across all levels of N)
faRTOverall Mean response time (in ms) of pressing incorrect response key for nontarget trials (across all levels of N)
corrRTNontargetOverall Mean response time (in ms) of pressing correct response key for nontarget trials (across all levels of N)
zHitRateOverall The z-score of the overall hit rate
zFaRateOverall The z-score of the overall False Alarm rate
dPrimeOverall Computes d' (parametric measure of sensitivity)
The higher the value, the better targets were overall correctly distinguished
from nontargets (d' = 0: chance performance; negative values: nontargets were treated as targets
and targets were treated as nontargets)
cOverall C-criterion in signal detection:The absolute value of c provides an indication of the strength of
the response bias/response style
negative: participant more likely to report that signal (go stims) is present (liberal response style)
may favor faster responding in speed-accuracy trade-off response paradigms
positive: favoring caution (conservative response style)
Level N Summary Statistics (Explained Only For Level N=0)
targetTrialCountN0 The count of target trials runs in N0 trials
nrRateTargetN0 The proportion of No Response target trials in N0 trials
hitRateN0 Hit rate in N0 trials
hitRTN0 Mean response time (in ms) of correctly responding to target trials in N0 trials
errorRTTargetN0 Mean response time (in ms) of pressing the incorrect response key to targets in N0 trials
nontargetTrialCountN0 The count of nontarget trials runs in N0 trials
nrRateNontargetN0 The proportion of No Response nontarget trials in N0 trials
faRateN0 False Alarm/Commission Error Rate in N0 trials
faRTN0 Mean response time (in ms) of pressing incorrect response key for nontarget trials in N0 trials
corrRTNontargetN0 Mean response time (in ms) of pressing correct response key for nontarget trials in N0 trials
Signal Detection Metrics
zHitRateN0 The z-score of the hit rate in N0 trials
zFaRateN0 The z-score of the False Alarm rate in N0 trials
dPrimeN0 Computes d' (parametric measure of sensitivity) for N0 condition
cN0 C-criterium in 0back condition

Raw Data

File Name: singlenbacktask_shapes_2keys_raw.iqdat

Data Fields

NameDescription
date Date the session was run
time Time the session was run
subject Participant ID
group Group number
session Session number
build Inquisit version number
computer.platform Device platform: win | mac |ios | android
computer.touch 0 = device has no touchscreen capabilities; 1 = device has touchscreen capabilities
computer.hasKeyboard 0 = no external keyboard detected; 1 = external keyboard detected
blockcode The name the current block (built-in Inquisit variable)
blocknum The number of the current block (built-in Inquisit variable)
trialcode The name of the currently recorded trial (built-in Inquisit variable)
trialnum The number of the currently recorded trial (built-in Inquisit variable)
trialnum is a built-in Inquisit variable; it counts all trials run
even those that do not store data to the data file.
totalBlocks The total number of experimental blocks run
n The current level N tested
startTrialCounter Keeps track of how many start trials have been run
stimulusItem.1 The shape presented
stimulusNumber.1 The item number of the presented shape
currentTarget The item number of the current target
response The Response of the participant (scancode of response button)
0 = no response
31 = 'A' key (target key)
38 = 'L' key (non-target key)
(57 = spacebar)
responseCategory "Correct", "Incorrect", "No Response"
correct The correctness of the response (1 = correct; 0 = otherwise)
latency How fast a participant responded within the given timeframe, if at all (in ms)
no responses = the entire trialduration
list.blockAcc.mean Proportion correct during the current block (start trials are excluded from block acc assessment by default, editable)

Parameters

The procedure can be adjusted by setting the following parameters.

NameDescriptionDefault
Design
allowPracticeRepeat True: practice can be repeated as often as indicated (default)
false: practice cannot be repeated
true
excludeStartTrialfromPerformanceMeasure True (1): performance during start trials that cannot be targets yet is not considered
for Block level performance analyses, e.g. for feedback purposes
false (0): performance during start trials that cannot be targets yet IS considered for block performance analyses
true
Timing Parameters
soa Stimulus Onset Asynchrony3000
stimulusPresentationTime The presentation time (in ms) of the stimuli500
Debugging
debugmode Debugmode = 1: targetalerts are shown on screen,
debugmode = 0, no targetalerts are shown
0