// Numbas version: finer_feedback_settings {"name": "Hypothesis test (t)", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Hypothesis test (t)", "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{zval}\\]
\nto 3 decimal places.
\nc)
\nFor a significance level of 5%:
\n$z_{{\\frac{\\alpha}{2}}}=1.96$
\n\n
d)
Hence there is {evi1[pval]} evidence against $\\operatorname{H}_0$ and so we {dothis} $\\operatorname{H}_0$.
\n{Correctc}
", "parts": [{"unitTests": [], "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "customMarkingAlgorithm": "", "marks": 0, "sortAnswers": false, "scripts": {}, "variableReplacements": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "gaps": [{"mustBeReducedPC": 0, "notationStyles": ["plain", "en", "si-en"], "showFeedbackIcon": true, "correctAnswerStyle": "plain", "minValue": "thisamount", "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "customMarkingAlgorithm": "", "correctAnswerFraction": false, "marks": 0.5, "variableReplacements": [], "mustBeReduced": false, "scripts": {}, "showCorrectAnswer": true, "unitTests": [], "allowFractions": false, "maxValue": "thisamount", "type": "numberentry"}, {"mustBeReducedPC": 0, "notationStyles": ["plain", "en", "si-en"], "showFeedbackIcon": true, "correctAnswerStyle": "plain", "minValue": "thisamount", "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "customMarkingAlgorithm": "", "correctAnswerFraction": false, "marks": 0.5, "variableReplacements": [], "mustBeReduced": false, "scripts": {}, "showCorrectAnswer": true, "unitTests": [], "allowFractions": false, "maxValue": "thisamount", "type": "numberentry"}], "prompt": "Step 1: Null Hypothesis
\n$\\operatorname{H}_0\\;: \\; \\mu=\\;$[[0]]
\nStep 2: Alternative Hypothesis
\n$\\operatorname{H}_1\\;: \\; \\mu \\neq\\;$[[1]]
", "type": "gapfill"}, {"unitTests": [], "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "customMarkingAlgorithm": "", "marks": 0, "sortAnswers": false, "scripts": {}, "variableReplacements": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "gaps": [{"showFeedbackIcon": true, "checkingAccuracy": 0.001, "scripts": {}, "variableReplacementStrategy": "originalfirst", "vsetRange": [0, 1], "checkVariableNames": false, "customMarkingAlgorithm": "", "checkingType": "absdiff", "expectedVariableNames": [], "showPreview": true, "failureRate": 1, "answer": "z", "variableReplacements": [], "type": "jme", "marks": 1, "showCorrectAnswer": true, "unitTests": [], "vsetRangePoints": 5, "extendBaseMarkingAlgorithm": true}, {"mustBeReducedPC": 0, "notationStyles": ["plain", "en", "si-en"], "showFeedbackIcon": true, "correctAnswerStyle": "plain", "minValue": "zval-tol", "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "customMarkingAlgorithm": "", "correctAnswerFraction": false, "marks": 1, "variableReplacements": [], "mustBeReduced": false, "scripts": {}, "showCorrectAnswer": true, "unitTests": [], "allowFractions": false, "maxValue": "zval+tol", "type": "numberentry"}], "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)
", "type": "gapfill"}, {"unitTests": [], "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "customMarkingAlgorithm": "", "marks": 0, "sortAnswers": false, "scripts": {}, "variableReplacements": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "gaps": [{"mustBeReducedPC": 0, "notationStyles": ["plain", "en", "si-en"], "showPrecisionHint": true, "variableReplacementStrategy": "originalfirst", "precisionType": "dp", "marks": 1, "precisionPartialCredit": 0, "mustBeReduced": false, "showFeedbackIcon": true, "maxValue": "1.96", "unitTests": [], "correctAnswerStyle": "plain", "minValue": "1.96", "precisionMessage": "You have not given your answer to the correct precision.", "extendBaseMarkingAlgorithm": true, "scripts": {}, "customMarkingAlgorithm": "", "correctAnswerFraction": false, "strictPrecision": false, "type": "numberentry", "precision": "2", "variableReplacements": [], "showCorrectAnswer": true, "allowFractions": false}], "prompt": "Step 4: critical value
\nUse tables to find the critical value for a significance level of 5%.
\n[[0]]
", "type": "gapfill"}, {"unitTests": [], "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "customMarkingAlgorithm": "", "marks": 0, "sortAnswers": false, "scripts": {}, "variableReplacements": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "gaps": [{"choices": ["Fail to reject", "Reject"], "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "showCellAnswerState": true, "extendBaseMarkingAlgorithm": true, "scripts": {}, "customMarkingAlgorithm": "", "displayColumns": 0, "maxMarks": 0, "displayType": "radiogroup", "minMarks": 0, "variableReplacements": [], "matrix": "dmm", "shuffleChoices": false, "marks": 0, "showCorrectAnswer": true, "unitTests": [], "type": "1_n_2"}, {"choices": ["{Correctc}", "{Fac}"], "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "showCellAnswerState": true, "extendBaseMarkingAlgorithm": true, "scripts": {}, "customMarkingAlgorithm": "", "displayColumns": 0, "maxMarks": 0, "marks": 0, "minMarks": 0, "variableReplacements": [], "matrix": [1, 0], "shuffleChoices": true, "displayType": "radiogroup", "distractors": ["", ""], "unitTests": [], "showCorrectAnswer": true, "type": "1_n_2"}], "prompt": "\n
Your Decision:
\n[[0]]
\n\n\n
Conclusion:
\n[[1]]
\n", "type": "gapfill"}], "variables": {"zval": {"name": "zval", "definition": "precround(zval1,3)", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "mm": {"name": "mm", "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": "", "group": "Ungrouped variables", "templateType": "anything"}, "n": {"name": "n", "definition": "random(35..45)", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "dothis": {"name": "dothis", "definition": "switch(pval =1, 'fail to reject','reject')", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "dmm": {"name": "dmm", "definition": "if(pval=1,[1,0],[0,1])", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "evi1": {"name": "evi1", "definition": "[\"sufficient\",\"insufficient\"]", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "pval": {"name": "pval", "definition": "switch(zval>1.96,0,1)", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "evi": {"name": "evi", "definition": "[\"None\",\"Slight\",\"Moderate\",\"Strong\"]", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "zval1": {"name": "zval1", "definition": "abs(m-thisamount)*sqrt(n)/stand", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "m": {"name": "m", "definition": "thisamount+random(0.2..0.6#0.02)", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "correctc": {"name": "correctc", "definition": "if(pval=1,\"There is insufficient evidence against the claim of the manufacturer\",\"There is sufficient evidence against the claim of the manufacturer.\")", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "fac": {"name": "fac", "definition": "if(pval=0,\"There is insufficient evidence against the claim of the manufacturer\",\"There is sufficient evidence against the claim of the manufacturer.\")", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "thisamount": {"name": "thisamount", "definition": "random(35..40#0.1)", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "stand": {"name": "stand", "definition": "random(0.8..1#0.01)", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "tol": {"name": "tol", "definition": "0.001", "description": "", "group": "Ungrouped variables", "templateType": "anything"}}, "variablesTest": {"maxRuns": 100, "condition": ""}, "functions": {}, "preamble": {"css": "", "js": ""}, "ungrouped_variables": ["pval", "evi1", "zval1", "stand", "tol", "fac", "evi", "dothis", "correctc", "m", "dmm", "n", "mm", "thisamount", "zval"], "extensions": ["stats"], "tags": [], "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", "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"}, "variable_groups": [], "rulesets": {}, "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/"}]}