// Numbas version: exam_results_page_options {"name": "Apply Kruskal-Wallis test - SES", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Apply Kruskal-Wallis test - SES", "tags": [], "metadata": {"description": "

Kruskal-Wallis test with ties.

", "licence": "Creative Commons Attribution 4.0 International"}, "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

Apply the Kruskal-Wallis test to this data in order to test the null hypothesis that hydration does not affect the mean time taken to complete the set of exercises. 

\n

 

", "advice": "

In order to find the ranks we order, in increasing order,  all of the times for the exercise set across all the three groups. We also work out the ranks for each time by including a row which simply numbers from $1$ to $\\var{n}$, this we call the index of the numbers and the last row then takes equal values in the list and gives the averages of their indices, so that they all get the same rank. So you simply add up their corresponding indices in that group and divide by the number of equal entries. So if a number is not repeated then its rank is its index. 

\n

For this example we have:

\n

{table([s1,s2,s3],[])}

\n

We see that there are ties as follows:

\n

{table(ties,[])}

\n

We use this information later to find the correction factor.

\n

Putting these ranks back into the original table gives, where $R_1,\\;R_2$ and $R_3$ are the sums of the ranks in each row:

\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\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]}$ 
Rank{rkt[0]}{rkt[1]}{rkt[2]}{rkt[3]}{rkt[4]}{rkt[5]}$R_1=\\;${sr[0]}
Group 2 (partially hydrated)$\\var{r2[0]}$$\\var{r2[1]}$$\\var{r2[2]}$$\\var{r2[3]}$$\\var{r2[4]}$$\\var{r2[5]}$ 
Rank{rkt[6]}{rkt[7]}{rkt[8]}{rkt[9]}{rkt[10]}{rkt[11]}$R_2=\\;${sr[1]}
Group 3 (dehydrated)$\\var{r3[0]}$$\\var{r3[1]}$$\\var{r3[2]}$$\\var{r3[3]}$$\\var{r3[4]}$$\\var{r3[5]}$ 
Rank{rkt[12]}{rkt[13]}{rkt[14]}{rkt[15]}{rkt[16]}{rkt[17]}$R_3=\\;${sr[2]}
\n

We now have enough information to start the calculation of the Kruskal-Wallis statistic.

\n

We do this in three steps:

\n

1. Calculate the statistic $H$, which assumes there are no ties.

\n

2. Find the correction factor $C$ given by the ties in the data.

\n

3. This gives the statistic $H^*=H/C$ we want, and we make a decision based on the Kruskal-Wallis table.

\n

Step 1: Find $H$.

\n

\\[\\begin{eqnarray*}H &=& \\left[\\frac{12}{N \\times (N+1)} \\times \\left(\\sum \\frac{R_i^2}{n_i}\\right)\\right]-3(N+1)\\\\&=&\\left\\{\\frac{12}{\\var{n}\\times\\var{n+1}}\\times\\left(\\frac{\\var{sr[0]}^2}{6}+\\frac{\\var{sr[1]}^2}{6}+\\frac{\\var{sr[2]}^2}{6}\\right)\\right\\}-3\\times \\var{n+1}\\\\&=&\\var{h}\\\\&=&\\var{precround(H,3)}\\end{eqnarray*}\\] to 3 decimal places.

\n

Step 2: Find the Correction Factor $C$.

\n

For each tie with $g$ equal data values we calculate $\\displaystyle \\frac{g^3-g}{N^3-N}$ and add these together over all ties to get $T$.

\n

Then $C=1-T$.

\n

So for our data we have:

\n

{table(tiesplus,[' ','Number','Contribution','Value'])}

\n

Hence $C=1-T = 1-\\var{sum(vties)}=\\var{1-sum(vties)}=\\var{precround(corr,3)}$ to 3 decimal places.

\n

Step 3: Find the Kruskal-Wallis test statistic and make a decision.

\n

The statistic is given by $\\displaystyle H^*=\\frac{H}{C}=\\frac{\\var{precround(h,3)}}{\\var{precround(corr,3)}}=\\var{kw}$ to 2 decimal places.

\n

Looking at the $\\chi^2$ table our decision is that {dec}

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$10\\%$$5\\%$$1\\%$$0.1\\%$
$4.605$$5.991$$9.210$$13.816$
\n

