// Numbas version: finer_feedback_settings {"name": "PA1 - Discrete Random Variable", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "PA1 - Discrete Random Variable", "tags": [], "metadata": {"description": "", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "

A random variable is a function that assigns a real number to each element of a sample space.

", "advice": "

a) Since we have a uniform distribution, each event is equally as likely to occur therefore the probability of each outcome is one divided by the total number of possible values which is $\\frac{1}{\\var{number}}$.

\n

b) Probabilites must add up to one. We can show this is the case by calculating $\\frac{1}{\\var{number}}\\times\\var{number}=\\frac{\\var{number}}{\\var{number}}={1}$.

\n

Use this link to find some resources which will help you revise this topic.

", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"number": {"name": "number", "group": "Ungrouped variables", "definition": "random(3 .. 7#1)", "description": "

Number of elements in sample space

", "templateType": "randrange", "can_override": false}, "set": {"name": "set", "group": "Ungrouped variables", "definition": "if(number=3,\"Red, Blue, Green\",if(number=4,\"Red, Blue, Green, Orange\",if(number=5,\"Red, Blue, Green, Orange, Pink\",if(number=6,\"Red, Blue, Green, Orange, Pink, Purple\",if(number=7,\"Red, Blue, Green, Orange, Pink, Purple, Yellow\",\"error\")))))", "description": "

Our sample space

", "templateType": "anything", "can_override": false}, "bracket_left": {"name": "bracket_left", "group": "Ungrouped variables", "definition": "\"{\"", "description": "", "templateType": "string", "can_override": false}, "bracket_right": {"name": "bracket_right", "group": "Ungrouped variables", "definition": "\"}\"", "description": "", "templateType": "string", "can_override": false}, "probability": {"name": "probability", "group": "Ungrouped variables", "definition": "1/number", "description": "

Probability of each event occuring

", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["number", "set", "bracket_left", "bracket_right", "probability"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "numberentry", "useCustomName": true, "customName": "a)", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

If discrete random variable $X$ can take {number} possible values {bracket_left}{set}{bracket_right} and it has a uniform distribution, what is the probability of each outcome?

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

What do all the probabilities of all the possible outcomes of a single event have to add up to?

", "minValue": "1", "maxValue": "1", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Lauren Desoysa", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/21504/"}, {"name": "Will Morgan", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/21933/"}, {"name": "Megan Oliver", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/23526/"}], "resources": []}]}], "contributors": [{"name": "Lauren Desoysa", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/21504/"}, {"name": "Will Morgan", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/21933/"}, {"name": "Megan Oliver", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/23526/"}]}