// Numbas version: exam_results_page_options {"name": "Normal distribution probability and percentiles, ", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Normal distribution probability and percentiles, ", "tags": ["checked2015", "continuous distributions", "distributions", "mean", "Normal distribution", "normal distribution", "normal tables", "percentiles", "probability", "Probability", "sc", "standard deviation", "statistics", "z scores"], "metadata": {"description": "

Given normal distribution $\\operatorname{N}(m,\\sigma^2)$ find $P(a \\lt X \\lt b),\\; a \\lt m,\\;b \\gt m$ and also find the value of $X$ corresponding to a given percentile $p$%. 

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

Let $X$ be the {something} which has a normal distribution, mean $\\var{m}$ and standard deviation $\\var{s}$ i.e. $X \\sim \\operatorname{N}(\\var{m},\\var{s^2})$.

", "advice": "

Converting to $\\operatorname{N}(0,1)$:

\n

a)

\n

\\[\\begin{eqnarray*}P(\\var{lower1} \\lt X \\lt \\var{upper1})&=&P(X \\lt \\var{upper1})- P(X \\lt \\var{lower1})\\\\&=&P\\left(Z \\lt \\frac{\\var{upper1}-\\var{m}}{\\var{s}}\\right)-P\\left(Z \\lt \\frac{\\var{lower1}-\\var{m}}{\\var{s}}\\right)\\\\&=&P(Z \\lt \\var{zu})-P(Z \\lt \\var{zl})=\\var{u}-\\var{l}\\\\&=&\\var{p}\\end{eqnarray*}\\]

\n

to 3 decimal places.

\n

b)

\n

We need to find $x$ such that:

\n

\\[\\begin{eqnarray*}P(X \\lt x) &\\le& \\var{percentile/100}\\\\ \\Rightarrow P\\left(Z \\le \\frac{x-\\var{m}}{\\var{s}}\\right) &\\le& \\var{percentile/100}\\\\ \\Rightarrow \\frac{x-\\var{m}}{\\var{s}} &\\le& \\Phi^{-1}(\\var{percentile/100})=\\var{normalinv(percentile/100,0,1)}\\\\ \\Rightarrow x &\\le&\\var{normalinv(percentile/100,0,1)}\\times\\var{s}+\\var{m}=\\var{perX}\\end{eqnarray*}\\] to 2 decimal places.

\n

Hence $X=\\var{perX}$ gives the $\\var{percentile}$% percentile.

\n

 

", "rulesets": {}, "extensions": ["stats"], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"tol": {"name": "tol", "group": "Ungrouped variables", "definition": "0.001", "description": "", "templateType": "anything", "can_override": false}, "percentile": {"name": "percentile", "group": "Ungrouped variables", "definition": "//perhaps should stick to standard values 90,95,99,99.9\n random(40..99 except 50)", "description": "", "templateType": "anything", "can_override": false}, "m": {"name": "m", "group": "Ungrouped variables", "definition": "random(270..290#0.2)", "description": "", "templateType": "anything", "can_override": false}, "perx": {"name": "perx", "group": "Ungrouped variables", "definition": "precround(normalinv(percentile/100,m,s),2)", "description": "", "templateType": "anything", "can_override": false}, "this": {"name": "this", "group": "Ungrouped variables", "definition": "'a platelet count'", "description": "", "templateType": "anything", "can_override": false}, "u": {"name": "u", "group": "Ungrouped variables", "definition": "normalcdf(zu,0,1)", "description": "", "templateType": "anything", "can_override": false}, "zu": {"name": "zu", "group": "Ungrouped variables", "definition": "random(0.2..2.0 except abs(zl))", "description": "", "templateType": "anything", "can_override": false}, "athing": {"name": "athing", "group": "Ungrouped variables", "definition": "'an individual'", "description": "", "templateType": "anything", "can_override": false}, "l": {"name": "l", "group": "Ungrouped variables", "definition": "1-normalcdf(abs(zl),0,1)", "description": "", "templateType": "anything", "can_override": false}, "upper1": {"name": "upper1", "group": "Ungrouped variables", "definition": "zu*s+m", "description": "", "templateType": "anything", "can_override": false}, "s": {"name": "s", "group": "Ungrouped variables", "definition": "random(44..46#0.2)", "description": "", "templateType": "anything", "can_override": false}, "zl": {"name": "zl", "group": "Ungrouped variables", "definition": "random(-2.0..-0.2#0.1)", "description": "", "templateType": "anything", "can_override": false}, "p": {"name": "p", "group": "Ungrouped variables", "definition": "precround(u-l,3)", "description": "", "templateType": "anything", "can_override": false}, "lower1": {"name": "lower1", "group": "Ungrouped variables", "definition": "zl*s+m", "description": "", "templateType": "anything", "can_override": false}, "something": {"name": "something", "group": "Ungrouped variables", "definition": "'blood platelet count (measured in thousands per cc of blood)'", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["zl", "lower1", "upper1", "this", "m", "athing", "l", "p", "s", "percentile", "u", "something", "tol", "zu", "perx"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

What is the probability that {athing} has {this} between $\\var{lower1}$ and $\\var{upper1}$?

\n

Probability = ? [[0]] (to 3 decimal places).

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "p-tol", "maxValue": "p+tol", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

What value of $X$ is equivalent to the $\\var{percentile}$% percentile (i.e. $\\var{percentile}$% of all individuals will have a platelet count below this value)?

\n

$\\var{percentile}$% percentile = ?[[0]] (input to 2 decimal places).

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "perX-0.01", "maxValue": "perX+0.01", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}