// Numbas version: exam_results_page_options {"name": "Andrew's copy of 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": [{"rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "parts": [{"showCorrectAnswer": true, "gaps": [{"showCorrectAnswer": true, "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "correctAnswerFraction": false, "minValue": "m1", "correctAnswerStyle": "plain", "marks": 0.5, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "maxValue": "m1"}, {"showCorrectAnswer": true, "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "correctAnswerFraction": false, "minValue": "sd1", "correctAnswerStyle": "plain", "marks": 0.5, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "maxValue": "sd1"}, {"showCorrectAnswer": true, "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "correctAnswerFraction": false, "minValue": "t[0]", "correctAnswerStyle": "plain", "marks": 0.5, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "maxValue": "t[0]"}, {"showCorrectAnswer": true, "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "correctAnswerFraction": false, "minValue": "ssq[0]", "correctAnswerStyle": "plain", "marks": 0.5, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "maxValue": "ssq[0]"}, {"showCorrectAnswer": true, "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "correctAnswerFraction": false, "minValue": "m2", "correctAnswerStyle": "plain", "marks": 0.5, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "maxValue": "m2"}, {"showCorrectAnswer": true, "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "correctAnswerFraction": false, "minValue": "sd2", "correctAnswerStyle": "plain", "marks": 0.5, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "maxValue": "sd2"}, {"showCorrectAnswer": true, "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "correctAnswerFraction": false, "minValue": "t[1]", "correctAnswerStyle": "plain", "marks": 0.5, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "maxValue": "t[1]"}, {"showCorrectAnswer": true, "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "correctAnswerFraction": false, "minValue": "ssq[1]", "correctAnswerStyle": "plain", "marks": 0.5, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "maxValue": "ssq[1]"}, {"showCorrectAnswer": true, "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "correctAnswerFraction": false, "minValue": "m3", "correctAnswerStyle": "plain", "marks": 0.5, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "maxValue": "m3"}, {"showCorrectAnswer": true, "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "correctAnswerFraction": false, "minValue": "sd3", "correctAnswerStyle": "plain", "marks": 0.5, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "maxValue": "sd3"}, {"showCorrectAnswer": true, "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "correctAnswerFraction": false, "minValue": "t[2]", "correctAnswerStyle": "plain", "marks": 0.5, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "maxValue": "t[2]"}, {"showCorrectAnswer": true, "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "correctAnswerFraction": false, "minValue": "ssq[2]", "correctAnswerStyle": "plain", "marks": 0.5, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "maxValue": "ssq[2]"}, {"showCorrectAnswer": true, "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "correctAnswerFraction": false, "minValue": "g", "correctAnswerStyle": "plain", "marks": 0.5, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "maxValue": "g"}, {"showCorrectAnswer": true, "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "correctAnswerFraction": false, "minValue": "ss", "correctAnswerStyle": "plain", "marks": 0.5, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "maxValue": "ss"}], "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "marks": 0, "type": "gapfill", "prompt": "

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\n\n\n
 $\\overline{x}_i$$s_i$$T_i$$\\sum x^2$$n_i$
Treatment A[[0]][[1]][[2]][[3]]6
Treatment B[[4]][[5]][[6]][[7]]6
Treatment 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.

", "variableReplacementStrategy": "originalfirst"}, {"showCorrectAnswer": true, "gaps": [{"showCorrectAnswer": true, "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "correctAnswerFraction": false, "minValue": "tss", "correctAnswerStyle": "plain", "marks": 0.5, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "maxValue": "tss"}, {"showCorrectAnswer": true, "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "correctAnswerFraction": false, "minValue": "btss", "correctAnswerStyle": "plain", "marks": 0.5, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "maxValue": "btss"}, {"showCorrectAnswer": true, "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "correctAnswerFraction": false, "minValue": "rss", "correctAnswerStyle": "plain", "marks": 0.5, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "maxValue": "rss"}], "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "marks": 0, "type": "gapfill", "prompt": "

Now find the following, all to 2 decimal places:

\n

$\\displaystyle SS Total\\;=\\;$[[0]], $\\displaystyle SST\\;=\\;$[[1]], $\\displaystyle SSE\\;=\\;$[[2]]

