// Numbas version: exam_results_page_options {"name": "Charlie's copy of Perform a paired t-test", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"statement": "
The following data was obtained from right-handed participants.
\nThe observations consist of the time taken in seconds for each participant to complete a reaction time task by firstly using their right hand and secondly using their left hand.
\nCarry out a paired t-test to test whether there is evidence of a difference in the reaction times.
\nUse SPSS to complete this question. Save your output in the answer box.
\n\nSubject | \nReaction Time (Right Hand) (seconds) | \nReaction Time (Left Hand) (seconds) | \n
1 | \n1:02 | \n2:11 | \n
2 | \n2:33 | \n2:23 | \n
3 | \n1:45 | \n1:56 | \n
4 | \n1:59 | \n2:15 | \n
5 | \n2:56 | \n3:07 | \n
6 | \n2:44 | \n2:55 | \n
7 | \n3:14 | \n3:32 | \n
8 | \n2:01 | \n1:54 | \n
Paired t-test to see if there is a difference between times taken to complete a task.
"}, "variablesTest": {"maxRuns": 100, "condition": "1-2"}, "tags": [], "parts": [{"showFeedbackIcon": false, "type": "1_n_2", "prompt": "Attach your SPSS output here.
", "variableReplacementStrategy": "originalfirst", "matrix": [], "minMarks": 0, "unitTests": [], "distractors": [], "scripts": {}, "choices": [], "maxMarks": 0, "extendBaseMarkingAlgorithm": true, "showCorrectAnswer": false, "marks": 0, "variableReplacements": [], "showCellAnswerState": false, "customMarkingAlgorithm": "", "shuffleChoices": false, "displayType": "dropdownlist", "displayColumns": 0}, {"checkVariableNames": false, "showFeedbackIcon": false, "type": "jme", "showPreview": false, "checkingAccuracy": 0.001, "prompt": "How would this signficance be written?
", "expectedVariableNames": [], "variableReplacementStrategy": "originalfirst", "answer": "", "failureRate": 1, "unitTests": [], "checkingType": "absdiff", "scripts": {}, "vsetRange": [0, 1], "extendBaseMarkingAlgorithm": true, "showCorrectAnswer": false, "marks": 1, "variableReplacements": [], "customMarkingAlgorithm": "", "vsetRangePoints": 5}], "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "variables": {"mu1": {"definition": "random(18..25#0.5)", "group": "Data given in question", "name": "mu1", "templateType": "anything", "description": ""}, "sig1": {"definition": "random(2..3#0.2)", "group": "Data given in question", "name": "sig1", "templateType": "anything", "description": ""}, "r1": {"definition": "repeat(round(normalsample(mu1,sig1)),12)", "group": "Data given in question", "name": "r1", "templateType": "anything", "description": "Data for the \"right hand\".
"}, "v": {"definition": "if(tvalue>=t999,[1,0,0,0,0],if(tvalue>=t99,[0,1,0,0,0],if(tvalue>=t95,[0,0,1,0,0],if(tvalue>=t90,[0,0,0,1,0],[0,0,0,0,1]))))", "group": "Ungrouped variables", "name": "v", "templateType": "anything", "description": ""}, "tvalue": {"definition": "abs(meandiff*sqrt(n)/stdiff)", "group": "Summary Statistics of the difference", "name": "tvalue", "templateType": "anything", "description": "The test statistic of the difference between left and right.
"}, "stdiff": {"definition": "precround(pstdev(d),3)", "group": "Summary Statistics of the difference", "name": "stdiff", "templateType": "anything", "description": "Standard deviation of the difference of the left and right.
"}, "meandiff": {"definition": "precround(mean(d),3)", "group": "Summary Statistics of the difference", "name": "meandiff", "templateType": "anything", "description": "Mean of the difference between left and right.
"}, "t999": {"definition": "4.437", "group": "t-values", "name": "t999", "templateType": "number", "description": ""}, "r2": {"definition": "repeat(round(normalsample(mu2,sig2)),12)", "group": "Data given in question", "name": "r2", "templateType": "anything", "description": "Data for the \"left hand\".
"}, "t99": {"definition": "3.106", "group": "t-values", "name": "t99", "templateType": "number", "description": ""}, "mu2": {"definition": "mu1+random(2..5#0.1)", "group": "Data given in question", "name": "mu2", "templateType": "anything", "description": ""}, "object": {"definition": "'Participant'", "group": "Ungrouped variables", "name": "object", "templateType": "anything", "description": ""}, "n": {"definition": "12", "group": "Data given in question", "name": "n", "templateType": "number", "description": "Sample size.
"}, "pvalue": {"definition": "precround(ttest(0,d,2),3)", "group": "Ungrouped variables", "name": "pvalue", "templateType": "anything", "description": ""}, "t95": {"definition": "2.201", "group": "t-values", "name": "t95", "templateType": "number", "description": ""}, "msg": {"definition": "['is greater than $\\\\var{t999}$','lies between $\\\\var{t99}$ and $\\\\var{t999}$','lies between $\\\\var{t95}$ and $\\\\var{t99}$','lies between $\\\\var{t90}$ and $\\\\var{t95}$','is less than $\\\\var{t90}$']", "group": "Choices", "name": "msg", "templateType": "anything", "description": ""}, "pmsg": {"definition": "[' is less than $0.001$',' lies between $0.001$ and $0.01$',' lies between $0.01$ and $0.05$',' lies between $0.05$ and $0.1$',' is greater than $0.1$']", "group": "Choices", "name": "pmsg", "templateType": "anything", "description": ""}, "cmsg1": {"definition": "['very strong','strong','slight','no','no']", "group": "Choices", "name": "cmsg1", "templateType": "anything", "description": ""}, "d": {"definition": "list(vector(r2)-vector(r1))", "group": "Summary Statistics of the difference", "name": "d", "templateType": "anything", "description": "Difference between left and right hand, (Left-Right).
"}, "cmsg": {"definition": "['do reject','do reject','do not reject','do not reject','do not reject']", "group": "Choices", "name": "cmsg", "templateType": "anything", "description": ""}, "t": {"definition": "switch(v[0]=1,0,v[1]=1,1,v[2]=1,2,v[3]=1,3,4)", "group": "Ungrouped variables", "name": "t", "templateType": "anything", "description": ""}, "sig2": {"definition": "random(2..4#0.2)", "group": "Data given in question", "name": "sig2", "templateType": "anything", "description": ""}, "t90": {"definition": "1.796", "group": "t-values", "name": "t90", "templateType": "number", "description": ""}}, "functions": {"pstdev": {"language": "jme", "type": "number", "definition": "sqrt(abs(l)/(abs(l)-1))*stdev(l)", "parameters": [["l", "list"]]}}, "extensions": ["stats"], "name": "Charlie's copy of Perform a paired t-test", "preamble": {"css": "", "js": ""}, "ungrouped_variables": ["object", "t", "v", "pvalue"], "variable_groups": [{"variables": ["t90", "t95", "t99", "t999"], "name": "t-values"}, {"variables": ["mu1", "mu2", "n", "r1", "r2", "sig1", "sig2"], "name": "Data given in question"}, {"variables": ["d", "meandiff", "stdiff", "tvalue"], "name": "Summary Statistics of the difference"}, {"variables": ["cmsg1", "cmsg", "msg", "pmsg"], "name": "Choices"}], "type": "question", "contributors": [{"name": "Chris Graham", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/369/"}, {"name": "Vicky Hall", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/659/"}, {"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Lauren Frances Desoysa", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2490/"}, {"name": "Charlie Earle", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3054/"}]}]}], "contributors": [{"name": "Chris Graham", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/369/"}, {"name": "Vicky Hall", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/659/"}, {"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Lauren Frances Desoysa", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2490/"}, {"name": "Charlie Earle", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3054/"}]}