___________________________________________________________________________________________________________________ Mental Arithmetic Task ___________________________________________________________________________________________________________________ Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com) for Millisecond Software, LLC Date: 04-04-2018 last updated: 12-11-2024 by K. Borchert (katjab@millisecond.com) for Millisecond Software, LLC Script Copyright © 12-11-2024 Millisecond Software ___________________________________________________________________________________________________________________ BACKGROUND INFO ___________________________________________________________________________________________________________________ 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 DESCRIPTION ___________________________________________________________________________________________________________________ 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. ___________________________________________________________________________________________________________________ DURATION ___________________________________________________________________________________________________________________ the default set-up of the script takes appr. 15 minutes to complete ___________________________________________________________________________________________________________________ DATA OUTPUT DICTIONARY ___________________________________________________________________________________________________________________ The fields in the data files are: (1) Raw data file: 'mentalArithmetictask_raw*.iqdat' (a separate file for each participant)* build: The specific Inquisit version used (the 'build') that was run computer.platform: the platform the script was run on (win/mac/ios/android) date, time: date and time script was run subject, group, with the current subject/groupnumber session: with the current session id blockCode, blockNum: the name and number of the current block (built-in Inquisit variable) trialCode, trialNum: the name and number of the currently recorded trial (built-in Inquisit variable) Note: trialNum is a built-in Inquisit variable; it counts all trials run; even those that do not store data to the data file such as feedback trials. Thus, trialNum may not reflect the number of main trials run per block. (Parameter) 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 currentResponse: 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)* inquisit.version: Inquisit version run computer.platform: the platform the script was run on (win/mac/ios/android) startDate: date script was run startTime: time script was started subjectId: assigned subject id number groupId: assigned group id number sessionId: assigned session id number elapsedTime: time it took to run script (in ms); measured from onset to offset of script completed: 0 = script was not completed (prematurely aborted); 1 = script was completed (all conditions run) (Parameter) 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) (Parameter) 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 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 ___________________________________________________________________________________________________________________ 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. 60000ms) -> 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: 60000ms) /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)