// Numbas version: exam_results_page_options {"name": "Find a confidence interval given the mean of a sample, population variance known adaptive marking", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Find a confidence interval given the mean of a sample, population variance known adaptive marking", "tags": [], "metadata": {"description": "

Finding the confidence interval at either 90%, 95% or 99% for the mean given the mean of a sample. The population variance is given and so the z values are used. Various scenarios are included.

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

A company {sc[s]} {dothis[s]} $\\var{sd[s]}$ $\\var{units}^2$.

\n

A random sample of $\\var{n}$ {t[s]} gives a mean  of $\\var{m[s]}$ {units}. 

\n

 

", "advice": "

a)

\n

We use the standard normal distribution (rather than the t-distribution) to find the confidence interval as we know the population variance.

\n

We now calculate the $\\var{confl}$% confidence interval.

\n

Note that $z_{\\var{con}}=\\var{zval}$ and the confidence interval is given by:

\n

\\[ \\var{m[s]} \\pm z_{\\var{con}}\\sqrt{\\frac{\\var{sd2}}{\\var{n}}}\\]

\n

Hence:

\n

Lower value of the confidence interval $=\\;\\displaystyle \\var{m[s]} -\\var{zval} \\sqrt{\\frac{\\var{sd2}} {\\var{n}}} = \\var{lci}${units} to 2 decimal places.

\n

Upper value of the confidence interval $=\\;\\displaystyle \\var{m[s]} +\\var{zval} \\sqrt{\\frac{\\var{sd2}} {\\var{n}}} = \\var{uci}${units} to 2 decimal places.

\n

\n

 

