// Numbas version: finer_feedback_settings {"name": "ANOVA (one-way): drug effect", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "ANOVA (one-way): drug effect", "tags": [], "metadata": {"description": "

This questions assesses the ability to conduct an ANOVA and interpret the results.

Adaptive marking: an error in calculating F can be carried over to the calculation of the p-value as well as the test conclusion.

", "licence": "Creative Commons Attribution-ShareAlike 4.0 International"}, "statement": "

A trial was conducted to investigate any difference in blood cholesterol reduction when comparing $\\var{k-1}$ different drugs. A total of $\\var{n}$ subjects was randomly allocated to $\\var{k}$ groups (one group for each drug plus a placebo group), with each group comprising $\\var{ni}$ subjects.

", "advice": "

For general aspects of ANOVA, see relevant literature (e.g., section 7.5 of OpenIntro Statistics).

\n

The p-value can be calculated from the F value using Excel's F.DIST.RT function.

", "rulesets": {}, "extensions": ["stats"], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"dfE": {"name": "dfE", "group": "Analysis", "definition": "n-k", "description": "", "templateType": "anything", "can_override": false}, "F": {"name": "F", "group": "Analysis", "definition": "siground(MSG/MSE,3)", "description": "", "templateType": "anything", "can_override": false}, "v": {"name": "v", "group": "Ungrouped variables", "definition": "switch(p_pc<=alpha_pc,[3,0],p_pc>alpha_pc,[0,3])", "description": "

The \"3\" is the amount of marks available.

", "templateType": "anything", "can_override": false}, "MSE": {"name": "MSE", "group": "Analysis", "definition": "siground(SSE/dfE,3)", "description": "", "templateType": "anything", "can_override": false}, "alpha_pc": {"name": "alpha_pc", "group": "Setup", "definition": "random(0.1,1,5,10)", "description": "

Significance level as percentage.

", "templateType": "anything", "can_override": false}, "p": {"name": "p", "group": "Analysis", "definition": "siground(ftest(F,dfG,dfE),3)", "description": "", "templateType": "anything", "can_override": false}, "SSE": {"name": "SSE", "group": "Setup", "definition": "random(700..800)", "description": "", "templateType": "anything", "can_override": false}, "k": {"name": "k", "group": "Setup", "definition": "random(4,5,10)", "description": "

Number of groups.

", "templateType": "anything", "can_override": false}, "dfG": {"name": "dfG", "group": "Analysis", "definition": "k-1", "description": "", "templateType": "anything", "can_override": false}, "MSG": {"name": "MSG", "group": "Analysis", "definition": "siground(SSG/dfG,3)", "description": "", "templateType": "anything", "can_override": false}, "tol": {"name": "tol", "group": "Ungrouped variables", "definition": "0.05", "description": "

Tolerance to allow for up to 5% rounding errors.

", "templateType": "anything", "can_override": false}, "SST": {"name": "SST", "group": "Analysis", "definition": "siground(SSG+SSE,3)", "description": "", "templateType": "anything", "can_override": false}, "SSG": {"name": "SSG", "group": "Setup", "definition": "random(10..15#0.1)", "description": "", "templateType": "anything", "can_override": false}, "dfTot": {"name": "dfTot", "group": "Analysis", "definition": "n-1", "description": "", "templateType": "anything", "can_override": false}, "n": {"name": "n", "group": "Setup", "definition": "random(100..900#100)", "description": "

Total number of subjects.

", "templateType": "anything", "can_override": false}, "p_pc": {"name": "p_pc", "group": "Analysis", "definition": "100*siground(ftest(F,dfG,dfE),3)", "description": "", "templateType": "anything", "can_override": false}, "ni": {"name": "ni", "group": "Setup", "definition": "n/k", "description": "

Number of subjects per group.

", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["tol", "v"], "variable_groups": [{"name": "Setup", "variables": ["n", "k", "ni", "SSG", "SSE", "alpha_pc"]}, {"name": "Analysis", "variables": ["dfG", "dfE", "dfTot", "MSG", "MSE", "F", "SST", "p", "p_pc"]}], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Fill in the gaps in the ANOVA table:

\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
dfSum SqMean SqF value
drug[[0]]$\\var{SSG}$[[3]][[5]]
Residuals[[1]]$\\var{SSE}$[[4]]
Total[[2]][[6]]
", "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": "dfG", "maxValue": "dfG", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "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": "dfE", "maxValue": "dfE", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "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": "dfTot", "maxValue": "dfTot", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "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": "MSG*(1-tol)", "maxValue": "MSG*(1+tol)", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "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": "MSE*(1-tol)", "maxValue": "MSE*(1+tol)", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "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": "F*(1-tol)", "maxValue": "F*(1+tol)", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "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": "SST*(1-tol)", "maxValue": "SST*(1+tol)", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "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": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Calculate the p-value and convert to the corresponding percentage:

\n

$p=$ [[0]]$=$ [[1]]$\\%$

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [{"variable": "F", "part": "p0g5", "must_go_first": false}], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": "0.5", "exploreObjective": null, "minValue": "p*(1-tol)", "maxValue": "p*(1+tol)", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "1.5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [{"variable": "F", "part": "p0g5", "must_go_first": false}], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": "0.5", "exploreObjective": null, "minValue": "p_pc*(1-tol)", "maxValue": "p_pc*(1+tol)", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "1_n_2", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": false, "variableReplacements": [{"variable": "p_pc", "part": "p1g1", "must_go_first": false}], "variableReplacementStrategy": "alwaysreplace", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": "0", "exploreObjective": null, "prompt": "

What is the conclusion of the test considering a significance level $\\alpha=\\var{alpha_pc}\\%$?

", "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": "1", "showCellAnswerState": true, "choices": ["Reject the null hypothesis as at least one group mean is different.", "Do not reject the null hypothesis as all group means are equal."], "matrix": "v"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Mario Orsi", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/427/"}], "resources": []}]}], "contributors": [{"name": "Mario Orsi", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/427/"}]}