// Numbas version: finer_feedback_settings {"name": "Find z-score for sample and calculate confidence interval", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variable_groups": [], "statement": "\n\t
A recent survey asked $\\var{samplesize}$ {these} to rate {this} on a scale from $\\var{bottom}$ ({expb}) to $\\var{top}$ ({expt}).
\n\tThe mean rating was $\\var{samplemean}$ with SD $\\var{sstdev}$.
\n\t \n\tEnter all values to 3 decimal places.
\n\t \n\t", "showQuestionGroupNames": false, "tags": ["95%", "ACE2013", "checked2015", "confidence interval", "mean", "mean ", "population mean", "sample", "sample mean", "scale", "standard deviation", "statistics", "z-score"], "ungrouped_variables": ["zscore", "lowerbound", "bottom", "this", "top", "upperbound", "samplemean", "these", "sstdev", "score", "samplesize", "expb", "expt"], "variables": {"this": {"group": "Ungrouped variables", "description": "", "definition": "'the importance of price when making food choice decisions'", "name": "this", "templateType": "anything"}, "zscore": {"group": "Ungrouped variables", "description": "", "definition": "precround((score-samplemean)/sstdev,3)", "name": "zscore", "templateType": "anything"}, "bottom": {"group": "Ungrouped variables", "description": "", "definition": "1", "name": "bottom", "templateType": "anything"}, "score": {"group": "Ungrouped variables", "description": "", "definition": "random(2..5#0.1)", "name": "score", "templateType": "anything"}, "expt": {"group": "Ungrouped variables", "description": "", "definition": "'Extremely important'", "name": "expt", "templateType": "anything"}, "samplesize": {"group": "Ungrouped variables", "description": "", "definition": "1000", "name": "samplesize", "templateType": "anything"}, "top": {"group": "Ungrouped variables", "description": "", "definition": "7", "name": "top", "templateType": "anything"}, "these": {"group": "Ungrouped variables", "description": "", "definition": "'UK shoppers'", "name": "these", "templateType": "anything"}, "upperbound": {"group": "Ungrouped variables", "description": "", "definition": "precround(samplemean+1.96*sstdev/sqrt(samplesize),3)", "name": "upperbound", "templateType": "anything"}, "lowerbound": {"group": "Ungrouped variables", "description": "", "definition": "precround(samplemean-1.96*sstdev/sqrt(samplesize),3)", "name": "lowerbound", "templateType": "anything"}, "expb": {"group": "Ungrouped variables", "description": "", "definition": "'Not at all important'", "name": "expb", "templateType": "anything"}, "samplemean": {"group": "Ungrouped variables", "description": "", "definition": "random(4.5..6.5#0.01)", "name": "samplemean", "templateType": "anything"}, "sstdev": {"group": "Ungrouped variables", "description": "", "definition": "random(0.9..2.0#0.01)", "name": "sstdev", "templateType": "anything"}}, "functions": {}, "preamble": {"css": "", "js": ""}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "\n\t\tGiven mean and sd of 1000 sample returns on a scale of 1 to 7 together with a given score, find the z-score.
\n\t\tAlso find the 95% confidence interval for the population mean.
\n\t\t", "notes": "\n\t\t17/10/2013:
\n\t\t
Created question.
a)
\n\tThe $z$-score is given by
\n\t\\[z=\\frac{\\var{score}-\\var{samplemean}}{\\var{sstdev}}=\\var{zscore}\\]
\n\t(To 3 decimal places).
\n\tb)
\n\tThe lower bound for the 95% confidence interval is given by:
\n\tLower bound = $\\displaystyle \\var{samplemean}-1.96 \\times \\frac{ \\var{sstdev}}{\\sqrt{\\var{samplesize}}}=\\var{lowerbound}$
\n\t \n\tUpper bound = $\\displaystyle \\var{samplemean}+1.96 \\times \\frac{ \\var{sstdev}}{\\sqrt{\\var{samplesize}}}=\\var{upperbound}$
\n\t(Both to 3 decimal places.)
\n\tHence for the population mean $\\mu$ we can say that $\\var{lowerbound} \\le\\mu \\le \\var{upperbound}$ with $95$% confidence.
\n\t", "parts": [{"scripts": {}, "marks": 2, "type": "numberentry", "maxValue": "zscore+0.001", "prompt": "\n\t\t\tWhat is the $z$-score for a score of $\\var{score}$?
\n\t\t\t \n\t\t\tEnter your answer to 3 decimal places.
\n\t\t\t", "showPrecisionHint": false, "minValue": "zscore-0.001", "showCorrectAnswer": true, "correctAnswerFraction": false, "allowFractions": false}, {"gaps": [{"scripts": {}, "marks": 1, "type": "numberentry", "maxValue": "lowerbound+0.001", "showPrecisionHint": false, "allowFractions": false, "showCorrectAnswer": true, "correctAnswerFraction": false, "minValue": "lowerbound-0.001"}, {"scripts": {}, "marks": 1, "type": "numberentry", "maxValue": "upperbound+0.001", "showPrecisionHint": false, "allowFractions": false, "showCorrectAnswer": true, "correctAnswerFraction": false, "minValue": "upperbound-0.001"}], "marks": 0, "type": "gapfill", "prompt": "\n\t\t\tCalculate the $95$% confidence interval for the population mean $\\mu$:
\n\t\t\tLower bound: [[0]]
\n\t\t\tUpper bound: [[1]]
\n\t\t\t \n\t\t\tEnter your answers to 3 decimal places.
\n\t\t\t", "showCorrectAnswer": true, "scripts": {}}], "name": "Find z-score for sample and calculate confidence interval", "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Xiaodan Leng", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2146/"}]}]}], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Xiaodan Leng", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2146/"}]}