// Numbas version: exam_results_page_options {"timing": {"timeout": {"action": "none", "message": ""}, "timedwarning": {"action": "warn", "message": ""}, "allowPause": false}, "showstudentname": true, "metadata": {"licence": "None specified", "description": ""}, "question_groups": [{"pickingStrategy": "all-ordered", "name": "Group", "pickQuestions": 1, "questions": [{"name": "cormac's copy of Marlon's copy of Partial Fractions", "extensions": ["stats", "jsxgraph", "geogebra"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "cormac murphy", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/26/"}], "functions": {}, "tags": ["algebra", "algebraic fractions", "algebraic manipulation", "combining algebraic fractions", "common denominator"], "type": "question", "advice": "\n

We use partial fractions to find $A$ and $B$ such that: 
\\[ \\simplify[std]{({a*a2+c*a1}*x+{c*b+a*d})/(({a1}x +{b})*({a2}x+{d}))} \\;\\;\\;=\\simplify[std]{ A/({a1}x+{b})+B/({a2}x+{d})}\\]

\n

Multiplying both sides of the equation by $\\displaystyle \\simplify[std]{1/( ({a1}x+{b})({a2}x+{d}) )}\\;\\;$ we obtain:

\n

$\\simplify[std]{A*({a2}x+{d})+B*({a1}x+{b}) = {a*a2+c*a1}*x+{a*d+c*b}} \\Rightarrow \\simplify[std]{({a2}A+{a1}B)*x+{d}*A+{b}*B={a*a2+c*a1}*x+{a*d+c*b}}$

\n

Identifying coefficients:

\n

Constant term: $\\simplify[std]{ {d}*A+{b}*B={a*d+c*b} }$

\n

Coefficent $x$: $ \\simplify[std]{ {a2}A+{a1}B = {a*a2+c*a1} }$ 

\n

On solving these equations we obtain $A = \\var{a}$ and $B=\\var{c}$

\n

Which gives:\\[ \\simplify[std]{({a*a2+c*a1}*x+{c*b+a*d})/(({a1}x +{b})*({a2}x+{d}))}\\;\\;= \\simplify[std]{{a}/({a1}x+{b})+{c}/({a2}x+{d})}\\]

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

Split \\[\\simplify{({a*a2 +  c*a1} * x + {a * d +  c * b})/ (({a1}*x + {b}) * ({a2}*x + {d}))}\\] into partial fractions.

\n

Input the partial fractions here: [[0]].

\n

 

\n

 

\n ", "marks": 0, "gaps": [{"notallowed": {"message": "

Input as the sum of partial fractions.

