Child N-Back Task

Technical Manual

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

Credits:
Millisecond thanks Dr. Pelegrina for generously sharing source material!

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

Script Copyright © Millisecond Software, LLC

Background

This script implements a basic letter n-back procedure used in research with children to obtain norming data for children aged 7-13. The n-back task is a go/nogo working-memory performance task with increasing levels of difficulty.

The implemented nback procedure is based on Pelegrina et al (2015).

References

Pelegrina, S. et al (2015). Normative data on the n-back task for children and young adolescents. Frontiers in Psychology, 6. URL=https://www.frontiersin.org/article/10.3389/fpsyg.2015.01544 DOI=10.3389/fpsyg.2015.01544 https://www.researchgate.net/publication/283085448Normative_data_onTheN-backTaskFor_children_and_young_adolescents

Adjustments to z-scores done in this Inquisit script 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 2-key single n-back task, participants are shown a sequence of stimuli (here: a sequence of black letters on a white background) and are asked to indicate whether the currently presented stimulus fulfills the following criteria:

For N=0 trials: - is the letter the same as the letter 'X'? If so (it's a target), press "1". If not, press "2".

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

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

For N=3 trials: - is the letter the same as the one presented three trials before? If so (it's a target), press "1". If not, press "2".

The default setup of this script runs 2 blocks of: - n1Back - n2Back - n3Back in that order but can be easily edited to run n0Backs-n3Backs.

Procedure

This script provides code to run n0Backs, n1Backs, n2Backs and n3Backs in sequential order.
By default, this script only runs the n1Back, n2Back and n3Back condition.
Check section Editable Parameter to skip/add conditions.

Procedure
For each level of N-back, participants:
1. receive instructions (which can be repeated as often as necessary)
2. practice block: N start trials + 20 test trials (6 targets, 14 nontargets) - practice is repeated if the practice hitRate is below 60%
3. test: 2 test blocks (editable number) with N start trials + 20 trials (6 targets, 14 nontargets)
Test is prematurely terminated if performance in one of the test blocks sinks below 60%correct.

Trial Information:
- The computer selects randomly
a) whether it is a target trial or not and
b) what letter to show if it is not a target trial
Based on shared original e-prime script, notarget letters are selected randomly without replacement
from 20 consonants.

Trial Sequence:
- Each trial presents the letter for 500ms and waits another 3000ms before presenting the next letter in the sequence
(editable durations)
- Participants have the entire 3500ms to respond

Stimuli

20 consonant letters, see section Editable Stimuli

Instructions

The presented instructions are based on the e-prime script shared by Dr. Pellegrina
Instructions can be edited under section Editable Instructions in script
'childletternbacktask_instruct_inc.iqjs'

Scoring

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

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)

Norms

One important goal of Pelegrina et al (2015) was to report n-back norming data for children 7-13 years
of age. The reported norms can be found in Table 4.

Norming Sample: Pelegrina et al (2015) tested a total of 3722 Spanish children and adolescents
(1886 boys and 1836 girls) aged 7–13 years.

Testing Design: Each child was tested with 2 blocks for (letter) n1Back, n2Back, n3Back (sequential block order)
with 20 trials each (30% targets). If a child did not reach 60% correct during a test block,
the task was prematurely terminated.

Result: Table 4 provides means (of hits only), standard deviations and p-levels by nback level, age and gender.
Pelegrina et al (2015) further report:
"This component showed that age-related increases in performance diminished with age.
Gender was found to be a predictor only in the 1-back condition and for total hits. Girls
obtained a higher number of hits than boys at both levels of the task. (p.6)"

Script: p-values reported in this script are solely based on reported means and standarddeviations.
By default this script reports p-values for hits for n1Back, n2Back and n3Back levels using
weighted means of male and female means as well as pooled standarddeviations.
If gender specific values are needed, go to section Editable Parameters and check parameter settings.

For a more in depth analyses of specific data, please refer to Table 4 in Pelegrina et al (2015).
The article can be downloaded here:
https://www.researchgate.net/publication/283085448Normative_data_onTheN-backTaskFor_children_and_young_adolescents

Summary Data

