// Numbas version: exam_results_page_options {"name": "CI for a difference of means: embryonic stem cells", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "CI for a difference of means: embryonic stem cells", "tags": [], "metadata": {"description": "

This question assesses the learner's ability to compute a confidence interval for a difference of two means, given two samples.

\n

Randomized variables: sample raw data and confidence level. 

\n

Adapted from section 7.3.1 in OpenIntro Statistics (4th ed).

", "licence": "Creative Commons Attribution-ShareAlike 4.0 International"}, "statement": "

We are interested in whether treatment using embryonic stem cells (ESCs) improves heart function following a heart attack. The table below reports the change in heart pumping capacity (compared to pre attack, as percentage) for a group of subjects that received ESCs and for a control group. Subject assignment to the groups was random.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
ESCcontrol
{r1[0]}{r2[0]}
{r1[1]}{r2[1]}
{r1[2]}{r2[2]}
{r1[3]}{r2[3]}
{r1[4]}{r2[4]}
{r1[5]}{r2[5]}
{r1[6]}{r2[6]}
{r1[7]}{r2[7]}
{r1[8]}{r2[8]}
\n

", "advice": "

See section 7.3.1 in OpenIntro Statistics (4th ed.), from which this question was adapted.

", "rulesets": {}, "extensions": ["stats"], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"sd1": {"name": "sd1", "group": "Statistics", "definition": "stdev(r1,true)", "description": "", "templateType": "anything", "can_override": false}, "mean2": {"name": "mean2", "group": "Statistics", "definition": "mean(r2)", "description": "", "templateType": "anything", "can_override": false}, "tol": {"name": "tol", "group": "Setup", "definition": "0.05", "description": "", "templateType": "anything", "can_override": false}, "sigma1": {"name": "sigma1", "group": "Setup", "definition": "random(4.5..5.5#0.1)", "description": "", "templateType": "anything", "can_override": false}, "mu1": {"name": "mu1", "group": "Setup", "definition": "random(2.5..4.5#0.1)", "description": "

Population mean of sample 1.

", "templateType": "anything", "can_override": false}, "r2": {"name": "r2", "group": "Setup", "definition": "repeat(round(normalsample(mu2,sigma2)),n2)", "description": "", "templateType": "anything", "can_override": false}, "SE": {"name": "SE", "group": "Statistics", "definition": "siground(sqrt(sd1^2/n1+sd2^2/n2),3)", "description": "", "templateType": "anything", "can_override": false}, "sd2": {"name": "sd2", "group": "Statistics", "definition": "stdev(r2,true)", "description": "", "templateType": "anything", "can_override": false}, "mu2": {"name": "mu2", "group": "Setup", "definition": "random(-4.5..-2.5#0.1)", "description": "

Population mean of sample 2.

", "templateType": "anything", "can_override": false}, "n2": {"name": "n2", "group": "Setup", "definition": "9", "description": "", "templateType": "anything", "can_override": false}, "ciLower": {"name": "ciLower", "group": "Statistics", "definition": "siground(meanDiff-tStar*SE,3)", "description": "", "templateType": "anything", "can_override": false}, "mean1": {"name": "mean1", "group": "Statistics", "definition": "mean(r1)", "description": "", "templateType": "anything", "can_override": false}, "r1": {"name": "r1", "group": "Setup", "definition": "repeat(round(normalsample(mu1,sigma1)),n1)", "description": "", "templateType": "anything", "can_override": false}, "n1": {"name": "n1", "group": "Setup", "definition": "9", "description": "", "templateType": "anything", "can_override": false}, "sigma2": {"name": "sigma2", "group": "Setup", "definition": "random(2..3#0.1)", "description": "", "templateType": "anything", "can_override": false}, "tStar": {"name": "tStar", "group": "Statistics", "definition": "studenttinv(0.5*(100-CL)/100,n1-1)", "description": "", "templateType": "anything", "can_override": false}, "CL": {"name": "CL", "group": "Setup", "definition": "random(90,95,99)", "description": "

Confidence level.

", "templateType": "anything", "can_override": false}, "meanDiff": {"name": "meanDiff", "group": "Statistics", "definition": "siground(mean1-mean2,3)", "description": "", "templateType": "anything", "can_override": false}, "ciUpper": {"name": "ciUpper", "group": "Statistics", "definition": "siground(meanDiff+tStar*SE,3)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [{"name": "Setup", "variables": ["n1", "n2", "mu1", "mu2", "sigma1", "sigma2", "r1", "r2", "CL", "tol"]}, {"name": "Statistics", "variables": ["mean1", "mean2", "meanDiff", "SE", "sd1", "sd2", "tStar", "ciLower", "ciUpper"]}], "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": "

Calculate the following point estimate:

\n

$\\overline{x}_{ESC}-\\overline{x}_{control}=$ [[0]]

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "(meanDiff)*(1-tol)", "maxValue": "(meanDiff)*(1+tol)", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"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": "

Calculate the standard error of the point estimate in part a):

\n

$SE=$ [[0]]

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [{"variable": "sd1", "part": "p0g0", "must_go_first": false}], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": "1", "exploreObjective": null, "minValue": "SE*(1-tol)", "maxValue": "SE*(1+tol)", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"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": "

Calculate the $\\var{CL}\\%$ confidence interval for the mean difference in heart pumping capacity.

\n

Lower limit: [[0]]

\n

Upper limit: [[1]]

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "3", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "ciUpper*(1-tol)", "maxValue": "ciUpper*(1+tol)", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "3", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "ciLower*(1-tol)", "maxValue": "ciLower*(1+tol)", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Mario Orsi", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/427/"}]}]}], "contributors": [{"name": "Mario Orsi", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/427/"}]}