// Numbas version: exam_results_page_options {"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": [{"rulesets": {}, "variablesTest": {"maxRuns": 100, "condition": ""}, "metadata": {"licence": "Creative Commons Attribution-ShareAlike 4.0 International", "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.

"}, "tags": [], "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.

", "functions": {}, "variables": {"dfE": {"definition": "n-k", "description": "", "templateType": "anything", "name": "dfE", "group": "Analysis"}, "F": {"definition": "siground(MSG/MSE,3)", "description": "", "templateType": "anything", "name": "F", "group": "Analysis"}, "v": {"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", "name": "v", "group": "Ungrouped variables"}, "MSE": {"definition": "siground(SSE/dfE,3)", "description": "", "templateType": "anything", "name": "MSE", "group": "Analysis"}, "alpha_pc": {"definition": "random(0.1,1,5,10)", "description": "

Significance level as percentage.

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

Number of groups.

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

Tolerance to allow for up to 5% rounding errors.

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

Total number of subjects.

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

Number of subjects per group.

", "templateType": "anything", "name": "ni", "group": "Setup"}}, "name": "ANOVA (one-way): drug effect", "ungrouped_variables": ["tol", "v"], "extensions": ["stats"], "variable_groups": [{"variables": ["n", "k", "ni", "SSG", "SSE", "alpha_pc"], "name": "Setup"}, {"variables": ["dfG", "dfE", "dfTot", "MSG", "MSE", "F", "SST", "p", "p_pc"], "name": "Analysis"}], "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.

", "preamble": {"css": "", "js": ""}, "parts": [{"scripts": {}, "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": [{"minValue": "dfG", "maxValue": "dfG", "type": "numberentry", "showFractionHint": true, "allowFractions": false, "useCustomName": false, "marks": "0.5", "adaptiveMarkingPenalty": 0, "correctAnswerFraction": false, "customName": "", "customMarkingAlgorithm": "", "showCorrectAnswer": true, "scripts": {}, "showFeedbackIcon": true, "notationStyles": ["plain", "en", "si-en"], "mustBeReducedPC": 0, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "extendBaseMarkingAlgorithm": true, "unitTests": [], "mustBeReduced": false, "correctAnswerStyle": "plain"}, {"minValue": "dfE", "maxValue": "dfE", "type": "numberentry", "showFractionHint": true, "allowFractions": false, "useCustomName": false, "marks": "0.5", "adaptiveMarkingPenalty": 0, "correctAnswerFraction": false, "customName": "", "customMarkingAlgorithm": "", "showCorrectAnswer": true, "scripts": {}, "showFeedbackIcon": true, "notationStyles": ["plain", "en", "si-en"], "mustBeReducedPC": 0, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "extendBaseMarkingAlgorithm": true, "unitTests": [], "mustBeReduced": false, "correctAnswerStyle": "plain"}, {"minValue": "dfTot", "maxValue": "dfTot", "type": "numberentry", "showFractionHint": true, "allowFractions": false, "useCustomName": false, "marks": "0.5", "adaptiveMarkingPenalty": 0, "correctAnswerFraction": false, "customName": "", "customMarkingAlgorithm": "", "showCorrectAnswer": true, "scripts": {}, "showFeedbackIcon": true, "notationStyles": ["plain", "en", "si-en"], "mustBeReducedPC": 0, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "extendBaseMarkingAlgorithm": true, "unitTests": [], "mustBeReduced": false, "correctAnswerStyle": "plain"}, {"minValue": "MSG*(1-tol)", "maxValue": "MSG*(1+tol)", "type": "numberentry", "showFractionHint": true, "allowFractions": false, "useCustomName": false, "marks": "0.5", "adaptiveMarkingPenalty": 0, "correctAnswerFraction": false, "customName": "", "customMarkingAlgorithm": "", "showCorrectAnswer": true, "scripts": {}, "showFeedbackIcon": true, "notationStyles": ["plain", "en", "si-en"], "mustBeReducedPC": 0, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "extendBaseMarkingAlgorithm": true, "unitTests": [], "mustBeReduced": false, "correctAnswerStyle": "plain"}, {"minValue": "MSE*(1-tol)", "maxValue": "MSE*(1+tol)", "type": "numberentry", "showFractionHint": true, "allowFractions": false, "useCustomName": false, "marks": "0.5", "adaptiveMarkingPenalty": 0, "correctAnswerFraction": false, "customName": "", "customMarkingAlgorithm": "", "showCorrectAnswer": true, "scripts": {}, "showFeedbackIcon": true, "notationStyles": ["plain", "en", "si-en"], "mustBeReducedPC": 0, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "extendBaseMarkingAlgorithm": true, "unitTests": [], "mustBeReduced": false, "correctAnswerStyle": "plain"}, {"minValue": "F*(1-tol)", "maxValue": "F*(1+tol)", "type": "numberentry", "showFractionHint": true, "allowFractions": false, "useCustomName": false, "marks": "0.5", "adaptiveMarkingPenalty": 0, "correctAnswerFraction": false, "customName": "", "customMarkingAlgorithm": "", "showCorrectAnswer": true, "scripts": {}, "showFeedbackIcon": true, "notationStyles": ["plain", "en", "si-en"], "mustBeReducedPC": 0, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "extendBaseMarkingAlgorithm": true, "unitTests": [], "mustBeReduced": false, "correctAnswerStyle": "plain"}, {"minValue": "SST*(1-tol)", "maxValue": "SST*(1+tol)", "type": "numberentry", "showFractionHint": true, "allowFractions": false, "useCustomName": false, "marks": "0.5", "adaptiveMarkingPenalty": 0, "correctAnswerFraction": false, "customName": "", "customMarkingAlgorithm": "", "showCorrectAnswer": true, "scripts": {}, "showFeedbackIcon": true, "notationStyles": ["plain", "en", "si-en"], "mustBeReducedPC": 0, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "extendBaseMarkingAlgorithm": true, "unitTests": [], "mustBeReduced": false, "correctAnswerStyle": "plain"}], "marks": 0, "unitTests": [], "useCustomName": false, "sortAnswers": false, "variableReplacementStrategy": "originalfirst", "type": "gapfill", "variableReplacements": [], "extendBaseMarkingAlgorithm": true, "adaptiveMarkingPenalty": 0, "showFeedbackIcon": true, "customName": "", "customMarkingAlgorithm": "", "showCorrectAnswer": true}, {"scripts": {}, "prompt": "

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

\n

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

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

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

", "marks": 0, "maxMarks": 0, "showFeedbackIcon": true, "adaptiveMarkingPenalty": "0", "variableReplacements": [{"must_go_first": false, "part": "p1g1", "variable": "p_pc"}], "customMarkingAlgorithm": "", "scripts": {}, "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."], "displayColumns": "1", "useCustomName": false, "customName": "", "variableReplacementStrategy": "alwaysreplace", "displayType": "radiogroup", "shuffleChoices": false, "extendBaseMarkingAlgorithm": true, "unitTests": [], "matrix": "v", "showCellAnswerState": true}], "contributors": [{"name": "Mario Orsi", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/427/"}]}]}], "contributors": [{"name": "Mario Orsi", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/427/"}]}