// Numbas version: finer_feedback_settings {"name": "Z-score and percentile", "extensions": ["stats", "random_person"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Z-score and percentile", "tags": [], "metadata": {"description": "
Calculate the z-score and percentile of an observation. The question uses the random person extension.
", "licence": "Creative Commons Attribution-ShareAlike 4.0 International"}, "statement": "A survey asked a large number of NHS patients to rate the service received on a scale from $\\var{lowestValue}$ (\"Not good at all\") to $\\var{highestValue}$ (\"Extremely good\"). The ratings follow a normal distribution with mean $\\var{mean}$ and standard deviation $\\var{sd}$.
\n", "advice": "a)
\nThe $z$-score is given by
\n\\[z=\\frac{\\var{value}-\\var{mean}}{\\var{sd}}\\]
\nb)
\nThe percentile can be found using Excel, either with:
\n= 100 * NORM.DIST($\\var{value}, \\var{mean}, \\var{sd}$, TRUE)
\nor:
\n= 100 * NORM.S.DIST($\\var{zscore}$, TRUE)
\nwhere \"100 *\" converts the Excel functions' output into a percentage.
", "rulesets": {}, "extensions": ["random_person", "stats"], "variables": {"zscore": {"name": "zscore", "group": "Ungrouped variables", "definition": "siground((value-mean)/sd,3)", "description": "", "templateType": "anything"}, "mean": {"name": "mean", "group": "Ungrouped variables", "definition": "random(4.5..6.5#0.01)", "description": "", "templateType": "anything"}, "lowestValue": {"name": "lowestValue", "group": "Ungrouped variables", "definition": "1", "description": "", "templateType": "anything"}, "highestValue": {"name": "highestValue", "group": "Ungrouped variables", "definition": "7", "description": "", "templateType": "anything"}, "percentile": {"name": "percentile", "group": "Ungrouped variables", "definition": "round(100*normalcdf(value, mean, sd))", "description": "", "templateType": "anything"}, "sd": {"name": "sd", "group": "Ungrouped variables", "definition": "random(0.9..2.0#0.01)", "description": "", "templateType": "anything"}, "value": {"name": "value", "group": "Ungrouped variables", "definition": "random(4..7#0.1)", "description": "", "templateType": "anything"}, "person": {"name": "person", "group": "Ungrouped variables", "definition": "random_person()", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["zscore", "lowestValue", "highestValue", "mean", "sd", "value", "percentile", "person"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "{person['name']} recently rated {person['pronouns']['their']} visit as $\\var{value}$; what is the corresponding Z-score?
", "minValue": "zscore-0.01", "maxValue": "zscore+0.01", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"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 {person['name']}'s rating percentile? Approximate your answer to the nearest integer.
\n[[0]]st|nd|rd|th percentile
", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "percentile", "maxValue": "percentile", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question", "contributors": [{"name": "Mario Orsi", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/427/"}, {"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}]}], "contributors": [{"name": "Mario Orsi", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/427/"}, {"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}