", "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "extensions": ["stats"], "variables": {"tol": {"name": "tol", "group": "Ungrouped variables", "definition": "0.001", "description": "", "templateType": "anything"}, "n2": {"name": "n2", "group": "Ungrouped variables", "definition": "6", "description": "", "templateType": "anything"}, "ran": {"name": "ran", "group": "Ungrouped variables", "definition": "rk(biglist)", "description": "", "templateType": "anything"}, "sr": {"name": "sr", "group": "Ungrouped variables", "definition": "map(sum(ran[x..x+6]),x,[0,6,12])", "description": "", "templateType": "anything"}, "corr": {"name": "corr", "group": "Ungrouped variables", "definition": "1-1/(n^3-n)*g", "description": "", "templateType": "anything"}, "sig2": {"name": "sig2", "group": "Ungrouped variables", "definition": "sig1", "description": "", "templateType": "anything"}, "m2": {"name": "m2", "group": "Ungrouped variables", "definition": "precround(mean(r2),2)", "description": "", "templateType": "anything"}, "n": {"name": "n", "group": "Ungrouped variables", "definition": "n1+n2+n3", "description": "", "templateType": "anything"}, "mu3": {"name": "mu3", "group": "Ungrouped variables", "definition": "random(24..32#0.5)", "description": "", "templateType": "anything"}, "k": {"name": "k", "group": "Ungrouped variables", "definition": "3", "description": "", "templateType": "anything"}, "sd1": {"name": "sd1", "group": "Ungrouped variables", "definition": "precround(pstdev(r1),2)", "description": "", "templateType": "anything"}, "s3": {"name": "s3", "group": "Ungrouped variables", "definition": "['$\\\\bf{Rank}$']+ sort(rkt)", "description": "", "templateType": "anything"}, "r2": {"name": "r2", "group": "Ungrouped variables", "definition": "repeat(round(normalsample(mu2,sig2)),6)", "description": "", "templateType": "anything"}, "dec": {"name": "dec", "group": "Ungrouped variables", "definition": "switch(w[0]=1,'we very strongly reject the null hypothesis at the $0.1\\\\%$ level and conclude that times differ depending on hydration level.',\n w[1]=1,'we strongly reject the null hypothesis at the $1\\\\%$ level and conclude that times differ depending on hydration level.',\n w[2]=1,'we have evidence against the null hypothesis at the $5\\\\%$ level and so we reject it and conclude that times differ depending on hydration level.',\n w[3]=1, 'we only have weak evidence against the null hypothesis at the $10\\\\%$ level so we do not reject it.',\n'there is no evidence against the null hypothesis and so we do not reject it.' )", "description": "", "templateType": "anything"}, "w": {"name": "w", "group": "Ungrouped variables", "definition": "switch(kw>=13.816,[1,0,0,0,0],kw >=9.210,[0,1,0,0,0],kw>=5.991,[0,0,1,0,0],kw>=4.605,[0,0,0,1,0],[0,0,0,0,1])", "description": "", "templateType": "anything"}, "m1": {"name": "m1", "group": "Ungrouped variables", "definition": "precround(mean(r1),2)", "description": "", "templateType": "anything"}, "m3": {"name": "m3", "group": "Ungrouped variables", "definition": "precround(mean(r3),2)", "description": "", "templateType": "anything"}, "kw": {"name": "kw", "group": "Ungrouped variables", "definition": "precround(h/corr,2)", "description": "", "templateType": "anything"}, "vties": {"name": "vties", "group": "Ungrouped variables", "definition": "map(round(rs[x]/(x+1))*(((x+1)^3-(x+1))/(n^3-n)),x,1..abs(rs)-1)", "description": "", "templateType": "anything"}, "r1": {"name": "r1", "group": "Ungrouped variables", "definition": "repeat(round(normalsample(mu1,sig1)),6)", "description": "", "templateType": "anything"}, "biglist": {"name": "biglist", "group": "Ungrouped variables", "definition": "r1+r2+r3", "description": "", "templateType": "anything"}, "ties": {"name": "ties", "group": "Ungrouped variables", "definition": "map(['Number of ties of size $'+x+1+'$ =', round(rs[x]/(x+1))],x,1..abs(rs)-1)", "description": "", "templateType": "anything"}, "tiesplus": {"name": "tiesplus", "group": "Ungrouped variables", "definition": "map(['Ties of size $'+(x+1)+'$','$'+round(rs[x]/(x+1))+'$', '$\\\\,\\\\,\\\\,\\\\,\\\\, \\\\displaystyle '+round(rs[x]/(x+1))+'\\\\times \\\\displaystyle \\\\frac{'+(x+1)+'^3-'+(x+1)+'}{'+n+'^3-'+n+'}$','$'+vties[x-1]+'$'],x,1..abs(rs)-1)+[['Total',' ',' ','$T='+sum(vties)+'$']]", "description": "", "templateType": "anything"}, "mu2": {"name": "mu2", "group": "Ungrouped variables", "definition": "random(22..28#0.5)", "description": "", "templateType": "anything"}, "sd2": {"name": "sd2", "group": "Ungrouped variables", "definition": "precround(pstdev(r2),2)", "description": "", "templateType": "anything"}, "rs": {"name": "rs", "group": "Ungrouped variables", "definition": "rep(ran[18..36])", "description": "", "templateType": "anything"}, "r3": {"name": "r3", "group": "Ungrouped variables", "definition": "repeat(round(normalsample(mu3,sig3)),6)", "description": "", "templateType": "anything"}, "s2": {"name": "s2", "group": "Ungrouped variables", "definition": "['$\\\\bf{Index}$']+map(x,x,1..18)", "description": "", "templateType": "anything"}, "g": {"name": "g", "group": "Ungrouped variables", "definition": "sum(map(ran[x]^2-1,x,18..35))", "description": "", "templateType": "anything"}, "mu1": {"name": "mu1", "group": "Ungrouped variables", "definition": "random(20..25#0.5)", "description": "", "templateType": "anything"}, "h": {"name": "h", "group": "Ungrouped variables", "definition": "12/(n*(n+1))*sum(map(x^2/n1,x,sr))-3*(n+1)", "description": "", "templateType": "anything"}, "sig3": {"name": "sig3", "group": "Ungrouped variables", "definition": "sig1", "description": "", "templateType": "anything"}, "s1": {"name": "s1", "group": "Ungrouped variables", "definition": "['$\\\\bf{Ordered\\\\;\\\\; times}$']+sort(biglist)", "description": "", "templateType": "anything"}, "sig1": {"name": "sig1", "group": "Ungrouped variables", "definition": "random(3..5#0.2)", "description": "", "templateType": "anything"}, "n3": {"name": "n3", "group": "Ungrouped variables", "definition": "6", "description": "", "templateType": "anything"}, "n1": {"name": "n1", "group": "Ungrouped variables", "definition": "6", "description": "", "templateType": "anything"}, "sd3": {"name": "sd3", "group": "Ungrouped variables", "definition": "precround(pstdev(r3),2)", "description": "", "templateType": "anything"}, "rkt": {"name": "rkt", "group": "Ungrouped variables", "definition": "ran[0..18]", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["rkt", "sd1", "sd2", "sd3", "ran", "biglist", "vties", "mu3", "rs", "s3", "s2", "s1", "m1", "tol", "m2", "tiesplus", "m3", "sig1", "sig3", "sig2", "corr", "ties", "r1", "n3", "mu1", "g", "r2", "mu2", "h", "k", "r3", "n", "kw", "w", "sr", "n1", "n2", "dec"], "variable_groups": [], "functions": {"rep": {"parameters": [["a", "list"]], "type": "list", "language": "javascript", "definition": "\nvar b=a.sort(function(c,d){return c-d});\n var M=b[a.length-1];\n var arr=[];\n for(var j=1;j<=M;j++){\nvar s=0;\nfor(var i=0;il[i]){s+=1;}\n else\nif(l[j]==l[i]){c+=1;}\n}\n out[j]=(2*s+c+1)/2;\n rep[j]=c;\n }\n return out.concat(rep);\n\n"}, "pstdev": {"parameters": [["l", "list"]], "type": "number", "language": "jme", "definition": "sqrt(abs(l)/(abs(l)-1))*stdev(l)"}}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Kruskal-Wallis Test

\n

First fill in this table with the appropriate values, all decimals to 1 decimal place. $R_1,\\;R_2,\\;R_3$  are the sums of the ranks in each row.

\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\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]}$ 
Rank[[0]][[1]][[2]][[3]][[4]][[5]]$R_1=\\;$[[6]]
Group 2 (partially hydrated)$\\var{r2[0]}$$\\var{r2[1]}$$\\var{r2[2]}$$\\var{r2[3]}$$\\var{r2[4]}$$\\var{r2[5]}$ 
Rank[[7]][[8]][[9]][[10]][[11]][[12]]$R_2=\\;$[[13]]
Group 3 (dehydrated)$\\var{r3[0]}$$\\var{r3[1]}$$\\var{r3[2]}$$\\var{r3[3]}$$\\var{r3[4]}$$\\var{r3[5]}$ 
Rank[[14]][[15]][[16]][[17]][[18]][[19]]$R_3=\\;$[[20]]
\n

 

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 0.5, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "ran[0]", "maxValue": "ran[0]", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 0.5, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "ran[1]", "maxValue": "ran[1]", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 0.5, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "ran[2]", "maxValue": "ran[2]", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 0.5, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "ran[3]", "maxValue": "ran[3]", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 0.5, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "ran[4]", "maxValue": "ran[4]", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 0.5, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "ran[5]", "maxValue": "ran[5]", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "sr[0]", "maxValue": "sr[0]", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 0.5, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "ran[6]", "maxValue": "ran[6]", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 0.5, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "ran[7]", "maxValue": "ran[7]", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 0.5, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "ran[8]", "maxValue": "ran[8]", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 0.5, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "ran[9]", "maxValue": "ran[9]", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 0.5, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "ran[10]", "maxValue": "ran[10]", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 0.5, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "ran[11]", "maxValue": "ran[11]", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "sr[1]", "maxValue": "sr[1]", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 0.5, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "ran[12]", "maxValue": "ran[12]", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 0.5, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "ran[13]", "maxValue": "ran[13]", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 0.5, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "ran[14]", "maxValue": "ran[14]", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 0.5, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "ran[15]", "maxValue": "ran[15]", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 0.5, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "ran[16]", "maxValue": "ran[16]", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 0.5, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "ran[17]", "maxValue": "ran[17]", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "sr[2]", "maxValue": "sr[2]", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Now calculate the Kruskal-Wallis  test statistic in the following steps as in your notes:

