Return to the Mental Arithmetic Task page
						
										Mental Arithmetic Task
SCRIPT INFO

Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com) for Millisecond Software, LLC
Date: 04-04-2018
last updated: 04-05-2018 by K.Borchert (katjab@millisecond.com) for Millisecond Software LLC

Script Copyright © 04-05-2018 Millisecond Software


BACKGROUND INFO 

											*Purpose*
This script implements a Mental Arithmetic Task based on:

KAHNEMAN D., TURSKY, B., SHAPIRO, D. & CRIDER, A. (1969). PUPILLARY, HEART RATE, AND SKIN RESISTANCE
CHANGES DURING A MENTAL TASK. Journal of Experimental Psychology, 79, No. 1, 164-167.


											  *Task*
Participants are presented series of 4 digits and are asked to mentally add* a number (0, 1, 2 or 3) to each digit.
The new sequence is reported by entering the new digits in provided textboxes.

The script can be altered to run either addition, subtraction or multiplication sequences as well as test
any levels from 0-9.


DATA FILE INFORMATION: 
The default data stored in the data files are:

(1) Raw data file: 'mentalarithmetictask_raw*.iqdat' (a separate file for each participant)*

build:							Inquisit build
computer.platform:				the platform the script was run on
date, time, subject, group:		date and time script was run with the current subject/groupnumber 
blockcode, blocknum:			the name and number of the current block
trialcode, trialnum: 			the name and number of the currently recorded trial
									(Note: not all trials that are run might record data; by default data is collected unless /recorddata = false is set for a particular trial/block) 
/arithmeticProcedure:			the math task to perform: choose from "add", "subtract", "multiply" (the default one is "add")
/trialcount:					counts the trials in the practice/test block (resets after practice)
/level:							the current level tested (default: 0, 1, 2, 3)
/digitSequence:					the digits in the order presented (e.g. "3456")
/corrSolution:					contains the correct solution for the current digit sequence
/response:						contains the entered digits (in sequence)
textbox.digit1response.response-
textbox.digit4response.response-: entered digits by textbox
/ACC:							1 = the entered solution is correct (correct digits and order); 0 = otherwise
/countCorrDigits:				counts the number of correctly entered digits per trial
/RT:							stores the latency (in ms); measured from onset of textboxes to pressing the submit-button

/count0:						counts the number of level 0 test trials
/countcorrect0:					counts the number of correct level 0 test trials
/count1:						counts the number of level 1 test trials
/countcorrect1:					counts the number of correct level 1 test trials
/count2:						counts the number of level 2 test trials
/countcorrect2:					counts the number of correct level 2 test trials
/count3:						counts the number of level 3 test trials
/countcorrect3:					counts the number of correct level 3 test trials

The following variables will be empty for the default script set-up and could be removed from the data file:
/count4:						counts the number of level 4 test trials (default settings: "not run")
/countcorrect4:					counts the number of correct level 4 test trials
/count5:						counts the number of level 5 test trials
/countcorrect5:					counts the number of correct level 5 test trials
/count6:						counts the number of level 6 test trials
/countcorrect6:					counts the number of correct level 6 test trials
/count7:						counts the number of level 7 test trials
/countcorrect7:					counts the number of correct level 7 test trials
/count8:						counts the number of level 8 test trials
/countcorrect8:					counts the number of correct level 8 test trials
/count9:						counts the number of level 9 test trials
/countcorrect9:					counts the number of correct level 9 test trials


(2) Summary data file: 'mentalarithmetictask_summary*.iqdat' (a separate file for each participant)*

script.startdate:				date script was run
script.starttime:				time script was started
script.subjectid:				subject id number
script.groupid:					group id number
script.elapsedtime:				time it took to run script (in ms)
computer.platform:				the platform the script was run on
/completed:						0 = script was not completed (prematurely aborted); 1 = script was completed (all conditions run)
/arithmeticProcedure:			the math task to perform: choose from "add", "subtract", "multiply" (the default one is "add")
/levels:						stores all the levels run (default setup: 0123)
/maxCorrectSolutions:			the exit criteria: number of problems participants have to get correct at each tested levels
								to exit the script (default: 5)
/passedTest:					0 = test terminated because max. allowed time was up;
								1 = otherwise (reached criteria for all levels tested)								
								
/trialcount:					number of test trials run
/count0:						counts the number of level 0 test trials
/count1:						counts the number of level 1 test trials
/count2:						counts the number of level 2 test trials
/count3:						counts the number of level 3 test trials

