// Numbas version: exam_results_page_options {"name": "mathcentre: Probability mass functions", "type": "exam", "duration": 0, "metadata": {"notes": "", "description": "
Use a probability mass function; determine if a given function is a probability mass function; find the probability mass function of a discrete distribution and use it.
", "licence": "Creative Commons Attribution 4.0 International"}, "allQuestions": true, "shuffleQuestions": false, "questions": [], "percentPass": 75, "timing": {"allowPause": true, "timeout": {"action": "none", "message": ""}, "timedwarning": {"action": "none", "message": ""}}, "pickQuestions": 0, "navigation": {"onleave": {"action": "none", "message": ""}, "reverse": true, "allowregen": true, "preventleave": false, "browse": true, "showfrontpage": false, "showresultspage": "never"}, "feedback": {"showtotalmark": true, "advicethreshold": 0, "showanswerstate": true, "showactualmark": true, "allowrevealanswer": true}, "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": [{"name": "IP3.1", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Bill Foster", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/6/"}], "functions": {}, "ungrouped_variables": ["strexceed", "idef", "period", "episodes", "rdexp", "u2", "check", "n9", "u1", "u3", "probexceed", "ecom", "d", "p2", "p3", "p0", "p1", "p6", "p7", "p4", "p5", "p8", "t2", "t1", "n8", "thing", "s", "r", "t", "activity", "n1", "n2", "n3", "n4", "n5", "n6", "n7"], "tags": ["PMF", "Probability", "discrete distribution", "expectation", "expected value", "mass function", "pmf", "probability", "probability mass function", "query", "sc", "statistics", "tested1"], "preamble": {"css": "", "js": ""}, "advice": "The expected number is given by:
\n\\[\\simplify[]{{p0 / 100} * {n1} + {p1 / 100} * {n2} + {p2 / 100} * {n3} + {p3 / 100} * {n4} + {p4 / 100} * {n5} + {p5 / 100} * {n6} + {p6 / 100} * {n7} + {p7 / 100} * {n8} + {p8 / 100} * {n9} = {ecom}}\\]
\nWe want the probability that the number of {episodes} exceeds $\\var{ecom}$
\nThis is the probability that the number exceeds $\\var{rdexp}$ and is
\n\\[\\sum_{i=\\var{rdexp+1}}^{i=8}\\left( \\mbox{Probability complaints}=i\\right)=\\simplify[]{{strexceed} }= \\var{probexceed/100}\\]
", "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "parts": [{"prompt": "Find the expected number of {episodes} per {period}.
\nAnswer to $2$ decimal places
\nExpected number = [[0]]
", "marks": 0, "gaps": [{"allowFractions": false, "marks": 2, "maxValue": "{ecom+0.01}", "minValue": "{ecom-0.01}", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "type": "gapfill"}, {"prompt": "What is the probability that the number of {episodes} will exceed the expected number?
\nAnswer to $2$ decimal places.
\nProbability = [[0]]
", "marks": 0, "gaps": [{"allowFractions": false, "marks": 2, "maxValue": "{probexceed/100+0.01}", "minValue": "{probexceed/100-0.01}", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "type": "gapfill"}], "statement": "\nThe probabilities that {idef} {thing} will receive {episodes} per {period} about its {activity} are given by the following table:
\nComplaints | \n0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
---|---|---|---|---|---|---|---|---|---|
Probability | \n$\\var{p0/100}$ | \n$\\var{p1/100}$ | \n$\\var{p2/100}$ | \n$\\var{p3/100}$ | \n$\\var{p4/100}$ | \n$\\var{p5/100}$ | \n$\\var{p6/100}$ | \n$\\var{p7/100}$ | \n$\\var{p8/100}$ | \n
Answer the following two parts:
\n ", "type": "question", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"strexceed": {"definition": "if(ecom>3,p4/100+'+'+p5/100+'+'+p6/100+'+'+p7/100+'+'+p8/100,if(ecom>4,p5/100+'+'+p6/100+'+'+p7/100+'+'+p8/100,if(ecom>5,p6/100+'+'+p7/100+'+'+p8/100,p3/100+'+'+p4/100+'+'+p5/100+'+'+p6/100+'+'+p7/100+'+'+p8/100)))", "templateType": "anything", "group": "Ungrouped variables", "name": "strexceed", "description": ""}, "idef": {"definition": "'an'", "templateType": "anything", "group": "Ungrouped variables", "name": "idef", "description": ""}, "period": {"definition": "'day'", "templateType": "anything", "group": "Ungrouped variables", "name": "period", "description": ""}, "episodes": {"definition": "'complaints'", "templateType": "anything", "group": "Ungrouped variables", "name": "episodes", "description": ""}, "rdexp": {"definition": "floor(ecom)", "templateType": "anything", "group": "Ungrouped variables", "name": "rdexp", "description": ""}, "probexceed": {"definition": "if(ecom>3,p4+p5+p6+p7+p8,if(ecom>4,p5+p6+p7+p8,if(ecom>5,p6+p7+p8,100-p0-p1-p2)))", "templateType": "anything", "group": "Ungrouped variables", "name": "probexceed", "description": ""}, "check": {"definition": "p0+p1+p2+p3+p4+p5+p6+p7+p8", "templateType": "anything", "group": "Ungrouped variables", "name": "check", "description": ""}, "thing": {"definition": "'airline'", "templateType": "anything", "group": "Ungrouped variables", "name": "thing", "description": ""}, "u1": {"definition": "round(d*random(70..100)/100)", "templateType": "anything", "group": "Ungrouped variables", "name": "u1", "description": ""}, "u3": {"definition": "u1", "templateType": "anything", "group": "Ungrouped variables", "name": "u3", "description": ""}, "u2": {"definition": "u1", "templateType": "anything", "group": "Ungrouped variables", "name": "u2", "description": ""}, "ecom": {"definition": "(n1*p0+n2*p1+n3*p2+n4*p3+n5*p4+n6*p5+n7*p6+n8*p7+n9*p8)/100", "templateType": "anything", "group": "Ungrouped variables", "name": "ecom", "description": ""}, "p7": {"definition": "p8+u1", "templateType": "anything", "group": "Ungrouped variables", "name": "p7", "description": ""}, "p2": {"definition": "p1+t2", "templateType": "anything", "group": "Ungrouped variables", "name": "p2", "description": ""}, "p3": {"definition": "r-p0-p1-p2", "templateType": "anything", "group": "Ungrouped variables", "name": "p3", "description": ""}, "p0": {"definition": "s", "templateType": "anything", "group": "Ungrouped variables", "name": "p0", "description": ""}, "p1": {"definition": "p0+t1", "templateType": "anything", "group": "Ungrouped variables", "name": "p1", "description": ""}, "p6": {"definition": "p7+u2", "templateType": "anything", "group": "Ungrouped variables", "name": "p6", "description": ""}, "d": {"definition": "round(t/15)", "templateType": "anything", "group": "Ungrouped variables", "name": "d", "description": ""}, "p4": {"definition": "t-p8-p7-p6-p5", "templateType": "anything", "group": "Ungrouped variables", "name": "p4", "description": ""}, "p5": {"definition": "p6+u3", "templateType": "anything", "group": "Ungrouped variables", "name": "p5", "description": ""}, "p8": {"definition": "d", "templateType": "anything", "group": "Ungrouped variables", "name": "p8", "description": ""}, "t2": {"definition": "t1", "templateType": "anything", "group": "Ungrouped variables", "name": "t2", "description": ""}, "t1": {"definition": "round(s*random(70..100)/100)", "templateType": "anything", "group": "Ungrouped variables", "name": "t1", "description": ""}, "n8": {"definition": "7", "templateType": "anything", "group": "Ungrouped variables", "name": "n8", "description": ""}, "n9": {"definition": "8", "templateType": "anything", "group": "Ungrouped variables", "name": "n9", "description": ""}, "s": {"definition": "round(r/10)", "templateType": "anything", "group": "Ungrouped variables", "name": "s", "description": ""}, "r": {"definition": "random(45..65)", "templateType": "anything", "group": "Ungrouped variables", "name": "r", "description": ""}, "t": {"definition": "100-r", "templateType": "anything", "group": "Ungrouped variables", "name": "t", "description": ""}, "activity": {"definition": "'luggage handling'", "templateType": "anything", "group": "Ungrouped variables", "name": "activity", "description": ""}, "n1": {"definition": "0", "templateType": "anything", "group": "Ungrouped variables", "name": "n1", "description": ""}, "n2": {"definition": "1", "templateType": "anything", "group": "Ungrouped variables", "name": "n2", "description": ""}, "n3": {"definition": "2", "templateType": "anything", "group": "Ungrouped variables", "name": "n3", "description": ""}, "n4": {"definition": "3", "templateType": "anything", "group": "Ungrouped variables", "name": "n4", "description": ""}, "n5": {"definition": "4", "templateType": "anything", "group": "Ungrouped variables", "name": "n5", "description": ""}, "n6": {"definition": "5", "templateType": "anything", "group": "Ungrouped variables", "name": "n6", "description": ""}, "n7": {"definition": "6", "templateType": "anything", "group": "Ungrouped variables", "name": "n7", "description": ""}}, "metadata": {"notes": "\n \t\t7/07/2012:
\n \t\tAdded tags.
\n \t\tChecked calculation.
\n \t\t22/07/2012:
\n \t\tAdded description.
\n \t\tTicked stats extension box.
\n \t\t31/07/2012:
\n \t\tAdded tags.
\n \t\tQuestion appears to be working correctly.
\n \t\t20/12/2012:
\n \t\tCould increase the number of scenarios by using random string variables. Query tag added for that.
\n \t\tAlso very cumbersome use of variables. But no change proposed for now.
\n \t\tChecked calculation, OK. Added tested1 tag.
\n \t\t21/12/2012:
\n \t\tAlthough asks for solution to 2 dps, there is no rounding as the raw values are to 2 dps. Added sc tag for possible scenarios.
\n \t\t", "description": "Given a probability mass function $P(X=i)$ with outcomes $i \\in \\{0,1,2,\\ldots 8\\}$, find the expectation $E$ and $P(X \\gt E)$.
", "licence": "Creative Commons Attribution 4.0 International"}, "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}, {"name": "IP3.2", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Bill Foster", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/6/"}], "functions": {}, "ungrouped_variables": ["a", "negerror", "c", "b", "error", "flse2", "flse1", "d3", "d4", "u", "t", "correct1", "correct2", "flse", "d2", "correct", "d1"], "tags": ["PMF", "Probability", "discrete distribution", "mass function", "pmf", "probabilities", "probability", "probability mass function", "statistics", "tested1"], "preamble": {"css": "", "js": ""}, "advice": "A probability mass function $f(x)=P(X=x)$ has to satisfy:
\n1. $\\sum_{x \\in S} f(x) = 1$
\n2. $f(x) \\ge 0,\\;\\;\\forall x \\in S$
\nIn this case:
\n{correct} as
\n1. {correct1}
\n2. {correct2}
\nTo verify this we calculate the function as follows:
\n\\[ \\begin{eqnarray*} P(X = \\var{d1}) &=&\\simplify[std]{({a} * {d1} + {b}) / {c} = {(a * d1 + b)} / {c}}\\\\ P(X = \\var{d2}) &=&\\simplify[std]{({a} * {d2} + {b}) / {c} = {a * d2 + b} / {c}}\\\\ P(X = \\var{d3}) &=&\\simplify[std]{({a} * {d3} + {b}) / {c} = {a * d3 + b} / {c}}\\\\ P(X = \\var{d4}) &=&\\simplify[std]{({a} * {d4} + {b}) / {c} = {a * d4 + b} / {c}} \\end{eqnarray*} \\]
and
\\[\\sum_{x \\in S} f(x) =\\simplify[std]{{c-error}/{c}}\\]
as you can easily check.
", "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "parts": [{"prompt": "Does the following define a valid probability mass function?
\n\\[P(X=x) = \\simplify{({a}x+{b})/{c}},\\;\\;\\;x \\in S=\\{\\var{d1},\\;\\var{d2},\\;\\var{d3},\\;\\var{d4}\\}\\]
\n[[0]]
", "marks": 0, "gaps": [{"displayColumns": 2, "matrix": [1, 0], "shuffleChoices": true, "maxMarks": 0, "distractors": ["", ""], "choices": ["{correct}
", "{flse}
"], "displayType": "radiogroup", "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "1_n_2", "minMarks": 0}], "showCorrectAnswer": true, "scripts": {}, "type": "gapfill"}, {"prompt": "Tick all boxes which describe this function:
\n[[0]]
\nNote that if you choose an incorrect option then you will lose 2 marks.
\nThe minimum number of marks you can obtain is 0.
", "marks": 0, "gaps": [{"maxAnswers": 2, "displayColumns": 1, "matrix": [1, 1, -2, -2], "shuffleChoices": true, "maxMarks": 0, "minAnswers": 0, "choices": ["{correct1}
", "{correct2}
", "{flse1}
", "{flse2}
"], "displayType": "checkbox", "showCorrectAnswer": true, "scripts": {}, "distractors": ["", "", "", ""], "marks": 0, "type": "m_n_2", "minMarks": 0}], "showCorrectAnswer": true, "scripts": {}, "type": "gapfill"}], "statement": "\n \n \nDetermine whether the following defines a valid probability mass function.
\n \n \n \nAlso choose the options which describe the function.
\n \n \n \n ", "type": "question", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"a": {"definition": "random(1..4)", "templateType": "anything", "group": "Ungrouped variables", "name": "a", "description": ""}, "negerror": {"definition": "round(-b/a)-random(1,2)", "templateType": "anything", "group": "Ungrouped variables", "name": "negerror", "description": ""}, "c": {"definition": "a*(d1+d2+d3+d4)+4*b + error", "templateType": "anything", "group": "Ungrouped variables", "name": "c", "description": ""}, "b": {"definition": "random(-3..3 except 0)", "templateType": "anything", "group": "Ungrouped variables", "name": "b", "description": ""}, "correct1": {"definition": "if(t=0,'Probabilities sum to $1$', 'Probabilities do not sum to $1$')", "templateType": "anything", "group": "Ungrouped variables", "name": "correct1", "description": ""}, "flse2": {"definition": "if(u=0, 'There is a negative probability', 'All probabilities are non-negative')", "templateType": "anything", "group": "Ungrouped variables", "name": "flse2", "description": ""}, "flse1": {"definition": "if(t=0,'Probabilities do not sum to $1$', 'Probabilities sum to $1$')", "templateType": "anything", "group": "Ungrouped variables", "name": "flse1", "description": ""}, "correct": {"definition": "if(t=0 ,if(u=0, 'Yes, it is a probability mass function', 'No, it is not a probability mass function'), 'No, it is not a probability mass function')", "templateType": "anything", "group": "Ungrouped variables", "name": "correct", "description": ""}, "flse": {"definition": " if(t=0 ,if(u=0,'No, it is not a probability mass function','Yes, it is a probability mass function'), 'Yes, it is a probability mass function')", "templateType": "anything", "group": "Ungrouped variables", "name": "flse", "description": ""}, "u": {"definition": "random(0,1)", "templateType": "anything", "group": "Ungrouped variables", "name": "u", "description": ""}, "t": {"definition": "random(0,1)", "templateType": "anything", "group": "Ungrouped variables", "name": "t", "description": ""}, "error": {"definition": "t*random(1..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "error", "description": ""}, "correct2": {"definition": "if(u=0, 'All probabilities are non-negative', 'There is a negative probability')", "templateType": "anything", "group": "Ungrouped variables", "name": "correct2", "description": ""}, "d4": {"definition": "d3+random(3..5)", "templateType": "anything", "group": "Ungrouped variables", "name": "d4", "description": ""}, "d2": {"definition": "d1+random(1..5)", "templateType": "anything", "group": "Ungrouped variables", "name": "d2", "description": ""}, "d3": {"definition": "d2+random(2..4)", "templateType": "anything", "group": "Ungrouped variables", "name": "d3", "description": ""}, "d1": {"definition": "u*negerror+(1-u)*random(3..5)", "templateType": "anything", "group": "Ungrouped variables", "name": "d1", "description": ""}}, "metadata": {"notes": "\n \t\t7/07/2012:
\n \t\tAdded tags.
\n \t\tChecked answers.
\n \t\t22/07/2012:
\n \t\tAdded description.
\n \t\tTicked stats extension box.
\n \t\tIssue with the multiple response question.The feedback on choosing only one correct answer out of the two says that both marks are awarded. This needs to be modified to the correct number of marks awarded and also in practice mode should give the information that there are other correct responses.
\n \t\tAnother linked issue is that there should be an option for forcing a number of choices for multiple response.
\n \t\t31/07/2012:
\n \t\tAdded tags.
\n \t\t20/12/2012:
\n \t\tThe above issue on multiple response has been resolved. Changed the MR so that lose 2 marks if choose an incorrect response (min mark 0).
\n \t\tCorrected error in setting up negative values for function, but still claiming that it was a PMF.
\n \t\tChecked calculation, OK. Added tested1 tag.
\n \t\t", "description": "\n \t\t \t\tDetermine if the following describes a probability mass function.
\n \t\t \t\t$P(X=x) = \\frac{ax+b}{c},\\;\\;x \\in S=\\{n_1,\\;n_2,\\;n_3,\\;n_4\\}\\subset \\mathbb{R}$.
\n \t\t \n \t\t", "licence": "Creative Commons Attribution 4.0 International"}, "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}, {"name": "IP3.3", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Bill Foster", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/6/"}], "functions": {"scale": {"definition": "map(b*x+c,x,a)", "type": "list", "language": "jme", "parameters": [["a", "list"], ["b", "number"], ["c", "number"]]}}, "ungrouped_variables": ["a", "b", "d", "p", "pmf", "q", "twice", "x8", "expx", "t", "m2", "x2", "x3", "x0", "x1", "x6", "x7", "x4", "x5"], "tags": ["PMF", "Probability", "choose without replacement", "expectation", "expected value", "mass function", "pmf", "probabilities", "probability", "probability mass function", "random choice", "statistics", "tested1", "udf", "without replacement"], "preamble": {"css": "", "js": ""}, "advice": "First we find the sums that can occur by simply adding two different numbers together from the given.
\nNote that these are pairs of different numbers as we choose without replacement.
\nWe get:
\n$X=x$ | \n$\\var{pmf[0]}$ | \n$\\var{pmf[1]}$ | \n$\\var{pmf[2]}$ | \n$\\var{pmf[3]}$ | \n$\\var{pmf[4]}$ | \n$\\var{pmf[5]}$ | \n$\\var{pmf[6]}$ | \n$\\var{pmf[7]}$ | \n$\\var{pmf[8]}$ | \n
We have to find the probabilities that each of these sums occur.
\nThere are $10$ ways of selecting $2$ numbers from the $5$ given, but it may be the case that two different pairs produce the same sum.
\nIn this case we find that there are two ways of producing the sum $\\var{twice}$. All other sums have only one way.
\nSo since each selection of a pair of numbers has probability $0.1$.
\nThe probability of producing the sum $\\var{twice}$ is $0.2$ , and the other sums have probability $0.1$ .
\nThe expectation is given by:
\n\\[ \\begin{eqnarray*} E[X]&=& \\sum xP(X=x)\\\\ &=&\\simplify[]{ {pmf[0]}*{x0}+{pmf[1]}*{x1}+{pmf[2]}*{x2}+{pmf[3]}*{x3}+{pmf[4]}*{x4}+{pmf[5]}*{x5}+{pmf[6]}*{x6}+{pmf[7]}*{x7}+{pmf[8]}*{x8}}\\\\ &=&\\var{expx} \\end{eqnarray*} \\]
", "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "parts": [{"prompt": "\n \n \nInput the possible values of $X$ in the following table.
\n \n \n \nYou have to input these in increasing order.
\n \n \n \nAlso find the probability mass function $P(X=x)$ values and input them into the table.
\n \n \n \nInput all values as exact values.
\n \n \n \n$X=x$ | [[0]] | [[1]] | [[2]] | [[3]] | [[4]] | [[5]] | [[6]] | [[7]] | [[8]] |
---|---|---|---|---|---|---|---|---|---|
$P(X=x)$ | [[9]] | [[10]] | [[11]] | [[12]] | [[13]] | [[14]] | [[15]] | [[16]] | [[17]] |
Find the expectation, $E[X]$ of $X$.
\nInput as an exact decimal.
\n$E[X]=\\;\\;$[[0]]
\n ", "marks": 0, "gaps": [{"allowFractions": false, "marks": 1.2, "maxValue": "{expx}", "minValue": "{expx}", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "type": "gapfill"}], "statement": "\nTwo of the integers $\\var{d[0]},\\;\\var{d[1]}, \\;\\var{d[2]}, \\;\\var{d[3]}, \\;\\var{d[4]} $ are chosen at random, without replacement.
\nLet $X$ denote the sum of the chosen two values.
\nAnswer the following two parts:
\n ", "type": "question", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"a": {"definition": "[[0,1,2,3,7],[0,1,2,4,6],[0,1,3,5,7]]", "templateType": "anything", "group": "Ungrouped variables", "name": "a", "description": ""}, "b": {"definition": "[[1,2,3,4,5,7,8,9,10],[1,2,3,4,5,6,7,8,10],[1,3,4,5,6,7,8,10,12]]", "templateType": "anything", "group": "Ungrouped variables", "name": "b", "description": ""}, "d": {"definition": "scale(a[t],p,q)", "templateType": "anything", "group": "Ungrouped variables", "name": "d", "description": ""}, "twice": {"definition": "switch(t=0,pmf[2],t=1,pmf[5],pmf[6])", "templateType": "anything", "group": "Ungrouped variables", "name": "twice", "description": ""}, "x8": {"definition": "0.1", "templateType": "anything", "group": "Ungrouped variables", "name": "x8", "description": ""}, "q": {"definition": "random(-9..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "q", "description": ""}, "p": {"definition": "random(1,2,3,4)", "templateType": "anything", "group": "Ungrouped variables", "name": "p", "description": ""}, "pmf": {"definition": "scale(b[t],p,2*q)", "templateType": "anything", "group": "Ungrouped variables", "name": "pmf", "description": ""}, "expx": {"definition": "x0*pmf[0]+x1*pmf[1]+x2*pmf[2]+x3*pmf[3]+x4*pmf[4]+x5*pmf[5]+x6*pmf[6]+x7*pmf[7]+x8*pmf[8]", "templateType": "anything", "group": "Ungrouped variables", "name": "expx", "description": ""}, "t": {"definition": "random(0..2)", "templateType": "anything", "group": "Ungrouped variables", "name": "t", "description": ""}, "m2": {"definition": "if(t=0,0.2,0.1)", "templateType": "anything", "group": "Ungrouped variables", "name": "m2", "description": ""}, "x2": {"definition": "if(t=0,0.2,0.1)", "templateType": "anything", "group": "Ungrouped variables", "name": "x2", "description": ""}, "x3": {"definition": "0.1", "templateType": "anything", "group": "Ungrouped variables", "name": "x3", "description": ""}, "x0": {"definition": "0.1", "templateType": "anything", "group": "Ungrouped variables", "name": "x0", "description": ""}, "x1": {"definition": "0.1", "templateType": "anything", "group": "Ungrouped variables", "name": "x1", "description": ""}, "x6": {"definition": "if(t=2,0.2,0.1)", "templateType": "anything", "group": "Ungrouped variables", "name": "x6", "description": ""}, "x7": {"definition": "0.1", "templateType": "anything", "group": "Ungrouped variables", "name": "x7", "description": ""}, "x4": {"definition": "0.1", "templateType": "anything", "group": "Ungrouped variables", "name": "x4", "description": ""}, "x5": {"definition": "if(t=1,0.2,0.1)", "templateType": "anything", "group": "Ungrouped variables", "name": "x5", "description": ""}}, "metadata": {"notes": "\n \t\t7/07/2012:
\n \t\tAdded tags.
\n \t\tChecked calculations.
\n \t\t22/07/2012:
\n \t\tAdded description.
\n \t\tImproved display, in particular replaced $E(X)$ by $E[X]$.
\n \t\tCorrected typo in Advice (\"if\" instead of \"of\").
\n \t\tTicked stats extension box.
\n \t\t31/07/2012:
\n \t\tAdded tags.
\n \t\tQuestion appears to be working correctly.
\n \t\t20/12/2012:
\n \t\tImproved display of integers in statement.
\n \t\tAdded tag udf for user-defined functions.
\n \t\tOne such:
\n \t\tscale(a,b,c)=map(b*x+c,x,a), scaling the list a.
\n \t\tCalculation OK. Added tested1 tag.
\n \t\t", "description": "Two numbers from a set of $5$ numbers are chosen at random, without replacement. Find the distribution $X$ of their sum and $E[X]$.
", "licence": "Creative Commons Attribution 4.0 International"}, "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}]}], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "extensions": ["stats"], "custom_part_types": [], "resources": []}