// Numbas version: finer_feedback_settings {"name": "Perform a one-way ANOVA", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variable_groups": [], "variables": {"btss": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(stovern-G^2/N,2)", "description": "", "name": "btss"}, "tol": {"templateType": "anything", "group": "Ungrouped variables", "definition": "0.001", "description": "", "name": "tol"}, "r1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "repeat(round(normalsample(mu1,sig1)),6)", "description": "", "name": "r1"}, "dfbt": {"templateType": "anything", "group": "Ungrouped variables", "definition": "k-1", "description": "", "name": "dfbt"}, "pmsg": {"templateType": "anything", "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": "", "name": "pmsg"}, "sig1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(3..5#0.2)", "description": "", "name": "sig1"}, "ssq": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[sum(map(x^2,x,r1)),sum(map(x^2,x,r2)),sum(map(x^2,x,r3))]", "description": "", "name": "ssq"}, "pvalue": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(ftest(VR,2,15),3)", "description": "", "name": "pvalue"}, "mrs": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(RSS/dfrs,2)", "description": "", "name": "mrs"}, "sd1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(pstdev(r1),2)", "description": "", "name": "sd1"}, "tss": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(ss-G^2/N,2)", "description": "", "name": "tss"}, "m3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(mean(r3),2)", "description": "", "name": "m3"}, "k": {"templateType": "anything", "group": "Ungrouped variables", "definition": "3", "description": "", "name": "k"}, "cmsg": {"templateType": "anything", "group": "Ungrouped variables", "definition": "['do reject','do reject','do not reject','do not reject','do not reject']", "description": "", "name": "cmsg"}, "mu1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(20..25#0.5)", "description": "", "name": "mu1"}, "n": {"templateType": "anything", "group": "Ungrouped variables", "definition": "n1+n2+n3", "description": "", "name": "n"}, "stovern": {"templateType": "anything", "group": "Ungrouped variables", "definition": "sum(tsqovern)", "description": "", "name": "stovern"}, "sig2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "sig1", "description": "", "name": "sig2"}, "v1": {"templateType": "anything", "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": "", "name": "v1"}, "mu2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(22..28#0.5)", "description": "", "name": "mu2"}, "n3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "6", "description": "", "name": "n3"}, "n2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "6", "description": "", "name": "n2"}, "vr": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(MBT/MRS,2)", "description": "", "name": "vr"}, "dfrs": {"templateType": "anything", "group": "Ungrouped variables", "definition": "N-k", "description": "", "name": "dfrs"}, "rss": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(ss-stovern,2)", "description": "", "name": "rss"}, "t": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[sum(r1),sum(r2),sum(r3)]", "description": "", "name": "t"}, "n1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "6", "description": "", "name": "n1"}, "sd3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(pstdev(r3),2)", "description": "", "name": "sd3"}, "m1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(mean(r1),2)", "description": "", "name": "m1"}, "ss": {"templateType": "anything", "group": "Ungrouped variables", "definition": "sum(ssq)", "description": "", "name": "ss"}, "r3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "repeat(round(normalsample(mu3,sig3)),6)", "description": "", "name": "r3"}, "sig3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "sig1", "description": "", "name": "sig3"}, "v": {"templateType": "anything", "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": "", "name": "v"}, "m2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(mean(r2),2)", "description": "", "name": "m2"}, "stderror": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(sqrt(mrs)/sqrt(n1),2)", "description": "", "name": "stderror"}, "mbt": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(BTSS/dfbt,2)", "description": "", "name": "mbt"}, "r2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "repeat(round(normalsample(mu2,sig2)),6)", "description": "", "name": "r2"}, "mu3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(24..32#0.5)", "description": "", "name": "mu3"}, "g": {"templateType": "anything", "group": "Ungrouped variables", "definition": "sum(t)", "description": "", "name": "g"}, "tsqovern": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[t[0]^2/n1,t[1]^2/n2,t[2]^2/n3]", "description": "", "name": "tsqovern"}, "u": {"templateType": "anything", "group": "Ungrouped variables", "definition": "switch(v[0]=1,0,v[1]=1,1,v[2]=1,2,v[3]=1,3,4)", "description": "", "name": "u"}, "sd2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(pstdev(r2),2)", "description": "", "name": "sd2"}}, "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"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "name": "Perform a one-way ANOVA", "functions": {"pstdev": {"type": "number", "language": "jme", "definition": "sqrt(abs(l)/(abs(l)-1))*stdev(l)", "parameters": [["l", "list"]]}}, "showQuestionGroupNames": false, "parts": [{"scripts": {}, "gaps": [{"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "m1", "minValue": "m1", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "sd1", "minValue": "sd1", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "t[0]", "minValue": "t[0]", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "ssq[0]", "minValue": "ssq[0]", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "m2", "minValue": "m2", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "sd2", "minValue": "sd2", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "t[1]", "minValue": "t[1]", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "ssq[1]", "minValue": "ssq[1]", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "m3", "minValue": "m3", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "sd3", "minValue": "sd3", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "t[2]", "minValue": "t[2]", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "ssq[2]", "minValue": "ssq[2]", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "g", "minValue": "g", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "ss", "minValue": "ss", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}], "type": "gapfill", "prompt": "\n

