// Numbas version: finer_feedback_settings {"name": "Ed's copy of Find a confidence interval given the mean of a sample, ,", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"metadata": {"licence": "Creative Commons Attribution 4.0 International", "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.
", "notes": "\n \t\t1/01/2013:
\n \t\tUses the statistical extension which includes the necessary statistic functions. There are string variables giving various scenarios and these can be added to by the author - except has to add values to arrays m and sd etc as well. Added tag sc.
\n \t\t"}, "rulesets": {}, "type": "question", "advice": "a)
\nWe use the z tables to find the confidence interval as we know the population variance.
\nWe now calculate the $\\var{confl}$% confidence interval.
\nNote that $z_{\\var{confl}}=\\var{zval}$ and the confidence interval is given by:
\n\\[ \\var{m[s]} \\pm z_{\\var{confl}}\\sqrt{\\frac{\\var{sd2}}{\\var{n}}}\\]
\nHence:
\nLower value of the confidence interval $=\\;\\displaystyle \\var{m[s]} -\\var{zval} \\sqrt{\\frac{\\var{sd2}} {\\var{n}}} = \\var{lci}${units} to 2 decimal places.
\nUpper value of the confidence interval $=\\;\\displaystyle \\var{m[s]} +\\var{zval} \\sqrt{\\frac{\\var{sd2}} {\\var{n}}} = \\var{uci}${units} to 2 decimal places.
\nb)
\nSince $\\var{aim}$ {doornot} {lies} in the confidence interval the answer is {Correct}.
\n", "variable_groups": [], "showQuestionGroupNames": false, "name": "Ed's copy of Find a confidence interval given the mean of a sample, ,", "variables": {"sd1": {"group": "Ungrouped variables", "description": "", "definition": "if(s=3,sd[s],sqrt(sd[s]))", "name": "sd1", "templateType": "anything"}, "var2": {"group": "Ungrouped variables", "description": "", "definition": "random(\"process variance \",\"population variance \")", "name": "var2", "templateType": "anything"}, "dothis": {"group": "Ungrouped variables", "description": "", "definition": "\n [var1 + \" is\",\n \"with a \"+var2+\" of\",\n var3+ \" is\",\n \"knows that the population standard deviation for the wages of employees is\"]\n \n \n \n \n ", "name": "dothis", "templateType": "anything"}, "zval": {"group": "Ungrouped variables", "description": "", "definition": "if(confl=90,1.645,if(confl=95,1.96,2.576))", "name": "zval", "templateType": "anything"}, "tuci": {"group": "Ungrouped variables", "description": "", "definition": "m[s]+zval*sqrt(sd1^2/n)", "name": "tuci", "templateType": "anything"}, "s": {"group": "Ungrouped variables", "description": "", "definition": "random(0..abs(sc)-1)", "name": "s", "templateType": "anything"}, "m": {"group": "Ungrouped variables", "description": "", "definition": "\n [random(700..745),\n random(95..98),\n random(90..99),\n random(1000..2500#50)]\n \n \n ", "name": "m", "templateType": "anything"}, "aim": {"group": "Ungrouped variables", "description": "", "definition": "if(s=0,750,if(s=1,100,if(s=2,100,1500)))", "name": "aim", "templateType": "anything"}, "spec": {"group": "Ungrouped variables", "description": "", "definition": "if(s=2,\"the timecards of \", \" \")", "name": "spec", "templateType": "anything"}, "correct": {"group": "Ungrouped variables", "description": "", "definition": "if(test=0, \"yes\", \"no\")", "name": "correct", "templateType": "anything"}, "sc": {"group": "Ungrouped variables", "description": "", "definition": "\n [\"packs sacks of \"+sc1ch,\n \"manufactures \"+sc2ch,\n \"produces vending machines which fill cups with \"+sc3ch,\n \"in charge of the accounts of a large chain of \"+sc4ch\n ]\n \n ", "name": "sc", "templateType": "anything"}, "sd": {"group": "Ungrouped variables", "description": "", "definition": "\n [random(800..1400#20),\n random(1200..1800#20),\n random(300..600#20),\n random(100..200#0.1)]\n \n ", "name": "sd", "templateType": "anything"}, "sc2ch": {"group": "Ungrouped variables", "description": "", "definition": "random(\"bolts\",\"screws\")", "name": "sc2ch", "templateType": "anything"}, "confl": {"group": "Ungrouped variables", "description": "", "definition": "random(90,95,99)", "name": "confl", "templateType": "anything"}, "var1": {"group": "Ungrouped variables", "description": "", "definition": "random(\"The variance of the filling process \",\"The process variance \")", "name": "var1", "templateType": "anything"}, "doornot": {"group": "Ungrouped variables", "description": "", "definition": "if(test=0, \" \",\"does not\")", "name": "doornot", "templateType": "anything"}, "lci": {"group": "Ungrouped variables", "description": "", "definition": "precround(tlci,2)", "name": "lci", "templateType": "anything"}, "lies": {"group": "Ungrouped variables", "description": "", "definition": "if(test=0,\"lies\",\"lie\")", "name": "lies", "templateType": "anything"}, "var3": {"group": "Ungrouped variables", "description": "", "definition": "random(\"The variance of the filling process \",\"The process variance \")", "name": "var3", "templateType": "anything"}, "mm": {"group": "Ungrouped variables", "description": "", "definition": "[1-test,test]", "name": "mm", "templateType": "anything"}, "units": {"group": "Ungrouped variables", "description": "", "definition": "switch(s=0,\"g\",s=1,\"mm\",s=2,\"ml\",\"pounds\")", "name": "units", "templateType": "anything"}, "uci": {"group": "Ungrouped variables", "description": "", "definition": "precround(tuci,2)", "name": "uci", "templateType": "anything"}, "tlci": {"group": "Ungrouped variables", "description": "", "definition": "m[s]-zval*sqrt(sd1^2/n)", "name": "tlci", "templateType": "anything"}, "sc3ch": {"group": "Ungrouped variables", "description": "", "definition": "random(\"hot water.\",\"tea.\",\"coffee.\",\"hot chocolate.\",\"cappuccino.\")", "name": "sc3ch", "templateType": "anything"}, "sc4ch": {"group": "Ungrouped variables", "description": "", "definition": "random(\"supermarkets\",\"clothing retailers\",\"department stores\",\"fast food outlets\")", "name": "sc4ch", "templateType": "anything"}, "howwell": {"group": "Ungrouped variables", "description": "", "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 \"The company aims for an average salary of \u00a31500 per month per worker. Is the aim being met?\"]\n ", "name": "howwell", "templateType": "anything"}, "n": {"group": "Ungrouped variables", "description": "", "definition": "random(20..100)", "name": "n", "templateType": "anything"}, "sd2": {"group": "Ungrouped variables", "description": "", "definition": "if(s=3,sd[s]^2,sd[s])", "name": "sd2", "templateType": "anything"}, "t": {"group": "Ungrouped variables", "description": "", "definition": "\n [\"bags \",\n sc2ch,\n \"filled cups \",\n \"monthly wage slips \"]\n \n \n ", "name": "t", "templateType": "anything"}, "test": {"group": "Ungrouped variables", "description": "", "definition": "if(aim
Calculate a $\\var{confl}$% confidence interval $(a,b)$ for the population mean:
\n$a=\\;$[[0]]{units} $b=\\;$[[1]]{units}
\nEnter both to 2 decimal places.
\n\n ", "scripts": {}, "showCorrectAnswer": true, "gaps": [{"correctAnswerFraction": false, "allowFractions": false, "maxValue": "lci+0.01", "marks": 1, "type": "numberentry", "scripts": {}, "showPrecisionHint": false, "showCorrectAnswer": true, "minValue": "lci-0.01"}, {"correctAnswerFraction": false, "allowFractions": false, "maxValue": "uci+0.01", "marks": 1, "type": "numberentry", "scripts": {}, "showPrecisionHint": false, "showCorrectAnswer": true, "minValue": "uci-0.01"}]}, {"type": "gapfill", "marks": 0, "prompt": "\n
{howwell[s]}
\n[[0]]
\n ", "scripts": {}, "showCorrectAnswer": true, "gaps": [{"choices": ["Yes", "No"], "type": "1_n_2", "marks": 0, "matrix": "mm", "showCorrectAnswer": true, "shuffleChoices": false, "displayType": "radiogroup", "scripts": {}, "maxMarks": 0, "displayColumns": 0, "minMarks": 0, "distractors": ["", ""]}]}], "question_groups": [{"pickQuestions": 0, "pickingStrategy": "all-ordered", "questions": [], "name": ""}], "statement": "\nA company {sc[s]} {dothis[s]} $\\var{sd[s]}$ {units}.
\nA random sample of $\\var{n}$ {t[s]} gives a mean of $\\var{m[s]}$ {units}.
\n\n ", "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", "sd"], "variablesTest": {"maxRuns": 100, "condition": ""}, "preamble": {"css": "", "js": ""}, "functions": {}, "tags": ["ACC1012", "ACE2013", "checked2015", "MAS1403"], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Ed Stewart", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3232/"}]}]}], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Ed Stewart", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3232/"}]}