// Numbas version: finer_feedback_settings {"questions": [], "duration": 0, "name": "Two-way ANOVA Practice", "showQuestionGroupNames": false, "allQuestions": true, "percentPass": 0, "feedback": {"showanswerstate": true, "advicethreshold": 0, "showactualmark": true, "allowrevealanswer": true, "showtotalmark": true, "enterreviewmodeimmediately": true, "showexpectedanswerswhen": "inreview", "showpartfeedbackmessageswhen": "always", "showactualmarkwhen": "always", "showtotalmarkwhen": "always", "showanswerstatewhen": "always", "showadvicewhen": "never"}, "shuffleQuestions": false, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Perform a two-way ANOVA", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variable_groups": [], "variables": {"btss": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(sum(map(x^2,x,cols))/n-tot^2/(m*n),2)", "name": "btss", "description": ""}, "tol": {"templateType": "anything", "group": "Ungrouped variables", "definition": "0.01", "name": "tol", "description": ""}, "r1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "map(repeat(round(normalsample(mu[x],sig)),5),x,0..m-1)", "name": "r1", "description": ""}, "dfbt": {"templateType": "anything", "group": "Ungrouped variables", "definition": "m-1", "name": "dfbt", "description": ""}, "ssq": {"templateType": "anything", "group": "Ungrouped variables", "definition": "sum(map(sum(map(x^2,x,r[y])),y,0..n-1))", "name": "ssq", "description": ""}, "sig": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(3..7#0.2)", "name": "sig", "description": ""}, "t90": {"templateType": "anything", "group": "Ungrouped variables", "definition": "13.36", "name": "t90", "description": ""}, "tss": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(ssq-tot^2/(m*n),2)", "name": "tss", "description": ""}, "mu": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[random(30..40),random(35..40),random(25..35),random(40..45),random(20..40)]", "name": "mu", "description": ""}, "rs": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(rss/dfr,2)", "name": "rs", "description": ""}, "t99": {"templateType": "anything", "group": "Ungrouped variables", "definition": "20.09", "name": "t99", "description": ""}, "v": {"templateType": "anything", "group": "Ungrouped variables", "definition": "switch(vr>=10.8,[1,0,0,0,0],vr>=5.95,[0,1,0,0,0],vr>=3.49,[0,0,1,0,0],vr>=2.61,[0,0,0,1,0],[0,0,0,0,1])", "name": "v", "description": ""}, "msbt": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(btss/(m-1),2)", "name": "msbt", "description": ""}, "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])", "name": "v1", "description": ""}, "bbss": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(sum(map(x^2,x,t))/m-tot^2/20,2)", "name": "bbss", "description": ""}, "vr": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(msbt/rs,2)", "name": "vr", "description": ""}, "cols": {"templateType": "anything", "group": "Ungrouped variables", "definition": "map(sum(rt[x]),x,0..m-1)", "name": "cols", "description": ""}, "pvalue": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(ftest(VR,3,12),3)", "name": "pvalue", "description": ""}, "dfr": {"templateType": "anything", "group": "Ungrouped variables", "definition": "m*n-m-n+1", "name": "dfr", "description": ""}, "rss": {"templateType": "anything", "group": "Ungrouped variables", "definition": "tss-btss-bbss", "name": "rss", "description": ""}, "m": {"templateType": "anything", "group": "Ungrouped variables", "definition": "4", "name": "m", "description": ""}, "msbb": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(bbss/(n-1),2)", "name": "msbb", "description": ""}, "dfbb": {"templateType": "anything", "group": "Ungrouped variables", "definition": "n-1", "name": "dfbb", "description": ""}, "vrbb": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(msbb/rs,2)", "name": "vrbb", "description": ""}, "t95": {"templateType": "anything", "group": "Ungrouped variables", "definition": "15.51", "name": "t95", "description": ""}, "tot": {"templateType": "anything", "group": "Ungrouped variables", "definition": "sum(cols)", "name": "tot", "description": ""}, "r": {"templateType": "anything", "group": "Ungrouped variables", "definition": "list(transpose(matrix(r1)))", "name": "r", "description": ""}, "n": {"templateType": "anything", "group": "Ungrouped variables", "definition": "5", "name": "n", "description": ""}, "stderror": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(sqrt(rs/n),2)", "name": "stderror", "description": ""}, "rt": {"templateType": "anything", "group": "Ungrouped variables", "definition": "list(transpose(matrix(r)))", "name": "rt", "description": ""}, "t": {"templateType": "anything", "group": "Ungrouped variables", "definition": "map(sum(r[x]),x,0..n-1)", "name": "t", "description": ""}}, "ungrouped_variables": ["stderror", "bbss", "cols", "vrbb", "vr", "rt", "rs", "msbb", "tot", "dfr", "sig", "tol", "btss", "tss", "dfbt", "msbt", "ssq", "v1", "dfbb", "t99", "t95", "t90", "rss", "r1", "m", "n", "mu", "r", "t", "v", "pvalue"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "functions": {}, "showQuestionGroupNames": false, "parts": [{"scripts": {}, "gaps": [{"correctAnswerFraction": false, "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "showCorrectAnswer": true, "minValue": "tss-tol", "maxValue": "tss+tol", "marks": 1}, {"correctAnswerFraction": false, "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "showCorrectAnswer": true, "minValue": "btss-tol", "maxValue": "btss+tol", "marks": 1}, {"correctAnswerFraction": false, "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "showCorrectAnswer": true, "minValue": "bbss-tol", "maxValue": "bbss+tol", "marks": 1}, {"correctAnswerFraction": false, "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "showCorrectAnswer": true, "minValue": "rss-tol", "maxValue": "rss+tol", "marks": 1}], "type": "gapfill", "prompt": "

