// Numbas version: exam_results_page_options {"name": "BS3.5", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "ungrouped_variables": ["upper", "lower", "ans1", "ans2", "ans3", "thisdis", "t", "tol"], "name": "BS3.5", "tags": ["continuous distributions", "expectation", "probabilities", "sc", "statistical distributions", "statistics", "uniform distribution", "uniformly distributed", "variance"], "preamble": {"css": "", "js": ""}, "advice": "

a)

\n

For a uniform distribution \\[X \\sim \\operatorname{U}(\\var{lower},\\var{upper})\\] we have:

\n

$\\displaystyle \\operatorname{E}[X] = \\frac{\\var{lower}+\\var{upper}}{2}=\\var{ans1}$m

\n

$\\displaystyle \\operatorname{Var}[X] = \\frac{(\\var{upper}-\\var{lower})^2}{12}=\\frac{(\\var{upper-lower})^2}{12}=\\var{ans2}$ to 3 decimal places.

\n

b)

\n

$\\displaystyle P(X \\le \\var{thisdis}\\textrm{km})=\\frac{\\var{thisdis}\\times 1000 -\\var{lower}}{\\var{upper}-\\var{lower}}=\\var{ans3}$ to 3 decimal places.

", "rulesets": {}, "parts": [{"prompt": "

Find $\\operatorname{E}[X]$, the expected distance in metres of the new supermarket from the town centre:

\n

$\\operatorname{E}[X]=$ [[0]]m (to 3 decimal places).

\n

Also find the variance $\\operatorname{Var}(X)$:

\n

 $\\operatorname{Var}(X)=$ [[1]] (to 3 decimal places).

\n

 

", "marks": 0, "gaps": [{"allowFractions": false, "marks": 1, "maxValue": "ans1", "minValue": "ans1", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "marks": 1, "maxValue": "ans2+tol", "minValue": "ans2-tol", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "type": "gapfill"}, {"prompt": "

Find the probability that the supermarket opens within $\\var{thisdis}$ kilometres of the town centre.

\n

$P(X \\le \\var{thisdis}\\textrm{km})=$ [[0]] (to 3 decimal places).

", "marks": 0, "gaps": [{"allowFractions": false, "marks": 1, "maxValue": "ans3+tol", "minValue": "ans3-tol", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "type": "gapfill"}], "statement": "\n

A new supermarket plans to open somewhere on the outskirts of a town. In fact, $X$, the distance of a new supermarket from the town centre is Uniformly distributed between $\\var{lower}$ metres and $\\var{upper}$ metres i.e. 

\n

\\[X \\sim \\operatorname{U}(\\var{lower},\\var{upper})\\]

\n ", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"upper": {"definition": "lower+random(300..500#50)", "templateType": "anything", "group": "Ungrouped variables", "name": "upper", "description": ""}, "lower": {"definition": "random(500..1000#50)", "templateType": "anything", "group": "Ungrouped variables", "name": "lower", "description": ""}, "ans1": {"definition": "(upper+lower)/2", "templateType": "anything", "group": "Ungrouped variables", "name": "ans1", "description": ""}, "ans2": {"definition": "precround((upper-lower)^2/12,3)", "templateType": "anything", "group": "Ungrouped variables", "name": "ans2", "description": ""}, "ans3": {"definition": "precround((thisdis*1000-lower)/(upper-lower),3)", "templateType": "anything", "group": "Ungrouped variables", "name": "ans3", "description": ""}, "thisdis": {"definition": "precround((t*lower+(100-t)*upper)/100000,2)", "templateType": "anything", "group": "Ungrouped variables", "name": "thisdis", "description": ""}, "t": {"definition": "random(20..80)", "templateType": "anything", "group": "Ungrouped variables", "name": "t", "description": ""}, "tol": {"definition": "0.001", "templateType": "anything", "group": "Ungrouped variables", "name": "tol", "description": ""}}, "metadata": {"notes": "

1/01/2013:

\n

Although this application is fixed, it could be made into a \"scenario\" based question by introducing string variables, so added tag sc.

\n

25/01/2013:

\n

Included missed out request to calculate to 3 decimal places.

", "description": "\n \t\t

Exercise using a given uniform distribution $X$, calculating the expectation and variance. Also finding $P(X \\le a)$ for a given value $a$.

\n \t\t

 

\n \t\t", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "contributors": [{"name": "Bill Foster", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/6/"}]}]}], "contributors": [{"name": "Bill Foster", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/6/"}]}