// Numbas version: exam_results_page_options {"name": "Week 1 quiz", "metadata": {"description": "", "licence": "None specified"}, "duration": 0, "percentPass": 0, "showQuestionGroupNames": false, "shuffleQuestionGroups": false, "showstudentname": true, "question_groups": [{"name": "Group", "pickingStrategy": "all-shuffled", "pickQuestions": 1, "questionNames": ["", "", "", "", "", "", ""], "variable_overrides": [[], [], [], [], [], [], []], "questions": [{"name": "Find expectation of X using PGF", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Chris Drovandi", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/9840/"}, {"name": "adam bretherton", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/18177/"}], "tags": [], "metadata": {"description": "", "licence": "None specified"}, "statement": "

What is the formula for finding the expectation of X using PGFs?

", "advice": "

$E[X] = P'_X(1)$

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "1_n_2", "useCustomName": false, "customName": "", "marks": 0, "scripts": {"mark": {"script": "// Reveal answers, score and advice\nthis.display.revealAnswer();\nthis.display.showScore();\nNumbas.controls.getAdvice();", "order": "after"}}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": true, "displayType": "radiogroup", "displayColumns": 0, "showCellAnswerState": true, "choices": ["$E[X] = P'_X(1)$", "$E[X] = P'_X(0)$", "$E[X] = P_X(x)$"], "matrix": ["1", 0, 0], "distractors": ["", "", ""]}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Find variance of X using PGF", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Chris Drovandi", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/9840/"}, {"name": "adam bretherton", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/18177/"}], "tags": [], "metadata": {"description": "", "licence": "None specified"}, "statement": "

What is the formula for the variance of X using PGFs?

", "advice": "

$\\mbox{Var}[X] = P''_X(1) + P'_X(1)-[P'_X(1)]^2$

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "1_n_2", "useCustomName": false, "customName": "", "marks": 0, "scripts": {"mark": {"script": "// Reveal answers, score and advice\nthis.display.revealAnswer();\nthis.display.showScore();\nNumbas.controls.getAdvice();", "order": "before"}}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": 0, "showCellAnswerState": true, "choices": ["

$\\mbox{Var}[X] = P''_X(1) + P'_X(1)-[P'_X(1)]^2$

", "

$\\mbox{Var}[X] = P''_X(0) + P'_X(0)-[P'_X(0)]^2$

", "

$\\mbox{Var}[X] = P''_X(1)$

"], "matrix": ["1", 0, 0], "distractors": ["", "", ""]}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Formula for the sum of IID RV's with PGFs", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "adam bretherton", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/18177/"}], "tags": [], "metadata": {"description": "", "licence": "None specified"}, "statement": "

For $X_i \\overset{\\text{iid}}{\\sim} X$

\n

Let $Y = X_1 + X_2 + \\cdots + X_n$

\n

What is the formula for the PGF of Y: $P_Y(s)$?

", "advice": "

