// Numbas version: exam_results_page_options {"name": "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": {"notes": "\n \t\t

1/01/2013:

\n \t\t

Uses 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", "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"}, "type": "question", "preamble": {"css": "", "js": ""}, "advice": "

a)

\n

We use the z tables 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{confl}}=\\var{zval}$ and the confidence interval is given by:

\n

\\[ \\var{m[s]} \\pm z_{\\var{confl}}\\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

b)

\n

Since $\\var{aim}$ {doornot} {lies} in the confidence interval the answer is {Correct}.

\n

 

", "rulesets": {}, "question_groups": [{"pickingStrategy": "all-ordered", "name": "", "pickQuestions": 0, "questions": []}], "name": "Find a confidence interval given the mean of a sample, ,", "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"], "showQuestionGroupNames": false, "functions": {}, "tags": ["ACC1012", "ACE2013", "checked2015", "MAS1403"], "variablesTest": {"condition": "", "maxRuns": 100}, "variable_groups": [], "variables": {"tlci": {"name": "tlci", "definition": "m[s]-zval*sqrt(sd1^2/n)", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "lies": {"name": "lies", "definition": "if(test=0,\"lies\",\"lie\")", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "n": {"name": "n", "definition": "random(20..100)", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "correct": {"name": "correct", "definition": "if(test=0, \"yes\", \"no\")", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "var3": {"name": "var3", "definition": "random(\"The variance of the filling process \",\"The process variance \")", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "mm": {"name": "mm", "definition": "[1-test,test]", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "dothis": {"name": "dothis", "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 ", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "sc4ch": {"name": "sc4ch", "definition": "random(\"supermarkets\",\"clothing retailers\",\"department stores\",\"fast food outlets\")", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "sc2ch": {"name": "sc2ch", "definition": "random(\"bolts\",\"screws\")", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "t": {"name": "t", "definition": "\n [\"bags \",\n sc2ch,\n \"filled cups \",\n \"monthly wage slips \"]\n \n \n ", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "sd2": {"name": "sd2", "definition": "if(s=3,sd[s]^2,sd[s])", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "m": {"name": "m", "definition": "\n [random(700..745),\n random(95..98),\n random(90..99),\n random(1000..2500#50)]\n \n \n ", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "zval": {"name": "zval", "definition": "if(confl=90,1.645,if(confl=95,1.96,2.576))", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "sc": {"name": "sc", "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 ", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "s": {"name": "s", "definition": "random(0..abs(sc)-1)", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "lci": {"name": "lci", "definition": "precround(tlci,2)", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "aim": {"name": "aim", "definition": "if(s=0,750,if(s=1,100,if(s=2,100,1500)))", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "spec": {"name": "spec", "definition": "if(s=2,\"the timecards of \", \" \")", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "uci": {"name": "uci", "definition": "precround(tuci,2)", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "confl": {"name": "confl", "definition": "random(90,95,99)", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "var1": {"name": "var1", "definition": "random(\"The variance of the filling process \",\"The process variance \")", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "howwell": {"name": "howwell", "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 ", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "sd1": {"name": "sd1", "definition": "if(s=3,sd[s],sqrt(sd[s]))", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "sc3ch": {"name": "sc3ch", "definition": "random(\"hot water.\",\"tea.\",\"coffee.\",\"hot chocolate.\",\"cappuccino.\")", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "tuci": {"name": "tuci", "definition": "m[s]+zval*sqrt(sd1^2/n)", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "units": {"name": "units", "definition": "switch(s=0,\"g\",s=1,\"mm\",s=2,\"ml\",\"pounds\")", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "var2": {"name": "var2", "definition": "random(\"process variance \",\"population variance \")", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "sd": {"name": "sd", "definition": "\n [random(800..1400#20),\n random(1200..1800#20),\n random(300..600#20),\n random(100..200#0.1)]\n \n ", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "doornot": {"name": "doornot", "definition": "if(test=0, \" \",\"does not\")", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "sc1ch": {"name": "sc1ch", "definition": "random(\"flour.\",\"sugar.\",\"dried milk.\",\"instant coffee.\")", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "test": {"name": "test", "definition": "if(aim lci,0,1)", "group": "Ungrouped variables", "description": "", "templateType": "anything"}}, "statement": "\n

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

\n

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

\n

 

\n ", "parts": [{"type": "gapfill", "scripts": {}, "marks": 0, "prompt": "\n

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

 

\n ", "showCorrectAnswer": true, "gaps": [{"maxValue": "lci+0.01", "showPrecisionHint": false, "scripts": {}, "type": "numberentry", "marks": 1, "minValue": "lci-0.01", "showCorrectAnswer": true, "correctAnswerFraction": false, "allowFractions": false}, {"maxValue": "uci+0.01", "showPrecisionHint": false, "scripts": {}, "type": "numberentry", "marks": 1, "minValue": "uci-0.01", "showCorrectAnswer": true, "correctAnswerFraction": false, "allowFractions": false}]}, {"type": "gapfill", "scripts": {}, "marks": 0, "prompt": "\n

{howwell[s]}

\n

[[0]]

\n ", "showCorrectAnswer": true, "gaps": [{"type": "1_n_2", "maxMarks": 0, "marks": 0, "displayColumns": 0, "minMarks": 0, "distractors": ["", ""], "shuffleChoices": false, "scripts": {}, "displayType": "radiogroup", "choices": ["Yes", "No"], "showCorrectAnswer": true, "matrix": "mm"}]}], "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/"}]}