// Numbas version: exam_results_page_options {"name": "Perform t-test for hypothesis given sample mean and standard deviation", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"parts": [{"marks": 0, "type": "gapfill", "gaps": [{"showPrecisionHint": false, "allowFractions": false, "type": "numberentry", "minValue": "thisamount", "marks": 0.5, "maxValue": "thisamount", "scripts": {}, "showCorrectAnswer": true, "correctAnswerFraction": false}, {"showPrecisionHint": false, "allowFractions": false, "type": "numberentry", "minValue": "thisamount", "marks": 0.5, "maxValue": "thisamount", "scripts": {}, "showCorrectAnswer": true, "correctAnswerFraction": false}], "prompt": "\n
Step 1: Null Hypothesis
\n$\\operatorname{H}_0\\;: \\; \\mu=\\;$[[0]]
\nStep 2: Alternative Hypothesis
\n$\\operatorname{H}_1\\;: \\; \\mu \\neq\\;$[[1]]
\n ", "scripts": {}, "showCorrectAnswer": true}, {"marks": 0, "type": "gapfill", "gaps": [{"answer": "t", "scripts": {}, "vsetrange": [0, 1], "expectedvariablenames": [], "checkvariablenames": false, "type": "jme", "showCorrectAnswer": true, "marks": 1, "showpreview": true, "checkingaccuracy": 0.001, "vsetrangepoints": 5, "checkingtype": "absdiff"}, {"showPrecisionHint": false, "allowFractions": false, "type": "numberentry", "minValue": "tval-tol", "marks": 1, "maxValue": "tval+tol", "scripts": {}, "showCorrectAnswer": true, "correctAnswerFraction": false}], "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)
", "scripts": {}, "showCorrectAnswer": true}, {"marks": 0, "type": "gapfill", "gaps": [{"displayColumns": 0, "displayType": "radiogroup", "maxMarks": 0, "choices": ["{pm[0]}", "{pm[1]}", "{pm[2]}", "{pm[3]}"], "scripts": {}, "showCorrectAnswer": true, "marks": 0, "distractors": ["", "", "", ""], "type": "1_n_2", "matrix": "mm", "minMarks": 0, "shuffleChoices": false}], "prompt": "\nStep 4: p-value
\nUse tables to find a range for your $p$-value.
\nChoose the correct range here for $p$ : [[0]]
\n ", "scripts": {}, "showCorrectAnswer": true}, {"marks": 0, "type": "gapfill", "gaps": [{"displayColumns": 0, "displayType": "radiogroup", "maxMarks": 0, "choices": ["{evi[0]}", "{evi[1]}", "{evi[2]}", "{evi[3]}"], "scripts": {}, "showCorrectAnswer": true, "marks": 0, "distractors": ["", "", "", ""], "type": "1_n_2", "matrix": "mm", "minMarks": 0, "shuffleChoices": false}, {"displayColumns": 0, "displayType": "radiogroup", "maxMarks": 0, "choices": ["Retain", "Reject"], "scripts": {}, "showCorrectAnswer": true, "marks": 0, "distractors": ["", ""], "type": "1_n_2", "matrix": "dmm", "minMarks": 0, "shuffleChoices": false}, {"displayColumns": 0, "displayType": "radiogroup", "maxMarks": 0, "choices": ["{Correctc}", "{Fac}"], "scripts": {}, "showCorrectAnswer": true, "marks": 0, "distractors": ["", ""], "type": "1_n_2", "matrix": [1, 0], "minMarks": 0, "shuffleChoices": true}], "prompt": "\nStep 5: Conclusion
\n\n
Given the $p$ - value and the range you have found, what is the strength of evidence against the null hypothesis?
\n[[0]]
\nYour Decision:
\n[[1]]
\n\n
Conclusion:
\n[[2]]
\n ", "scripts": {}, "showCorrectAnswer": true}], "type": "question", "variablesTest": {"maxRuns": 100, "condition": ""}, "variable_groups": [], "statement": "\n{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 ", "functions": {}, "advice": "\na)
\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. We have the following data from the tables:
\n{table([['Critical Value',crit[0],crit[1],crit[2]]],['p value','10%','5%','1%'])}
\nWe see that the $p$ value {pm[pval]}.
\n
d)
Hence there is {evi1[pval]} evidence against $\\operatorname{H}_0$ and so we {dothis} $\\operatorname{H}_0$.
\n{Correctc}
\n ", "rulesets": {}, "question_groups": [{"pickingStrategy": "all-ordered", "pickQuestions": 0, "name": "", "questions": []}], "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", "notes": "\n \t\t2/01/2012:
\n \t\tAdded tag sc as has string variables in order to generate other scenarios.
\n \t\tThe jstat function studenttinv(critvalue,n-1) gives the critical p values correctly.
\n \t\tAdded tag diagram as the i-assess question advice has a nice graphic of the p-value and the appropriate decision.
\n \t\t"}, "showQuestionGroupNames": false, "variables": {"pval": {"templateType": "anything", "description": "", "definition": "switch(tval