\n

$H=\\;$[[0]] (Assuming no ties).  Calculate to 3 decimal places.

\n

$C=\\;$[[1]] (Correction for ties). Calculate to 3 decimal places.

\n

Kruskal-Wallis statistic $H^*=\\;$ [[2]].   Calculate to 2 decimal places.

\n

 

\n

Give the value of $H^*$ you have found, determine the significance of your result by looking up the critical values in the $\\chi^2$ table.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$10\\%$$5\\%$$1\\%$$0.1\\%$
$4.605$$5.991$$9.210$$13.816$
\n

Hence what can you say using the Kruskal-Wallis test about the null hypothesis that times to do the exercises do not depend upon the level of hydration?

\n

[[3]]

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 2, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "precround(H,3)-0.001", "maxValue": "precround(H,3)+0.001", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "precround(corr,3)", "maxValue": "precround(corr,3)", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 2, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "kw-0.01", "maxValue": "kw+0.01", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "1_n_2", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": 1, "showCellAnswerState": true, "choices": ["

We very strongly reject the null hypothesis at the $0.1\\%$ level and conclude that times differ depending upon hydration level.

", "

We strongly reject the null hypothesis at the $1\\%$ level and conclude that times differ depending upon hydration level.

", "

We have evidence against the null hypothesis at the $5\\%$ level, so we reject it and conclude that times differ depending upon hydration level.

", "

We only have weak evidence against the null hypothesis at the $10\\%$ level and so conclude that times do not depend upon hydration level.

", "

We have no evidence against the null hypothesis and so conclude that times do not depend upon hydration level.

"], "matrix": "w"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "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/"}, {"name": "Tom Lowe", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/9601/"}]}]}], "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/"}, {"name": "Tom Lowe", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/9601/"}]}