Treatment totals are:

\n

$T_1=\\var{cols[0]},\\;T_2=\\var{cols[1]},\\;T_3=\\var{cols[2]},\\;T_4=\\var{cols[3]}$

\n

Subject totals are:

\n

$B_1=\\var{t[0]},\\;B_2=\\var{t[1]},\\;B_3=\\var{t[2]},\\;B_4=\\var{t[3]},\\;B_5=\\var{t[4]}$

\n

$\\sum \\sum x^2 = \\var{ssq}$ and $G= \\var{tot}$

\n

Now using the above find the following, all to 2 decimal places:

\n

$\\displaystyle TSS\\;=\\;$[[0]], $\\displaystyle BTSS\\;=\\;$[[1]]

\n

$\\displaystyle BBSS \\;=\\;$[[2]], $\\displaystyle RSS\\;=\\;$[[3]]

\n

(Find $RSS$ using the values to 2 decimal places for $TSS,\\;BTSS,\\;BBSS$.)

", "showCorrectAnswer": true, "marks": 0}, {"scripts": {}, "gaps": [{"correctAnswerFraction": false, "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "showCorrectAnswer": true, "minValue": "m-1", "maxValue": "m-1", "marks": 0.5}, {"correctAnswerFraction": false, "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "showCorrectAnswer": true, "minValue": "btss-tol", "maxValue": "btss+tol", "marks": 0.5}, {"correctAnswerFraction": false, "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "showCorrectAnswer": true, "minValue": "msbt-tol", "maxValue": "msbt+tol", "marks": 1}, {"correctAnswerFraction": false, "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "showCorrectAnswer": true, "minValue": "vr-0.01", "maxValue": "vr+0.01", "marks": 1}, {"correctAnswerFraction": false, "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "showCorrectAnswer": true, "minValue": "n-1", "maxValue": "n-1", "marks": 0.5}, {"correctAnswerFraction": false, "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "showCorrectAnswer": true, "minValue": "bbss-tol", "maxValue": "bbss+tol", "marks": 0.5}, {"correctAnswerFraction": false, "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "showCorrectAnswer": true, "minValue": "msbb-0.01", "maxValue": "msbb+0.01", "marks": 1}, {"correctAnswerFraction": false, "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "showCorrectAnswer": true, "minValue": "vrbb-0.01", "maxValue": "vrbb+0.01", "marks": 1}, {"correctAnswerFraction": false, "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "showCorrectAnswer": true, "minValue": "dfr", "maxValue": "dfr", "marks": 0.5}, {"correctAnswerFraction": false, "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "showCorrectAnswer": true, "minValue": "rss-tol", "maxValue": "rss+tol", "marks": 0.5}, {"correctAnswerFraction": false, "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "showCorrectAnswer": true, "minValue": "rs-0.01", "maxValue": "rs+0.01", "marks": 1}, {"correctAnswerFraction": false, "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "showCorrectAnswer": true, "minValue": "m*n-1", "maxValue": "m*n-1", "marks": 0.5}, {"correctAnswerFraction": false, "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "showCorrectAnswer": true, "minValue": "tss-tol", "maxValue": "tss+tol", "marks": 0.5}], "type": "gapfill", "prompt": "