First fill in this table with the appropriate values, all decimals to 2 decimal places:

\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
 $\\overline{x}_i$$s_i$$T_i$$\\sum x^2$$n_i$
Group A[[0]][[1]][[2]][[3]]6
Group B[[4]][[5]][[6]][[7]]6
Group C[[8]][[9]][[10]][[11]]6
   $G=\\;$[[12]]Sum of Squares=[[13]]$N=18$
\n

Note that in doing this you will have supplied the sample means and sample standard deviations for the three groups.

\n \n ", "showCorrectAnswer": true, "marks": 0}, {"scripts": {}, "gaps": [{"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "tss", "minValue": "tss", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "btss", "minValue": "btss", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "rss", "minValue": "rss", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}], "type": "gapfill", "prompt": "

Now find the following, all to 2 decimal places:

\n

$\\displaystyle SST\\;=\\;$[[0]], $\\displaystyle SSG\\;=\\;$[[1]], $\\displaystyle SSW\\;=\\;$[[2]]

", "showCorrectAnswer": true, "marks": 0}, {"scripts": {}, "gaps": [{"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "dfbt", "minValue": "dfbt", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "btss", "minValue": "btss", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "mbt", "minValue": "mbt", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "vr", "minValue": "vr", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "dfrs", "minValue": "dfrs", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "rss", "minValue": "rss", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "mrs", "minValue": "mrs", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "n-1", "minValue": "n-1", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "tss", "minValue": "tss", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}], "type": "gapfill", "prompt": "

Now complete the ANOVA table using the values to 2 decimal places obtained above:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
SourcedfSSMSF
Between groups[[0]][[1]][[2]][[3]]
Within groups[[4]][[5]][[6]]-
Total[[7]][[8]]--
\n

Note that is found by taking the ratio of two of the values in this table.

\n

Input all numbers to 2 decimal places.

", "showCorrectAnswer": true, "marks": 0}, {"displayType": "radiogroup", "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\\%$

"], "displayColumns": 1, "prompt": "

Give the value of $F$ you have found, choose the range for the $p$ value by looking up the critical values of $F_{2,15}$ (one-sided).

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$10\\%$$5\\%$$1\\%$$0.1\\%$
$2.70$$3.68$$6.36$$11.34$
", "distractors": ["", "", "", "", ""], "shuffleChoices": false, "scripts": {}, "minMarks": 0, "type": "1_n_2", "maxMarks": 0, "showCorrectAnswer": true, "matrix": "v", "marks": 0}, {"displayType": "radiogroup", "choices": ["Very strong", "Strong", "Moderate", "Weak", "None"], "displayColumns": 0, "prompt": "

Given the $p$-value and the range you have found, what is the strength of evidence against the null hypothesis that the mean times taken are the same for the three groups?

", "distractors": ["", "", "", "", ""], "shuffleChoices": false, "scripts": {}, "minMarks": 0, "type": "1_n_2", "maxMarks": 0, "showCorrectAnswer": true, "matrix": "v", "marks": 0}, {"displayType": "radiogroup", "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."], "displayColumns": 1, "prompt": "

Hence what is your decision based on the above ANOVA analysis?

", "distractors": ["", "", "", "", ""], "shuffleChoices": false, "scripts": {}, "minMarks": 0, "type": "1_n_2", "maxMarks": 0, "showCorrectAnswer": true, "matrix": "v", "marks": 0}], "statement": "

The following data arose in a comparison of the effects of alcohol on the time taken to complete a task. 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 responses are the times (in seconds) taken to complete a word-matching task.

\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
Group A (0 units)$\\var{r1[0]}$$\\var{r1[1]}$$\\var{r1[2]}$$\\var{r1[3]}$$\\var{r1[4]}$$\\var{r1[5]}$
Group B (2 units)$\\var{r2[0]}$$\\var{r2[1]}$$\\var{r2[2]}$$\\var{r2[3]}$$\\var{r2[4]}$$\\var{r2[5]}$
Group C (4 units)$\\var{r3[0]}$$\\var{r3[1]}$$\\var{r3[2]}$$\\var{r3[3]}$$\\var{r3[4]}$$\\var{r3[5]}$
\n \n

 

", "tags": ["ACE2013", "ANOVA", "average", "checked2015", "data analysis", "degrees of freedom", "F-test", "hypothesis testing", "mean", "mean ", "one-way ANOVA", "one-way Anova", "standard deviation", "statistics", "stats", "variance"], "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "\n \t\t \t\t

11/07/2012:

\n \t\t \t\t


Added tags.

\n \t\t \t\t

Calculation not yet tested.

\n \t\t \t\t

23/07/2012:

\n \t\t \t\t

Added description.

\n \t\t \t\t

Checked calculation.

\n \t\t \t\t

3/08/2012:

\n \t\t \t\t

Added tags.

\n \t\t \t\t

Question appears to be working correctly.

\n \t\t \n \t\t", "licence": "Creative Commons Attribution 4.0 International", "description": "

One-way ANOVA example

"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "", "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}]}], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}