// Numbas version: exam_results_page_options {"name": "Simon's copy of Find a confidence interval for the population mean with variance unknown, ,", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"rulesets": {}, "name": "Simon's copy of Find a confidence interval for the population mean with variance unknown, ,", "parts": [{"marks": 0, "scripts": {}, "sortAnswers": false, "variableReplacements": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "type": "gapfill", "gaps": [{"marks": 0, "scripts": {}, "maxMarks": 0, "shuffleChoices": true, "variableReplacements": [], "showCellAnswerState": true, "showCorrectAnswer": true, "minMarks": 0, "distractors": ["", ""], "displayColumns": 0, "showFeedbackIcon": true, "type": "1_n_2", "choices": ["Known", "Unknown"], "customName": "", "unitTests": [], "variableReplacementStrategy": "originalfirst", "useCustomName": false, "extendBaseMarkingAlgorithm": true, "matrix": [0, 1], "displayType": "radiogroup", "customMarkingAlgorithm": ""}, {"scripts": {}, "variableReplacements": [], "showCorrectAnswer": true, "notationStyles": ["plain", "en", "si-en"], "precisionMessage": "You have not given your answer to the correct precision.", "mustBeReducedPC": 0, "correctAnswerStyle": "plain", "strictPrecision": false, "allowFractions": false, "customName": "", "mustBeReduced": false, "maxValue": "lci+0.01", "marks": 1, "minValue": "lci-0.01", "customMarkingAlgorithm": "", "showPrecisionHint": false, "showFeedbackIcon": true, "precisionType": "dp", "precision": "2", "type": "numberentry", "precisionPartialCredit": 0, "unitTests": [], "variableReplacementStrategy": "originalfirst", "useCustomName": false, "extendBaseMarkingAlgorithm": true, "correctAnswerFraction": false}, {"scripts": {}, "variableReplacements": [], "showCorrectAnswer": true, "notationStyles": ["plain", "en", "si-en"], "precisionMessage": "You have not given your answer to the correct precision.", "mustBeReducedPC": 0, "correctAnswerStyle": "plain", "strictPrecision": false, "allowFractions": false, "customName": "", "mustBeReduced": false, "maxValue": "uci+0.01", "marks": 1, "minValue": "uci-0.01", "customMarkingAlgorithm": "", "showPrecisionHint": false, "showFeedbackIcon": true, "precisionType": "dp", "precision": "2", "type": "numberentry", "precisionPartialCredit": 0, "unitTests": [], "variableReplacementStrategy": "originalfirst", "useCustomName": false, "extendBaseMarkingAlgorithm": true, "correctAnswerFraction": false}], "customName": "", "unitTests": [], "variableReplacementStrategy": "originalfirst", "useCustomName": false, "extendBaseMarkingAlgorithm": true, "prompt": "

Is the population variance known or unknown?

\n

[[0]]

\n

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

\n

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

\n

Enter both to 2 decimal places.

\n", "customMarkingAlgorithm": ""}], "functions": {"pounds": {"parameters": [["n", "number"]], "type": "number", "definition": "return Numbas.util.currency(n,'\u00a3','p');", "language": "javascript"}}, "tags": [], "preamble": {"css": "", "js": ""}, "ungrouped_variables": ["m", "uci", "invt", "units", "lci", "spec", "sc2ch", "sc1ch", "tinvt", "confl", "tuci", "dothis", "sc4ch", "sc6ch", "n", "p", "s", "tlci", "t", "sc", "sc5ch", "sd"], "variablesTest": {"maxRuns": 100, "condition": ""}, "extensions": ["stats"], "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 and standard deviation of a sample. The population variance is not given and so the t test has to be used. Various scenarios are included.

"}, "advice": "

(a)

\n

The population variance is unknown. We only know the sample standard deviation (and hence sample variance). 

\n

\n

(b)

\n

Since the population variance is unknown, we have to use t-tables to find the confidence interval.

\n

\n

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

\n

As we have $\\var{n}-1=\\var{n-1}$ degrees of freedom, the interval is given by:

\n

\\[ \\var{m[s]} \\pm t_{\\var{n-1}}\\frac{\\var{sd[s]}}{\\sqrt{\\var{n}}}\\]

\n

Looking up the two-tailed t tables for $\\var{confl}$% we see that $t_{\\var{n-1}}=\\var{invt}$ to 3 decimal places.

\n

Hence:

\n

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

\n

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

", "statement": "

The management of {sc[s]} wants to {dothis[s]}.

\n

A random sample of {spec} $\\var{n}$ {t[s]} gave a mean and standard deviation of {p}$\\var{m[s]}$ {units} and {p}$\\var{sd[s]}${units} respectively.