Now complete the ANOVA table using the values obtained to 2 decimal places 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
SourcedfSSMSVR
Between Treatments[[0]][[1]][[2]][[3]]
Between Blocks[[4]][[5]][[6]][[7]]
Residual[[8]][[9]][[10]]-
Total[[11]][[12]]--
\n

Input all numbers to 2 decimal places.

\n

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

", "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 $VR$ you have found, choose the range for the $p$ value by looking up the critical values of $F_{3,12}$ (one-sided).

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$10\\%$$5\\%$$1\\%$$0.1\\%$
$2.61$$3.49$$5.95$$10.8$
", "distractors": ["", "", "", "", ""], "shuffleChoices": false, "scripts": {}, "minMarks": 0, "type": "1_n_2", "maxMarks": 0, "showCorrectAnswer": true, "matrix": "v", "marks": 0}, {"displayType": "radiogroup", "choices": ["

Very Strong Evidence

", "

Strong Evidence

", "

Evidence

", "

Weak Evidence

", "

No Evidence

"], "displayColumns": 0, "prompt": "

Given the $p$-value and the range you have found, what is the strength of evidence against the null hypothesis that there is no difference in the treatments offered by the sun-creams?

", "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 more investigation is needed.", "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}, {"scripts": {}, "gaps": [{"correctAnswerFraction": false, "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "showCorrectAnswer": true, "minValue": "mean(r1[0])-tol", "maxValue": "mean(r1[0])+tol", "marks": 0.5}, {"correctAnswerFraction": false, "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "showCorrectAnswer": true, "minValue": "mean(r1[1])-tol", "maxValue": "mean(r1[1])+tol", "marks": 0.5}, {"correctAnswerFraction": false, "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "showCorrectAnswer": true, "minValue": "mean(r1[2])-tol", "maxValue": "mean(r1[2])+tol", "marks": 0.5}, {"correctAnswerFraction": false, "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "showCorrectAnswer": true, "minValue": "mean(r1[3])-tol", "maxValue": "mean(r1[3])+tol", "marks": 0.5}, {"correctAnswerFraction": false, "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "showCorrectAnswer": true, "minValue": "stderror-tol", "maxValue": "stderror+tol", "marks": 1}], "type": "gapfill", "prompt": "

Enter the sample means for the sun-creams:

\n

W: [[0]], X:[[1]], Y:[[2]], Z:[[3]]

\n

Also enter an estimate of the standard error of the mean: [[4]]

\n

(Use the value to 2 decimal places you obtained above for $RMS$ to calculate the standard error of the mean).

", "showCorrectAnswer": true, "marks": 0}], "statement": "

To test the effectiveness of sun-tan creams, five volunteers A, B, C, D, E each tried four creams W, X, Y, Z on various parts of their legs. They were then subjected to ultra-violet radiation and an estimate of the degree of burning was made (higher figures indicate greater burning). The results are given below with some totals:

\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 \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
 WXYZTotals
A{r[0][0]}{r[0][1]}{r[0][2]}{r[0][3]}{t[0]}
B{r[1][0]}{r[1][1]}{r[1][2]}{r[1][3]}{t[1]}
C{r[2][0]}{r[2][1]}{r[2][2]}{r[2][3]}{t[2]}
D{r[3][0]}{r[3][1]}{r[3][2]}{r[3][3]}{t[3]}
E{r[4][0]}{r[4][1]}{r[4][2]}{r[4][3]}{t[4]}
Totals{cols[0]}{cols[1]}{cols[2]}{cols[3]}{tot}
\n

You are given that $\\sum \\sum x^2=\\var{ssq}$ is the uncorrected sum of squares of the observations and you are asked to:

\n \n

 

\n ", "tags": ["ANOVA", "checked2015", "hypothesis testing", "PSY2010", "statistics", "two-way ANOVA"], "rulesets": {}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "", "licence": "Creative Commons Attribution 4.0 International", "description": "

Two-way ANOVA example, 5 subjects, 4 treatments.

"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "

 

\n

 

"}], "name": "", "pickQuestions": 0}], "metadata": {"notes": "", "licence": "Creative Commons Attribution 4.0 International", "description": "

Statistics and probability. Two way-anova question.

"}, "type": "exam", "navigation": {"onleave": {"action": "none", "message": ""}, "reverse": true, "browse": true, "showresultspage": "oncompletion", "preventleave": true, "allowregen": true, "showfrontpage": true}, "timing": {"timedwarning": {"action": "none", "message": ""}, "timeout": {"action": "none", "message": ""}, "allowPause": true}, "pickQuestions": 0, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "extensions": ["stats"], "custom_part_types": [], "resources": []}