// Numbas version: finer_feedback_settings {"name": "LSD and Tukey yardsticks, and one-way ANOVA - Mock Test - SES2003", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"metadata": {"description": "

LSD and Tukey yardsticks on three treatments. Also one-way Anova test on same set of data.

", "licence": "Creative Commons Attribution 4.0 International"}, "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "name": "LSD and Tukey yardsticks, and one-way ANOVA - Mock Test - SES2003", "variablesTest": {"maxRuns": 100, "condition": ""}, "parts": [{"sortAnswers": false, "scripts": {}, "extendBaseMarkingAlgorithm": true, "gaps": [{"correctAnswerStyle": "plain", "scripts": {}, "variableReplacements": [], "mustBeReduced": false, "customMarkingAlgorithm": "", "correctAnswerFraction": false, "precision": "2", "precisionMessage": "You have not given your answer to the correct precision.", "mustBeReducedPC": 0, "showFeedbackIcon": true, "strictPrecision": false, "showPrecisionHint": false, "allowFractions": false, "precisionPartialCredit": 0, "marks": "0.5", "notationStyles": ["plain", "en", "si-en"], "minValue": "btss-tol", "showCorrectAnswer": true, "precisionType": "dp", "extendBaseMarkingAlgorithm": true, "unitTests": [], "variableReplacementStrategy": "originalfirst", "maxValue": "btss+tol", "type": "numberentry"}, {"maxValue": "dfrs+tol", "minValue": "dfrs-tol", "correctAnswerStyle": "plain", "scripts": {}, "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "mustBeReduced": false, "customMarkingAlgorithm": "", "correctAnswerFraction": false, "unitTests": [], "variableReplacementStrategy": "originalfirst", "notationStyles": ["plain", "en", "si-en"], "showFeedbackIcon": true, "mustBeReducedPC": 0, "type": "numberentry", "allowFractions": false, "showCorrectAnswer": true, "marks": "0.5"}, {"maxValue": "n-1", "minValue": "n-1", "correctAnswerStyle": "plain", "scripts": {}, "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "mustBeReduced": false, "customMarkingAlgorithm": "", "correctAnswerFraction": false, "unitTests": [], "variableReplacementStrategy": "originalfirst", "notationStyles": ["plain", "en", "si-en"], "showFeedbackIcon": true, "mustBeReducedPC": 0, "type": "numberentry", "allowFractions": false, "showCorrectAnswer": true, "marks": "0.5"}, {"correctAnswerStyle": "plain", "scripts": {}, "variableReplacements": [], "mustBeReduced": false, "customMarkingAlgorithm": "", "correctAnswerFraction": false, "precision": "2", "precisionMessage": "You have not given your answer to the correct precision.", "mustBeReducedPC": 0, "showFeedbackIcon": true, "strictPrecision": false, "showPrecisionHint": false, "allowFractions": false, "precisionPartialCredit": 0, "marks": "0.5", "notationStyles": ["plain", "en", "si-en"], "minValue": "tss-tol", "showCorrectAnswer": true, "precisionType": "dp", "extendBaseMarkingAlgorithm": true, "unitTests": [], "variableReplacementStrategy": "originalfirst", "maxValue": "tss+tol", "type": "numberentry"}], "variableReplacements": [], "customMarkingAlgorithm": "", "prompt": "

Fill in the following ANOVA table for this data, entering your answers 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
SourcedfSSMSVR
Between Treatments$\\var{dfbt}$[[0]]$\\var{mbt}$$\\var{vr}$
Residual[[1]]$\\var{rss}$$\\var{mrs}$-
Total[[2]][[3]]--
\n

 $\\sqrt{RMS} = \\var{sqrms}$, to 2 decimal places. This will be used to calculate the LSD and Tukey yardstick values later.

", "unitTests": [], "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "type": "gapfill", "showCorrectAnswer": true, "marks": 0}, {"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\\%$"], "displayType": "radiogroup", "displayColumns": "1", "scripts": {}, "minMarks": 0, "extendBaseMarkingAlgorithm": true, "maxMarks": 0, "variableReplacements": [], "customMarkingAlgorithm": "", "prompt": "

Using ANOVA

\n

Given the value of $VR$ in the table above, find the range for the $p$ value by using the critical values of $F_{2,15}$ (one-sided) below.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$10\\%$$5\\%$$1\\%$$0.1\\%$
$2.7$$3.68$$6.36$$11.34$
\n

", "showCellAnswerState": true, "unitTests": [], "variableReplacementStrategy": "originalfirst", "matrix": "v", "showFeedbackIcon": true, "shuffleChoices": false, "type": "1_n_2", "showCorrectAnswer": true, "marks": 0}, {"choices": ["Very strong", "Strong", "Moderate", "Weak", "None"], "displayType": "radiogroup", "displayColumns": 0, "scripts": {}, "minMarks": 0, "extendBaseMarkingAlgorithm": true, "maxMarks": 0, "variableReplacements": [], "customMarkingAlgorithm": "", "prompt": "

What is the strength of evidence against the null hypothesis that the mean times taken are the same for the three groups?

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

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

", "showCellAnswerState": true, "unitTests": [], "variableReplacementStrategy": "originalfirst", "matrix": "v", "showFeedbackIcon": true, "shuffleChoices": false, "type": "1_n_2", "showCorrectAnswer": true, "marks": 0}, {"sortAnswers": false, "scripts": {}, "extendBaseMarkingAlgorithm": true, "gaps": [{"maxValue": "lsd+tol", "minValue": "lsd-tol", "correctAnswerStyle": "plain", "scripts": {}, "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "mustBeReduced": false, "customMarkingAlgorithm": "", "correctAnswerFraction": false, "unitTests": [], "variableReplacementStrategy": "originalfirst", "notationStyles": ["plain", "en", "si-en"], "showFeedbackIcon": true, "mustBeReducedPC": 0, "type": "numberentry", "allowFractions": false, "showCorrectAnswer": true, "marks": 1}, {"maxValue": "tukey+tol", "minValue": "tukey-tol", "correctAnswerStyle": "plain", "scripts": {}, "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "mustBeReduced": false, "customMarkingAlgorithm": "", "correctAnswerFraction": false, "unitTests": [], "variableReplacementStrategy": "originalfirst", "notationStyles": ["plain", "en", "si-en"], "showFeedbackIcon": true, "mustBeReducedPC": 0, "type": "numberentry", "allowFractions": false, "showCorrectAnswer": true, "marks": 1}, {"displayType": "radiogroup", "answers": ["Definite Significant Difference", "Possible Significant Difference", "No Significant Difference"], "scripts": {}, "minMarks": 0, "minAnswers": 0, "variableReplacements": [], "shuffleAnswers": false, "customMarkingAlgorithm": "", "maxAnswers": 0, "type": "m_n_x", "showCorrectAnswer": true, "marks": 0, "choices": ["Groups $1$ and $2$", "Groups $2$ and $3$", "Groups $1$ and $3$"], "showCellAnswerState": true, "layout": {"type": "all", "expression": ""}, "maxMarks": 0, "extendBaseMarkingAlgorithm": true, "warningType": "none", "unitTests": [], "variableReplacementStrategy": "originalfirst", "matrix": "w", "shuffleChoices": false, "showFeedbackIcon": true}], "variableReplacements": [], "customMarkingAlgorithm": "", "prompt": "

The mean values of the groups are

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
 $\\overline{x}_i$
Group 1{m1}
Group 2{m2}
Group 3{m3}
\n


Given $q_{t,\\nu}(\\alpha) =3.67$, $t_{\\nu}(\\alpha) =2.131$ and the value for $\\sqrt{RMS}$ above, find the LSD and Tukey yardsticks from the data.

\n

LSD= [[0]]  (to 2 decimal places)

\n

Tukey= [[1]]  (to 2 decimal places)  

\n

Using these yardsticks fill in the following table indicating if there is a possible or definite significant difference between the pairs of groups mean times in undertaking the tasks:

\n

[[2]]

", "unitTests": [], "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "type": "gapfill", "showCorrectAnswer": true, "marks": 0}], "variable_groups": [], "ungrouped_variables": ["lsd", "tukey", "sd1", "sd2", "sd3", "vr", "w3", "w2", "w1", "mbt", "n", "pmsg", "mu3", "stderror", "sqrms", "dfrs", "m1", "m3", "m2", "btss", "stovern", "tss", "dfbt", "tol", "yn", "ssq", "sig1", "v1", "sig3", "sig2", "cmsg", "rss", "tsqovern", "mu1", "g", "r2", "mu2", "ss", "k", "r3", "mrs", "r1", "u", "t", "w", "v", "n1", "n2", "n3", "pvalue"], "extensions": ["stats"], "tags": [], "statement": "

