// Numbas version: finer_feedback_settings {"name": "Small sample t-test on sample mean", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"metadata": {"licence": "Creative Commons Attribution-NonCommercial 4.0 International", "description": ""}, "type": "question", "preamble": {"css": "", "js": ""}, "advice": "

\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.

", "rulesets": {}, "extensions": ["stats"], "name": "Small sample t-test on sample mean", "ungrouped_variables": ["sample_size", "r1", "sample_mean_2", "sample_stdev_2", "mu1", "sigm1", "test_statistic", "t95", "scenario", "decision_matrix", "t99", "t90", "t999"], "functions": {}, "tags": [], "variablesTest": {"condition": "", "maxRuns": 100}, "variable_groups": [], "variables": {"t90": {"name": "t90", "group": "Ungrouped variables", "definition": "1.771", "description": "", "templateType": "number"}, "sample_stdev_2": {"name": "sample_stdev_2", "group": "Ungrouped variables", "definition": "precround(sqrt(14*stdev(r1)^2/13),3)", "description": "", "templateType": "anything"}, "scenario": {"name": "scenario", "group": "Ungrouped variables", "definition": "sum(map(abs(test_statistic)t

", "templateType": "anything"}, "t95": {"name": "t95", "group": "Ungrouped variables", "definition": "2.16", "description": "", "templateType": "number"}, "sample_size": {"name": "sample_size", "group": "Ungrouped variables", "definition": "14", "description": "", "templateType": "number"}, "t99": {"name": "t99", "group": "Ungrouped variables", "definition": "3.012", "description": "", "templateType": "number"}, "r1": {"name": "r1", "group": "Ungrouped variables", "definition": "repeat(round(normalsample(mu1,sigm1)),sample_size)", "description": "", "templateType": "anything"}, "sample_mean_2": {"name": "sample_mean_2", "group": "Ungrouped variables", "definition": "precround(mean(r1),3)", "description": "", "templateType": "anything"}, "sigm1": {"name": "sigm1", "group": "Ungrouped variables", "definition": "random(1..5#0.5)", "description": "", "templateType": "randrange"}, "decision_matrix": {"name": "decision_matrix", "group": "Ungrouped variables", "definition": "[\n [1,0,0,0],\n [0,1,0,0],\n [0,0,1,0],\n [0,0,0,1]\n][scenario]", "description": "", "templateType": "anything"}}, "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

", "parts": [{"type": "gapfill", "scripts": {}, "variableReplacementStrategy": "originalfirst", "marks": 0, "prompt": "

Input the sample mean: [[0]]

\n

Input the sample standard deviation:[[1]]

\n

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

\n

", "showCorrectAnswer": true, "gaps": [{"precision": "2", "type": "numberentry", "showPrecisionHint": true, "maxValue": "sample_mean_2", "strictPrecision": false, "correctAnswerStyle": "plain", "precisionPartialCredit": 0, "precisionType": "dp", "correctAnswerFraction": false, "mustBeReducedPC": 0, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "scripts": {}, "mustBeReduced": false, "showFeedbackIcon": true, "marks": 1, "minValue": "sample_mean_2", "notationStyles": ["plain", "en", "si-en"], "precisionMessage": "You have not given your answer to the correct precision.", "variableReplacements": [], "allowFractions": false}, {"precision": "2", "type": "numberentry", "showPrecisionHint": true, "maxValue": "sample_stdev_2", "strictPrecision": false, "correctAnswerStyle": "plain", "precisionPartialCredit": 0, "precisionType": "dp", "correctAnswerFraction": false, "mustBeReducedPC": 0, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "scripts": {}, "mustBeReduced": false, "showFeedbackIcon": true, "marks": 1, "minValue": "sample_stdev_2", "notationStyles": ["plain", "en", "si-en"], "precisionMessage": "You have not given your answer to the correct precision.", "variableReplacements": [], "allowFractions": false}, {"precision": "2", "type": "numberentry", "showPrecisionHint": true, "maxValue": "(sample_mean_2-mu1)/(sample_stdev_2/sqrt(sample_size))", "strictPrecision": false, "correctAnswerStyle": "plain", "precisionPartialCredit": 0, "precisionType": "dp", "correctAnswerFraction": false, "mustBeReducedPC": 0, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "scripts": {}, "mustBeReduced": false, "showFeedbackIcon": true, "marks": 1, "minValue": "(sample_mean_2-mu1)/(sample_stdev_2/sqrt(sample_size))", "notationStyles": ["plain", "en", "si-en"], "precisionMessage": "You have not given your answer to the correct precision.", "variableReplacements": [{"variable": "sample_mean_2", "part": "p0g0", "must_go_first": true}, {"variable": "sample_stdev_2", "part": "p0g1", "must_go_first": true}], "allowFractions": false}], "showFeedbackIcon": true, "variableReplacements": []}, {"type": "1_n_2", "maxMarks": "2", "variableReplacementStrategy": "originalfirst", "marks": 0, "showFeedbackIcon": true, "displayColumns": "1", "minMarks": "2", "choices": ["

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}\\) .

"], "shuffleChoices": false, "scripts": {}, "matrix": "decision_matrix", "displayType": "radiogroup", "showCorrectAnswer": true, "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.

", "variableReplacements": [{"variable": "test_statistic", "part": "p0g2", "must_go_first": false}]}], "contributors": [{"name": "Frank Doheny", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/789/"}, {"name": "Xiaodan Leng", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2146/"}]}]}], "contributors": [{"name": "Frank Doheny", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/789/"}, {"name": "Xiaodan Leng", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2146/"}]}