// Numbas version: exam_results_page_options {"name": "Alex's copy of IP3.1", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "name": "Alex's copy of IP3.1", "type": "question", "question_groups": [{"name": "", "pickQuestions": 0, "pickingStrategy": "all-ordered", "questions": []}], "preamble": {"css": "", "js": ""}, "variablesTest": {"condition": "", "maxRuns": 100}, "variables": {"rdexp": {"name": "rdexp", "description": "", "definition": "floor(ecom)", "templateType": "anything", "group": "Ungrouped variables"}, "probexceed": {"name": "probexceed", "description": "", "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"}, "episodes": {"name": "episodes", "description": "", "definition": "'complaints'", "templateType": "anything", "group": "Ungrouped variables"}, "n3": {"name": "n3", "description": "", "definition": "2", "templateType": "anything", "group": "Ungrouped variables"}, "u3": {"name": "u3", "description": "", "definition": "u1", "templateType": "anything", "group": "Ungrouped variables"}, "period": {"name": "period", "description": "", "definition": "'day'", "templateType": "anything", "group": "Ungrouped variables"}, "p1": {"name": "p1", "description": "", "definition": "p0+t1", "templateType": "anything", "group": "Ungrouped variables"}, "n2": {"name": "n2", "description": "", "definition": "1", "templateType": "anything", "group": "Ungrouped variables"}, "u2": {"name": "u2", "description": "", "definition": "u1", "templateType": "anything", "group": "Ungrouped variables"}, "t1": {"name": "t1", "description": "", "definition": "round(s*random(70..100)/100)", "templateType": "anything", "group": "Ungrouped variables"}, "p2": {"name": "p2", "description": "", "definition": "p1+t2", "templateType": "anything", "group": "Ungrouped variables"}, "p7": {"name": "p7", "description": "", "definition": "p8+u1", "templateType": "anything", "group": "Ungrouped variables"}, "p4": {"name": "p4", "description": "", "definition": "t-p8-p7-p6-p5", "templateType": "anything", "group": "Ungrouped variables"}, "thing": {"name": "thing", "description": "", "definition": "'airline'", "templateType": "anything", "group": "Ungrouped variables"}, "idef": {"name": "idef", "description": "", "definition": "'an'", "templateType": "anything", "group": "Ungrouped variables"}, "n8": {"name": "n8", "description": "", "definition": "7", "templateType": "anything", "group": "Ungrouped variables"}, "n7": {"name": "n7", "description": "", "definition": "6", "templateType": "anything", "group": "Ungrouped variables"}, "p3": {"name": "p3", "description": "", "definition": "r-p0-p1-p2", "templateType": "anything", "group": "Ungrouped variables"}, "strexceed": {"name": "strexceed", "description": "", "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"}, "p5": {"name": "p5", "description": "", "definition": "p6+u3", "templateType": "anything", "group": "Ungrouped variables"}, "s": {"name": "s", "description": "", "definition": "round(r/10)", "templateType": "anything", "group": "Ungrouped variables"}, "n4": {"name": "n4", "description": "", "definition": "3", "templateType": "anything", "group": "Ungrouped variables"}, "n9": {"name": "n9", "description": "", "definition": "8", "templateType": "anything", "group": "Ungrouped variables"}, "ecom": {"name": "ecom", "description": "", "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"}, "p0": {"name": "p0", "description": "", "definition": "s", "templateType": "anything", "group": "Ungrouped variables"}, "t": {"name": "t", "description": "", "definition": "100-r", "templateType": "anything", "group": "Ungrouped variables"}, "n1": {"name": "n1", "description": "", "definition": "0", "templateType": "anything", "group": "Ungrouped variables"}, "p8": {"name": "p8", "description": "", "definition": "d", "templateType": "anything", "group": "Ungrouped variables"}, "check": {"name": "check", "description": "", "definition": "p0+p1+p2+p3+p4+p5+p6+p7+p8", "templateType": "anything", "group": "Ungrouped variables"}, "t2": {"name": "t2", "description": "", "definition": "t1", "templateType": "anything", "group": "Ungrouped variables"}, "n6": {"name": "n6", "description": "", "definition": "5", "templateType": "anything", "group": "Ungrouped variables"}, "u1": {"name": "u1", "description": "", "definition": "round(d*random(70..100)/100)", "templateType": "anything", "group": "Ungrouped variables"}, "r": {"name": "r", "description": "", "definition": "random(45..65)", "templateType": "anything", "group": "Ungrouped variables"}, "p6": {"name": "p6", "description": "", "definition": "p7+u2", "templateType": "anything", "group": "Ungrouped variables"}, "n5": {"name": "n5", "description": "", "definition": "4", "templateType": "anything", "group": "Ungrouped variables"}, "activity": {"name": "activity", "description": "", "definition": "'luggage handling'", "templateType": "anything", "group": "Ungrouped variables"}, "d": {"name": "d", "description": "", "definition": "round(t/15)", "templateType": "anything", "group": "Ungrouped variables"}}, "statement": "\n

