// Numbas version: exam_results_page_options {"metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Statistics and probability. Two questions: using LSD and Tukey yardsticks.

"}, "type": "exam", "percentPass": 0, "feedback": {"intro": "", "advicethreshold": 0, "showactualmark": true, "feedbackmessages": [], "showanswerstate": true, "allowrevealanswer": true, "showtotalmark": true}, "name": "Yardsticks Practice", "question_groups": [{"pickingStrategy": "all-ordered", "name": "Group", "pickQuestions": 1, "questions": [{"name": "LSD and Tukey yardsticks, and one-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": {"pvalue": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(ftest(VR,2,15),3)", "name": "pvalue", "description": ""}, "r1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "repeat(round(normalsample(mu1,sig1)),6)", "name": "r1", "description": ""}, "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))]", "name": "ssq", "description": ""}, "btss": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(stovern-G^2/N,2)", "name": "btss", "description": ""}, "sd1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(pstdev(r1),2)", "name": "sd1", "description": ""}, "tss": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(ss-G^2/N,2)", "name": "tss", "description": ""}, "k": {"templateType": "anything", "group": "Ungrouped variables", "definition": "3", "name": "k", "description": ""}, "dfbt": {"templateType": "anything", "group": "Ungrouped variables", "definition": "k-1", "name": "dfbt", "description": ""}, "sig2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "sig1", "name": "sig2", "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": ""}, "vr": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(MBT/MRS,2)", "name": "vr", "description": ""}, "w1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "switch(abs(m1-m2)>=tukey,[1,0,0],abs(m1-m2)>=lsd,[0,1,0],[0,0,1])", "name": "w1", "description": ""}, "rss": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(ss-stovern,2)", "name": "rss", "description": ""}, "n1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "6", "name": "n1", "description": ""}, "sd3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(pstdev(r3),2)", "name": "sd3", "description": ""}, "ss": {"templateType": "anything", "group": "Ungrouped variables", "definition": "sum(ssq)", "name": "ss", "description": ""}, "w2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "switch(abs(m3-m2)>=tukey,[1,0,0],abs(m3-m2)>=lsd,[0,1,0],[0,0,1])", "name": "w2", "description": ""}, "sig3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "sig1", "name": "sig3", "description": ""}, "mbt": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(BTSS/dfbt,2)", "name": "mbt", "description": ""}, "r2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "repeat(round(normalsample(mu2,sig2)),6)", "name": "r2", "description": ""}, "mu2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "mu1+random(3..6)", "name": "mu2", "description": ""}, "g": {"templateType": "anything", "group": "Ungrouped variables", "definition": "sum(t)", "name": "g", "description": ""}, "t": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[sum(r1),sum(r2),sum(r3)]", "name": "t", "description": ""}, "sd2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(pstdev(r2),2)", "name": "sd2", "description": ""}, "w": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[w1,w2,w3]", "name": "w", "description": ""}, "tol": {"templateType": "anything", "group": "Ungrouped variables", "definition": "0.01", "name": "tol", "description": ""}, "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])", "name": "v", "description": ""}, "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$']", "name": "pmsg", "description": ""}, "sig1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(3..4#0.2)", "name": "sig1", "description": ""}, "sqrms": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(sqrt(mrs),2)", "name": "sqrms", "description": ""}, "mrs": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(RSS/dfrs,2)", "name": "mrs", "description": ""}, "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)", "name": "u", "description": ""}, "m3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(mean(r3),2)", "name": "m3", "description": ""}, "n2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "6", "name": "n2", "description": ""}, "cmsg": {"templateType": "anything", "group": "Ungrouped variables", "definition": "['do reject','do reject','do not reject','do not reject','do not reject']", "name": "cmsg", "description": ""}, "mu1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(20..25#0.5)", "name": "mu1", "description": ""}, "stovern": {"templateType": "anything", "group": "Ungrouped variables", "definition": "sum(tsqovern)", "name": "stovern", "description": ""}, "lsd": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(2.131*sqrms*sqrt(2/n1),2)", "name": "lsd", "description": ""}, "dfrs": {"templateType": "anything", "group": "Ungrouped variables", "definition": "N-k", "name": "dfrs", "description": ""}, "yn": {"templateType": "anything", "group": "Ungrouped variables", "definition": "map(map(yeaornay(x),x,w[z]),z,0..2)", "name": "yn", "description": ""}, "tukey": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(3.67*sqrms*1/sqrt(n1),2)", "name": "tukey", "description": ""}, "w3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "switch(abs(m3-m1)>=tukey,[1,0,0],abs(m3-m1)>=lsd,[0,1,0],[0,0,1])", "name": "w3", "description": ""}, "m1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(mean(r1),2)", "name": "m1", "description": ""}, "r3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "repeat(round(normalsample(mu3,sig3)),6)", "name": "r3", "description": ""}, "m2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(mean(r2),2)", "name": "m2", "description": ""}, "n3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "6", "name": "n3", "description": ""}, "n": {"templateType": "anything", "group": "Ungrouped variables", "definition": "n1+n2+n3", "name": "n", "description": ""}, "stderror": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(mrs/sqrt(n1),2)", "name": "stderror", "description": ""}, "mu3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "mu2+random(4..6)", "name": "mu3", "description": ""}, "tsqovern": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[t[0]^2/n1,t[1]^2/n2,t[2]^2/n3]", "name": "tsqovern", "description": ""}}, "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"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "functions": {"pstdev": {"type": "number", "language": "jme", "definition": "sqrt(abs(l)/(abs(l)-1))*stdev(l)", "parameters": [["l", "list"]]}, "yeaornay": {"type": "string", "language": "jme", "definition": "if(n=1,'Yes','No')", "parameters": [["n", "number"]]}}, "showQuestionGroupNames": false, "parts": [{"scripts": {}, "gaps": [{"correctAnswerFraction": false, "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "showCorrectAnswer": true, "minValue": "sqrms-tol", "maxValue": "sqrms+tol", "marks": 1}], "type": "gapfill", "prompt": "\n