", "variableReplacementStrategy": "originalfirst"}, {"showCorrectAnswer": true, "gaps": [{"showCorrectAnswer": true, "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "correctAnswerFraction": false, "minValue": "dfbt", "correctAnswerStyle": "plain", "marks": 0.5, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "maxValue": "dfbt"}, {"showCorrectAnswer": true, "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "correctAnswerFraction": false, "minValue": "btss", "correctAnswerStyle": "plain", "marks": 0.5, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "maxValue": "btss"}, {"showCorrectAnswer": true, "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "correctAnswerFraction": false, "minValue": "mbt", "correctAnswerStyle": "plain", "marks": 0.5, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "maxValue": "mbt"}, {"showCorrectAnswer": true, "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "correctAnswerFraction": false, "minValue": "vr", "correctAnswerStyle": "plain", "marks": 0.5, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "maxValue": "vr"}, {"showCorrectAnswer": true, "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "correctAnswerFraction": false, "minValue": "dfrs", "correctAnswerStyle": "plain", "marks": 0.5, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "maxValue": "dfrs"}, {"showCorrectAnswer": true, "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "correctAnswerFraction": false, "minValue": "rss", "correctAnswerStyle": "plain", "marks": 0.5, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "maxValue": "rss"}, {"showCorrectAnswer": true, "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "correctAnswerFraction": false, "minValue": "mrs", "correctAnswerStyle": "plain", "marks": 0.5, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "maxValue": "mrs"}, {"showCorrectAnswer": true, "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "correctAnswerFraction": false, "minValue": "n-1", "correctAnswerStyle": "plain", "marks": 0.5, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "maxValue": "n-1"}, {"showCorrectAnswer": true, "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "correctAnswerFraction": false, "minValue": "tss", "correctAnswerStyle": "plain", "marks": 0.5, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "maxValue": "tss"}], "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "marks": 0, "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\n\n\n\n\n\n\n\n\n
Source of VariationdfSums of SquaresMean SquareF
Treatments[[0]][[1]][[2]][[3]]
Error[[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.

", "variableReplacementStrategy": "originalfirst"}, {"showCorrectAnswer": true, "variableReplacements": [], "showFeedbackIcon": true, "displayColumns": 1, "scripts": {}, "maxMarks": 0, "shuffleChoices": false, "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\\%$

"], "minMarks": 0, "matrix": "v", "marks": 0, "type": "1_n_2", "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$
", "variableReplacementStrategy": "originalfirst"}, {"showCorrectAnswer": true, "variableReplacements": [], "showFeedbackIcon": true, "displayColumns": 0, "scripts": {}, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "choices": ["Very strong", "Strong", "Moderate", "Weak", "None"], "minMarks": 0, "matrix": "v", "marks": 0, "type": "1_n_2", "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?

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

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

", "variableReplacementStrategy": "originalfirst"}], "preamble": {"js": "", "css": ""}, "extensions": ["stats"], "advice": "", "tags": [], "name": "Andrew's copy of Perform a one-way ANOVA", "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"], "functions": {"pstdev": {"type": "number", "definition": "sqrt(abs(l)/(abs(l)-1))*stdev(l)", "language": "jme", "parameters": [["l", "list"]]}}, "statement": "

Grand MeanThe 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\n\n\n
Treatment A (0 units)$\\var{r1[0]}$$\\var{r1[1]}$$\\var{r1[2]}$$\\var{r1[3]}$$\\var{r1[4]}$$\\var{r1[5]}$
Treatment B (2 units)$\\var{r2[0]}$$\\var{r2[1]}$$\\var{r2[2]}$$\\var{r2[3]}$$\\var{r2[4]}$$\\var{r2[5]}$
Treatment C (4 units)$\\var{r3[0]}$$\\var{r3[1]}$$\\var{r3[2]}$$\\var{r3[3]}$$\\var{r3[4]}$$\\var{r3[5]}$
\n\n

 

", "metadata": {"description": "

One-way ANOVA example

", "licence": "Creative Commons Attribution 4.0 International"}, "variables": {"g": {"group": "Ungrouped variables", "definition": "sum(t)", "name": "g", "description": "", "templateType": "anything"}, "sd2": {"group": "Ungrouped variables", "definition": "precround(pstdev(r2),2)", "name": "sd2", "description": "", "templateType": "anything"}, "t": {"group": "Ungrouped variables", "definition": "[sum(r1),sum(r2),sum(r3)]", "name": "t", "description": "", "templateType": "anything"}, "sd3": {"group": "Ungrouped variables", "definition": "precround(pstdev(r3),2)", "name": "sd3", "description": "", "templateType": "anything"}, "sd1": {"group": "Ungrouped variables", "definition": "precround(pstdev(r1),2)", "name": "sd1", "description": "", "templateType": "anything"}, "stderror": {"group": "Ungrouped variables", "definition": "precround(sqrt(mrs)/sqrt(n1),2)", "name": "stderror", "description": "", "templateType": "anything"}, "r1": {"group": "Ungrouped variables", "definition": "repeat(round(normalsample(mu1,sig1)),6)", "name": "r1", "description": "", "templateType": "anything"}, "r3": {"group": "Ungrouped variables", "definition": "repeat(round(normalsample(mu3,sig3)),6)", "name": "r3", "description": "", "templateType": "anything"}, "sig2": {"group": "Ungrouped variables", "definition": "sig1", "name": "sig2", "description": "", "templateType": "anything"}, "pvalue": {"group": "Ungrouped variables", "definition": "precround(ftest(VR,2,15),3)", "name": "pvalue", "description": "", "templateType": "anything"}, "n3": {"group": "Ungrouped variables", "definition": "6", "name": "n3", "description": "", "templateType": "anything"}, "mu2": {"group": "Ungrouped variables", "definition": "random(22..28#0.5)", "name": "mu2", "description": "", "templateType": "anything"}, "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$']", "name": "pmsg", "description": "", "templateType": "anything"}, "m2": {"group": "Ungrouped variables", "definition": "precround(mean(r2),2)", "name": "m2", "description": "", "templateType": "anything"}, "tol": {"group": "Ungrouped variables", "definition": "0.001", "name": "tol", "description": "", "templateType": "anything"}, "m1": {"group": "Ungrouped variables", "definition": "precround(mean(r1),2)", "name": "m1", "description": "", "templateType": "anything"}, "m3": {"group": "Ungrouped variables", "definition": "precround(mean(r3),2)", "name": "m3", "description": "", "templateType": "anything"}, "vr": {"group": "Ungrouped variables", "definition": "precround(MBT/MRS,2)", "name": "vr", "description": "", "templateType": "anything"}, "n": {"group": "Ungrouped variables", "definition": "n1+n2+n3", "name": "n", "description": "", "templateType": "anything"}, "dfbt": {"group": "Ungrouped variables", "definition": "k-1", "name": "dfbt", "description": "", "templateType": "anything"}, "btss": {"group": "Ungrouped variables", "definition": "precround(stovern-G^2/N,2)", "name": "btss", "description": "", "templateType": "anything"}, "tss": {"group": "Ungrouped variables", "definition": "precround(ss-G^2/N,2)", "name": "tss", "description": "", "templateType": "anything"}, "stovern": {"group": "Ungrouped variables", "definition": "sum(tsqovern)", "name": "stovern", "description": "", "templateType": "anything"}, "mrs": {"group": "Ungrouped variables", "definition": "precround(RSS/dfrs,2)", "name": "mrs", "description": "", "templateType": "anything"}, "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])", "name": "v", "description": "", "templateType": "anything"}, "mbt": {"group": "Ungrouped variables", "definition": "precround(BTSS/dfbt,2)", "name": "mbt", "description": "", "templateType": "anything"}, "tsqovern": {"group": "Ungrouped variables", "definition": "[t[0]^2/n1,t[1]^2/n2,t[2]^2/n3]", "name": "tsqovern", "description": "", "templateType": "anything"}, "mu3": {"group": "Ungrouped variables", "definition": "random(24..32#0.5)", "name": "mu3", "description": "", "templateType": "anything"}, "rss": {"group": "Ungrouped variables", "definition": "precround(ss-stovern,2)", "name": "rss", "description": "", "templateType": "anything"}, "mu1": {"group": "Ungrouped variables", "definition": "random(20..25#0.5)", "name": "mu1", "description": "", "templateType": "anything"}, "r2": {"group": "Ungrouped variables", "definition": "repeat(round(normalsample(mu2,sig2)),6)", "name": "r2", "description": "", "templateType": "anything"}, "ssq": {"group": "Ungrouped variables", "definition": "[sum(map(x^2,x,r1)),sum(map(x^2,x,r2)),sum(map(x^2,x,r3))]", "name": "ssq", "description": "", "templateType": "anything"}, "ss": {"group": "Ungrouped variables", "definition": "sum(ssq)", "name": "ss", "description": "", "templateType": "anything"}, "k": {"group": "Ungrouped variables", "definition": "3", "name": "k", "description": "", "templateType": "anything"}, "n1": {"group": "Ungrouped variables", "definition": "6", "name": "n1", "description": "", "templateType": "anything"}, "n2": {"group": "Ungrouped variables", "definition": "6", "name": "n2", "description": "", "templateType": "anything"}, "sig3": {"group": "Ungrouped variables", "definition": "sig1", "name": "sig3", "description": "", "templateType": "anything"}, "cmsg": {"group": "Ungrouped variables", "definition": "['do reject','do reject','do not reject','do not reject','do not reject']", "name": "cmsg", "description": "", "templateType": "anything"}, "u": {"group": "Ungrouped variables", "definition": "switch(v[0]=1,0,v[1]=1,1,v[2]=1,2,v[3]=1,3,4)", "name": "u", "description": "", "templateType": "anything"}, "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])", "name": "v1", "description": "", "templateType": "anything"}, "sig1": {"group": "Ungrouped variables", "definition": "random(3..5#0.2)", "name": "sig1", "description": "", "templateType": "anything"}, "dfrs": {"group": "Ungrouped variables", "definition": "N-k", "name": "dfrs", "description": "", "templateType": "anything"}}, "variable_groups": [], "type": "question", "contributors": [{"name": "Andrew Dunbar", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/770/"}]}]}], "contributors": [{"name": "Andrew Dunbar", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/770/"}]}