The probabilities that {idef} {thing} will receive {episodes} per {period} about its {activity} are given by the following table:

\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
Complaints012345678
Probability$\\var{p0/100}$$\\var{p1/100}$$\\var{p2/100}$$\\var{p3/100}$$\\var{p4/100}$$\\var{p5/100}$$\\var{p6/100}$$\\var{p7/100}$$\\var{p8/100}$
\n

Answer the following two parts:

\n ", "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "advice": "

a)

\n

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}}\\]

\n

b)

\n

We want the probability that the number of {episodes} exceeds $\\var{ecom}$

\n

This 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}\\]

", "tags": ["PMF", "Probability", "discrete distribution", "expectation", "expected value", "mass function", "pmf", "probability", "probability mass function", "query", "sc", "statistics", "tested1"], "showQuestionGroupNames": false, "metadata": {"notes": "\n \t\t

7/07/2012:

\n \t\t

Added tags.

\n \t\t

Checked calculation.

\n \t\t

22/07/2012:

\n \t\t

Added description.

\n \t\t

Ticked stats extension box.

\n \t\t

31/07/2012:

\n \t\t

Added tags.

\n \t\t

Question appears to be working correctly.

\n \t\t

20/12/2012:

\n \t\t

Could increase the number of scenarios by using random string variables. Query tag added for that.

\n \t\t

Also very cumbersome use of variables. But no change proposed for now.

\n \t\t

Checked calculation, OK. Added tested1 tag.

\n \t\t

21/12/2012:

\n \t\t

Although 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"}, "parts": [{"type": "gapfill", "prompt": "

Find the expected number of {episodes} per {period}.

\n

Answer to $2$ decimal places

\n

Expected number = [[0]]

", "showCorrectAnswer": true, "marks": 0, "scripts": {}, "gaps": [{"correctAnswerFraction": false, "marks": 2, "maxValue": "{ecom+0.01}", "allowFractions": false, "showPrecisionHint": false, "minValue": "{ecom-0.01}", "scripts": {}, "type": "numberentry", "showCorrectAnswer": true}]}, {"type": "gapfill", "prompt": "

What is the probability that the number of {episodes} will exceed the expected number?

\n

Answer to $2$ decimal places.

\n

Probability = [[0]]

", "showCorrectAnswer": true, "marks": 0, "scripts": {}, "gaps": [{"correctAnswerFraction": false, "marks": 2, "maxValue": "{probexceed/100+0.01}", "allowFractions": false, "showPrecisionHint": false, "minValue": "{probexceed/100-0.01}", "scripts": {}, "type": "numberentry", "showCorrectAnswer": true}]}], "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"], "variable_groups": [], "contributors": [{"name": "Alex Van den Hof", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1273/"}]}]}], "contributors": [{"name": "Alex Van den Hof", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1273/"}]}