The following data arose in a comparison of the effects of hydration on the time taken (in minutes) to complete a set of exercises. There were three groups of subjects; group 1 (fully hydrated), group 2 (partially hydrated) and group 3 (dehydrated).

\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
Group 1 (fully hydrated)$\\var{r1[0]}$$\\var{r1[1]}$$\\var{r1[2]}$$\\var{r1[3]}$$\\var{r1[4]}$$\\var{r1[5]}$
Group 2 (partially hydrated)$\\var{r2[0]}$$\\var{r2[1]}$$\\var{r2[2]}$$\\var{r2[3]}$$\\var{r2[4]}$$\\var{r2[5]}$
Group 3 (dehydrated)$\\var{r3[0]}$$\\var{r3[1]}$$\\var{r3[2]}$$\\var{r3[3]}$$\\var{r3[4]}$$\\var{r3[5]}$
\n

 

", "advice": "

Using the Yardsticks

\n

The mean values for each group are:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
 $\\overline{x}_i$
Group 1 $\\var{m1}$
Group 2$\\var{m2}$
Group 3$\\var{m3}$  
\n

The differences between the mean values for the groups are:

\n

Between $1$ and $2=\\;|\\var{m1}-\\var{m2}|=\\var{abs(m1-m2)}$

\n

Between $2$ and $3=\\;|\\var{m2}-\\var{m3}|=\\var{abs(m2-m3)}$

