// Numbas version: finer_feedback_settings {"name": "Hypothesis test (volume)", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Hypothesis test (volume)", "tags": [], "metadata": {"description": "
Provided with information on a sample (>30) with sample mean and standard deviation, use the z test to either accept or reject a given null hypothesis.
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "A leading manufacturer claims its product contains {thisamount} ml by volume. A sample of {n} items was taken and the mean of the sample was $\\bar{x}=\\var{m}$ ml and the standard deviation of the sample was $s = \\var{stand}$ ml. Is the manufacturers claim justified?
\n", "advice": "
a)
\nStep 1: Null Hypothesis
\n$\\operatorname{H}_0\\;: \\; \\mu=\\;\\var{thisamount}$
\nStep 2: Alternative Hypothesis
\n$\\operatorname{H}_1\\;: \\; \\mu \\neq\\;\\var{thisamount}$
\nb)
\nWe should use the z statistic since the sample size is greater than 30.
\nThe test statistic:
\n\\[z = \\frac{\\var{m}-\\var{thisamount}}{\\frac{\\var{stand}}{\\sqrt{\\var{n}}}}=\\var{teststatistic}\\]
\nto 3 decimal places.
\nc)
\nFor a significance level of 5%:
\n$z_{{\\frac{\\alpha}{2}}}=\\var{critical}$
\n\n
d)
Hence there is {evi1[pval]} evidence against $\\operatorname{H}_0$ and so we {dothis} $\\operatorname{H}_0$.
\n{Correctc}
", "rulesets": {}, "extensions": ["stats"], "variables": {"m": {"name": "m", "group": "Ungrouped variables", "definition": "thisamount+random(0.2..0.6#0.02)", "description": "", "templateType": "anything"}, "fac": {"name": "fac", "group": "Ungrouped variables", "definition": "if(abs(teststatistic)>abs(critical),\"There is insufficient evidence against the claim of the manufacturer\",\"There is sufficient evidence against the claim of the manufacturer.\")", "description": "", "templateType": "anything"}, "tol": {"name": "tol", "group": "Ungrouped variables", "definition": "0.001", "description": "", "templateType": "anything"}, "evi1": {"name": "evi1", "group": "Ungrouped variables", "definition": "[\"sufficient\",\"insufficient\"]", "description": "", "templateType": "anything"}, "n": {"name": "n", "group": "Ungrouped variables", "definition": "random(35..45)", "description": "", "templateType": "anything"}, "dmm": {"name": "dmm", "group": "Ungrouped variables", "definition": "if(pval=1,[1,0],[0,1])", "description": "", "templateType": "anything"}, "mm": {"name": "mm", "group": "Ungrouped variables", "definition": "switch(pval=0,[1,0,0,0],pval=1,[0,1,0,0],pval=2,[0,0,1,0],[0,0,0,1])", "description": "", "templateType": "anything"}, "zval1": {"name": "zval1", "group": "Ungrouped variables", "definition": "abs(m-thisamount)*sqrt(n)/stand", "description": "", "templateType": "anything"}, "zval": {"name": "zval", "group": "Ungrouped variables", "definition": "precround(zval1,3)", "description": "", "templateType": "anything"}, "pval": {"name": "pval", "group": "Ungrouped variables", "definition": "switch(abs(zval)>1.96,0,1)", "description": "", "templateType": "anything"}, "evi": {"name": "evi", "group": "Ungrouped variables", "definition": "[\"None\",\"Slight\",\"Moderate\",\"Strong\"]", "description": "", "templateType": "anything"}, "teststatistic": {"name": "teststatistic", "group": "Ungrouped variables", "definition": "precround(if(m-thisamount>0,zval1,-zval1),3)", "description": "", "templateType": "anything"}, "dothis": {"name": "dothis", "group": "Ungrouped variables", "definition": "switch(abs(teststatistic)Step 1: Null Hypothesis
\n$\\operatorname{H}_0\\;: \\; \\mu=\\;$[[0]]
\nStep 2: Alternative Hypothesis
\n$\\operatorname{H}_1\\;: \\; \\mu \\neq\\;$[[1]]
", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 0.5, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "minValue": "thisamount", "maxValue": "thisamount", "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, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "minValue": "thisamount", "maxValue": "thisamount", "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, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "Step 3: Test statistic
\nShould we use the z or t test statistic? [[0]] (enter z or t).
\nNow calculate the test statistic = ? [[1]] (to 3 decimal places)
", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "z", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "valuegenerators": [{"name": "z", "value": ""}]}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "minValue": "teststatistic-tol", "maxValue": "teststatistic+tol", "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, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "Step 4: critical value
\nUse tables to find the critical value for a significance level of 5%.
\n[[0]]
", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "minValue": "critical", "maxValue": "critical", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "dp", "precision": "2", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "\n
Your Decision:
\n[[0]]
\n\n\n
Conclusion:
\n[[1]]
\n", "gaps": [{"type": "1_n_2", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": 0, "showCellAnswerState": true, "choices": ["Fail to reject", "Reject"], "matrix": "dmm"}, {"type": "1_n_2", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "minMarks": 0, "maxMarks": 0, "shuffleChoices": true, "displayType": "radiogroup", "displayColumns": 0, "showCellAnswerState": true, "choices": ["{Correctc}", "{Fac}"], "matrix": [1, 0], "distractors": ["", ""]}], "sortAnswers": false}], "type": "question", "contributors": [{"name": "Catherine Palmer", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/423/"}, {"name": "Patrice Behan", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1791/"}]}]}], "contributors": [{"name": "Catherine Palmer", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/423/"}, {"name": "Patrice Behan", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1791/"}]}