$P_Y(s) = \\prod_{i=1}^{n}P_{X_i}(s) = [P_X(s)]^n$ because the $X_i$'s are IID.

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "1_n_2", "useCustomName": false, "customName": "", "marks": 0, "scripts": {"mark": {"script": "// Reveal answers, score and advice\nthis.display.revealAnswer();\nthis.display.showScore();\nNumbas.controls.getAdvice();", "order": "before"}}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": true, "displayType": "radiogroup", "displayColumns": 0, "showCellAnswerState": true, "choices": ["$P_Y(s) = [P_X(s)]^n$", "$P_Y(s) = nP_X(s)$", "$P_Y(s) = \\sum_{i=1}^nP_{X_i}(s)$"], "matrix": ["1", 0, 0], "distractors": ["", "", ""]}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Probability of x from PGF of X", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Chris Drovandi", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/9840/"}, {"name": "adam bretherton", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/18177/"}], "tags": [], "metadata": {"description": "", "licence": "None specified"}, "statement": "

What is the probability that $X=x$ using its PGF?

", "advice": "

Remember that $P_X(s) = \\mbox{E}[s^X] = \\sum_Kp_ks^k$ so to find $p_x$ you need to:

\n
    \n
  1. Derive $x$ times so it is the only value without an $s$
  2. \n
  3. Evaluate at $s=0$ so it is the only remaining term
  4. \n
  5. Divide by $x!$ to account for the constant introduced during the derivatives
  6. \n
", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "1_n_2", "useCustomName": false, "customName": "", "marks": 0, "scripts": {"mark": {"script": "// Reveal answers, score and advice\nthis.display.revealAnswer();\nthis.display.showScore();\nNumbas.controls.getAdvice();", "order": "before"}}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": true, "displayType": "radiogroup", "displayColumns": 0, "showCellAnswerState": true, "choices": ["$Pr(X=x) = \\frac{P_X^{(x)}(0)}{x!}$", "$Pr(X=x) = P_X(x)$", "$Pr(X=x) = P_X^{(x)}(0)$"], "matrix": ["1", 0, 0], "distractors": ["", "", ""]}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Properties of PGF", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Chris Drovandi", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/9840/"}, {"name": "adam bretherton", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/18177/"}], "tags": [], "metadata": {"description": "", "licence": "None specified"}, "statement": "

Which of these are properties of a PGF?

", "advice": "

The four properties of a PGF are:

\n", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "m_n_2", "useCustomName": false, "customName": "", "marks": 0, "scripts": {"mark": {"script": "// Reveal answers, score and advice\nthis.display.revealAnswer();\nthis.display.showScore();\nNumbas.controls.getAdvice();", "order": "before"}}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minMarks": 0, "maxMarks": "0", "shuffleChoices": true, "displayType": "checkbox", "displayColumns": 0, "minAnswers": 0, "maxAnswers": 0, "warningType": "none", "showCellAnswerState": true, "markingMethod": "sum ticked cells", "choices": ["$P(0) = p_0 < 1$", "$P(1) = \\sum_kp_k = 1$", "$P(s)$ exists for $0 \\leq s \\leq 1$", "$P(0) = p_0 = 1$", "$P(0) = p_0 = 0$", "$P(1) = \\sum_kp_k < 1$", "$P(1) = \\sum_kp_k = 0$", "$P(s)$ exists for $0 \\leq s$", "$P(s)$ exists for $s\\leq 1$"], "matrix": ["1", "1", "1", "-1", "-1", "-1", "-1", "-1", "-1"], "distractors": ["", "", "", "", "", "", "", "", ""]}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Random sum of IID RV with PGF", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Chris Drovandi", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/9840/"}, {"name": "adam bretherton", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/18177/"}], "tags": [], "metadata": {"description": "", "licence": "None specified"}, "statement": "

For $X_i \\overset{\\text{iid}}{\\sim} X$

\n

And $N$ as a discrete random variable with PGF given by $P_N(s)$

\n

Let $Y = X_1 + X_2 + \\cdots + X_N$

\n

What is the formula for the PGF of Y: $P_Y(s)$?

", "advice": "

$P_Y(s)=P_N(P_X(s))$

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "1_n_2", "useCustomName": false, "customName": "", "marks": 0, "scripts": {"mark": {"script": "// Reveal answers, score and advice\nthis.display.revealAnswer();\nthis.display.showScore();\nNumbas.controls.getAdvice();", "order": "before"}}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": true, "displayType": "radiogroup", "displayColumns": 0, "showCellAnswerState": true, "choices": ["$P_Y(s)=P_N(P_X(s))$", "$P_Y(s)=P_N(s)P_X(s)$", "$P_Y(s)=P_X(P_N(s))$"], "matrix": ["1", 0, 0], "distractors": ["", "", ""]}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Which of these statements are true of PGFs", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "adam bretherton", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/18177/"}], "tags": [], "metadata": {"description": "", "licence": "None specified"}, "statement": "

Which of these statements are true of PGFs?

", "advice": "

We can define a PGF for a continuous random variable is False as: P(X = x) = 0 for continuous random variables, so a PGF cannot be defined.

\n

Two different probability mass functions can lead to the same PGF if False as: there is a 1-1 correspondence between a PGF and its probability mass function.

\n", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "m_n_x", "useCustomName": false, "customName": "", "marks": 0, "scripts": {"mark": {"script": "// Reveal answers, score and advice\nthis.display.revealAnswer();\nthis.display.showScore();\nNumbas.controls.getAdvice();", "order": "before"}}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Which of these statements are true of PGFs?

", "minMarks": 0, "maxMarks": 0, "minAnswers": 0, "maxAnswers": 0, "shuffleChoices": true, "shuffleAnswers": false, "displayType": "radiogroup", "warningType": "none", "showCellAnswerState": true, "markingMethod": "sum ticked cells", "choices": ["PGFs provide a different way to represent the distribution of a discrete random variable", "We can define a PGF for a continuous random variable", "Two different probability mass functions can lead to the same PGF", "The probability mass function is contained in the coefficients of the PGF power series"], "matrix": [["1", 0], [0, "1"], [0, "1"], ["1", 0]], "layout": {"type": "all", "expression": ""}, "answers": ["True", "False"]}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}]}, {"name": "Group", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questionNames": [], "variable_overrides": [], "questions": []}], "allowPrinting": true, "navigation": {"allowregen": true, "reverse": true, "browse": true, "allowsteps": true, "showfrontpage": true, "showresultspage": "oncompletion", "navigatemode": "sequence", "onleave": {"action": "warnifunattempted", "message": "

Please try all questions

"}, "preventleave": true, "startpassword": ""}, "timing": {"allowPause": true, "timeout": {"action": "none", "message": ""}, "timedwarning": {"action": "none", "message": ""}}, "feedback": {"showactualmark": true, "showtotalmark": true, "showanswerstate": true, "allowrevealanswer": true, "advicethreshold": 0, "intro": "", "end_message": "", "reviewshowscore": true, "reviewshowfeedback": true, "reviewshowexpectedanswer": true, "reviewshowadvice": true, "feedbackmessages": []}, "diagnostic": {"knowledge_graph": {"topics": [], "learning_objectives": []}, "script": "diagnosys", "customScript": ""}, "contributors": [{"name": "Chris Drovandi", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/9840/"}, {"name": "adam bretherton", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/18177/"}], "extensions": [], "custom_part_types": [], "resources": []}