The following variables will be empty for the default script set-up and could be removed from the data file:
/count4:						counts the number of level 4 test trials (default settings: "not run")
/count5:						counts the number of level 5 test trials
/count6:						counts the number of level 6 test trials
/count7:						counts the number of level 7 test trials
/count8:						counts the number of level 8 test trials
/count9:						counts the number of level 9 test trials

* separate data files: to change to one data file for all participants (on Inquisit Lab only), go to section
"DATA" and follow further instructions


EXPERIMENTAL SET-UP

(1) Practice: 
* by default the practice session runs 8 trials (2 trials per levels 0, 1, 2, 3); levels randomly selected 
(change the number of trials under section Editable Parameters; change the levels tested under section Editable Lists)

(2) Test:
- the test runs random selections of levels 0-3 (Note: levels can be edited under section Editable Lists)
- once a level reaches criteria (5 correct solutions -> see section Editable Parameters for possible edits), it is not further selected
- the test ends once all levels reach criteria OR if the maximum allowed test time expires (default: 1h; see section Editable Parameters for possible edits)

Sequence Selection:
- each digit sequences randomly selects 4 different digits
- the script ensures as much as possible (without noticeably slowing down the selection process)
that each presented digit sequence during the practice and test session is unique.
For a random selection of 4 digits from 10 possible digits (no repeats), there are 5040 possible unique sequences. 
The script resets the list of unique sequences after 1000 sequences have been provided (thus repeats are possible after each
block of 1000 trials, but it's unlikely that 1000 sequences are going to be run)

Default Trial Sequence (can be edited under section Editable Parameters):
Get Ready (1000ms) -> blank (4000ms) ->
task instructions (2000ms) -> blank (3000ms) ->
1. digit (1000ms) -> blank (0ms) ->
2. digit (1000ms) -> blank (0ms) ->
3. digit (1000ms) -> blank (0ms) ->
4. digit (1000ms) -> blank (1000ms) ->
presentation of input-textboxes (max. 8000ms) -> 
feedback (optional for test):
positive feedback: 200ms
error feedback: until participants decides to continue ->
ITI (blank screen for 1000ms)


STIMULI
digits: change size under section Editable Parameters

INSTRUCTIONS
provided by Millisecond Software - can be edited under section Editable Instructions

EDITABLE CODE:
check below for (relatively) easily editable parameters, stimuli, instructions etc. 
Keep in mind that you can use this script as a template and therefore always "mess" with the entire code to further customize your experiment.

The parameters you can change are:

/maxCorrectSolutions:			the exit criteria: number of problems participants have to get correct at each level tested
								to exit the script (default: 5)
/maxTestTime:					the max duration (in ms) the test is running if exit-criteria is not met (default: 3600000ms = 1h)
/testFeedback:					true (1) = performance feedback is provided during the test after each trial (default)
								false (0) = performance feedback is not provided during the test
								
/arithmeticProcedure:			the math task to perform: choose from "add", "subtract", "multiply" (the default one is "add")

/digitSize:						the proportional sizing (to canvas height) of the presented digits (default: 8%)


/readyDuration:					the duration (in ms) of the the 'get Ready' trial (default: 1000ms)
/delayTaskInstructions:			the delay (in ms) of the task instructions (measured from onset of trial) (default: 5000ms)
/taskInstructionDuration:		the duration (in ms) of the task instructions (default: 2000ms)
/digit1Delay:					the delay (in ms) of the first digit (measured from onset of trial) (default: 10000ms)
/digitDuration:					the duration (in ms) of the digit presentation (default: 1000ms)
/digit2Delay:					the delay (in ms) of the second digit (measured from onset of trial) (default: 11000ms)
/digit3Delay:					the delay (in ms) of the third digit (measured from onset of trial) (default: 12000ms)
/digit4Delay:					the delay (in ms) of the fourth digit (measured from onset of trial) (default: 13000ms)
/responseTimeout:				the response timeout (in ms) (default: 8000ms)
/recallDelay:					the delay (in ms) of the recall textbox (measured from onset of 'get Ready') (default: 15000ms)
									Note: script checks delay settings and aborts if conflicting
									

/feedbackDuration:				duration (in ms) of positive feedback (default: 500)
									Note: errorfeedback is provided until participant is ready to move on
/ITI:							the intertrial interval in ms (default: 1000)


																
Copyright © Millisecond Software. All rights reserved.
Contact | Terms of Service | Privacy Statement | Security Statement | GDPR
Website Security Test