", "variables": {"m": {"definition": "\n [random(30..100#0.01),\n random(40000..80000#500),\n random(34..48#0.01),\n random(100..300#0.01),\n random(10..20#0.01),\n random(3.5..6#0.01)]\n \n ", "templateType": "anything", "group": "Ungrouped variables", "name": "m", "description": ""}, "invt": {"definition": "precround(tinvt,3)", "templateType": "anything", "group": "Ungrouped variables", "name": "invt", "description": ""}, "spec": {"definition": "if(s=2,\"the timecards of \", \" \")", "templateType": "anything", "group": "Ungrouped variables", "name": "spec", "description": ""}, "sc5ch": {"definition": "random(\"caramel\",\"Turkish delight\",\"honeycomb\",\"nuts\")", "templateType": "anything", "group": "Ungrouped variables", "name": "sc5ch", "description": ""}, "uci": {"definition": "precround(tuci,2)", "templateType": "anything", "group": "Ungrouped variables", "name": "uci", "description": ""}, "sc6ch": {"definition": "random(\"Cornish pasties\",\"sausage rolls\",\"chicken pies\",\"minced beef pasties\")", "templateType": "anything", "group": "Ungrouped variables", "name": "sc6ch", "description": ""}, "lci": {"definition": "precround(tlci,2)", "templateType": "anything", "group": "Ungrouped variables", "name": "lci", "description": ""}, "units": {"definition": "switch(s=2,\"hours\",s=4,\"g\",s=5,\"g per 100g\",\" \")", "templateType": "anything", "group": "Ungrouped variables", "name": "units", "description": ""}, "sd": {"definition": "\n [random(3..10#0.01),\n random(500..4000#0.5),\n random(2..5#0.01),\n random(10..40#0.01),\n random(1..3#0.01),\n random(0.5..1#0.01)]\n ", "templateType": "anything", "group": "Ungrouped variables", "name": "sd", "description": ""}, "n": {"definition": "random(10..30)", "templateType": "anything", "group": "Ungrouped variables", "name": "n", "description": ""}, "tlci": {"definition": "m[s]-invt*sqrt(sd[s]^2/n)", "templateType": "anything", "group": "Ungrouped variables", "name": "tlci", "description": ""}, "t": {"definition": "\n [\"vacated rooms was inspected by the management and this\",\n \"clothing outlets \",\n \"workers\",\n \"tickets \",\n \"chocolate bars \",\n sc6ch+\" \"]\n \n ", "templateType": "anything", "group": "Ungrouped variables", "name": "t", "description": ""}, "s": {"definition": "random(0..abs(sc)-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "s", "description": ""}, "sc2ch": {"definition": "random(\"local\",\"national\")", "templateType": "anything", "group": "Ungrouped variables", "name": "sc2ch", "description": ""}, "tuci": {"definition": "m[s]+invt*sqrt(sd[s]^2/n)", "templateType": "anything", "group": "Ungrouped variables", "name": "tuci", "description": ""}, "dothis": {"definition": "\n [\"estimate the mean cost per room of repairing damage caused by its customers during a bank holiday weekend\",\n \"estimate the mean monthly sales of all of its outlets\",\n \"estimate the mean hours worked per week of all its employees\",\n \"estimate the mean cost of a ticket on its most popular route\",\n \"estimate the mean weight of \"+sc5ch+\" inside bars of its most popular product\",\n \"estimate the mean amount of saturated fat in its \"+ sc6ch]\n \n \n \n ", "templateType": "anything", "group": "Ungrouped variables", "name": "dothis", "description": ""}, "confl": {"definition": "random(90,95,99)", "templateType": "anything", "group": "Ungrouped variables", "name": "confl", "description": ""}, "sc": {"definition": "\n [\"a national chain of \"+ sc1ch,\n \"a \"+sc2ch + \" chain of clothing shops \",\n \" a large factory \",\n \" a regional passenger airline in \"+sc4ch,\n \"Choclastic!, a company producing a variety of chocolate bars \",\n \" a large bakery \"]\n ", "templateType": "anything", "group": "Ungrouped variables", "name": "sc", "description": ""}, "sc1ch": {"definition": "random(\"hotels\",\"motels\", \"Bed and Breakfasts\",\"budget hotels\")", "templateType": "anything", "group": "Ungrouped variables", "name": "sc1ch", "description": ""}, "sc4ch": {"definition": "random(\"the Caribbean\",\"the Mediterranean\",\"North East England\",\"South West England\",\"California\")", "templateType": "anything", "group": "Ungrouped variables", "name": "sc4ch", "description": ""}, "tinvt": {"definition": "studenttinv((confl+100)/200,n-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "tinvt", "description": ""}, "p": {"definition": "switch(s=0 or s=1 or s=3,'\u00a3',' ')", "templateType": "anything", "group": "Ungrouped variables", "name": "p", "description": ""}}, "variable_groups": [], "type": "question", "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}]}]}], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}]}