File Name: childletternbacktask_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
scriptAbort 0 = the script was not ended prematurely due to low performance in one test block
1 = the script was prematurely ended due to low performance in one test block
Parameter Values
calculatePValues True (1): the script will collect age and gender information at the end
and report a p-values for the total hits (across n1Back, n2Back and n3Back conditions)
using the normative data reported by Pelegrina et al (2015, table4)
false (0): no p-values are reported
useGenderInfo True (1): gender information is used when reporting p-values for total hits
false (0): no gender information is used when reporting p-values.
Reported p-values are based on the pooled data of both genders.
Pooled data are calculated by this script using the provided
numbers in table 4 (Pelegrina et al, 2015).
Summary Data: The Following Summary Variables Are Only Based On Performance On Trial.Target/Trial.Nontarget
propCorrectTotal Overall proportion correct (across all test blocks and level of N tested)
hitsTotal Overall number of hits (across all test blocks and level of N tested)
zValueN1Back The calculated z-value for the total hits (across n1Back, n2Back, n3Back)
pValueN1Back The calculated p-value for the total hits (across n1Back, n2Back, n3Back) (based on selected mean and standard deviation information for that age group)
referenceMeanN1Back The reference Mean used for calculating hit p-value for the n1Back task
referenceSDN1Back The reference standarddeviation used for calculating hit p-value for the n1Back task
meanHitRTTotal The overall mean hit response time (in ms)
missesTotal Overall number of misses (across all test blocks and level of N tested)
crTotal Overall number of correct rejections (across all test blocks and level of N tested)
faTotal Overall number of false alarms (across all test blocks and level of N tested)
nrTotal Overall number of no responses (across all test blocks and level of N tested)
Signal Detection (Separate For Total And All Levels Of N Tested; Only Described For Total)
hitRateTotal The overall hitRate (number of hits/number of targetTrials)
zHitRateTotal The z-converted hitRate
faRateTotal The overall false alarm rate (number of false alarms/number of nontarget trials)
zFaRateTotal The z-converted FArate
dPrimeTotal Computes d' (parametric measure of sensitivity)
=> Range (in this script)
-5.1516586840152740479 <= dprime <= 5.1516586840152740479 (=perfect performance)
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)
cTotal 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 is present (liberal response style)
may favor faster responding in speed-accuracy trade-off response paradigms
positive: favoring caution (conservative response style)

Raw Data

File Name: childletternbacktask_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.
phase 'practice' vs. 'test'
blockCounterPerLevelN Tracks the number of blocks run per N-level tested
n The current level N tested
startTrialCounter Keeps track of how many start trials have been run
stimulusItem.1 The letter presented
stimulusNumber.1 The item number of the presented letter
currentTarget The item number of the current target
response The Response of the participant (SCANCODE of response button)
0 = no response
2 => '1' key (target key)
3 => '2' key (non target key)
responseText Stores the actual key pressed ("1" vs. "2")
responseCategory "Hit": pressed target key for target
"Miss": pressed nontarget key for target
"CR": pressed nontarget key for nontarget
"FA": pressed target key for nontarget
"NR": did not press any response key
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)

Parameters

The procedure can be adjusted by setting the following parameters.

NameDescriptionDefault
Design Parameters
runN0Back True = n0Back module is run; false = n0Back module is skipped ( Pelegrina et al, 2015, did not run the n0Back)false
runN1Back True = n1Back module is run; false = n1Back module is skippedtrue
runN2Back True = n2Back module is run; false = n2Back module is skippedtrue
runN3Back True = n3Back module is run; false = n3Back module is skipped
Pelegrina et al (2015) report that 'The version of the task applied here consisted of three levels:1-back,2-back,and 3-back.'(p.3)
true
numberBlocksPerNLevel The number of blocks run per level of N tested2
showKeyReminders True = script will show response key reminders for target and notarget keys
false = no response key reminder are presented
true
minPracticeHitRate The minimum hitRate proportion for the first practice block in each nlevel
that needs to be reached to move on to test blocks without a repetition of the practice; see Pelegrina et al (2015)
0.6
minTestAcc The minimum proportion correct that needs to be reached during each test block
if the minimum acc is not reached, the script terminates automatically; see Pelegrina et al (2015)
0.6
maxPracticeBlocks The number of test blocks run per level of N tested2
Norms: See Pelegrina Et Al (2015, Table4)
calculatePValues True: the script will collect age and gender information at the end
and report a p-values for the TOTAL hits (across n1Back, n2Back and n3Back conditions)
using the normative data reported by Pelegrina et al (2015, table4)
false: no p-values are reported
true
useGenderInfo True: gender information is used when reporting p-values for total hits
false: no gender information is used when reporting p-values.
Reported p-values are based on the pooled data of both genders.
Pooled data are calculated by this script using the provided
numbers in table 4 (Pelegrina et al, 2015).
true
Timing Parameters
soa Stimulus Onset Asynchrony in ms3500
stimulusPresentationTime The presentation time (in ms) of the stimuli500
getReadyDuration The duration (in ms) of the 'Get Ready' Trial3000
nBackDelay The delay (in ms) of the first nback trial after the 'Get Ready' Trials end1000
Response Keys
targetKey "1"
nontargetKey "2"
Debug
debugMode DebugMode = 1: targetAlerts are shown on screen,
debugMode = 0, no targetAlerts are shown (default)
0