// Numbas version: finer_feedback_settings {"name": "Find z-score for sample and calculate confidence interval with SE formula given", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "ungrouped_variables": ["zscore", "lowerbound", "bottom", "this", "top", "upperbound", "samplemean", "these", "sstdev", "score", "samplesize", "expb", "expt"], "name": "Find z-score for sample and calculate confidence interval with SE formula given", "tags": ["BES220"], "preamble": {"css": "", "js": ""}, "advice": "
a)
\nThe $z$-score is given by
\n\\[z=\\frac{\\var{score}-\\var{samplemean}}{\\var{sstdev}}=\\var{zscore}\\]
\n(To 3 decimal places).
\nWhy do we use $sd$ and not $SE$? Because the question asks how many standard deviations the score of {score} is away from the mean. We use $SE$ when we are dealing with confidence intervals and hypothesis tests.
\nb)
\nThe lower bound for the 95% confidence interval is given by:
\nLower bound = $\\displaystyle \\var{samplemean}-1.96 \\times \\frac{ \\var{sstdev}}{\\sqrt{\\var{samplesize}}}=\\var{lowerbound}$
\n\nUpper bound = $\\displaystyle \\var{samplemean}+1.96 \\times \\frac{ \\var{sstdev}}{\\sqrt{\\var{samplesize}}}=\\var{upperbound}$
\n(Both to 3 decimal places.)
\nHence for the population mean $\\mu$ we can say that $\\var{lowerbound} \\le\\mu \\le \\var{upperbound}$ with $95$% confidence.
", "rulesets": {}, "parts": [{"prompt": "What is the $z$-score for a score of $\\var{score}$? Hint: use the sample $sd$ and $\\bar{x}$.
\nEnter your answer to 3 decimal places.
", "allowFractions": false, "variableReplacements": [], "maxValue": "zscore+0.001", "minValue": "zscore-0.001", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 2, "type": "numberentry", "showPrecisionHint": false}, {"prompt": "Calculate the $95$% confidence interval for the population mean $\\mu$:
\nLower bound: [[0]]
\nUpper bound: [[1]]
\n\nEnter your answers to 3 decimal places.
", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"allowFractions": false, "variableReplacements": [], "maxValue": "lowerbound+0.001", "minValue": "lowerbound-0.001", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "variableReplacements": [], "maxValue": "upperbound+0.001", "minValue": "upperbound-0.001", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}], "extensions": [], "statement": "A recent survey asked $\\var{samplesize}$ {these} to rate {this} on a scale from $\\var{bottom}$ ({expb}) to $\\var{top}$ ({expt}).
\nThe mean rating, $\\bar{x}$, was $\\var{samplemean}$ with a standard deviation, $sd$ of $\\var{sstdev}$.
\nThe following formula can be used to calculate the Standard Error for the sample:
\n$SE = \\dfrac{sd}{\\sqrt{n}}$,
\nEnter all values to 3 decimal places.
\n", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"zscore": {"definition": "precround((score-samplemean)/sstdev,3)", "templateType": "anything", "group": "Ungrouped variables", "name": "zscore", "description": ""}, "lowerbound": {"definition": "precround(samplemean-1.96*sstdev/sqrt(samplesize),3)", "templateType": "anything", "group": "Ungrouped variables", "name": "lowerbound", "description": ""}, "bottom": {"definition": "1", "templateType": "anything", "group": "Ungrouped variables", "name": "bottom", "description": ""}, "this": {"definition": "'the importance of price when making food choice decisions'", "templateType": "anything", "group": "Ungrouped variables", "name": "this", "description": ""}, "top": {"definition": "7", "templateType": "anything", "group": "Ungrouped variables", "name": "top", "description": ""}, "upperbound": {"definition": "precround(samplemean+1.96*sstdev/sqrt(samplesize),3)", "templateType": "anything", "group": "Ungrouped variables", "name": "upperbound", "description": ""}, "samplemean": {"definition": "random(4.5..6.5#0.01)", "templateType": "anything", "group": "Ungrouped variables", "name": "samplemean", "description": ""}, "these": {"definition": "'UK shoppers'", "templateType": "anything", "group": "Ungrouped variables", "name": "these", "description": ""}, "sstdev": {"definition": "random(0.9..2.0#0.01)", "templateType": "anything", "group": "Ungrouped variables", "name": "sstdev", "description": ""}, "score": {"definition": "random(2..5#0.1)", "templateType": "anything", "group": "Ungrouped variables", "name": "score", "description": ""}, "samplesize": {"definition": "1000", "templateType": "anything", "group": "Ungrouped variables", "name": "samplesize", "description": ""}, "expb": {"definition": "'Not at all important'", "templateType": "anything", "group": "Ungrouped variables", "name": "expb", "description": ""}, "expt": {"definition": "'Extremely important'", "templateType": "anything", "group": "Ungrouped variables", "name": "expt", "description": ""}}, "metadata": {"description": "Given mean and sd of 1000 sample returns on a scale of 1 to 7 together with a given score, find the z-score.
\nAlso find the 95% confidence interval for the population mean.
", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "contributors": [{"name": "Elias Jakobus Willemse", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/846/"}]}]}], "contributors": [{"name": "Elias Jakobus Willemse", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/846/"}]}