// Numbas version: exam_results_page_options
{"name": "Colin's copy of Two sample t-test: paired data", "extensions": ["stats", "polynomials"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"tags": [], "variables": {"scenario": {"name": "scenario", "description": "", "definition": "sum(map(abs(test_statistic)
Trace metals in drinking water affect the flavor and an unusually high concentration can pose a health hazard. Twelve locations were selected and pairs of data were taken measuring zinc concentration in bottom water and surface water. (\\(\\mu g/l\\))
\nThe data is presented below:
\n\n
\n | 1 | \n2 | \n3 | \n4 | \n5 | \n6 | \n7 | \n8 | \n9 | \n10 | \n11 | \n12 | \n
Surface Water | \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
Bottom Water | \n{r2[0]} | \n{r2[1]} | \n{r2[2]} | \n{r2[3]} | \n{r2[4]} | \n{r2[5]} | \n{r2[6]} | \n{r2[7]} | \n{r2[8]} | \n{r2[9]} | \n{r2[10]} | \n{r2[11]} | \n
\n
It is believed that the bottom water will contain more zinc per litre than the surface water.
", "parts": [{"prompt": "Input the appropriate sample mean: [[0]]
\nInput the appropriate sample standard deviation: [[1]]
\nEnter the value for the test statistic: t = [[2]]
\n", "variableReplacementStrategy": "originalfirst", "marks": 0, "type": "gapfill", "showCorrectAnswer": true, "gaps": [{"precisionMessage": "You have not given your answer to the correct precision.", "notationStyles": ["plain", "en", "si-en"], "mustBeReducedPC": 0, "precisionPartialCredit": 0, "precision": "2", "marks": 1, "variableReplacements": [], "strictPrecision": false, "correctAnswerStyle": "plain", "showFeedbackIcon": true, "minValue": "diff_mean", "allowFractions": false, "maxValue": "diff_mean", "precisionType": "dp", "type": "numberentry", "scripts": {}, "showCorrectAnswer": true, "showPrecisionHint": true, "correctAnswerFraction": false, "mustBeReduced": false, "variableReplacementStrategy": "originalfirst"}, {"precisionMessage": "You have not given your answer to the correct precision.", "notationStyles": ["plain", "en", "si-en"], "mustBeReducedPC": 0, "precisionPartialCredit": 0, "precision": "2", "marks": 1, "variableReplacements": [], "strictPrecision": false, "correctAnswerStyle": "plain", "showFeedbackIcon": true, "minValue": "diff_stdev", "allowFractions": false, "maxValue": "diff_stdev", "precisionType": "dp", "type": "numberentry", "scripts": {}, "showCorrectAnswer": true, "showPrecisionHint": true, "correctAnswerFraction": false, "mustBeReduced": false, "variableReplacementStrategy": "originalfirst"}, {"precisionMessage": "You have not given your answer to the correct precision.", "notationStyles": ["plain", "en", "si-en"], "mustBeReducedPC": 0, "precisionPartialCredit": 0, "precision": "2", "marks": 1, "variableReplacements": [{"must_go_first": true, "part": "p0g0", "variable": "sample_mean_2"}, {"must_go_first": true, "part": "p0g1", "variable": "sample_stdev_2"}], "strictPrecision": false, "correctAnswerStyle": "plain", "showFeedbackIcon": true, "minValue": "test_statistic", "allowFractions": false, "maxValue": "test_statistic", "precisionType": "dp", "type": "numberentry", "scripts": {}, "showCorrectAnswer": true, "showPrecisionHint": true, "correctAnswerFraction": false, "mustBeReduced": false, "variableReplacementStrategy": "originalfirst"}], "variableReplacements": [], "scripts": {}, "showFeedbackIcon": true}, {"minMarks": "2", "displayColumns": "1", "choices": ["Reject the Null Hypothesis and conclude that the mean zinc concentration is greater for bottom water than surface water
", "Reject the Null Hypothesis at the 5% significance level but accept the Null Hypothesis at the 1% significance level and conclude that the mean zinc concentration is the same for bottom water and surface water
", "Reject the Null Hypothesis at the 10% significance level but accept the Null Hypothesis at the 5% significance level and conclude that the mean zinc concentration is the same for bottom water and surface water
", "Accept the Null Hypothesis at the 10% significance level and conclude that the mean zinc concentration is the same for bottom water and surface water
"], "variableReplacementStrategy": "originalfirst", "matrix": "decision_matrix", "showCorrectAnswer": true, "marks": 0, "variableReplacements": [{"must_go_first": false, "part": "p0g2", "variable": "test_statistic"}], "showFeedbackIcon": true, "type": "1_n_2", "displayType": "radiogroup", "prompt": "\nHaving compared your test statistic with the table value, select one of the following conclusions that best describes your conclusion.
", "scripts": {}, "shuffleChoices": false, "maxMarks": "2"}], "advice": "In this example we are dealing with paired data.
\n\\(H_0:\\) \\(\\mu_d=0\\) i.e. The mean zinc concentration for surface water and bottom water is the same.
\n\\(H_1:\\) \\(\\mu_d<0\\) i.e The mean zinc concentration for surface water is less than the mean zinc concentration for bottom water.
\nWe must evaluate the differences: for each pair of values \\(d=x_1-x_2\\)
\n\\(\\var{diff}\\)
\nWe now have a sample of \\(n=\\var{sample_size}\\) differences.
\nRecall:
\nthe formula for the mean difference: \\(\\overline{d}=\\frac{\\sum {d}}{n}=\\var{diff_mean}\\)
\nthe formula for the standard deviation: \\(s=\\sqrt{\\frac{\\sum{(d-\\overline{d})^2}}{n-1}}=\\var{diff_stdev}\\)
\nthe formula for the t-statistic: \\(t=\\frac{\\overline{d}}{\\frac{s}{\\sqrt{n}}}=\\frac{\\var{diff_mean}}{\\frac{\\var{diff_stdev}}{\\sqrt{12}}}=\\var{test_statistic}\\)
\nThe t-table value will be for a one-tailed test and will have \\(n-1=11\\) degrees of freedom. Because of the alternative hypothesis the t-value chosen will be negative.
\n\\[\\begin{array}{r|rrrr}&0.10&0.05&0.01\\\\\\hline11&-\\var{t90}&-\\var{t95}&-\\var{t99}\\end{array}\\]
\nCompare the test statistic with the t-table values and choose your conclusion.
", "variable_groups": [], "metadata": {"description": "", "licence": "Creative Commons Attribution-NonCommercial 4.0 International"}, "extensions": ["polynomials", "stats"], "functions": {}, "type": "question", "contributors": [{"name": "Colin Whitehead", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2486/"}]}]}], "contributors": [{"name": "Colin Whitehead", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2486/"}]}