// 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": [], "variables": {"expb": {"group": "Ungrouped variables", "templateType": "anything", "definition": "'Not at all important'", "name": "expb", "description": ""}, "top": {"group": "Ungrouped variables", "templateType": "anything", "definition": "7", "name": "top", "description": ""}, "score": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(2..5#0.1)", "name": "score", "description": ""}, "sstdev": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(0.9..2.0#0.01)", "name": "sstdev", "description": ""}, "upperbound": {"group": "Ungrouped variables", "templateType": "anything", "definition": "precround(samplemean+1.96*sstdev/sqrt(samplesize),3)", "name": "upperbound", "description": ""}, "these": {"group": "Ungrouped variables", "templateType": "anything", "definition": "'UK shoppers'", "name": "these", "description": ""}, "zscore": {"group": "Ungrouped variables", "templateType": "anything", "definition": "precround((score-samplemean)/sstdev,3)", "name": "zscore", "description": ""}, "this": {"group": "Ungrouped variables", "templateType": "anything", "definition": "'the importance of price when making food choice decisions'", "name": "this", "description": ""}, "expt": {"group": "Ungrouped variables", "templateType": "anything", "definition": "'Extremely important'", "name": "expt", "description": ""}, "samplemean": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(4.5..6.5#0.01)", "name": "samplemean", "description": ""}, "samplesize": {"group": "Ungrouped variables", "templateType": "anything", "definition": "1000", "name": "samplesize", "description": ""}, "bottom": {"group": "Ungrouped variables", "templateType": "anything", "definition": "1", "name": "bottom", "description": ""}, "lowerbound": {"group": "Ungrouped variables", "templateType": "anything", "definition": "precround(samplemean-1.96*sstdev/sqrt(samplesize),3)", "name": "lowerbound", "description": ""}}, "ungrouped_variables": ["zscore", "lowerbound", "bottom", "this", "top", "upperbound", "samplemean", "these", "sstdev", "score", "samplesize", "expb", "expt"], "rulesets": {}, "name": "Find z-score for sample and calculate confidence interval", "showQuestionGroupNames": false, "functions": {}, "parts": [{"prompt": "\n\t\t\t

What is the $z$-score for a score of $\\var{score}$?

\n\t\t\t

\n\t\t\t

Enter your answer to 3 decimal places.

\n\t\t\t", "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "correctAnswerFraction": false, "minValue": "zscore-0.001", "showCorrectAnswer": true, "marks": 2, "maxValue": "zscore+0.001"}, {"scripts": {}, "gaps": [{"showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "correctAnswerFraction": false, "minValue": "lowerbound-0.001", "showCorrectAnswer": true, "marks": 1, "maxValue": "lowerbound+0.001"}, {"showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "correctAnswerFraction": false, "minValue": "upperbound-0.001", "showCorrectAnswer": true, "marks": 1, "maxValue": "upperbound+0.001"}], "type": "gapfill", "showCorrectAnswer": true, "prompt": "\n\t\t\t

Calculate the $95$% confidence interval for the population mean $\\mu$:

\n\t\t\t

Lower bound: [[0]]

\n\t\t\t

Upper bound: [[1]]

\n\t\t\t

\n\t\t\t

Enter your answers to 3 decimal places.

\n\t\t\t", "marks": 0}], "variablesTest": {"condition": "", "maxRuns": 100}, "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\t

The mean rating was $\\var{samplemean}$ with SD $\\var{sstdev}$.

\n\t

\n\t

Enter all values to 3 decimal places.

\n\t

\n\t", "tags": ["95%", "ACE2013", "checked2015", "confidence interval", "mean", "mean ", "population mean", "sample", "sample mean", "scale", "standard deviation", "statistics", "z-score"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "\n\t\t

17/10/2013:

\n\t\t


Created question.

\n\t\t", "licence": "Creative Commons Attribution 4.0 International", "description": "\n\t\t

Given 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\t

Also find the 95% confidence interval for the population mean.

\n\t\t"}, "advice": "\n\t

a)

\n\t

The $z$-score is given by 

\n\t

\\[z=\\frac{\\var{score}-\\var{samplemean}}{\\var{sstdev}}=\\var{zscore}\\]

\n\t

(To 3 decimal places).

\n\t

b)

\n\t

The lower bound for the 95% confidence interval is given by:

\n\t

Lower bound = $\\displaystyle \\var{samplemean}-1.96 \\times \\frac{ \\var{sstdev}}{\\sqrt{\\var{samplesize}}}=\\var{lowerbound}$

\n\t

\n\t

Upper bound = $\\displaystyle \\var{samplemean}+1.96 \\times \\frac{ \\var{sstdev}}{\\sqrt{\\var{samplesize}}}=\\var{upperbound}$

\n\t

(Both to 3 decimal places.)

\n\t

Hence for the population mean $\\mu$  we can say that $\\var{lowerbound} \\le\\mu \\le \\var{upperbound}$ with $95$% confidence.

\n\t", "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}]}], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}