// Numbas version: exam_results_page_options {"name": "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": [{"name": "Two sample t-test: Paired data", "tags": [], "metadata": {"description": "", "licence": "Creative Commons Attribution-NonCommercial 4.0 International"}, "statement": "\n

\n\n

\n

\n\n

\n

idence intervals[Mean1{0}]

", "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.

\n

We must evaluate the differences: for each pair of values \\(d=x_1-x_2\\)

\n

\\(\\var{diff}\\)

\n

We now have a sample of \\(n=\\var{sample_size}\\) differences.

\n

Recall:

\n

the formula for the mean difference:    \\(\\overline{d}=\\frac{\\sum {d}}{n}=\\var{diff_mean}\\)

\n

the formula for the standard deviation:   \\(s=\\sqrt{\\frac{\\sum{(d-\\overline{d})^2}}{n-1}}=\\var{diff_stdev}\\)

\n

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

\n

The 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}\\]

\n

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

", "rulesets": {}, "extensions": ["polynomials", "stats"], "variables": {"Mean1": {"name": "Mean1", "group": "Ungrouped variables", "definition": "random(30000 .. 50000#25)", "description": "", "templateType": "randrange"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["Mean1"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

\n\n

\n

\n\n

\n

\n\n

\n

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "minValue": "diff_mean", "maxValue": "diff_mean", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "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, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "minValue": "diff_stdev", "maxValue": "diff_stdev", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "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, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [{"variable": "sample_mean_2", "part": "p0g0", "must_go_first": true}, {"variable": "sample_stdev_2", "part": "p0g1", "must_go_first": true}], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "minValue": "test_statistic", "maxValue": "test_statistic", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "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, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [{"variable": "Mean1", "part": "p0g2", "must_go_first": false}], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "\n

Having compared your test statistic with the table value, select one of the following conclusions that best describes your conclusion.

", "minMarks": "2", "maxMarks": "2", "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": "1", "showCellAnswerState": true, "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

"], "matrix": "decision_matrix"}], "contributors": [{"name": "Frank Doheny", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/789/"}, {"name": "Brad Allison", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3394/"}]}]}], "contributors": [{"name": "Frank Doheny", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/789/"}, {"name": "Brad Allison", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3394/"}]}