// Numbas version: exam_results_page_options {"name": "Small sample t-test on sample mean", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "question_groups": [{"questions": [{"functions": {}, "type": "question", "variablesTest": {"maxRuns": 100, "condition": ""}, "variable_groups": [], "statement": "

The following set of \$$\\var{sample_size}\$$ numbers is believed to be drawn from a normal population:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
 {r1[0]} {r1[1]} {r1[2]} {r1[3]} {r1[4]} {r1[5]} {r1[6]} {r1[7]} {r1[8]} {r1[9]} {r1[10]} {r1[11]} {r1[12]} {r1[13]}
\n

We want to test the hypothesis that the population mean  = \$$\\var{mu1}\$$.

\n

\n

\$$H_0:\$$ The mean \$$=\\var{mu1}\$$.

\n

\$$H_1:\$$ The mean \$$\\ne\\var{mu1}\$$.

\n

This is a two-sided test.

\n

Given a sample of size \$$n\$$ recall:

\n

the formula for the sample mean:    \$$\\overline{x}=\\frac{\\sum {x}}{n}=\\var{sample_mean_2}\$$

\n

the formula for the sample standard deviation:   \$$s=\\sqrt{\\frac{\\sum{(x-\\overline{x})^2}}{n-1}}=\\var{sample_stdev_2}\$$

\n

the formula for the t-statistic:   \$$t=\\frac{\\overline{x}-\\mu}{\\frac{s}{\\sqrt{n}}}=\\frac{\\var{sample_mean_2}-\\var{mu1}}{\\frac{\\var{sample_stdev_2}}{\\sqrt{\\var{sample_size}}}}=\\var{test_statistic}\$$

\n

The t-table values will be for a two-tailed test and will have \$$n-1=13\$$ degrees of freedom looking this up gives:

\n

\$\\begin{array}{r|rrrr}&0.10&0.05&0.01\\\\\\hline13&\\pm\\var{t90}&\\pm\\var{t95}&\\pm\\var{t99}\\end{array}\$

\n

Compare the test statistic with the t-table values and choose your conclusion.

", "ungrouped_variables": ["sample_size", "r1", "sample_mean_2", "sample_stdev_2", "mu1", "sigm1", "test_statistic", "t95", "scenario", "decision_matrix", "t99", "t90", "t999"], "variables": {"sigm1": {"definition": "random(1..5#0.5)", "group": "Ungrouped variables", "description": "", "name": "sigm1", "templateType": "randrange"}, "t99": {"definition": "3.012", "group": "Ungrouped variables", "description": "", "name": "t99", "templateType": "number"}, "t95": {"definition": "2.16", "group": "Ungrouped variables", "description": "", "name": "t95", "templateType": "number"}, "mu1": {"definition": "random(58..74#0.5)", "group": "Ungrouped variables", "description": "", "name": "mu1", "templateType": "randrange"}, "scenario": {"definition": "sum(map(abs(test_statistic)t

", "name": "test_statistic", "templateType": "anything"}, "decision_matrix": {"definition": "[\n [1,0,0,0],\n [0,1,0,0],\n [0,0,1,0],\n [0,0,0,1]\n][scenario]", "group": "Ungrouped variables", "description": "", "name": "decision_matrix", "templateType": "anything"}, "t999": {"definition": "4.221", "group": "Ungrouped variables", "description": "", "name": "t999", "templateType": "anything"}, "r1": {"definition": "repeat(round(normalsample(mu1,sigm1)),sample_size)", "group": "Ungrouped variables", "description": "", "name": "r1", "templateType": "anything"}, "t90": {"definition": "1.771", "group": "Ungrouped variables", "description": "", "name": "t90", "templateType": "number"}, "sample_stdev_2": {"definition": "precround(sqrt(14*stdev(r1)^2/13),3)", "group": "Ungrouped variables", "description": "", "name": "sample_stdev_2", "templateType": "anything"}, "sample_mean_2": {"definition": "precround(mean(r1),3)", "group": "Ungrouped variables", "description": "", "name": "sample_mean_2", "templateType": "anything"}}, "rulesets": {}, "parts": [{"type": "gapfill", "showCorrectAnswer": true, "showFeedbackIcon": true, "prompt": "

Input the sample mean: [[0]]

\n

Input the sample standard deviation:[[1]]

\n

Enter the value for the test statistic: t = [[2]]

\n

Reject the Null Hypothesis and conclude that mean value is not \$$\\var{mu1}\$$

", "

Reject the Null Hypothesis at the 5% significance level but accept the Null Hypothesis at the 1% significance level and conclude that mean value is \$$\\var{mu1}\$$.

", "

Reject the Null Hypothesis at the 10% significance level but accept the Null Hypothesis at the 5% significance level and conclude that mean value is \$$\\var{mu1}\$$.

", "

Accept the Null Hypothesis at the 10% significance level and conclude that mean value is \$$\\var{mu1}\$$ .

"], "maxMarks": "2", "scripts": {}, "displayColumns": "1", "minMarks": "2", "prompt": "

Having compared your test statistic with the table values for a two-tailed t-test with 13 degrees of freedom, select one of the following conclusions that best describes your conclusion.

", "displayType": "radiogroup", "marks": 0}], "metadata": {"licence": "Creative Commons Attribution-NonCommercial 4.0 International", "description": ""}, "name": "Small sample t-test on sample mean", "extensions": ["stats"], "contributors": [{"name": "Frank Doheny", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/789/"}], "tags": [], "preamble": {"css": "", "js": ""}}], "pickingStrategy": "all-ordered"}], "contributors": [{"name": "Frank Doheny", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/789/"}]}