// Numbas version: finer_feedback_settings {"name": "ANOVA (one-way): alcohol effect", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "ANOVA (one-way): alcohol effect", "tags": [], "metadata": {"description": "
This question assesses learners' basic knowledge of a one-way ANOVA and ability to interpret typical software output.
", "licence": "Creative Commons Attribution-ShareAlike 4.0 International"}, "statement": "A study was conducted to investigate any effect of alcohol consumption on the time taken to complete a cognitive task (involving mental arithmetic). There were three groups of subjects; Group A had no alcohol, Group B had two units over 1 hour and Group C had 4 units over 1 hour. The following table reports the responses as the times (in seconds) taken to complete the task:
\nGroup A (0 units) | \n{r1[0]} | \n{r1[1]} | \n{r1[2]} | \n{r1[3]} | \n{r1[4]} | \n{r1[5]} | \n
---|---|---|---|---|---|---|
Group B (2 units) | \n{r2[0]} | \n{r2[1]} | \n{r2[2]} | \n{r2[3]} | \n{r2[4]} | \n{r2[5]} | \n
Group C (4 units) | \n{r3[0]} | \n{r3[1]} | \n{r3[2]} | \n{r3[3]} | \n{r3[4]} | \n{r3[5]} | \n
Complete the sections below to test and evaluate the null hypothesis that alcohol consumption does not affect the mean time taken to complete the task.
\n", "advice": "
Revise ANOVA, e.g., Section 7.5 of OpenIntro Statistics (4th edition).
\nThe p-value can be calculated from the F value using Excel's F.DIST.RT function.
", "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "extensions": ["stats"], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"rss": {"name": "rss", "group": "Ungrouped variables", "definition": "siground(ss-stovern,3)", "description": "", "templateType": "anything", "can_override": false}, "r3": {"name": "r3", "group": "Ungrouped variables", "definition": "repeat(round(normalsample(mu3,sig3)),6)", "description": "", "templateType": "anything", "can_override": false}, "sig2": {"name": "sig2", "group": "Ungrouped variables", "definition": "sig1", "description": "", "templateType": "anything", "can_override": false}, "mu1": {"name": "mu1", "group": "Ungrouped variables", "definition": "random(20..25#0.5)", "description": "", "templateType": "anything", "can_override": false}, "sd1": {"name": "sd1", "group": "Ungrouped variables", "definition": "precround(pstdev(r1),2)", "description": "", "templateType": "anything", "can_override": false}, "m1": {"name": "m1", "group": "Ungrouped variables", "definition": "siground(mean(r1),3)", "description": "", "templateType": "anything", "can_override": false}, "stovern": {"name": "stovern", "group": "Ungrouped variables", "definition": "sum(tsqovern)", "description": "", "templateType": "anything", "can_override": false}, "mu2": {"name": "mu2", "group": "Ungrouped variables", "definition": "random(22..28#0.5)", "description": "", "templateType": "anything", "can_override": false}, "m3": {"name": "m3", "group": "Ungrouped variables", "definition": "siground(mean(r3),3)", "description": "", "templateType": "anything", "can_override": false}, "mbt": {"name": "mbt", "group": "Ungrouped variables", "definition": "siground(BTSS/dfbt,3)", "description": "", "templateType": "anything", "can_override": false}, "v1": {"name": "v1", "group": "Ungrouped variables", "definition": "switch(pvalue<=0.001,[1,0,0,0,0],pvalue<=0.01,[0,1,0,0,0],pvalue<=0.05,[0,0,1,0,0],pvalue<=0.1,[0,0,0,1,0],[0,0,0,0,1])", "description": "", "templateType": "anything", "can_override": false}, "dfrs": {"name": "dfrs", "group": "Ungrouped variables", "definition": "N-k", "description": "", "templateType": "anything", "can_override": false}, "n2": {"name": "n2", "group": "Ungrouped variables", "definition": "6", "description": "", "templateType": "anything", "can_override": false}, "n": {"name": "n", "group": "Ungrouped variables", "definition": "n1+n2+n3", "description": "", "templateType": "anything", "can_override": false}, "sig3": {"name": "sig3", "group": "Ungrouped variables", "definition": "sig1", "description": "", "templateType": "anything", "can_override": false}, "stderror": {"name": "stderror", "group": "Ungrouped variables", "definition": "precround(sqrt(mrs)/sqrt(n1),2)", "description": "", "templateType": "anything", "can_override": false}, "r2": {"name": "r2", "group": "Ungrouped variables", "definition": "repeat(round(normalsample(mu2,sig2)),6)", "description": "", "templateType": "anything", "can_override": false}, "tol": {"name": "tol", "group": "Ungrouped variables", "definition": "0.15", "description": "", "templateType": "anything", "can_override": false}, "t": {"name": "t", "group": "Ungrouped variables", "definition": "[sum(r1),sum(r2),sum(r3)]", "description": "", "templateType": "anything", "can_override": false}, "vr": {"name": "vr", "group": "Ungrouped variables", "definition": "siground(MBT/MRS,3)", "description": "", "templateType": "anything", "can_override": false}, "pmsg": {"name": "pmsg", "group": "Ungrouped variables", "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.10$',' is greater than $0.10$']", "description": "", "templateType": "anything", "can_override": false}, "v": {"name": "v", "group": "Ungrouped variables", "definition": "switch(vr>=11.34,[1,0,0,0,0],vr>=6.36,[0,1,0,0,0],vr>=3.68,[0,0,1,0,0],vr>=2.7,[0,0,0,1,0],[0,0,0,0,1])", "description": "", "templateType": "anything", "can_override": false}, "n3": {"name": "n3", "group": "Ungrouped variables", "definition": "6", "description": "", "templateType": "anything", "can_override": false}, "tss": {"name": "tss", "group": "Ungrouped variables", "definition": "siground(ss-G^2/N,3)", "description": "", "templateType": "anything", "can_override": false}, "tsqovern": {"name": "tsqovern", "group": "Ungrouped variables", "definition": "[t[0]^2/n1,t[1]^2/n2,t[2]^2/n3]", "description": "", "templateType": "anything", "can_override": false}, "mrs": {"name": "mrs", "group": "Ungrouped variables", "definition": "siground(RSS/dfrs,3)", "description": "", "templateType": "anything", "can_override": false}, "mu3": {"name": "mu3", "group": "Ungrouped variables", "definition": "random(24..32#0.5)", "description": "", "templateType": "anything", "can_override": false}, "k": {"name": "k", "group": "Ungrouped variables", "definition": "3", "description": "", "templateType": "anything", "can_override": false}, "btss": {"name": "btss", "group": "Ungrouped variables", "definition": "siground(stovern-G^2/N,3)", "description": "", "templateType": "anything", "can_override": false}, "r1": {"name": "r1", "group": "Ungrouped variables", "definition": "repeat(round(normalsample(mu1,sig1)),6)", "description": "", "templateType": "anything", "can_override": false}, "n1": {"name": "n1", "group": "Ungrouped variables", "definition": "6", "description": "", "templateType": "anything", "can_override": false}, "u": {"name": "u", "group": "Ungrouped variables", "definition": "switch(v[0]=1,0,v[1]=1,1,v[2]=1,2,v[3]=1,3,4)", "description": "", "templateType": "anything", "can_override": false}, "m2": {"name": "m2", "group": "Ungrouped variables", "definition": "siground(mean(r2),3)", "description": "", "templateType": "anything", "can_override": false}, "ss": {"name": "ss", "group": "Ungrouped variables", "definition": "sum(ssq)", "description": "", "templateType": "anything", "can_override": false}, "pvalue": {"name": "pvalue", "group": "Ungrouped variables", "definition": "precround(ftest(VR,2,15),3)", "description": "", "templateType": "anything", "can_override": false}, "sig1": {"name": "sig1", "group": "Ungrouped variables", "definition": "random(3..5#0.2)", "description": "", "templateType": "anything", "can_override": false}, "sd3": {"name": "sd3", "group": "Ungrouped variables", "definition": "precround(pstdev(r3),2)", "description": "", "templateType": "anything", "can_override": false}, "cmsg": {"name": "cmsg", "group": "Ungrouped variables", "definition": "['do reject','do reject','do not reject','do not reject','do not reject']", "description": "", "templateType": "anything", "can_override": false}, "sd2": {"name": "sd2", "group": "Ungrouped variables", "definition": "precround(pstdev(r2),2)", "description": "", "templateType": "anything", "can_override": false}, "g": {"name": "g", "group": "Ungrouped variables", "definition": "sum(t)", "description": "", "templateType": "anything", "can_override": false}, "dfbt": {"name": "dfbt", "group": "Ungrouped variables", "definition": "k-1", "description": "", "templateType": "anything", "can_override": false}, "ssq": {"name": "ssq", "group": "Ungrouped variables", "definition": "[sum(map(x^2,x,r1)),sum(map(x^2,x,r2)),sum(map(x^2,x,r3))]", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["sd1", "sd2", "sd3", "vr", "mbt", "pmsg", "mu3", "stderror", "n", "m1", "tol", "m2", "btss", "stovern", "tss", "dfbt", "m3", "ssq", "sig1", "v1", "sig3", "sig2", "dfrs", "cmsg", "rss", "tsqovern", "mu1", "g", "r2", "mu2", "ss", "k", "r3", "mrs", "r1", "u", "t", "v", "n1", "n2", "n3", "pvalue"], "variable_groups": [], "functions": {"pstdev": {"parameters": [["l", "list"]], "type": "number", "language": "jme", "definition": "sqrt(abs(l)/(abs(l)-1))*stdev(l)"}}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Fill in the gaps in this table of descriptive statistics:
\n\n | $\\overline{x}_i$ | \n$SD_i$ | \n$n_i$ | \n
Group A | \n[[0]] | \n[[1]] | \n6 | \n
---|---|---|---|
Group B | \n[[2]] | \n[[3]] | \n6 | \n
Group C | \n[[4]] | \n[[5]] | \n6 | \n
\n | \n | \n | $N=18$ | \n
Fill in the gaps in the ANOVA table:
\n\n | df | \nSum Sq | \nMean Sq | \nF | \n
---|---|---|---|---|
alcohol | \n[[0]] | \n[[1]] | \n[[2]] | \n[[3]] | \n
Residuals | \n[[4]] | \n[[5]] | \n$\\var{mrs}$ | \n- | \n
Total | \n[[6]] | \n$\\var{tss}$ | \n- | \n- | \n
What is the correct range for the $p$ value?
", "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": 1, "showCellAnswerState": true, "choices": ["$p$ less than $0.1\\%$
", "$p$ lies between $0.1\\%$ and $1\\%$
", "$p$ lies between $1 \\%$ and $5\\%$
", "$p$ lies between $5 \\%$ and $10\\%$
", "$p$ is greater than $10\\%$
"], "matrix": "v"}, {"type": "1_n_2", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "What is the strength of evidence against the null hypothesis that the mean times taken are the same for the three groups?
", "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": 0, "showCellAnswerState": true, "choices": ["Very strong", "Strong", "Moderate", "Weak", "None"], "matrix": "v"}, {"type": "1_n_2", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "What is the correct decision based on the ANOVA analysis?
", "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": 1, "showCellAnswerState": true, "choices": ["We reject the null hypothesis at the $0.1\\%$ level", "We reject the null hypothesis at the $1\\%$ level.", "We reject the null hypothesis at the $5\\%$ level.", "We do not reject the null hypothesis but consider further investigation.", "We do not reject the null hypothesis."], "matrix": "v"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question", "contributors": [{"name": "Mario Orsi", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/427/"}, {"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}]}], "contributors": [{"name": "Mario Orsi", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/427/"}, {"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}