", "showStrings": false, "strings": [")(", ")*("], "partialCredit": 0}, "vsetrangepoints": 5, "expectedvariablenames": [], "checkingaccuracy": 1e-05, "vsetrange": [10, 11], "showpreview": true, "marks": 2, "showCorrectAnswer": true, "answersimplification": "std", "scripts": {}, "answer": "{a} / ({a1}*x + {b}) + ({c} / ({a2}*x + {d}))", "checkingtype": "absdiff", "checkvariablenames": false, "type": "jme"}], "showCorrectAnswer": true, "scripts": {}, "type": "gapfill"}], "statement": "\n

 

\n

 

\n ", "variable_groups": [], "progress": "ready", "preamble": {"css": "", "js": ""}, "variables": {"a": {"definition": "random(1..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "a", "description": ""}, "c": {"definition": "random(-9..9 except 0)", "templateType": "anything", "group": "Ungrouped variables", "name": "c", "description": ""}, "b": {"definition": "random(-9..9 except 0)", "templateType": "anything", "group": "Ungrouped variables", "name": "b", "description": ""}, "d": {"definition": "random(-9..9 except [0,round(b*a2/a1)])", "templateType": "anything", "group": "Ungrouped variables", "name": "d", "description": ""}, "nb": {"definition": "if(c<0,'taking away','adding')", "templateType": "anything", "group": "Ungrouped variables", "name": "nb", "description": ""}, "a1": {"definition": "random(1..8)", "templateType": "anything", "group": "Ungrouped variables", "name": "a1", "description": ""}, "a2": {"definition": "random(1..8)", "templateType": "anything", "group": "Ungrouped variables", "name": "a2", "description": ""}, "s1": {"definition": "if(c<0,-1,1)", "templateType": "anything", "group": "Ungrouped variables", "name": "s1", "description": ""}}, "metadata": {"notes": "\n \t\t \t\t

5/08/2012:

\n \t\t \t\t

Added tags.

\n \t\t \t\t

Added description.

\n \t\t \t\t

Changed to two questions, for the numerator and denomimator, rather than one as difficult to trap student input for this example. Still some ambiguity however.

\n \t\t \t\t

12/08/2012:

\n \t\t \t\t

Back to one input of a fraction and trapped input in Forbidden Strings.

\n \t\t \t\t

Used the except feature of ranges to get non-degenerate examples.

\n \t\t \t\t

Checked calculation.OK.

\n \t\t \t\t

Improved display in content areas.

\n \t\t \n \t\t", "description": "

Split $\\displaystyle \\frac{ax+b}{(cx + d)(px+q)}$ into partial fractions.

"}, "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}, {"name": "cormac's copy of BS2.1", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "cormac murphy", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/26/"}], "tags": ["Probability", "probability", "statistics", "udf"], "progress": "testing", "metadata": {"notes": "\n\t\t \t\t

28/12/2012:

\n\t\t \t\t

Using the inbuilt table function for now. This needs to be changed - either to direct input of an html table or improving the table function e.g. adding borders etc.

\n\t\t \t\t

The udf accumdisp(a,t) outputs a string of the form a[0]+a[1]+..a[t-1]  - useful to show in the solution the elements of the list we are summing over.

\n\t\t \t\t

There is a scenario variable sk, which is intended to be the beginning of a list of possible randomised scenarios. Probably best if this included other text based string variables (e.g. car loans could be the value of such a variable).

\n\t\t \t\t

Easy to make this have a variable number of ranges of loans. Only need to pay some attention to the creation of the list n giving the number of loans in each range - need to make that sensible.

\n\t\t \n\t\t", "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.

"}, "statement": "\n\t

{sc[k]}

\n\t

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

\n\t

 

\n\t \n\t \n\t", "advice": "\n\t

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

\n\t

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\t

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\t

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\t

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\t

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.

\n\t \n\t \n\t", "rulesets": {}, "variables": {"k": {"name": "k", "definition": "random(0..abs(sc)-1)"}, "sc": {"name": "sc", "definition": "['A bank made '+{thismany}+' car loans last year. The amounts were as follows (?):']"}, "thismany": {"name": "thismany", "definition": "random(300..1000#100)"}, "data": {"name": "data", "definition": "\n\t\t [[0,a[0]-1,n[0]],\n\t\t [a[0],a[1]-1,n[1]],\n\t\t [a[1],a[2]-1,n[2]],\n\t\t [a[2],'plus',n[3]]]\n\t\t \n\t\t \n\t\t \n\t\t"}, "a": {"name": "a", "definition": "[a0,a0+b0,a0+2*b0]"}, "a0": {"name": "a0", "definition": "random(1000..4000#1000)"}, "b0": {"name": "b0", "definition": "random(1000..3000#1000)"}, "n": {"name": "n", "definition": "[n0,n1,thismany-n0-n1-n3,n3]"}, "n0": {"name": "n0", "definition": "round(thismany/random(15,25))"}, "n1": {"name": "n1", "definition": "round(thismany/random(3,6))"}, "n3": {"name": "n3", "definition": "round(thismany/random(11,14))"}, "u1": {"name": "u1", "definition": "a[t]"}, "ans1": {"name": "ans1", "definition": "precround(sum(n[0..t+1])/thismany,2)"}, "o1": {"name": "o1", "definition": "a[v]"}, "ans2": {"name": "ans2", "definition": "precround((thismany-sum(n[0..v+1]))/thismany,2)"}, "ans3": {"name": "ans3", "definition": "precround((n[1]+n[2])/thismany,2)"}, "t": {"name": "t", "definition": "random(0..abs(a)-1)"}, "v": {"name": "v", "definition": "random(0..abs(a)-1 except t)"}, "p": {"name": "p", "definition": 0.0}, "q": {"name": "q", "definition": 2.0}}, "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": [{"type": "gapfill", "marks": 0.0, "prompt": "\n\t\t\t

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

\n\t\t\t

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

\n\t\t\t

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

\n\t\t\t

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

\n\t\t\t

 

\n\t\t\t

 

\n\t\t\t \n\t\t\t \n\t\t\t", "gaps": [{"type": "numberentry", "marks": 1.0, "minvalue": "ans1", "maxvalue": "ans1", "showPrecisionHint": false}, {"type": "numberentry", "marks": 1.0, "minvalue": "ans2", "maxvalue": "ans2", "showPrecisionHint": false}, {"type": "numberentry", "marks": 1.0, "minvalue": "ans3", "maxvalue": "ans3", "showPrecisionHint": false}]}], "type": "question", "variable_groups": [], "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}]}], "duration": 1200, "navigation": {"preventleave": true, "reverse": true, "allowregen": true, "browse": true, "showfrontpage": true, "showresultspage": "oncompletion", "onleave": {"action": "none", "message": ""}}, "name": "week 5", "feedback": {"allowrevealanswer": true, "advicethreshold": 0, "intro": "

dfg

", "feedbackmessages": [], "showtotalmark": true, "showanswerstate": true, "showactualmark": true}, "percentPass": 0, "showQuestionGroupNames": false, "type": "exam", "contributors": [{"name": "cormac murphy", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/26/"}], "extensions": ["oldgeogebra", "jsxgraph", "stats"], "custom_part_types": [], "resources": []}