You are given the following ANOVA table for this data:

\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}$$\\var{btss}$$\\var{mbt}$$\\var{vr}$
Residual$\\var{dfrs}$$\\var{rss}$$\\var{mrs}$-
Total$\\var{n-1}$$\\var{tss}$--
\n

 

\n

 Input $\\sqrt{RMS}$ here: [[0]] to 2 decimal places.

\n

 

\n

This will be used to calculate the LSD and Tukey yardstick values later.

\n \n ", "showCorrectAnswer": true, "marks": 0}, {"displayType": "radiogroup", "choices": ["Very strong", "Strong", "Moderate", "Weak", "None"], "displayColumns": 0, "prompt": "\n

Using ANOVA

\n

Using the $VR$ value given in the table and one-way ANOVA, what is the strength of evidence against the null hypothesis that the mean times taken are the same for the three groups?

\n ", "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}, {"scripts": {}, "gaps": [{"correctAnswerFraction": false, "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "showCorrectAnswer": true, "minValue": "m1", "maxValue": "m1", "marks": 1}, {"correctAnswerFraction": false, "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "showCorrectAnswer": true, "minValue": "m2", "maxValue": "m2", "marks": 1}, {"correctAnswerFraction": false, "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "showCorrectAnswer": true, "minValue": "m3", "maxValue": "m3", "marks": 1}], "type": "gapfill", "prompt": "\n

Using the Yardsticks

\n

Fill in this table with the appropriate values for the mean values of the groups, all decimals to 2 decimal places:

\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
 $\\overline{x}_i$
Group A[[0]]
Group B[[1]]
Group C[[2]]
\n

 

\n ", "showCorrectAnswer": true, "marks": 0}, {"scripts": {}, "gaps": [{"correctAnswerFraction": false, "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "showCorrectAnswer": true, "minValue": "lsd-tol", "maxValue": "lsd+tol", "marks": 1}, {"correctAnswerFraction": false, "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "showCorrectAnswer": true, "minValue": "tukey-tol", "maxValue": "tukey+tol", "marks": 1}, {"layout": {"expression": ""}, "choices": ["Groups $A$ and $B$", "Groups $B$ and $C$", "Groups $A$ and $C$"], "matrix": "w", "type": "m_n_x", "maxAnswers": 0, "shuffleChoices": false, "marks": 0, "scripts": {}, "minMarks": 0, "minAnswers": 0, "maxMarks": 0, "shuffleAnswers": false, "showCorrectAnswer": true, "answers": ["Definite Significant Difference", "Possible Significant Difference", "No Significant Difference"]}], "type": "gapfill", "prompt": "

Now find the LSD and Tukey yardsticks from the above data. Use the value to 2 decimal places you found for $\\sqrt{RMS}$:

\n

   LSD= [[0]]

\n

Tukey= [[1]]

\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]]

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

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 \n ", "tags": ["ANOVA", "average", "checked2015", "data analysis", "definite significant difference", "degrees of freedom", "F-test", "hypothesis testing", "Least significant difference", "lsd", "LSD", "mean ", "possible significant difference", "PSY2010", "standard deviation", "statistics", "stats", "Tukey", "tukey ", "variance", "yardsticks", "Yardsticks"], "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "\n \t\t \t\t

15/11/2012:

\n \t\t \t\t


This question cones from editing a one-way Anova example

\n \t\t \t\t

Added tags and description

\n \t\t \t\t

 

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

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

"}, "variablesTest": {"condition": "", "maxRuns": 100}, "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
 $\\overline{x}_i$
Group A$\\var{m1}$
Group B$\\var{m2}$
Group C$\\var{m3}$  
\n

The differences between the mean values for the groups are:

\n

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

\n

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

\n

Between $A$ and $C=\\;|\\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 \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
Pairs of GroupsDefinite Significant DifferencePossible Significant DifferenceNo Significant Difference
Means of Groups A and B{yn[0][0]}{yn[0][1]}{yn[0][2]}
Means of Groups B and C{yn[1][0]}{yn[1][1]}{yn[1][2]}
Means of Groups A and C{yn[2][0]}{yn[2][1]}{yn[2][2]}
"}, {"name": "LSD and Tukey yardsticks, and 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": ""}, "sig": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(3..7#0.2)", "name": "sig", "description": ""}, "r1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "map(repeat(round(normalsample(mu[x],sig)),5),x,0..m-1)", "name": "r1", "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": ""}, "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": ""}, "ssq": {"templateType": "anything", "group": "Ungrouped variables", "definition": "sum(map(sum(map(x^2,x,r[y])),y,0..n-1))", "name": "ssq", "description": ""}, "vrbb": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(msbb/rs,2)", "name": "vrbb", "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": ""}, "w6": {"templateType": "anything", "group": "Ungrouped variables", "definition": "switch(abs(me[2]-me[3])>=tukey,[1,0,0],abs(me[2]-me[3])>=lsd,[0,1,0],[0,0,1])", "name": "w6", "description": ""}, "dfbt": {"templateType": "anything", "group": "Ungrouped variables", "definition": "m-1", "name": "dfbt", "description": ""}, "msbt": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(btss/(m-1),2)", "name": "msbt", "description": ""}, "w4": {"templateType": "anything", "group": "Ungrouped variables", "definition": "switch(abs(me[1]-me[2])>=tukey,[1,0,0],abs(me[1]-me[2])>=lsd,[0,1,0],[0,0,1])", "name": "w4", "description": ""}, "bbss": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(sum(map(x^2,x,t))/m-tot^2/20,2)", "name": "bbss", "description": ""}, "lsd": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(2.179*sqrms*sqrt(2/5),2)", "name": "lsd", "description": ""}, "w5": {"templateType": "anything", "group": "Ungrouped variables", "definition": "switch(abs(me[1]-me[3])>=tukey,[1,0,0],abs(me[1]-me[3])>=lsd,[0,1,0],[0,0,1])", "name": "w5", "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": ""}, "w1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "switch(abs(me[0]-me[1])>=tukey,[1,0,0],abs(me[0]-me[1])>=lsd,[0,1,0],[0,0,1])", "name": "w1", "description": ""}, "pvalue": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(ftest(VR,3,12),3)", "name": "pvalue", "description": ""}, "tot": {"templateType": "anything", "group": "Ungrouped variables", "definition": "sum(cols)", "name": "tot", "description": ""}, "dfr": {"templateType": "anything", "group": "Ungrouped variables", "definition": "m*n-m-n+1", "name": "dfr", "description": ""}, "tukey": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(4.2*sqrms*sqrt(1/5),2)", "name": "tukey", "description": ""}, "w": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[w1,w2,w3,w4,w5,w6]", "name": "w", "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": ""}, "w3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "switch(abs(me[0]-me[3])>=tukey,[1,0,0],abs(me[0]-me[3])>=lsd,[0,1,0],[0,0,1])", "name": "w3", "description": ""}, "sqrms": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(sqrt(rs),2)", "name": "sqrms", "description": ""}, "t99": {"templateType": "anything", "group": "Ungrouped variables", "definition": "20.09", "name": "t99", "description": ""}, "tol": {"templateType": "anything", "group": "Ungrouped variables", "definition": "0.01", "name": "tol", "description": ""}, "t95": {"templateType": "anything", "group": "Ungrouped variables", "definition": "15.51", "name": "t95", "description": ""}, "w2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "switch(abs(me[0]-me[2])>=tukey,[1,0,0],abs(me[0]-me[2])>=lsd,[0,1,0],[0,0,1])", "name": "w2", "description": ""}, "yn": {"templateType": "anything", "group": "Ungrouped variables", "definition": "map(map(yeaornay(x),x,w[z]),z,0..5)", "name": "yn", "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": ""}, "me": {"templateType": "anything", "group": "Ungrouped variables", "definition": "map(mean(r1[x]),x,0..3)", "name": "me", "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": ""}, "rss": {"templateType": "anything", "group": "Ungrouped variables", "definition": "tss-btss-bbss", "name": "rss", "description": ""}, "t": {"templateType": "anything", "group": "Ungrouped variables", "definition": "map(sum(r[x]),x,0..n-1)", "name": "t", "description": ""}}, "ungrouped_variables": ["lsd", "tukey", "stderror", "bbss", "cols", "vrbb", "w6", "vr", "w4", "w3", "w2", "w1", "dfr", "rt", "rs", "t90", "tot", "sqrms", "sig", "tol", "btss", "tss", "dfbt", "yn", "msbt", "ssq", "v1", "dfbb", "t99", "t95", "msbb", "rss", "me", "r1", "m", "w5", "n", "mu", "r", "t", "w", "v", "pvalue"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "functions": {"yeaornay": {"type": "string", "language": "jme", "definition": "if(n=1, \"Yes\", \"No\")", "parameters": [["n", "number"]]}}, "showQuestionGroupNames": false, "parts": [{"scripts": {}, "gaps": [{"correctAnswerFraction": false, "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "showCorrectAnswer": true, "minValue": "sqrms-tol", "maxValue": "sqrms+tol", "marks": 1}], "type": "gapfill", "prompt": "

Here is the ANOVA table corresponding to this data:

\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{m-1}$$\\var{btss}$$\\var{msbt}$$\\var{vr}$
Between Blocks$\\var{n-1}$$\\var{bbss}$$\\var{msbb}$$\\var{vrbb}$
Residual$\\var{dfr}$$\\var{rss}$$\\var{rs}$-
Total$\\var{m*n-1}$$\\var{tss}$--
\n

Input $\\sqrt{RMS}$ here: [[0]] to 2 decimal places.

\n

This will be used later to calculate the yardsticks.

", "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": "

Given the value of $VR$ in the table above, find 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", "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 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": "me[0]-tol", "maxValue": "me[0]+tol", "marks": 0.5}, {"correctAnswerFraction": false, "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "showCorrectAnswer": true, "minValue": "me[1]-tol", "maxValue": "me[1]+tol", "marks": 0.5}, {"correctAnswerFraction": false, "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "showCorrectAnswer": true, "minValue": "me[2]-tol", "maxValue": "me[2]+tol", "marks": 0.5}, {"correctAnswerFraction": false, "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "showCorrectAnswer": true, "minValue": "me[3]-tol", "maxValue": "me[3]+tol", "marks": 0.5}, {"correctAnswerFraction": false, "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "showCorrectAnswer": true, "minValue": "lsd-tol", "maxValue": "lsd+tol", "marks": 1}, {"correctAnswerFraction": false, "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "showCorrectAnswer": true, "minValue": "tukey-tol", "maxValue": "tukey+tol", "marks": 1}], "type": "gapfill", "prompt": "

Using the yardsticks

\n

Enter the sample means for the sun-creams:

\n

W: [[0]], X:[[1]], Y:[[2]], Z:[[3]] (to 2 decimal places).

\n

Calclate the LSD and Tukey yardsticks using the value for $\\sqrt{RMS}$ to 2 decimal places obtained above.

\n

 

\n

LSD yardstick value =    [[4]] (to 2 decimal places).

\n

 

\n

Tukey yardstick value = [[5]] (to 2 decimal places).

\n

 

", "showCorrectAnswer": true, "marks": 0}, {"layout": {"expression": ""}, "choices": ["$W$ and $X$", "$W$ and $Y$", "$W$ and $Z$", "$X$ and $Y$", "$X$ and $Z$", "$Y$ and $Z$"], "matrix": "w", "prompt": "

Using these yardsticks fill in the following table indicating if there is a possible or definite significant difference between the sample means of pairs of sun-creams.

\n

 

", "type": "m_n_x", "maxAnswers": 0, "shuffleChoices": false, "marks": 0, "scripts": {}, "maxMarks": 0, "minAnswers": 0, "minMarks": 0, "shuffleAnswers": false, "showCorrectAnswer": true, "answers": ["Definite Significant Difference", "Possible Significant Difference", "No Significant Difference"]}], "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

 

\n \n

 

\n ", "tags": ["ANOVA", "checked2015", "hypothesis testing", "lsd", "LSD", "PSY2010", "sample means", "significant difference", "statistics", "Tukey", "tukey ", "two-way ANOVA", "yardsticks", "Yardsticks"], "rulesets": {}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "", "licence": "Creative Commons Attribution 4.0 International", "description": "

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

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

 Using the Yardsticks

\n

The mean values for each sun-cream are:

\n

  

\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
 $\\overline{x}_i$
W$\\var{me[0]}$
X$\\var{me[1]}$
Y$\\var{me[2]}$
Z$\\var{me[3]}$
\n

The differences between the mean values for the sun-creams are:

\n

Between $W$ and $X=\\;|\\var{me[0]}-\\var{me[1]}|=\\var{abs(me[0]-me[1])}$

\n

Between $W$ and $Y=\\;|\\var{me[0]}-\\var{me[2]}|=\\var{abs(me[0]-me[2])}$

\n

Between $W$ and $Z=\\;|\\var{me[0]}-\\var{me[3]}|=\\var{abs(me[0]-me[3])}$

\n

Between $X$ and $Y=\\;|\\var{me[1]}-\\var{me[2]}|=\\var{abs(me[1]-me[2])}$

\n

Between $X$ and $Z=\\;|\\var{me[1]}-\\var{me[3]}|=\\var{abs(me[1]-me[3])}$

\n

Between $Y$ and $Z=\\;|\\var{me[2]}-\\var{me[3]}|=\\var{abs(me[2]-me[3])}$

\n

We compare these differences with the LSD and Tukey yardsticks:

\n

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

\n

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

\n

If the difference of the means:

\n \n

 

\n \n

 

\n \n

 

\n

Hence we have the following for the sun-creams:

\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
Pairs of Sun-creamsDefinite Significant DifferencePossible Significant DifferenceNo Significant Difference
Means of W and X{yn[0][0]}{yn[0][1]}{yn[0][2]}
Means of W and Y{yn[1][0]}{yn[1][1]}{yn[1][2]}
Means of W and Z{yn[2][0]}{yn[2][1]}{yn[2][2]}
Means of X and Y{yn[3][0]}{yn[3][1]}{yn[3][2]}
Means of X and Z{yn[4][0]}{yn[4][1]}{yn[4][2]}
Means of Y and Z{yn[5][0]}{yn[5][1]}{yn[5][2]}
"}]}], "showQuestionGroupNames": false, "showstudentname": true, "navigation": {"onleave": {"action": "none", "message": ""}, "allowregen": true, "reverse": true, "preventleave": true, "browse": true, "showresultspage": "oncompletion", "showfrontpage": true}, "timing": {"timedwarning": {"action": "none", "message": ""}, "timeout": {"action": "none", "message": ""}, "allowPause": true}, "duration": 0, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "extensions": ["stats"], "custom_part_types": [], "resources": []}