// Numbas version: finer_feedback_settings {"name": "Harry's copy of Harry's copy of Perform t-test for hypothesis given sample mean and standard deviation two sided, one sample", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["claim", "pval", "evi1", "crit", "tval1", "things", "stand", "tol", "test", "pm", "correctc", "resultis", "here", "fac", "confl", "evi", "this", "dothis", "m", "dmm", "n", "mm", "thisamount", "tval", "tcrit"], "extensions": ["stats"], "parts": [{"gaps": [{"notationStyles": ["plain", "en", "si-en"], "scripts": {}, "correctAnswerFraction": false, "marks": 0.5, "mustBeReduced": false, "variableReplacementStrategy": "originalfirst", "allowFractions": false, "variableReplacements": [], "type": "numberentry", "showCorrectAnswer": true, "maxValue": "thisamount", "minValue": "thisamount", "mustBeReducedPC": 0, "correctAnswerStyle": "plain", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showFeedbackIcon": true, "customMarkingAlgorithm": ""}, {"notationStyles": ["plain", "en", "si-en"], "scripts": {}, "correctAnswerFraction": false, "marks": 0.5, "mustBeReduced": false, "variableReplacementStrategy": "originalfirst", "allowFractions": false, "variableReplacements": [], "type": "numberentry", "showCorrectAnswer": true, "maxValue": "thisamount", "minValue": "thisamount", "mustBeReducedPC": 0, "correctAnswerStyle": "plain", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showFeedbackIcon": true, "customMarkingAlgorithm": ""}], "scripts": {}, "marks": 0, "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "type": "gapfill", "showCorrectAnswer": true, "prompt": "\n
Step 1: Null Hypothesis
\n$\\operatorname{H}_0\\;: \\; \\mu=\\;$[[0]]
\nStep 2: Alternative Hypothesis
\n$\\operatorname{H}_1\\;: \\; \\mu \\neq\\;$[[1]]
\n ", "sortAnswers": false, "unitTests": [], "showFeedbackIcon": true, "customMarkingAlgorithm": ""}, {"gaps": [{"answer": "t", "checkingType": "absdiff", "scripts": {}, "failureRate": 1, "showCorrectAnswer": true, "vsetRangePoints": 5, "vsetRange": [0, 1], "expectedVariableNames": [], "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "type": "jme", "checkVariableNames": false, "checkingAccuracy": 0.001, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showFeedbackIcon": true, "marks": 1, "showPreview": true}, {"notationStyles": ["plain", "en", "si-en"], "scripts": {}, "correctAnswerFraction": false, "marks": 1, "mustBeReduced": false, "variableReplacementStrategy": "originalfirst", "allowFractions": false, "variableReplacements": [], "type": "numberentry", "showCorrectAnswer": true, "maxValue": "tval+tol", "minValue": "tval-tol", "mustBeReducedPC": 0, "correctAnswerStyle": "plain", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showFeedbackIcon": true, "customMarkingAlgorithm": ""}], "scripts": {}, "marks": 0, "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "type": "gapfill", "showCorrectAnswer": true, "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)
", "sortAnswers": false, "unitTests": [], "showFeedbackIcon": true, "customMarkingAlgorithm": ""}, {"gaps": [{"scripts": {}, "precisionMessage": "You have not given your answer to the correct precision.", "marks": 1, "mustBeReduced": false, "variableReplacements": [], "type": "numberentry", "showCorrectAnswer": true, "precisionPartialCredit": 0, "mustBeReducedPC": 0, "strictPrecision": false, "customMarkingAlgorithm": "", "precision": "2", "notationStyles": ["plain", "en", "si-en"], "correctAnswerFraction": false, "variableReplacementStrategy": "originalfirst", "allowFractions": false, "precisionType": "dp", "showPrecisionHint": true, "maxValue": "tcrit", "minValue": "tcrit", "correctAnswerStyle": "plain", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showFeedbackIcon": true}], "scripts": {}, "marks": 0, "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "type": "gapfill", "showCorrectAnswer": true, "prompt": "Step 4: critical value
\nUse tables to find the critical value for a significance level of 5%.
\n[[0]]
", "sortAnswers": false, "unitTests": [], "showFeedbackIcon": true, "customMarkingAlgorithm": ""}, {"gaps": [{"scripts": {}, "minMarks": 0, "variableReplacementStrategy": "originalfirst", "displayColumns": 0, "choices": ["Fail to reject", "Reject"], "marks": 0, "matrix": "dmm", "variableReplacements": [], "type": "1_n_2", "showCorrectAnswer": true, "shuffleChoices": false, "displayType": "radiogroup", "maxMarks": 0, "extendBaseMarkingAlgorithm": true, "unitTests": [], "showFeedbackIcon": true, "customMarkingAlgorithm": ""}, {"scripts": {}, "minMarks": 0, "variableReplacementStrategy": "originalfirst", "displayColumns": 0, "choices": ["{Correctc}", "{Fac}"], "marks": 0, "matrix": [1, 0], "variableReplacements": [], "type": "1_n_2", "showCorrectAnswer": true, "shuffleChoices": true, "displayType": "radiogroup", "maxMarks": 0, "extendBaseMarkingAlgorithm": true, "distractors": ["", ""], "unitTests": [], "showFeedbackIcon": true, "customMarkingAlgorithm": ""}], "scripts": {}, "marks": 0, "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "type": "gapfill", "showCorrectAnswer": true, "prompt": "\n
Your Decision:
\n[[0]]
\n\n\n
Conclusion:
\n[[1]]
\n", "sortAnswers": false, "unitTests": [], "showFeedbackIcon": true, "customMarkingAlgorithm": ""}], "name": "Harry's copy of Harry's copy of Perform t-test for hypothesis given sample mean and standard deviation two sided, one sample", "variables": {"this": {"definition": "\"An online flight company makes the following claim:\"", "name": "this", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "evi": {"definition": "[\"None\",\"Slight\",\"Moderate\",\"Strong\"]", "name": "evi", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "tval1": {"definition": "abs(m-thisamount)*sqrt(n)/stand", "name": "tval1", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "test": {"definition": "\"A rival flight company decides to test their claim.\"", "name": "test", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "thisamount": {"definition": "random(70..90)", "name": "thisamount", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "confl": {"definition": "random(90,95,99)", "name": "confl", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "tcrit": {"definition": "precround(studenttinv((0.975,n-1)),3)", "name": "tcrit", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "claim": {"definition": "\"The average cost of a flight with us to \"+ here + \" is just \u00a3\" + {thisamount} + \" (including all taxes and charges!)\"", "name": "claim", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "tol": {"definition": "0.001", "name": "tol", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "dmm": {"definition": "if(pval<2,[1,0],[0,1])", "name": "dmm", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "here": {"definition": "random(\"Barcelona\",\"Madrid\",\"Athens\",\"Berlin\",\"Palma\",\"Rome\",\"Paris\",\"Lisbon\")", "name": "here", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "things": {"definition": "\"customers is taken.\"", "name": "things", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "stand": {"definition": "random(15..25)", "name": "stand", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "pval": {"definition": "switch(tval{this}
\n{claim}
\n{test}
\nA sample of {n} {things}
\n{resultis} £{m} with a standard deviation of £{stand}.
\nPerform an appropriate hypothesis test to see if the claim made by the online flight company is substantiated (use a two-tailed test).
\n ", "metadata": {"description": "Provided with information on a sample with sample mean and standard deviation, but no information on the population variance, use the t test to either accept or reject a given null hypothesis.
", "licence": "Creative Commons Attribution 4.0 International"}, "variable_groups": [], "rulesets": {}, "preamble": {"js": "", "css": ""}, "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 t statistic as the population variance is unknown.
\nThe test statistic:
\n\\[t =\\frac{ |\\var{m} -\\var{thisamount}|} {\\sqrt{\\frac{\\var{stand} ^ 2 }{\\var{n}}}} = \\var{tval}\\]
\nto 3 decimal places.
\nc)
\nAs $n=\\var{n}$ we use the $t_{\\var{n-1}}$ tables. For a significance level of 5%:
\n$t_{{\\frac{\\alpha}{2},}\\var{n-1}}=\\var{tcrit}$
\n\n
d)
Hence there is {evi1[pval]} evidence against $\\operatorname{H}_0$ and so we {dothis} $\\operatorname{H}_0$.
\n{Correctc}
", "type": "question", "contributors": [{"name": "Catherine Palmer", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/423/"}, {"name": "Harry Flynn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/976/"}, {"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": "Harry Flynn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/976/"}, {"name": "Patrice Behan", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1791/"}]}