// Numbas version: finer_feedback_settings {"name": "One sample t-test -SES", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variables": {"t95": {"description": "", "group": "Ungrouped variables", "templateType": "number", "definition": "2.145", "name": "t95"}, "mu1": {"description": "", "group": "Ungrouped variables", "templateType": "randrange", "definition": "random(17..17.5#0.01)", "name": "mu1"}, "sigm1": {"description": "", "group": "Ungrouped variables", "templateType": "randrange", "definition": "random(0..1#0.05)", "name": "sigm1"}, "sample_stdev_2": {"description": "", "group": "Ungrouped variables", "templateType": "anything", "definition": "precround(sqrt(15*stdev(r1)^2/14),2)", "name": "sample_stdev_2"}, "test_statistic": {"description": "
t
", "group": "Ungrouped variables", "templateType": "anything", "definition": "precround((sample_mean_2-mu1)/(sample_stdev_2/sqrt(sample_size)),2)", "name": "test_statistic"}, "t99": {"description": "", "group": "Ungrouped variables", "templateType": "number", "definition": "2.977", "name": "t99"}, "t90": {"description": "", "group": "Ungrouped variables", "templateType": "number", "definition": "1.761", "name": "t90"}, "sample_size": {"description": "", "group": "Ungrouped variables", "templateType": "number", "definition": "15", "name": "sample_size"}, "scenario": {"description": "", "group": "Ungrouped variables", "templateType": "anything", "definition": "sum(map(abs(test_statistic)$ H_0: \\mu=\\var{mu1} $ , $ H_1: \\mu \\neq \\var{mu1} $
\n\nThe test statistic for a one-sample t-test is given by:
\n\n$ |t| = \\frac{\\bar{x}-\\mu_0}{s/\\sqrt{n}} $
\nwhere $\\bar{x}$ is the sample mean, given by:
\n\n$\\bar{x}= \\sum_{i=1}^{i=15} \\frac{x_i}{15} = \\var{sample_mean_2}$ $(2dp)$
\nand $s$ is the sample standard deviation, given by:
\n\n$ s = \\sqrt{\\frac{\\left (\\sum (x-\\bar{x})^2\\right)}{n-1}} = \\var{sample_stdev_2}$ $(2dp)$
\nTherefore, the test statistic is:
\n$ |{t}| = \\frac{\\var{sample_mean_2}-\\var{mu1}}{\\var{sample_stdev_2}/\\sqrt{15}}$
\n$ = \\var{abs({test_statistic})} $ $(2dp)$
\n\nThe t-table values will be for a two-tailed test and will have $ n-1 = 14$ degrees of freedom:
\n\\[\\begin{array}{r|rrrr}&0.10&0.05&0.01\\\\\\hline13&\\pm\\var{t90}&\\pm\\var{t95}&\\pm\\var{t99}\\end{array}\\]
\nIf $ |t| < t_{14}(0.1) $, then we accept $ H_0$ at the 10% level.
\nIf $ |t| > t_{14}(0.1)$, then we reject $H_0$ at the 10% level.
\nIf $ |t| > t_{14}(0.05) $, we reject $H_0$ at the $5%$ level.
\nIf $ |t| > t_{14}(0.01)$, then we reject $H_0$ at the 1% level.
", "tags": [], "functions": {}, "rulesets": {}, "preamble": {"js": "", "css": ""}, "extensions": ["stats"], "variable_groups": [], "metadata": {"description": "", "licence": "Creative Commons Attribution-NonCommercial 4.0 International"}, "ungrouped_variables": ["sample_size", "r1", "sample_mean_2", "sample_stdev_2", "mu1", "sigm1", "test_statistic", "t95", "scenario", "decision_matrix", "t99", "t90", "t999"], "variablesTest": {"condition": "", "maxRuns": 100}, "statement": "The following is a set of BMI's (Body Mass Index) for 15 overweight children aged 5.
\nThe data is thought to follow a normal distribution.
\n{r1[0]} | \n{r1[1]} | \n{r1[2]} | \n{r1[3]} | \n{r1[4]} | \n{r1[5]} | \n{r1[6]} | \n{r1[7]} | \n{r1[8]} | \n{r1[9]} | \n{r1[10]} | \n{r1[11]} | \n{r1[12]} | \n{r1[13]} | \n
We want to test the hypothesis that the population mean equals \\(\\var{mu1}\\) .
\n", "parts": [{"showFeedbackIcon": true, "maxValue": "sample_mean_2", "variableReplacementStrategy": "originalfirst", "unitTests": [], "type": "numberentry", "extendBaseMarkingAlgorithm": true, "mustBeReduced": false, "customMarkingAlgorithm": "", "mustBeReducedPC": 0, "prompt": "Calculate the sample mean.
", "allowFractions": false, "variableReplacements": [], "correctAnswerStyle": "plain", "scripts": {}, "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "marks": 1, "showCorrectAnswer": true, "minValue": "sample_mean_2"}, {"showFeedbackIcon": true, "maxValue": "sample_stdev_2", "variableReplacementStrategy": "originalfirst", "unitTests": [], "type": "numberentry", "extendBaseMarkingAlgorithm": true, "mustBeReduced": false, "customMarkingAlgorithm": "", "mustBeReducedPC": 0, "prompt": "Calculate the sample standard deviation.
", "allowFractions": false, "variableReplacements": [], "correctAnswerStyle": "plain", "scripts": {}, "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "marks": 1, "showCorrectAnswer": true, "minValue": "sample_stdev_2"}, {"showFeedbackIcon": true, "maxValue": "abs{test_statistic}", "variableReplacementStrategy": "originalfirst", "unitTests": [], "type": "numberentry", "extendBaseMarkingAlgorithm": true, "mustBeReduced": false, "customMarkingAlgorithm": "", "mustBeReducedPC": 0, "stepsPenalty": 0, "prompt": "Calculate the test statistic.
", "allowFractions": false, "variableReplacements": [], "correctAnswerStyle": "plain", "scripts": {}, "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "marks": 1, "showCorrectAnswer": true, "steps": [{"showFeedbackIcon": true, "scripts": {}, "unitTests": [], "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "type": "information", "customMarkingAlgorithm": "", "marks": 0, "prompt": "For a one sample t-test, the test statistic is given by:
\n\n
$ |t| = \\frac{\\bar{x}-\\mu}{s/\\sqrt{n}} $
", "variableReplacements": [], "showCorrectAnswer": true}], "minValue": "abs{test_statistic}"}, {"matrix": "decision_matrix", "showFeedbackIcon": false, "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}\\) .
"], "unitTests": [], "extendBaseMarkingAlgorithm": true, "type": "1_n_2", "displayColumns": "1", "prompt": "Using t-tables, compare your test statistic to the appropriate t-value, taking into account the correct degrees of freedom. From this comparison select one of the following statements that best describes your conclusion.
", "minMarks": "2", "variableReplacements": [{"must_go_first": false, "part": "p0", "variable": "test_statistic"}], "customMarkingAlgorithm": "", "displayType": "radiogroup", "scripts": {}, "maxMarks": "2", "marks": 0, "showCorrectAnswer": true, "shuffleChoices": false, "variableReplacementStrategy": "originalfirst"}], "name": "One sample t-test -SES", "type": "question", "contributors": [{"name": "Lauren Frances Desoysa", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2490/"}]}]}], "contributors": [{"name": "Lauren Frances Desoysa", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2490/"}]}