// Numbas version: exam_results_page_options {"name": "Julie'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": [{"advice": "

a) 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

b) 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

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.

", "functions": {"accumdisp": {"parameters": [["a", "list"], ["k", "number"]], "type": "string", "language": "jme", "definition": "if(k=0,'$\\\\var{a[0]}$','$\\\\var{a[0]}$ + '+accumdisp(a[1..abs(a)],k-1))"}}, "parts": [{"marks": 0, "scripts": {}, "type": "gapfill", "variableReplacements": [], "prompt": "

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

\n

a) Under €$\\var{u1}$?   Probability = ? [[0]]  (answer to 2 decimal places).

\n

b) Over €$\\var{o1-1}$?     Probability = ? [[1]]  (answer to 2 decimal places).

\n

c) Between €$\\var{a[p]}$ and €$\\var{a[q]-1}$?    Probability = ? [[2]] (answer to 2 decimal places).

\n

 

\n

 

", "gaps": [{"notationStyles": ["plain", "en", "si-en"], "type": "numberentry", "mustBeReduced": false, "mustBeReducedPC": 0, "showFeedbackIcon": true, "minValue": "ans1-0.1", "showCorrectAnswer": true, "correctAnswerFraction": false, "marks": 1, "correctAnswerStyle": "plain", "scripts": {}, "variableReplacements": [], "allowFractions": false, "variableReplacementStrategy": "originalfirst", "maxValue": "ans1+0.1"}, {"notationStyles": ["plain", "en", "si-en"], "type": "numberentry", "mustBeReduced": false, "mustBeReducedPC": 0, "showFeedbackIcon": true, "minValue": "ans2-0.1", "showCorrectAnswer": true, "correctAnswerFraction": false, "marks": 1, "correctAnswerStyle": "plain", "scripts": {}, "variableReplacements": [], "allowFractions": false, "variableReplacementStrategy": "originalfirst", "maxValue": "ans2+0.1"}, {"notationStyles": ["plain", "en", "si-en"], "type": "numberentry", "mustBeReduced": false, "mustBeReducedPC": 0, "showFeedbackIcon": true, "minValue": "ans3-0.1", "showCorrectAnswer": true, "correctAnswerFraction": false, "marks": 1, "correctAnswerStyle": "plain", "scripts": {}, "variableReplacements": [], "allowFractions": false, "variableReplacementStrategy": "originalfirst", "maxValue": "ans3+0.1"}], "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "showCorrectAnswer": true}], "name": "Julie's copy of Julie's copy of BS2.1", "variables": {"n": {"name": "n", "description": "", "group": "Ungrouped variables", "templateType": "anything", "definition": "[n0,n1,thismany-n0-n1-n3,n3]"}, "n0": {"name": "n0", "description": "", "group": "Ungrouped variables", "templateType": "anything", "definition": "round(thismany/random(15,25))"}, "u1": {"name": "u1", "description": "", "group": "Ungrouped variables", "templateType": "anything", "definition": "a[t]"}, "thismany": {"name": "thismany", "description": "", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(300..1000#100)"}, "q": {"name": "q", "description": "", "group": "Ungrouped variables", "templateType": "anything", "definition": "2"}, "data": {"name": "data", "description": "", "group": "Ungrouped variables", "templateType": "anything", "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 "}, "sc": {"name": "sc", "description": "", "group": "Ungrouped variables", "templateType": "anything", "definition": "['A bank made '+{thismany}+' car loans last year. The amounts were as follows (\u20ac):']"}, "n3": {"name": "n3", "description": "", "group": "Ungrouped variables", "templateType": "anything", "definition": "round(thismany/random(11,14))"}, "a": {"name": "a", "description": "", "group": "Ungrouped variables", "templateType": "anything", "definition": "[a0,a0+b0,a0+2*b0]"}, "ans2": {"name": "ans2", "description": "", "group": "Ungrouped variables", "templateType": "anything", "definition": "precround((thismany-sum(n[0..v+1]))/thismany,2)"}, "ans3": {"name": "ans3", "description": "", "group": "Ungrouped variables", "templateType": "anything", "definition": "precround((n[1]+n[2])/thismany,2)"}, "n1": {"name": "n1", "description": "", "group": "Ungrouped variables", "templateType": "anything", "definition": "round(thismany/random(3,6))"}, "k": {"name": "k", "description": "", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(0..abs(sc)-1)"}, "b0": {"name": "b0", "description": "", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(1000..3000#1000)"}, "t": {"name": "t", "description": "", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(0..abs(a)-1)"}, "v": {"name": "v", "description": "", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(0..abs(a)-1 except t)"}, "o1": {"name": "o1", "description": "", "group": "Ungrouped variables", "templateType": "anything", "definition": "a[v]"}, "ans1": {"name": "ans1", "description": "", "group": "Ungrouped variables", "templateType": "anything", "definition": "precround(sum(n[0..t+1])/thismany,2)"}, "a0": {"name": "a0", "description": "", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(1000..4000#1000)"}, "p": {"name": "p", "description": "", "group": "Ungrouped variables", "templateType": "anything", "definition": "0"}}, "statement": "\n

{sc[k]}

\n

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

\n

 

\n \n ", "variablesTest": {"maxRuns": 100, "condition": ""}, "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"}, "ungrouped_variables": ["a", "sc", "thismany", "ans1", "k", "ans3", "u1", "p", "n", "q", "a0", "b0", "t", "v", "n0", "n1", "n3", "data", "ans2", "o1"], "preamble": {"css": "", "js": ""}, "variable_groups": [], "tags": [], "extensions": ["stats"], "rulesets": {}, "type": "question", "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}]}]}], "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}]}