// Numbas version: exam_results_page_options {"name": "STAT7008 Hypothesis test given sample mean and population variance (vending machine)", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "STAT7008 Hypothesis test given sample mean and population variance (vending machine)", "tags": [], "metadata": {"description": "

Provided with information on a sample with sample mean and known population variance, use the z test to either or reject a given null hypothesis. One sided.

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

{this} {stuff}

\n

{claim}$\\var{thismuch}${units} and {var} {standarddev}.

\n

{test}

\n

To investigate a sample of $\\var{n}$ {things} {resultis} $\\var{m}${units}. 

\n

Perform an appropriate hypothesis test to see if the claim made by the customers is substantiated. Assume a significance level of 5%.

", "advice": "

a)

\n

Step 1: Null Hypothesis

\n

$\\operatorname{H}_0\\;: \\; \\mu=\\;\\var{thismuch}$

\n

Step 2: Alternative Hypothesis

\n

$\\operatorname{H}_1\\;: \\; \\mu \\lt\\;\\var{thismuch}$

\n

b)

\n

We should use the z statistic as the population variance is known.

\n

The test statistic:

\n

\\[z =\\frac{ \\var{m} -\\var{thismuch}} {\\frac{\\var{standarddev}}{\\sqrt{\\var{n}}}} = \\var{teststatistic}\\]

\n

to 2 decimal places.

\n

c)

\n

\n

 For a significance level of 5%:

\n

$z_{{\\alpha}}=\\var{critical}$

\n


d)

\n

We {dothis} $\\operatorname{H}_0$.

\n

{Correctc}

", "rulesets": {}, "extensions": ["stats"], "variables": {"stand": {"name": "stand", "group": "Ungrouped variables", "definition": "random(15..25)", "description": "", "templateType": "anything"}, "thisvar": {"name": "thisvar", "group": "Ungrouped variables", "definition": "random(300..400#10)", "description": "", "templateType": "anything"}, "dothis": {"name": "dothis", "group": "Ungrouped variables", "definition": "switch(abs(teststatistic) 0,1.65,-1.65)", "description": "", "templateType": "anything"}, "correctc": {"name": "correctc", "group": "Ungrouped variables", "definition": "if(abs(teststatistic)>abs(critical),\"There is sufficient evidence against the claim of the vending company.\",\n \"There is insufficient evidence against the claim of the vending company.\")", "description": "", "templateType": "anything"}, "var": {"name": "var", "group": "Ungrouped variables", "definition": "\"the standard deviation of the filling process is known to be \"", "description": "", "templateType": "anything"}, "thismuch": {"name": "thismuch", "group": "Ungrouped variables", "definition": "random(140..160)", "description": "", "templateType": "anything"}, "m": {"name": "m", "group": "Ungrouped variables", "definition": "thismuch-random(3..8)", "description": "", "templateType": "anything"}, "tol": {"name": "tol", "group": "Ungrouped variables", "definition": "0.001", "description": "", "templateType": "anything"}, "fac": {"name": "fac", "group": "Ungrouped variables", "definition": "if(abs(teststatistic) 0, zval1,-zval1),2)", "description": "", "templateType": "anything"}, "this": {"name": "this", "group": "Ungrouped variables", "definition": "\"A vending machine fills cups with \"", "description": "", "templateType": "anything"}, "things": {"name": "things", "group": "Ungrouped variables", "definition": "\"cups is taken\"", "description": "", "templateType": "anything"}, "dmm": {"name": "dmm", "group": "Ungrouped variables", "definition": "if(abs_testStep 1: Null Hypothesis

\n

$\\operatorname{H}_0\\;: \\; \\mu=\\;$[[0]]

\n

Step 2: Alternative Hypothesis

\n

$\\operatorname{H}_1\\;: \\; \\mu \\lt\\;$[[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": "thismuch", "maxValue": "thismuch", "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": "thismuch", "maxValue": "thismuch", "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

\n

Should we use the z or t test statistic? [[0]] (enter z or t).

\n

Now calculate the test statistic = ? [[1]] (to 2 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": "

The critical value is [[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": "

Step 5:

\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}], "contributors": [{"name": "Catherine Palmer", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/423/"}, {"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Harry Flynn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/976/"}]}]}], "contributors": [{"name": "Catherine Palmer", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/423/"}, {"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Harry Flynn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/976/"}]}