// Numbas version: exam_results_page_options {"name": "Simon's copy of Julie's copy of BS2.1", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"ungrouped_variables": ["a", "sc", "thismany", "ans1", "k", "ans3", "u1", "p", "n", "q", "a0", "b0", "t", "v", "n0", "n1", "n3", "data", "ans2", "o1"], "metadata": {"description": "

Simple probability question. Counting number of occurrences of an event in a sample space with given size and finding the probability of the event.

\n

rebelmaths

", "licence": "Creative Commons Attribution 4.0 International"}, "extensions": ["stats"], "functions": {"accumdisp": {"definition": "if(k=0,x[0] +\"\",x[0]+\" + \" +accumdisp(x[1..abs(x)],k-1))", "language": "jme", "type": "string", "parameters": [["x", "list"], ["k", "number"]]}}, "rulesets": {}, "variables": {"data": {"name": "data", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "\n [[0,a[0]-1,n[0]],\n [a[0],a[1]-1,n[1]],\n [a[1],a[2]-1,n[2]],\n [a[2],'plus',n[3]]]\n \n \n "}, "a0": {"name": "a0", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(1000..4000#1000)"}, "p": {"name": "p", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "0"}, "q": {"name": "q", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "2"}, "n": {"name": "n", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "[n0,n1,thismany-n0-n1-n3,n3]"}, "v": {"name": "v", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(0..abs(a)-1 except t)"}, "k": {"name": "k", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(0..abs(sc)-1)"}, "sc": {"name": "sc", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "['A bank made '+{thismany}+' car loans last year. The amounts were as follows (\u20ac):']"}, "thismany": {"name": "thismany", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(300..1000#100)"}, "a": {"name": "a", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "[a0,a0+b0,a0+2*b0]"}, "ans3": {"name": "ans3", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "precround((n[1]+n[2])/thismany,2)"}, "n1": {"name": "n1", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "round(thismany/random(3,6))"}, "n0": {"name": "n0", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "round(thismany/random(15,25))"}, "o1": {"name": "o1", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "a[v]"}, "n3": {"name": "n3", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "round(thismany/random(11,14))"}, "t": {"name": "t", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(0..abs(a)-1)"}, "u1": {"name": "u1", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "a[t]"}, "ans1": {"name": "ans1", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "precround(sum(n[0..t+1])/thismany,2)"}, "ans2": {"name": "ans2", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "precround((thismany-sum(n[0..v+1]))/thismany,2)"}, "b0": {"name": "b0", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(1000..3000#1000)"}}, "name": "Simon's copy of Julie's copy of BS2.1", "statement": "

{sc[k]}

\n

{table(data,['  From','  To', '  Loans Made'])}

\n

\n

In the following questions, give your answers as decimals correct to 2 d.p.

\n

 

", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "advice": "

(a)

\n

The number of loans less than €$\\var{u1}$ is $\\var{accumdisp(n,t)}=\\var{sum(n[0..t+1])}$

\n

Since there are $\\var{thismany}$ loans the probability of choosing one of these loans is  $\\displaystyle \\frac{\\var{sum(n[0..t+1])}}{\\var{thismany}}=\\var{ans1}$ to 2 decimal places.

\n

\n

(b)

\n

The number of loans greater than €$\\var{o1}$ is $\\var{accumdisp(n[v+1..abs(n)],abs(n)-v-2)}=\\var{sum(n[v+1..abs(n)])}$.

\n

Since there are $\\var{thismany}$ loans the probability of choosing one of these loans is  $\\displaystyle \\frac{\\var{sum(n[v+1..abs(n)])}}{\\var{thismany}}=\\var{ans2}$ to 2 decimal places.

\n

\n

(c) There are $\\var{accumdisp(n[p+1..q+1],q-p-1)}=\\var{sum(n[p+1..q+1])}$ loans between  €$\\var{a[p]}$ and €$\\var{a[q]-1}$.

\n

Hence the probability of selecting one of these loans in this range for review is $\\displaystyle \\frac{\\var{sum(n[p+1..q+1])}}{\\var{thismany}}=\\var{ans3}$ to 2 decimal places.

", "tags": [], "preamble": {"js": "", "css": ""}, "parts": [{"gaps": [{"showFeedbackIcon": true, "type": "numberentry", "correctAnswerFraction": false, "maxValue": "ans1", "unitTests": [], "showPrecisionHint": true, "allowFractions": false, "mustBeReduced": false, "marks": 1, "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "precisionType": "dp", "minValue": "ans1", "customMarkingAlgorithm": "", "showCorrectAnswer": true, "precisionMessage": "You have not given your answer to the correct precision.", "precisionPartialCredit": 0, "precision": "2", "scripts": {}, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "strictPrecision": false}, {"showFeedbackIcon": true, "type": "numberentry", "correctAnswerFraction": false, "maxValue": "ans2", "unitTests": [], "showPrecisionHint": true, "allowFractions": false, "mustBeReduced": false, "marks": 1, "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "precisionType": "dp", "minValue": "ans2", "customMarkingAlgorithm": "", "showCorrectAnswer": true, "precisionMessage": "You have not given your answer to the correct precision.", "precisionPartialCredit": 0, "precision": "2", "scripts": {}, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "strictPrecision": false}, {"showFeedbackIcon": true, "type": "numberentry", "correctAnswerFraction": false, "maxValue": "ans3", "unitTests": [], "showPrecisionHint": true, "allowFractions": false, "mustBeReduced": false, "marks": 1, "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "precisionType": "dp", "minValue": "ans3", "customMarkingAlgorithm": "", "showCorrectAnswer": true, "precisionMessage": "You have not given your answer to the correct precision.", "precisionPartialCredit": 0, "precision": "2", "scripts": {}, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "strictPrecision": false}], "showFeedbackIcon": true, "type": "gapfill", "prompt": "

One of these loans is sampled randomly for review by the bank. What is the probability that it is :

\n

(a)

\n

Under €$\\var{u1}$?  

\n

Probability =  [[0]]  

\n

\n

(b)

\n

Over €$\\var{o1-1}$?     

\n

Probability = [[1]]  

\n

\n

(c)

\n

Between €$\\var{a[p]}$ and €$\\var{a[q]-1}$?   

\n

Probability =  [[2]] 

\n

 

\n

 

", "sortAnswers": false, "unitTests": [], "customMarkingAlgorithm": "", "variableReplacements": [], "scripts": {}, "marks": 0, "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true}], "type": "question", "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}]}]}], "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}]}