", "rulesets": {}, "extensions": ["stats"], "variables": {"lci": {"name": "lci", "group": "Ungrouped variables", "definition": "precround(tlci,2)", "description": "", "templateType": "anything"}, "aim": {"name": "aim", "group": "Ungrouped variables", "definition": "if(s=0,750,if(s=1,100,if(s=2,100,1500)))", "description": "", "templateType": "anything"}, "test": {"name": "test", "group": "Ungrouped variables", "definition": "if(aim lci,0,1)", "description": "", "templateType": "anything"}, "lies": {"name": "lies", "group": "Ungrouped variables", "definition": "if(test=0,\"lies\",\"lie\")", "description": "", "templateType": "anything"}, "var1": {"name": "var1", "group": "Ungrouped variables", "definition": "random(\"The variance of the filling process \",\"The process variance \")", "description": "", "templateType": "anything"}, "zval": {"name": "zval", "group": "Ungrouped variables", "definition": "if(confl=90,1.645,if(confl=95,1.96,2.576))", "description": "", "templateType": "anything"}, "n": {"name": "n", "group": "Ungrouped variables", "definition": "random(20..100)", "description": "", "templateType": "anything"}, "sc3ch": {"name": "sc3ch", "group": "Ungrouped variables", "definition": "random(\"hot water.\",\"tea.\",\"coffee.\",\"hot chocolate.\",\"cappuccino.\")", "description": "", "templateType": "anything"}, "dothis": {"name": "dothis", "group": "Ungrouped variables", "definition": "\n [var1 + \" is\",\n \"with a \"+var2+\" of\",\n var3+ \" is\"]\n \n \n \n \n ", "description": "", "templateType": "anything"}, "sc1ch": {"name": "sc1ch", "group": "Ungrouped variables", "definition": "random(\"flour.\",\"sugar.\",\"dried milk.\",\"instant coffee.\")", "description": "", "templateType": "anything"}, "correct": {"name": "correct", "group": "Ungrouped variables", "definition": "if(test=0, \"yes\", \"no\")", "description": "", "templateType": "anything"}, "s": {"name": "s", "group": "Ungrouped variables", "definition": "random(0..abs(sc)-1)", "description": "", "templateType": "anything"}, "sd2": {"name": "sd2", "group": "Ungrouped variables", "definition": "if(s=3,sd[s]^2,sd[s])", "description": "", "templateType": "anything"}, "howwell": {"name": "howwell", "group": "Ungrouped variables", "definition": "\n [\"On average, is the company reaching its target of 750g per bag?\",\n \"The bolts are designed to be 100mm long. Is the process satisfactory?\",\n \"The vending machines are supposed to fill 100ml cups. Is the machine working satisfactorily?\"\n ]\n ", "description": "", "templateType": "anything"}, "mm": {"name": "mm", "group": "Ungrouped variables", "definition": "[1-test,test]", "description": "", "templateType": "anything"}, "tuci": {"name": "tuci", "group": "Ungrouped variables", "definition": "m[s]+zval*standard_error", "description": "", "templateType": "anything"}, "tlci": {"name": "tlci", "group": "Ungrouped variables", "definition": "m[s]-zval*standard_error", "description": "", "templateType": "anything"}, "sd": {"name": "sd", "group": "Ungrouped variables", "definition": "\n [random(800..1400#20),\n random(1200..1800#20),\n random(300..600#20),\n random(100..200#0.1)]\n \n ", "description": "", "templateType": "anything"}, "con": {"name": "con", "group": "Ungrouped variables", "definition": "(100-confl)/200", "description": "", "templateType": "anything"}, "doornot": {"name": "doornot", "group": "Ungrouped variables", "definition": "if(test=0, \" \",\"does not\")", "description": "", "templateType": "anything"}, "sc4ch": {"name": "sc4ch", "group": "Ungrouped variables", "definition": "random(\"supermarkets\",\"clothing retailers\",\"department stores\",\"fast food outlets\")", "description": "", "templateType": "anything"}, "t": {"name": "t", "group": "Ungrouped variables", "definition": "\n [\"bags \",\n sc2ch,\n \"filled cups \"\n]\n \n \n ", "description": "", "templateType": "anything"}, "m": {"name": "m", "group": "Ungrouped variables", "definition": "\n [random(700..745),\n random(95..98),\n random(90..99)]\n \n \n ", "description": "", "templateType": "anything"}, "sd1": {"name": "sd1", "group": "Ungrouped variables", "definition": "if(s=3,sd[s],sqrt(sd[s]))", "description": "", "templateType": "anything"}, "units": {"name": "units", "group": "Ungrouped variables", "definition": "switch(s=0,\"g\",s=1,\"mm\",s=2,\"ml\",\"pounds\")", "description": "", "templateType": "anything"}, "var2": {"name": "var2", "group": "Ungrouped variables", "definition": "random(\"process variance \",\"population variance \")", "description": "", "templateType": "anything"}, "sc": {"name": "sc", "group": "Ungrouped variables", "definition": "\n [\"packs sacks of \"+sc1ch,\n \"manufactures \"+sc2ch,\n \"produces vending machines which fill cups with \"+sc3ch\n\n ]\n \n ", "description": "", "templateType": "anything"}, "uci": {"name": "uci", "group": "Ungrouped variables", "definition": "precround(tuci,2)", "description": "", "templateType": "anything"}, "var3": {"name": "var3", "group": "Ungrouped variables", "definition": "random(\"The variance of the filling process \",\"The process variance \")", "description": "", "templateType": "anything"}, "sc2ch": {"name": "sc2ch", "group": "Ungrouped variables", "definition": "random(\"bolts\",\"screws\")", "description": "", "templateType": "anything"}, "confl": {"name": "confl", "group": "Ungrouped variables", "definition": "random(90,95,99)", "description": "", "templateType": "anything"}, "spec": {"name": "spec", "group": "Ungrouped variables", "definition": "if(s=2,\"the timecards of \", \" \")", "description": "", "templateType": "anything"}, "standard_error": {"name": "standard_error", "group": "Ungrouped variables", "definition": "sqrt(sd1^2/n)", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["sd1", "sd2", "howwell", "n", "doornot", "uci", "test", "confl", "spec", "var1", "var3", "var2", "sc2ch", "units", "zval", "sc1ch", "lci", "tuci", "lies", "mm", "dothis", "sc4ch", "m", "correct", "aim", "sc3ch", "s", "tlci", "t", "sc", "con", "sd", "standard_error"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "1_n_2", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

Does the sample mean follow a Z-distribution or a t-distribution?

\n

", "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": 0, "showCellAnswerState": true, "choices": ["Z-distribution", "t-distribution"], "matrix": ["1", 0], "distractors": ["", ""]}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

The standard error is  [[0]]

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "minValue": "standard_error", "maxValue": "standard_error", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "dp", "precision": "3", "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": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

Calculate a  $\\var{confl}$% confidence interval $(a,b)$ for the population mean:

\n

$a=\\;$[[0]]{units}          $b=\\;$[[1]]{units}

\n

Enter both to 2 decimal places.

\n

 

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [{"variable": "standard_error", "part": "p1g0", "must_go_first": false}], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "minValue": "lci-0.05", "maxValue": "lci+0.05", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [{"variable": "standard_error", "part": "p1g0", "must_go_first": false}], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "minValue": "uci-0.05", "maxValue": "uci+0.05", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "contributors": [{"name": "Catherine Palmer", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/423/"}, {"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}]}], "contributors": [{"name": "Catherine Palmer", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/423/"}, {"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}