// 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, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Small sample t-test on sample mean", "tags": [], "metadata": {"description": "", "licence": "Creative Commons Attribution-NonCommercial 4.0 International"}, "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

", "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"], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"sigm1": {"name": "sigm1", "group": "Ungrouped variables", "definition": "random(1 .. 5#0.5)", "description": "", "templateType": "randrange", "can_override": false}, "mu1": {"name": "mu1", "group": "Ungrouped variables", "definition": "random(58 .. 74#0.5)", "description": "", "templateType": "randrange", "can_override": false}, "t95": {"name": "t95", "group": "Ungrouped variables", "definition": "2.16", "description": "", "templateType": "number", "can_override": false}, "t90": {"name": "t90", "group": "Ungrouped variables", "definition": "1.771", "description": "", "templateType": "number", "can_override": false}, "r1": {"name": "r1", "group": "Ungrouped variables", "definition": "repeat(round(normalsample(mu1,sigm1)),sample_size)", "description": "", "templateType": "anything", "can_override": false}, "sample_mean_2": {"name": "sample_mean_2", "group": "Ungrouped variables", "definition": "precround(mean(r1),3)", "description": "", "templateType": "anything", "can_override": false}, "sample_stdev_2": {"name": "sample_stdev_2", "group": "Ungrouped variables", "definition": "precround(sqrt(14*stdev(r1)^2/13),3)", "description": "", "templateType": "anything", "can_override": false}, "sample_size": {"name": "sample_size", "group": "Ungrouped variables", "definition": "14", "description": "", "templateType": "number", "can_override": false}, "t99": {"name": "t99", "group": "Ungrouped variables", "definition": "3.012", "description": "", "templateType": "number", "can_override": false}, "test_statistic": {"name": "test_statistic", "group": "Ungrouped variables", "definition": "precround((sample_mean_2-mu1)/(sample_stdev_2/sqrt(sample_size)),3)", "description": "

t

", "templateType": "anything", "can_override": false}, "v": {"name": "v", "group": "Ungrouped variables", "definition": "if(atvalue>=t99,[1,0,0,0],if(atvalue>=t95,[0,1,0,0],if(atvalue>=t90,[0,0,1,0],[0,0,0,1])))", "description": "", "templateType": "anything", "can_override": false}, "atvalue": {"name": "atvalue", "group": "Ungrouped variables", "definition": "abs(test_statistic)", "description": "", "templateType": "anything", "can_override": false}, "t": {"name": "t", "group": "Ungrouped variables", "definition": "switch(v[0]=1,0,v[1]=1,1,v[2]=1,2,v[3]=1,3,4)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["sample_size", "r1", "sample_mean_2", "sample_stdev_2", "mu1", "test_statistic", "sigm1", "t95", "t90", "t99", "v", "atvalue", "t"], "variable_groups": [{"name": "Unnamed group", "variables": []}], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Input the sample mean: [[0]]

\n

Input the sample standard deviation:[[1]]

\n

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

\n

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "sample_mean_2", "maxValue": "sample_mean_2", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "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"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "sample_stdev_2", "maxValue": "sample_stdev_2", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "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"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [{"variable": "sample_mean_2", "part": "p0g0", "must_go_first": true}, {"variable": "sample_stdev_2", "part": "p0g1", "must_go_first": true}], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "(sample_mean_2-mu1)/(sample_stdev_2/sqrt(sample_size))", "maxValue": "(sample_mean_2-mu1)/(sample_stdev_2/sqrt(sample_size))", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "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": "1_n_2", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [{"variable": "test_statistic", "part": "p0g2", "must_go_first": false}], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "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.

", "minMarks": "2", "maxMarks": "2", "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": "0", "showCellAnswerState": true, "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}\\) ."], "matrix": "v"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Frank Doheny", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/789/"}]}]}], "contributors": [{"name": "Frank Doheny", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/789/"}]}