\n

Between $1$ and $3=\\;|\\var{m1}-\\var{m3}|=\\var{abs(m1-m3)}$

\n

We compare these differences with the LSD and Tukey yardsticks:

\n

LSD yardstick = $2.131\\times\\var{sqrms}\\times\\sqrt{2/\\var{n1}}=\\var{lsd}$ to 2 decimal places, where $\\var{sqrms}$ is the value of $\\sqrt{RMS}$ found above.

\n

Tukey yardstick = $3.67\\times\\var{sqrms}\\times\\sqrt{1/\\var{n1}}=\\var{tukey}$ to 2 decimal places.

\n

If the difference of the means:

\n\n\n\n

 

\n

Hence we have the following for the groups:

\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
Pairs of GroupsDefinite Significant DifferencePossible Significant DifferenceNo Significant Difference
Means of Groups 1 and 2{yn[0][0]}{yn[0][1]}{yn[0][2]}
Means of Groups 2 and 3{yn[1][0]}{yn[1][1]}{yn[1][2]}
Means of Groups 1 and 3{yn[2][0]}{yn[2][1]}{yn[2][2]}
", "functions": {"yeaornay": {"type": "string", "parameters": [["n", "number"]], "language": "jme", "definition": "if(n=1,'Yes','No')"}, "pstdev": {"type": "number", "parameters": [["l", "list"]], "language": "jme", "definition": "sqrt(abs(l)/(abs(l)-1))*stdev(l)"}}, "variables": {"w": {"description": "", "group": "Ungrouped variables", "name": "w", "definition": "[w1,w2,w3]", "templateType": "anything"}, "k": {"description": "", "group": "Ungrouped variables", "name": "k", "definition": "3", "templateType": "anything"}, "n1": {"description": "", "group": "Ungrouped variables", "name": "n1", "definition": "6", "templateType": "anything"}, "tsqovern": {"description": "", "group": "Ungrouped variables", "name": "tsqovern", "definition": "[t[0]^2/n1,t[1]^2/n2,t[2]^2/n3]", "templateType": "anything"}, "rss": {"description": "", "group": "Ungrouped variables", "name": "rss", "definition": "precround(ss-stovern,2)", "templateType": "anything"}, "n3": {"description": "", "group": "Ungrouped variables", "name": "n3", "definition": "6", "templateType": "anything"}, "stderror": {"description": "", "group": "Ungrouped variables", "name": "stderror", "definition": "precround(mrs/sqrt(n1),2)", "templateType": "anything"}, "vr": {"description": "", "group": "Ungrouped variables", "name": "vr", "definition": "precround(MBT/MRS,2)", "templateType": "anything"}, "sqrms": {"description": "", "group": "Ungrouped variables", "name": "sqrms", "definition": "precround(sqrt(mrs),2)", "templateType": "anything"}, "w3": {"description": "", "group": "Ungrouped variables", "name": "w3", "definition": "switch(abs(m3-m1)>=tukey,[1,0,0],abs(m3-m1)>=lsd,[0,1,0],[0,0,1])", "templateType": "anything"}, "btss": {"description": "", "group": "Ungrouped variables", "name": "btss", "definition": "precround(stovern-G^2/N,2)", "templateType": "anything"}, "ssq": {"description": "", "group": "Ungrouped variables", "name": "ssq", "definition": "[sum(map(x^2,x,r1)),sum(map(x^2,x,r2)),sum(map(x^2,x,r3))]", "templateType": "anything"}, "u": {"description": "", "group": "Ungrouped variables", "name": "u", "definition": "switch(v[0]=1,0,v[1]=1,1,v[2]=1,2,v[3]=1,3,4)", "templateType": "anything"}, "r3": {"description": "", "group": "Ungrouped variables", "name": "r3", "definition": "repeat(round(normalsample(mu3,sig3)),6)", "templateType": "anything"}, "ss": {"description": "", "group": "Ungrouped variables", "name": "ss", "definition": "sum(ssq)", "templateType": "anything"}, "dfrs": {"description": "", "group": "Ungrouped variables", "name": "dfrs", "definition": "N-k", "templateType": "anything"}, "sig3": {"description": "", "group": "Ungrouped variables", "name": "sig3", "definition": "sig1", "templateType": "anything"}, "g": {"description": "", "group": "Ungrouped variables", "name": "g", "definition": "sum(t)", "templateType": "anything"}, "tss": {"description": "", "group": "Ungrouped variables", "name": "tss", "definition": "precround(ss-G^2/N,2)", "templateType": "anything"}, "m1": {"description": "", "group": "Ungrouped variables", "name": "m1", "definition": "precround(mean(r1),2)", "templateType": "anything"}, "pvalue": {"description": "", "group": "Ungrouped variables", "name": "pvalue", "definition": "precround(ftest(VR,2,15),3)", "templateType": "anything"}, "mu3": {"description": "", "group": "Ungrouped variables", "name": "mu3", "definition": "mu2+random(4..6)", "templateType": "anything"}, "v1": {"description": "", "group": "Ungrouped variables", "name": "v1", "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])", "templateType": "anything"}, "tukey": {"description": "", "group": "Ungrouped variables", "name": "tukey", "definition": "precround(3.67*sqrms*1/sqrt(n1),2)", "templateType": "anything"}, "cmsg": {"description": "", "group": "Ungrouped variables", "name": "cmsg", "definition": "['do reject','do reject','do not reject','do not reject','do not reject']", "templateType": "anything"}, "mbt": {"description": "", "group": "Ungrouped variables", "name": "mbt", "definition": "precround(BTSS/dfbt,2)", "templateType": "anything"}, "sig2": {"description": "", "group": "Ungrouped variables", "name": "sig2", "definition": "sig1", "templateType": "anything"}, "v": {"description": "", "group": "Ungrouped variables", "name": "v", "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])", "templateType": "anything"}, "pmsg": {"description": "", "group": "Ungrouped variables", "name": "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.10$',' is greater than $0.10$']", "templateType": "anything"}, "lsd": {"description": "", "group": "Ungrouped variables", "name": "lsd", "definition": "precround(2.131*sqrms*sqrt(2/n1),2)", "templateType": "anything"}, "w2": {"description": "", "group": "Ungrouped variables", "name": "w2", "definition": "switch(abs(m3-m2)>=tukey,[1,0,0],abs(m3-m2)>=lsd,[0,1,0],[0,0,1])", "templateType": "anything"}, "n": {"description": "", "group": "Ungrouped variables", "name": "n", "definition": "n1+n2+n3", "templateType": "anything"}, "t": {"description": "", "group": "Ungrouped variables", "name": "t", "definition": "[sum(r1),sum(r2),sum(r3)]", "templateType": "anything"}, "dfbt": {"description": "", "group": "Ungrouped variables", "name": "dfbt", "definition": "k-1", "templateType": "anything"}, "m3": {"description": "", "group": "Ungrouped variables", "name": "m3", "definition": "precround(mean(r3),2)", "templateType": "anything"}, "sd2": {"description": "", "group": "Ungrouped variables", "name": "sd2", "definition": "precround(pstdev(r2),2)", "templateType": "anything"}, "m2": {"description": "", "group": "Ungrouped variables", "name": "m2", "definition": "precround(mean(r2),2)", "templateType": "anything"}, "n2": {"description": "", "group": "Ungrouped variables", "name": "n2", "definition": "6", "templateType": "anything"}, "mrs": {"description": "", "group": "Ungrouped variables", "name": "mrs", "definition": "precround(RSS/dfrs,2)", "templateType": "anything"}, "w1": {"description": "", "group": "Ungrouped variables", "name": "w1", "definition": "switch(abs(m1-m2)>=tukey,[1,0,0],abs(m1-m2)>=lsd,[0,1,0],[0,0,1])", "templateType": "anything"}, "r1": {"description": "", "group": "Ungrouped variables", "name": "r1", "definition": "repeat(round(normalsample(mu1,sig1)),6)", "templateType": "anything"}, "tol": {"description": "", "group": "Ungrouped variables", "name": "tol", "definition": "0.01", "templateType": "anything"}, "sig1": {"description": "", "group": "Ungrouped variables", "name": "sig1", "definition": "random(3..4#0.2)", "templateType": "anything"}, "mu1": {"description": "", "group": "Ungrouped variables", "name": "mu1", "definition": "random(20..25#0.5)", "templateType": "anything"}, "yn": {"description": "", "group": "Ungrouped variables", "name": "yn", "definition": "map(map(yeaornay(x),x,w[z]),z,0..2)", "templateType": "anything"}, "sd3": {"description": "", "group": "Ungrouped variables", "name": "sd3", "definition": "precround(pstdev(r3),2)", "templateType": "anything"}, "sd1": {"description": "", "group": "Ungrouped variables", "name": "sd1", "definition": "precround(pstdev(r1),2)", "templateType": "anything"}, "r2": {"description": "", "group": "Ungrouped variables", "name": "r2", "definition": "repeat(round(normalsample(mu2,sig2)),6)", "templateType": "anything"}, "stovern": {"description": "", "group": "Ungrouped variables", "name": "stovern", "definition": "sum(tsqovern)", "templateType": "anything"}, "mu2": {"description": "", "group": "Ungrouped variables", "name": "mu2", "definition": "mu1+random(3..6)", "templateType": "anything"}}, "preamble": {"js": "", "css": ""}, "type": "question", "contributors": [{"name": "Chris Graham", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/369/"}, {"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}]}], "contributors": [{"name": "Chris Graham", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/369/"}, {"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}