// Numbas version: exam_results_page_options {"variable_groups": [], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Expand brackets and solve an equation", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variable_groups": [], "variables": {"s1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,-1)", "description": "", "name": "s1"}, "td": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..20)", "description": "", "name": "td"}, "b": {"templateType": "anything", "group": "Ungrouped variables", "definition": "s2*random(1..12)", "description": "", "name": "b"}, "c": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(a*g=tc*f,tc+1,tc)", "description": "", "name": "c"}, "f": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..5)", "description": "", "name": "f"}, "s3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,-1)", "description": "", "name": "s3"}, "d": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(b=td,td+1,td)", "description": "", "name": "d"}, "g": {"templateType": "anything", "group": "Ungrouped variables", "definition": "switch(f=1,random(2..5),f=2, random(3..5),f=3, random(2,4,5),f=4,random(3,5),random(2,3,4))", "description": "", "name": "g"}, "tc": {"templateType": "anything", "group": "Ungrouped variables", "definition": "s3*random(2..20)", "description": "", "name": "tc"}, "a": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-12..12)", "description": "", "name": "a"}, "s2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,-1)", "description": "", "name": "s2"}}, "ungrouped_variables": ["a", "c", "b", "d", "g", "f", "s3", "s2", "s1", "td", "tc"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "functions": {}, "showQuestionGroupNames": false, "parts": [{"stepsPenalty": 0, "scripts": {}, "gaps": [{"answer": "{f*d-b*g}/{g*a-f*c}", "vsetrange": [0, 1], "checkingaccuracy": 0.001, "showCorrectAnswer": true, "expectedvariablenames": [], "notallowed": {"message": "

Input your answer as a fraction or an integer. Do not input the answer as a decimal. 

", "showStrings": false, "partialCredit": 0, "strings": ["."]}, "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "checkvariablenames": false, "type": "jme", "answersimplification": "all", "marks": 3, "vsetrangepoints": 5}], "type": "gapfill", "prompt": "\n\t\t\t

\\[\\simplify[std]{{a} * x + {b} = {f}/{g}({c} * x + {d})}\\]

\n\t\t\t

$x =$ [[0]]

\n\t\t\t

Click on \"Show steps\" to see a video of a solution of a similar problem.

\n\t\t\t", "steps": [{"type": "information", "prompt": "\n\t\t\t\t\t

A video example worked through. The method in the video is slightly different from the method in the solution.

\n\t\t\t\t\t

 

\n\t\t\t\t\t

\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t", "showCorrectAnswer": true, "scripts": {}, "marks": 0}], "showCorrectAnswer": true, "marks": 0}], "statement": "\n\t

Solve the following linear equation for $x$.

\n\t

Input your answer as a fraction or an integer. Do NOT input the answer as a decimal.

\n\t

 

\n\t", "tags": ["ACC1012", "checked2015", "equations", "linear equation", "solving a linear equation in one variable", "solving equations", "Solving equations", "solving linear equations", "video"], "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers"]}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "\n\t\t \t\t \t\t \t\t \t\t \t\t \t\t

5/08/2012:

\n\t\t \t\t \t\t \t\t \t\t \t\t \t\t

Added more tags.

\n\t\t \t\t \t\t \t\t \t\t \t\t \t\t

Added description.

\n\t\t \t\t \t\t \t\t \t\t \t\t \t\t

Checked calculation. OK.

\n\t\t \t\t \t\t \t\t \t\t \t\t \n\t\t \t\t \t\t \t\t \t\t \n\t\t \t\t \t\t \t\t \n\t\t \t\t \t\t \n\t\t \t\t \n\t\t \n\t\t", "licence": "Creative Commons Attribution 4.0 International", "description": "

Solve $\\displaystyle ax + b =\\frac{f}{g}( cx + d)$ for $x$.

\n

A video is included in Show steps which goes through a similar example.

"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "

Given the equation \\[\\simplify[std]{{a} * x + {b} = {f}/{g}({c} * x + {d})}\\] we first multiply both sides by $\\var{g}$ to get

\n

\\[\\simplify[std]{{g}*({a} * x + {b} )= {f}*({c} * x + {d})}.\\]

\n

Then expand both sides of this equation to get:

\n

\\[\\simplify[std]{{g*a} x + {g*b} = {f*c}x + {f*d}}.\\]

\n

and then collect together all the constant terms on the right hand-side, and collect together all the terms in $x$ on the left-hand side of the equation.

\n

The equation can then be written as:
\\[\\simplify[std]{({g*a}-{f*c})x=({f*d}+{-g*b})}\\] i.e.
\\[\\simplify{{g*a-f*c}x={f*d-b*g}}\\]
which gives \\[x =\\simplify[std]{{(f*d-b*g)}/{(g*a-f*c)}}\\] as the solution.

\n

Check the answer

\n

You can check that this is the correct solution by inputting this solution back into the equation to see if it satisfies the equation. 

\n

 

"}, {"name": "Expand product of brackets", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variable_groups": [], "variables": {"b": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-9..9 except [0,a])", "description": "", "name": "b"}, "d": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-9..9 except [0,c])", "description": "", "name": "d"}, "a": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-5..5 except 0)", "description": "", "name": "a"}, "c": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-5..5 except 0)", "description": "", "name": "c"}}, "ungrouped_variables": ["a", "c", "b", "d"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "functions": {}, "showQuestionGroupNames": false, "parts": [{"showCorrectAnswer": true, "marks": 0, "scripts": {}, "gaps": [{"answer": "{a*c}x^2+{b*c+a*d}x+{b*d}", "musthave": {"message": "

Input your answer as a quadratic in $x$, in the form $ax^2+bx+c$ for appropriate integers $a,\\;b,\\;c$.

", "showStrings": false, "partialCredit": 0, "strings": ["x^2"]}, "vsetrange": [0, 1], "checkingaccuracy": 0.001, "answersimplification": "std", "expectedvariablenames": [], "notallowed": {"message": "

Do not include brackets in your answer. Input your answer as a quadratic in $x$, in the form $ax^2+bx+c$ for appropriate integers $a,\\;b,\\;c$.

", "showStrings": false, "partialCredit": 0, "strings": ["("]}, "showpreview": true, "maxlength": {"length": "0", "message": "

Input your answer as a quadratic in $x$, in the form $ax^2+bx+c$ for appropriate integers $a,\\;b,\\;c$.

", "partialCredit": 0}, "checkingtype": "absdiff", "scripts": {}, "checkvariablenames": false, "type": "jme", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "variableReplacements": [], "marks": 2, "vsetrangepoints": 5}], "type": "gapfill", "prompt": "

$\\simplify[std]{({a}x+{b})({c}x+{d})}=\\;$[[0]].

\n

Your answer should be a quadratic in $x$ and should not include any brackets.

\n

You can click on \"Show steps\" for more information, but you will lose one mark if you do so.

", "steps": [{"prompt": "

There are many ways to expand an expression such as $(ax+b)(cx+d)$.

\n

One way:

\n

\\[\\begin{eqnarray*} (ax+b)(cx+d)&=&ax(cx+d)+b(cx+d)\\\\&=&acx^2+adx+bcx+bd\\\\&=&acx^2+(ad+bc)x+bd\\end{eqnarray*}\\]

", "scripts": {}, "type": "information", "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0}, {"prompt": "

", "scripts": {}, "type": "information", "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0}], "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "stepsPenalty": 1}], "statement": "

Expand the following to give a quadratic in $x$.

", "tags": ["ACC1012", "acc1012", "algebra", "algebraic manipulation", "checked2015", "expansion of brackets", "expansion of the product of two linear terms"], "rulesets": {"std": ["all", "!noLeadingMinus", "!collectNumbers"]}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "\n\t\t \t\t \t\t \t\t \t\t

15/08/2012:

\n\t\t \t\t \t\t \t\t \t\t

Added tags.

\n\t\t \t\t \t\t \t\t \t\t

Added description.

\n\t\t \t\t \t\t \t\t \n\t\t \t\t \t\t \n\t\t \t\t \n\t\t \n\t\t", "licence": "Creative Commons Attribution 4.0 International", "description": "

Expand $(ax+b)(cx+d)$.

"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "\n\t

Using the method given by Show steps we have:

\n\t

\\[\\begin{eqnarray*}\\simplify[std]{ ({a}x+{b})({c}x+{d})}&=&\\simplify[std]{{a}x*({c}x+{d})+{b}({c}x+{d})}\\\\&=&\\simplify[std]{{a*c}x^2+{a*d}x+{b*c}x+{b*d}}\\\\&=&\\simplify[std]{{a*c}x^2+{(a*d+b*c)}x+{b*d}}\\end{eqnarray*}\\]

\n\t

 

\n\t \n\t \n\t \n\t \n\t"}, {"name": "Factorise quadratic expressions", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variable_groups": [], "variables": {"x5": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-9..9 except [0,x2,x3,x4])", "description": "", "name": "x5"}, "x2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-9..9 except [0,x0,x1])", "description": "", "name": "x2"}, "x1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-9..9 except [0,x0])", "description": "", "name": "x1"}, "x7": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-9..9 except 0)", "description": "", "name": "x7"}, "x0": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-9..9 except 0)", "description": "", "name": "x0"}, "x6": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-9..9 except [0,x2,x3,x4,x5])", "description": "", "name": "x6"}, "x3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-9..9 except [0,x2])", "description": "", "name": "x3"}, "x4": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-9..9 except [0,x2,x3])", "description": "", "name": "x4"}}, "ungrouped_variables": ["x2", "x3", "x0", "x1", "x6", "x7", "x4", "x5"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "functions": {}, "showQuestionGroupNames": false, "parts": [{"answer": "(x - {x0})(x-{x1})", "vsetrange": [0, 1], "checkingaccuracy": 0.001, "checkvariablenames": false, "steps": [{"type": "information", "prompt": "

", "showCorrectAnswer": true, "marks": 0, "scripts": {}}], "expectedvariablenames": [], "prompt": "

$\\simplify{x^2 - {x0 + x1}x + {x0*x1}}$

", "showpreview": true, "checkingtype": "absdiff", "stepsPenalty": 0, "scripts": {}, "type": "jme", "showCorrectAnswer": true, "marks": 2, "vsetrangepoints": 5}, {"answer": "(x-{x2})(x-{x3})", "vsetrange": [0, 1], "checkingaccuracy": 0.001, "checkvariablenames": false, "expectedvariablenames": [], "prompt": "

$\\simplify{x^2 - {x2 + x3}x + {x2*x3}}$

", "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "type": "jme", "showCorrectAnswer": true, "marks": 2, "vsetrangepoints": 5}, {"answer": "(x-{x4})(x-{x5})", "vsetrange": [0, 1], "checkingaccuracy": 0.001, "checkvariablenames": false, "expectedvariablenames": [], "prompt": "

$\\simplify{x^2 - {x4 + x5}x + {x4*x5}}$

", "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "type": "jme", "showCorrectAnswer": true, "marks": 2, "vsetrangepoints": 5}, {"answer": "(x-{x6})(x-{x7})", "vsetrange": [0, 1], "checkingaccuracy": 0.001, "checkvariablenames": false, "expectedvariablenames": [], "prompt": "

$\\simplify{x^2 - {x6 + x7}x + {x6*x7}}$

", "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "type": "jme", "showCorrectAnswer": true, "marks": 2, "vsetrangepoints": 5}], "statement": "

Factorise the following quadratic equations.

", "tags": ["ACC1012", "checked2015"], "rulesets": {}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "", "licence": "Creative Commons Attribution 4.0 International", "description": ""}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": ""}, {"name": "Find the equation of a line with given gradient through a given point", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variable_groups": [], "variables": {"s1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-1,1)", "description": "", "name": "s1"}, "b": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(b1=d,b1+random(1..3),b1)", "description": "", "name": "b"}, "c": {"templateType": "anything", "group": "Ungrouped variables", "definition": "a+Random(1..4)*s1", "description": "", "name": "c"}, "f": {"templateType": "anything", "group": "Ungrouped variables", "definition": "(b-d)/(a-c)", "description": "", "name": "f"}, "b1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-9..9)", "description": "", "name": "b1"}, "d": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-9..9)", "description": "", "name": "d"}, "g": {"templateType": "anything", "group": "Ungrouped variables", "definition": "(b*c-a*d)/(c-a)", "description": "", "name": "g"}, "a": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,-1)*random(1..4)", "description": "", "name": "a"}}, "ungrouped_variables": ["a", "c", "b", "d", "g", "f", "s1", "b1"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "functions": {}, "showQuestionGroupNames": false, "parts": [{"stepsPenalty": 1, "scripts": {}, "gaps": [{"answer": "({b-d}/{a-c})x+{b*c-a*d}/{c-a}", "vsetrange": [0, 1], "checkingaccuracy": 0.001, "showCorrectAnswer": true, "expectedvariablenames": [], "notallowed": {"message": "

Input all numbers as fractions or integers as appropriate and not as decimals.

", "showStrings": false, "partialCredit": 0, "strings": ["."]}, "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "checkvariablenames": false, "type": "jme", "answersimplification": "std", "marks": 4, "vsetrangepoints": 5}], "type": "gapfill", "prompt": "

$y=\\;\\phantom{{}}$[[0]]

", "steps": [{"type": "information", "prompt": "\n\t\t\t\t\t

The equation of the line is of the form $y=mx+c$.

\n\t\t\t\t\t

You are given the slope or gradient $m$ and you can calculate the constant term $c$ by noting that $y=\\var{b}$ when $x=\\var{a}$.

\n\t\t\t\t\t

The following video goes through a similar example.

\n\t\t\t\t\t

\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t", "showCorrectAnswer": true, "scripts": {}, "marks": 0}], "showCorrectAnswer": true, "marks": 0}], "statement": "\n\t

Find the equation of the straight line which:

\n\t \n\t

 

\n\t \n\t

 

\n\t

Input your answer in the form $mx+c$ for suitable values of $m$ and $c$.

\n\t

Input $m$ and $c$ as fractions or integers as appropriate and not as decimals.

\n\t

Click on \"Show steps\" if you need help, you will lose 1 mark if you do so.

\n\t

Note that there is also a video in Show steps which goes through a similar example.

\n\t \n\t", "tags": ["ACC1012", "checked2015", "diagram", "equation of a straight line", "gradient of a line", "Steps", "steps", "video"], "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "\n\t\t \t\t \t\t \t\t \t\t \t\t

5/08/2012:

\n\t\t \t\t \t\t \t\t \t\t \t\t

Added tags.

\n\t\t \t\t \t\t \t\t \t\t \t\t

Added description.

\n\t\t \t\t \t\t \t\t \t\t \t\t

Checked calculation.OK.

\n\t\t \t\t \t\t \t\t \t\t \t\t

Improved display in content areas. Corrected some minor typos.

\n\t\t \t\t \t\t \t\t \t\t \n\t\t \t\t \t\t \t\t \n\t\t \t\t \t\t \n\t\t \t\t \n\t\t \n\t\t", "licence": "Creative Commons Attribution 4.0 International", "description": "\n\t\t \t\t \t\t \t\t \t\t

Find the equation of a straight line which has a given slope or gradient $m$ and passes through the given point $(a,b)$.

\n\t\t \t\t \t\t \t\t \t\t

There is a video in Show steps which goes through a similar example.

\n\t\t \t\t \t\t \t\t \n\t\t \t\t \t\t \n\t\t \t\t \n\t\t \n\t\t"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "\n\t

The equation of the line is of the form $y=mx+c$.

\n\t

You are given the slope or gradient $\\displaystyle m= \\simplify{{b-d}/{a-c}}$ and we can calculate the constant term $c$ by noting that $y=\\var{b}$ when $x=\\var{a}$.

\n\t

Using this we get:
\\[ \\begin{eqnarray} \\var{b}&=&\\simplify[std]{({b-d}/{a-c}){a}+c} \\Rightarrow\\\\ c&=&\\simplify[std]{{b}-({b-d}/{a-c}){a}={(b*c-a*d)}/{(c-a)}} \\end{eqnarray} \\]

\n\t

Hence the equation of the line is
\\[y = \\simplify[std]{({b-d}/{a-c})x+{b*c-a*d}/{c-a}}\\]

\n\t \n\t \n\t \n\t \n\t"}, {"name": "Jack's copy of Expanding 2", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variable_groups": [], "variables": {"q": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(2..8)", "description": "", "name": "q"}, "x": {"templateType": "anything", "group": "Ungrouped variables", "definition": "a*b", "description": "", "name": "x"}, "b": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(2..6)", "description": "", "name": "b"}, "c": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-9..-4)", "description": "", "name": "c"}, "f": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(8..14)", "description": "", "name": "f"}, "a": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(3..7)", "description": "", "name": "a"}, "r": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(2..6)", "description": "", "name": "r"}, "n": {"templateType": "anything", "group": "Ungrouped variables", "definition": "p*q", "description": "", "name": "n"}, "d": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-7..-3)", "description": "", "name": "d"}, "p": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-8..8)", "description": "", "name": "p"}, "y": {"templateType": "anything", "group": "Ungrouped variables", "definition": "c*d", "description": "", "name": "y"}, "m": {"templateType": "anything", "group": "Ungrouped variables", "definition": "p*r", "description": "", "name": "m"}}, "ungrouped_variables": ["a", "c", "b", "d", "f", "m", "n", "q", "p", "r", "y", "x"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "functions": {}, "showQuestionGroupNames": false, "parts": [{"answer": "z^2-{f}*z", "vsetrange": [0, 1], "checkingaccuracy": 0, "checkvariablenames": false, "expectedvariablenames": [], "prompt": "

$z\\times(z-\\var{f})$

", "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "type": "jme", "showCorrectAnswer": true, "marks": 1, "vsetrangepoints": 5}, {"answer": "{m}*z-{n}", "vsetrange": [0, 1], "checkingaccuracy": 0.001, "checkvariablenames": false, "expectedvariablenames": [], "prompt": "

$\\var{p}\\times(\\var{r}z -\\var{q})$

", "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "type": "jme", "showCorrectAnswer": true, "marks": 1, "vsetrangepoints": 5}], "statement": "

Multiply out the brackets in the following expressions.

", "tags": ["checked2015", "junk"], "rulesets": {}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "", "licence": "Creative Commons Attribution 4.0 International", "description": ""}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": ""}, {"name": "Rearrange linear equations to find value of an unknown", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variable_groups": [], "variables": {"q": {"group": "Ungrouped variables", "templateType": "anything", "definition": "precround((b-d)/(a-c),3)", "name": "q", "description": ""}, "d": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(2..5)", "name": "d", "description": ""}, "c": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(2..4 except a)", "name": "c", "description": ""}, "f": {"group": "Ungrouped variables", "templateType": "anything", "definition": "(b+c)/a", "name": "f", "description": ""}, "t": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(2..12 except n)", "name": "t", "description": ""}, "a": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(5..8)", "name": "a", "description": ""}, "k": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(4..10)", "name": "k", "description": ""}, "z": {"group": "Ungrouped variables", "templateType": "anything", "definition": "precround((m-s)/(t-n),3)", "name": "z", "description": ""}, "n": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(2..12)", "name": "n", "description": ""}, "s": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(2..12)", "name": "s", "description": ""}, "b": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(10..18)", "name": "b", "description": ""}, "g": {"group": "Ungrouped variables", "templateType": "anything", "definition": "b/(a-c)", "name": "g", "description": ""}, "p": {"group": "Ungrouped variables", "templateType": "anything", "definition": "b/a", "name": "p", "description": ""}, "j": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(3..9)", "name": "j", "description": ""}, "m": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(2..12)", "name": "m", "description": ""}}, "ungrouped_variables": ["a", "c", "b", "d", "g", "f", "k", "j", "m", "n", "q", "p", "s", "t", "z"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "showQuestionGroupNames": false, "functions": {}, "parts": [{"stepsPenalty": 0, "scripts": {}, "gaps": [{"answer": "{b-d}/{a-c}", "vsetrange": [0, 1], "scripts": {}, "checkvariablenames": false, "expectedvariablenames": [], "notallowed": {"message": "

Enter your answer as a fraction or an integer and not a decimal.

", "showStrings": false, "partialCredit": 0, "strings": ["."]}, "showpreview": true, "checkingtype": "absdiff", "checkingaccuracy": 0.001, "answersimplification": "std", "type": "jme", "showCorrectAnswer": true, "marks": 1, "vsetrangepoints": 5}], "type": "gapfill", "showCorrectAnswer": true, "steps": [{"type": "information", "prompt": "

", "showCorrectAnswer": true, "marks": 0, "scripts": {}}], "prompt": "

$\\var{a}y + \\var{d} = \\var{b} +\\var{c}y$

\n

$y=\\;$[[0]]

\n

", "marks": 0}, {"scripts": {}, "gaps": [{"answer": "{m-s}/{t-n}", "vsetrange": [0, 1], "scripts": {}, "checkvariablenames": false, "expectedvariablenames": [], "notallowed": {"message": "

Enter your answer as a fraction or an integer, not as a decimal.

", "showStrings": false, "partialCredit": 0, "strings": ["."]}, "showpreview": true, "checkingtype": "absdiff", "checkingaccuracy": 0.001, "answersimplification": "std", "type": "jme", "showCorrectAnswer": true, "marks": 1, "vsetrangepoints": 5}], "type": "gapfill", "showCorrectAnswer": true, "prompt": "

$\\displaystyle \\frac{\\var{m}}{y}+\\var{n}=\\frac{\\var{s}}{y}+\\var{t}$

\n

$y=\\;$[[0]]

", "marks": 0}], "variablesTest": {"condition": "", "maxRuns": 100}, "statement": "

Solve the following equations for $y$. Enter your answers as fractions or integers and not decimals.

", "tags": ["ACC1012", "checked2015"], "rulesets": {"std": ["all"]}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "", "licence": "Creative Commons Attribution 4.0 International", "description": "

Finding the value of a variable

"}, "advice": ""}, {"name": "Solve a pair of simultaneous equations", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variable_groups": [], "variables": {"s1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(1,-1)", "name": "s1", "description": ""}, "aort": {"group": "Ungrouped variables", "templateType": "anything", "definition": "if(b*b1>0,'take away the equation','add the equation')", "name": "aort", "description": ""}, "b": {"group": "Ungrouped variables", "templateType": "anything", "definition": "sb*random(1..9)", "name": "b", "description": ""}, "c": {"group": "Ungrouped variables", "templateType": "anything", "definition": "sc*random(1..9)", "name": "c", "description": ""}, "sc": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(1,-1)", "name": "sc", "description": ""}, "sc1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(1,-1)", "name": "sc1", "description": ""}, "b1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "if(a*b2=a1*b,b2+1,b2)", "name": "b1", "description": ""}, "fromorto": {"group": "Ungrouped variables", "templateType": "anything", "definition": "if(b*b1>0,'from','to')", "name": "fromorto", "description": ""}, "that": {"group": "Ungrouped variables", "templateType": "anything", "definition": "lcm(abs(b),abs(b1))/abs(b1)", "name": "that", "description": ""}, "sb": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(1,-1)", "name": "sb", "description": ""}, "b2": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(2..9)", "name": "b2", "description": ""}, "this": {"group": "Ungrouped variables", "templateType": "anything", "definition": "lcm(abs(b),abs(b1))/abs(b)", "name": "this", "description": ""}, "c1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "sc1*random(1..9)", "name": "c1", "description": ""}, "s6": {"group": "Ungrouped variables", "templateType": "anything", "definition": "if(b*b1>0,-1,1)", "name": "s6", "description": ""}, "a": {"group": "Ungrouped variables", "templateType": "anything", "definition": "sa*random(2..9)", "name": "a", "description": ""}, "a1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "switch(a2=2,random(3,5,7,9),a2=3,random(2,4,5,7),a2=4,random(3,5,7,9),a2=5,random(3,4,6,7,9),a2=6,random(4,5,7,8,9),a2=7,random(3,4,5,6,8,9),a2=8,random(3,5,6,7,9),a2=9,random(2,4,5,7,8),9)", "name": "a1", "description": ""}, "sa": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(1,-1)", "name": "sa", "description": ""}, "a2": {"group": "Ungrouped variables", "templateType": "anything", "definition": "abs(a)", "name": "a2", "description": ""}}, "ungrouped_variables": ["a", "c", "b", "that", "this", "sc1", "s1", "s6", "a1", "aort", "a2", "b1", "b2", "sc", "sb", "sa", "fromorto", "c1"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "showQuestionGroupNames": false, "functions": {}, "parts": [{"marks": 0, "scripts": {}, "gaps": [{"answer": "{c*b1-b*c1}/{b1*a-a1*b}", "vsetrange": [0, 1], "checkingaccuracy": 0.001, "checkvariablenames": false, "expectedvariablenames": [], "notallowed": {"showStrings": false, "message": "

Input as a fraction or an integer not as a decimal

", "strings": ["."], "partialCredit": 0}, "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "answersimplification": "std", "type": "jme", "showCorrectAnswer": true, "marks": 2, "vsetrangepoints": 5}, {"answer": "{c*a1-a*c1}/{b*a1-a*b1}", "vsetrange": [0, 1], "checkingaccuracy": 0.001, "checkvariablenames": false, "expectedvariablenames": [], "notallowed": {"showStrings": false, "message": "

Input as a fraction or an integer not as a decimal

", "strings": ["."], "partialCredit": 0}, "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "answersimplification": "std", "type": "jme", "showCorrectAnswer": true, "marks": 2, "vsetrangepoints": 5}], "type": "gapfill", "showCorrectAnswer": true, "steps": [{"type": "information", "prompt": "

", "showCorrectAnswer": true, "scripts": {}, "marks": 0}], "prompt": "\n\t\t\t

\\[ \\begin{eqnarray} \\simplify[std]{{a}x+{b}y}&=&\\var{c}\\\\ \\simplify[std]{{a1}x+{b1}y}&=&\\var{c1} \\end{eqnarray} \\]

\n\t\t\t

$x=\\phantom{{}}$[[0]], $y=\\phantom{{}}$[[1]]

\n\t\t\t

Input your answers as fractions or integers, not as decimals.

\n\t\t\t

See \"Show steps\" for a video that describes a more direct method of solving when, for example, one of the equations gives a variable directly in terms of the other variable.

\n\t\t\t \n\t\t\t", "stepsPenalty": 0}], "statement": "

Solve the following simultaneous equations for $x$ and $y$. Input your answers as fractions or integers, not as decimals.

", "tags": ["ACC1012", "checked2015", "equations", "linear", "pair of linear equations", "simultaneous", "simultaneous linear equations", "solve linear equations", "solving equations", "Solving equations", "video"], "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "\n\t\t \t\t \t\t \t\t \t\t \t\t \t\t

5/08/2012:

\n\t\t \t\t \t\t \t\t \t\t \t\t \t\t

Added more tags.

\n\t\t \t\t \t\t \t\t \t\t \t\t \t\t

Added description.

\n\t\t \t\t \t\t \t\t \t\t \t\t \t\t

Checked calculation. OK.

\n\t\t \t\t \t\t \t\t \t\t \t\t \n\t\t \t\t \t\t \t\t \t\t \n\t\t \t\t \t\t \t\t \n\t\t \t\t \t\t \n\t\t \t\t \n\t\t \n\t\t", "licence": "Creative Commons Attribution 4.0 International", "description": "

Solve for $x$ and $y$:  \\[ \\begin{eqnarray} a_1x+b_1y&=&c_1\\\\   a_2x+b_2y&=&c_2 \\end{eqnarray} \\]

\n

The included video describes a more direct method of solving when, for example, one of the equations gives a variable directly in terms of the other variable.

"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "\n\t

\\[ \\begin{eqnarray} \\simplify[std]{{a}x+{b}y}&=&\\var{c}&\\mbox{ ........(1)}\\\\ \\simplify[std]{{a1}x+{b1}y}&=&\\var{c1}&\\mbox{ ........(2)} \\end{eqnarray} \\]
To get a solution for $x$ multiply equation (1) by {this} and equation (2) by {that}

\n\t

This gives:
\\[ \\begin{eqnarray} \\simplify[std]{{a*this}x+{b*this}y}&=&\\var{this*c}&\\mbox{ ........(3)}\\\\ \\simplify[std]{{a1*that}x+{b1*that}y}&=&\\var{that*c1}&\\mbox{ ........(4)} \\end{eqnarray} \\]
Now {aort} (4) {fromorto} equation (3) to get
\\[\\simplify[std]{({a*this}+{s6*a1*that})x={this*c}+{s6*that*c1}}\\]
And so we get the solution for $x$:
\\[x = \\simplify{{c*b1-b*c1}/{b1*a-a1*b}}\\]
Substituting this value into any of the equations (1) and (2) gives:
\\[y = \\simplify{{c*a1-a*c1}/{b*a1-a*b1}}\\]
You can check that these solutions are correct by seeing if they satisfy both equations (1) and (2) by substituting these values into the equations.

\n\t \n\t \n\t \n\t \n\t \n\t \n\t"}, {"name": "Solve a quadratic with the formula", "extensions": [], "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/"}, {"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variable_groups": [], "variables": {"s1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,-1)", "name": "s1", "description": ""}, "disc": {"templateType": "anything", "group": "Ungrouped variables", "definition": "(b*c+a*d)^2-4*a*b*c*d", "name": "disc", "description": ""}, "d": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if((a*d1)^2=(b*c)^2, max(d1+1,random(1..5))*s3,d1*s3)", "name": "d", "description": ""}, "c": {"templateType": "anything", "group": "Ungrouped variables", "definition": "c1*s3", "name": "c", "description": ""}, "f": {"templateType": "anything", "group": "Ungrouped variables", "definition": "a*b", "name": "f", "description": ""}, "b": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..4)", "name": "b", "description": ""}, "n1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "b*c+a*d", "name": "n1", "description": ""}, "d1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "switch(f=1, random(1..6),f=2,random(1,3,5,7,9),f=3,random(1,2,5,7,8),f=4,random(1,3,5,7,9),f=6, random(1,5,7,8),f=9,random(1,2,4,7,8),f=8,random(1,3,5,7,9),f=12,random(1,5,7),random(1,3,5,7))", "name": "d1", "description": ""}, "n3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "2*a*b", "name": "n3", "description": ""}, "n5": {"templateType": "anything", "group": "Ungrouped variables", "definition": "a*b", "name": "n5", "description": ""}, "c1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "switch(f=1, random(1..6),f=2,random(1,3,5,7,9),f=3,random(1,2,5,7,8),f=4,random(1,3,5,7,9),f=6, random(1,5,7,8),f=9,random(1,2,4,7,8),f=8,random(1,3,5,7,9),f=12,random(1,5,7),random(1,3,5,7))", "name": "c1", "description": ""}, "rdis": {"templateType": "anything", "group": "Ungrouped variables", "definition": "switch(disc=0,'The discriminant is '+ 0+' and so we get two repeated roots in this case.',disc<0, 'There are no real roots.','The roots exist and are distinct. ')", "name": "rdis", "description": ""}, "n4": {"templateType": "anything", "group": "Ungrouped variables", "definition": "abs(n2)", "name": "n4", "description": ""}, "s3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,-1)", "name": "s3", "description": ""}, "a": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(2..5)", "name": "a", "description": ""}, "n2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "b*c-a*d", "name": "n2", "description": ""}, "s2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,-1)", "name": "s2", "description": ""}, "rep": {"templateType": "anything", "group": "Ungrouped variables", "definition": "switch(disc=0,'repeated', ' ')", "name": "rep", "description": ""}}, "ungrouped_variables": ["a", "c", "b", "d", "f", "s3", "s2", "s1", "n4", "n2", "disc", "rdis", "n1", "rep", "n3", "c1", "n5", "d1"], "functions": {}, "parts": [{"customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "steps": [{"prompt": "

Finding the roots by factorisation.

\n

Finding a factorisation of a quadratic $q(x)=a(x-r)(x-s)$ where $a$ is the coefficient of $x^2$ gives the roots $x=r$, $x=s$ immediately.

\n

If you cannot find a factorisation then there are several other methods you can use.

\n

Using the formula for the roots.

\n

You can find the roots by using the formula for finding the roots of a general quadratic equation $ax^2+bx+c=0$

\n

The two roots are:

\n

\\[ x = \\frac{-b +\\sqrt{b^2-4ac}}{2a}\\mbox{ and } x = \\frac{-b -\\sqrt{b^2-4ac}}{2a}\\]
there are three main types of solutions depending upon the value of the discriminant $\\Delta=b^2-4ac$

\n

1. $\\Delta \\gt 0$. The roots are real and distinct

\n

2. $\\Delta=0$. The roots are real and equal. Their value is $\\displaystyle \\frac{-b}{2a}$

\n

3. $\\Delta \\lt 0$. There are no real roots. The root are complex and form a complex conjugate pair.

\n

 

", "showCorrectAnswer": true, "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "type": "information", "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "unitTests": [], "showFeedbackIcon": true}], "prompt": "

Solve for $x$:

\n

\\[\\simplify[std]{{a*b} * x ^ 2 + ( {-b*c-a * d}) * x + {c * d}}=0\\]

\n

$x=$ [[0]] or [[1]].

\n

You can get more information on solving a quadratic by clicking on Show steps. You will lose 1 mark if you do so.

\n

Enter the roots as fractions or integers, not as decimals.

", "stepsPenalty": 1, "variableReplacementStrategy": "originalfirst", "sortAnswers": true, "scripts": {}, "gaps": [{"answer": "{n1-n4}/{2*a*b}", "customMarkingAlgorithm": "", "answerSimplification": "std", "expectedVariableNames": [], "showPreview": true, "unitTests": [], "notallowed": {"showStrings": false, "message": "

Input numbers as fractions or integers not as a decimals.

", "strings": ["."], "partialCredit": 0}, "checkingType": "absdiff", "checkVariableNames": false, "vsetRange": [0, 1], "vsetRangePoints": 5, "failureRate": 1, "scripts": {}, "extendBaseMarkingAlgorithm": true, "type": "jme", "variableReplacementStrategy": "originalfirst", "checkingAccuracy": 0.001, "showCorrectAnswer": true, "variableReplacements": [], "marks": 1, "showFeedbackIcon": true}, {"answer": "{n1+n4}/{2*a*b}", "customMarkingAlgorithm": "", "answerSimplification": "std", "expectedVariableNames": [], "showPreview": true, "unitTests": [], "notallowed": {"showStrings": false, "message": "

Input numbers as fractions or integers not as a decimals.

", "strings": ["."], "partialCredit": 0}, "checkingType": "absdiff", "checkVariableNames": false, "vsetRange": [0, 1], "vsetRangePoints": 5, "failureRate": 1, "scripts": {}, "extendBaseMarkingAlgorithm": true, "type": "jme", "variableReplacementStrategy": "originalfirst", "checkingAccuracy": 0.001, "showCorrectAnswer": true, "variableReplacements": [], "marks": 1, "showFeedbackIcon": true}], "type": "gapfill", "unitTests": [], "showCorrectAnswer": true, "variableReplacements": [], "marks": 0, "showFeedbackIcon": true}], "variablesTest": {"condition": "", "maxRuns": 100}, "statement": "

Find the roots of the following quadratic equation.

", "tags": ["Algebra", "algebra", "checked2015", "Factorisation", "factorisation", "find roots of a quadratic equation", "Quadratic formula", "quadratic formula", "quadratics", "roots of a quadratic equation", "solving a quadratic equation", "Solving equations", "solving equations", "steps", "Steps"], "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Solve for $x$: $\\displaystyle ax ^ 2 + bx + c=0$.

\n

Entering the correct roots in any order is marked as correct. However, entering one correct and the other incorrect gives feedback stating that both are incorrect.

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

Direct Factorisation

\n\t

If you can spot a direct factorisation then this is the quickest way to do this question.

\n\t

For this example we have the factorisation

\n\t

\\[\\simplify{{a*b} * x ^ 2 + ( {-b*c-a * d}) * x + {c * d} = ({a} * x + { -c}) * ({b} * x + { -d})}\\]

\n\t

Hence we find the roots:
\\[\\begin{eqnarray} x&=& \\simplify{{n1-n4}/{2*a*b}}\\\\ x&=& \\simplify{{n1+n4}/{2*a*b}} \\end{eqnarray} \\]

\n\t

Other Methods.

\n\t

There are several methods of finding the roots – here are the main methods.

\n\t

Finding the roots of a quadratic using the standard formula.

\n\t

We can use the following formula for finding the roots of a general quadratic equation $ax^2+bx+c=0$

\n\t

The two roots are

\n\t

\\[ x = \\frac{-b +\\sqrt{b^2-4ac}}{2a}\\mbox{ and } x = \\frac{-b -\\sqrt{b^2-4ac}}{2a}\\]
there are three main types of solutions depending upon the value of the discriminant $\\Delta=b^2-4ac$

\n\t

1. $\\Delta \\gt 0$. The roots are real and distinct

\n\t

2. $\\Delta=0$. The roots are real and equal. Their common value is $\\displaystyle -\\frac{b}{2a}$

\n\t

3. $\\Delta \\lt 0$. There are no real roots. The root are complex and form a complex conjugate pair.

\n\t

For this question the discriminant of $\\simplify{{a*b}x^2+{-b*c-a*d}x+{c*d}}$ is $\\Delta = \\simplify[std]{{-n1}^2-4*{a*b*c*d}}=\\var{disc}$

\n\t

{rdis}.

\n\t

So the {rep} roots are:

\n\t

\\[\\begin{eqnarray} x = \\frac{\\var{n1} - \\sqrt{\\var{disc}}}{\\var{n3}} &=& \\frac{\\var{n1} - \\var{n4} }{\\var{n3}} &=& \\simplify{{n1 - n4}/ {n3}}\\\\ x = \\frac{\\var{n1} + \\sqrt{\\var{disc}}}{\\var{n3}} &=& \\frac{\\var{n1} + \\var{n4} }{\\var{n3}} &=& \\simplify{{n1 + n4}/ {n3}} \\end{eqnarray}\\]

\n\t

Completing the square.

\n\t

First we complete the square for the quadratic expression $\\simplify{{a*b}x^2+{-n1}x+{c*d}}$
\\[\\begin{eqnarray} \\simplify{{a*b}x^2+{-n1}x+{c*d}}&=&\\var{n5}\\left(\\simplify{x^2+({-n1}/{a*b})x+ {c*d}/{a*b}}\\right)\\\\ &=&\\var{n5}\\left(\\left(\\simplify{x+({-n1}/{2*a*b})}\\right)^2+ \\simplify{{c*d}/{a*b}-({-n1}/({2*a*b}))^2}\\right)\\\\ &=&\\var{n5}\\left(\\left(\\simplify{x+({-n1}/{2*a*b})}\\right)^2 -\\simplify{ {n2^2}/{4*(a*b)^2}}\\right) \\end{eqnarray} \\]
So to solve $\\simplify{{a*b}x^2+{-n1}x+{c*d}}=0$ we have to solve:
\\[\\begin{eqnarray} \\left(\\simplify{x+({-n1}/{2*a*b})}\\right)^2&\\phantom{{}}& -\\simplify{ {n2^2}/{4*(a*b)^2}}=0\\Rightarrow\\\\ \\left(\\simplify{x+({-n1}/{2*a*b})}\\right)^2&\\phantom{{}}&=\\simplify{ {n2^2}/{4*(a*b)^2}=({abs(n2)}/{2*a*b})^2} \\end{eqnarray}\\]
So we get the two {rep} solutions:
\\[\\begin{eqnarray} \\simplify{x+({-n1}/{2*a*b})}&=&\\simplify{-{abs(n2)}/{2*a*b}} \\Rightarrow &x& = \\simplify{({-abs(n2)+n1}/{2*a*b})}\\\\ \\simplify{x+({-n1}/{2*a*b})}&=&\\simplify{({abs(n2)}/{2*a*b})} \\Rightarrow &x& = \\simplify{({n1+abs(n2)}/{2*a*b})} \\end{eqnarray}\\]

\n\t \n\t \n\t \n\t \n\t \n\t \n\t \n\t \n\t \n\t \n\t \n\t"}, {"name": "Solve an equation with a reciprocal", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "parts": [{"stepsPenalty": 1, "scripts": {}, "gaps": [{"answer": "{an1}/{an2}", "showCorrectAnswer": true, "vsetrange": [0, 1], "scripts": {}, "checkvariablenames": false, "expectedvariablenames": [], "notallowed": {"message": "

Input as a fraction or an integer, not as a decimal.

", "showStrings": false, "partialCredit": 0, "strings": ["."]}, "showpreview": true, "checkingtype": "absdiff", "checkingaccuracy": 0.0001, "type": "jme", "answersimplification": "std", "marks": 3, "vsetrangepoints": 5}], "type": "gapfill", "prompt": "\n\t\t\t

\\[\\simplify{{t} / ({a} * x + {b}) + {c} = {d}}\\]

\n\t\t\t

$x=\\;$ [[0]]

\n\t\t\t

If you want help in solving the equation, click on \"Show steps\". If you do so then you will lose 1 mark.

\n\t\t\t

Input all numbers as fractions or integers and not as decimals.

\n\t\t\t \n\t\t\t", "steps": [{"type": "information", "showCorrectAnswer": true, "prompt": "\n\t\t\t\t\t

Rearrange the equation by adding {-c} to both sides to get:
\\[\\simplify[std]{{t} / ({a} * x + {b}) = {d} + { -c} = {d -c}}\\]

\n\t\t\t\t\t

This gives \\[\\simplify{({a} * x + {b}) / {t} = 1 / {d -c}}\\] (this is because if $\\displaystyle \\frac{a}{b}=c$ then $\\displaystyle \\frac{b}{a}=\\frac{1}{c}$ on turning the fraction round the other way)

\n\t\t\t\t\t

and so \\[\\simplify{({a} * x + {b}) = {t} / {d -c}}\\] on multiplying both sides by {t}.

\n\t\t\t\t\t

Solve this equation for $x$.

\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t", "marks": 0, "scripts": {}}], "showCorrectAnswer": true, "marks": 0}], "variables": {"s1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-1,1)", "name": "s1", "description": ""}, "b": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(a=abs(b1),abs(b1)+2,b1)", "name": "b", "description": ""}, "an1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "t-b*d+b*c", "name": "an1", "description": ""}, "c": {"templateType": "anything", "group": "Ungrouped variables", "definition": "s2*random(1..9)", "name": "c", "description": ""}, "an2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "a*(d-c)", "name": "an2", "description": ""}, "b1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "s1*random(1..10)", "name": "b1", "description": ""}, "d": {"templateType": "anything", "group": "Ungrouped variables", "definition": "abs(c)+random(2..9)", "name": "d", "description": ""}, "s2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,-1)", "name": "s2", "description": ""}, "a": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(2..9)", "name": "a", "description": ""}, "t": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(2..8)", "name": "t", "description": ""}}, "ungrouped_variables": ["a", "c", "b", "d", "s2", "s1", "b1", "t", "an2", "an1"], "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "variable_groups": [], "showQuestionGroupNames": false, "variablesTest": {"condition": "", "maxRuns": 100}, "statement": "\n\t

Solve the following equation for $x$.

\n\t

Input your answer as a fraction or an integer as appropriate and not as a decimal.

\n\t \n\t \n\t \n\t \n\t", "tags": ["ACC1012", "algebra", "algebraic fractions", "algebraic manipulation", "changing the subject of an equation", "checked2015", "rearranging equations", "solving", "solving equations", "Solving equations", "subject of an equation"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "\n\t\t \t\t \t\t \t\t \t\t

5/08/2012:

\n\t\t \t\t \t\t \t\t \t\t

Added tags.

\n\t\t \t\t \t\t \t\t \t\t

Added description.

\n\t\t \t\t \t\t \t\t \t\t

Checked calculation.OK.

\n\t\t \t\t \t\t \t\t \t\t

Improved display in content areas.

\n\t\t \t\t \t\t \t\t \n\t\t \t\t \t\t \n\t\t \t\t \n\t\t \n\t\t", "licence": "Creative Commons Attribution 4.0 International", "description": "

Solve for $x$: $\\displaystyle \\frac{a} {bx+c} + d= s$

"}, "functions": {}, "advice": "

Rearrange the equation by adding {-c} to both sides to get:
\\[\\simplify{{t} / ({a} * x + {b}) = {d} + { -c} = {d -c}}\\]
This gives \\[\\simplify{({a} * x + {b}) / {t} = 1 / {d -c}}\\] (this is because if $\\displaystyle \\frac{a}{b}=c$ then $\\displaystyle \\frac{b}{a}=\\frac{1}{c}$ on turning the fraction round the other way)
and so \\[\\simplify{({a} * x + {b}) = {t} / {d -c}}\\] on multiplying both sides by {t}.
Hence \\[\\simplify{{a} * x = {t} / {d -c} -{b} = ({a * an1} / {an2})}\\]
and so \\[\\simplify{x={an1}/{an2}}\\] is the solution on dividing both sides by {a}.

"}, {"name": "Substitute a value into an expression", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variablesTest": {"condition": "", "maxRuns": 100}, "variables": {"q": {"templateType": "anything", "group": "Ungrouped variables", "definition": "-(t^3)+(b*t)", "name": "q", "description": ""}, "a": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(12..18)", "name": "a", "description": ""}, "f": {"templateType": "anything", "group": "Ungrouped variables", "definition": "-t+a", "name": "f", "description": ""}, "b": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(2..7)", "name": "b", "description": ""}, "t": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(3..7)", "name": "t", "description": ""}, "p": {"templateType": "anything", "group": "Ungrouped variables", "definition": "-a+t", "name": "p", "description": ""}}, "ungrouped_variables": ["a", "b", "f", "q", "p", "t"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "showQuestionGroupNames": false, "variable_groups": [], "functions": {}, "parts": [{"answer": "{p}", "vsetrange": [0, 1], "checkingaccuracy": 0, "checkvariablenames": false, "expectedvariablenames": [], "prompt": "

$-\\var{a}-n$

", "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "type": "jme", "showCorrectAnswer": true, "marks": 1, "vsetrangepoints": 5}, {"answer": "-({t}^2)", "vsetrange": [0, 1], "checkingaccuracy": 0, "checkvariablenames": false, "expectedvariablenames": [], "prompt": "

$-(n^2)$

", "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "type": "jme", "showCorrectAnswer": true, "marks": 1, "vsetrangepoints": 5}, {"answer": "{q}", "vsetrange": [0, 1], "checkingaccuracy": 0, "checkvariablenames": false, "expectedvariablenames": [], "prompt": "

$n^3-\\var{b}n$

", "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "type": "jme", "showCorrectAnswer": true, "marks": 1, "vsetrangepoints": 5}], "statement": "\n

Find the value of the following expressions, given the stated value of $n$.

\n

$n=-\\var{t}$

\n \n \n \n \n \n ", "tags": ["ACC1012", "checked2015"], "rulesets": {}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "", "licence": "Creative Commons Attribution 4.0 International", "description": "

What is the value of the expression given a choice of n?

"}, "advice": ""}, {"name": "Calculate mean, median, mode, range, and standard deviation of a sample", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variable_groups": [], "variables": {"range": {"templateType": "anything", "group": "Ungrouped variables", "definition": "range(number_list)", "description": "", "name": "range"}, "stdev": {"templateType": "anything", "group": "Ungrouped variables", "definition": "stdev(number_list,true)", "description": "", "name": "stdev"}, "median": {"templateType": "anything", "group": "Ungrouped variables", "definition": "median(number_list)", "description": "", "name": "median"}, "mode": {"templateType": "anything", "group": "Ungrouped variables", "definition": "mode(number_list)", "description": "", "name": "mode"}, "mean": {"templateType": "anything", "group": "Ungrouped variables", "definition": "mean(number_list)", "description": "", "name": "mean"}, "number_list": {"templateType": "anything", "group": "Ungrouped variables", "definition": "shuffle(tmp_list+tmp_list[random(0..5)])", "description": "", "name": "number_list"}, "tmp_list": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[random(-9..-7), random(-6..-4), random(-3..-1), random(1..3), random(4..6), random(7..9)]", "description": "", "name": "tmp_list"}}, "ungrouped_variables": ["number_list", "median", "tmp_list", "range", "mode", "stdev", "mean"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "functions": {}, "showQuestionGroupNames": false, "parts": [{"scripts": {}, "gaps": [{"precisionPartialCredit": 0, "allowFractions": false, "correctAnswerFraction": false, "minValue": "mean-0.001", "maxValue": "mean+0.001", "precision": 3, "type": "numberentry", "precisionType": "dp", "showPrecisionHint": false, "strictPrecision": false, "scripts": {}, "precisionMessage": "You have not given your answer to the correct precision.", "showCorrectAnswer": true, "marks": 1}], "type": "gapfill", "prompt": "

Mean=[[0]] (Enter your answer to 3d.p.)

", "showCorrectAnswer": true, "marks": 0}, {"scripts": {}, "gaps": [{"type": "numberentry", "correctAnswerFraction": false, "showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "integerAnswer": true, "integerPartialCredit": 0, "minValue": "median", "maxValue": "median", "marks": 1, "showPrecisionHint": false}], "type": "gapfill", "prompt": "

Median=[[0]]

", "showCorrectAnswer": true, "marks": 0}, {"scripts": {}, "gaps": [{"type": "numberentry", "correctAnswerFraction": false, "showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "integerAnswer": true, "integerPartialCredit": 0, "minValue": "mode[0]", "maxValue": "mode[0]", "marks": 1, "showPrecisionHint": false}], "type": "gapfill", "prompt": "

Mode=[[0]]

", "showCorrectAnswer": true, "marks": 0}, {"scripts": {}, "gaps": [{"type": "numberentry", "correctAnswerFraction": false, "showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "integerAnswer": true, "integerPartialCredit": 0, "minValue": "range", "maxValue": "range", "marks": 1, "showPrecisionHint": false}], "type": "gapfill", "prompt": "

Range=[[0]]

", "showCorrectAnswer": true, "marks": 0}, {"scripts": {}, "gaps": [{"precisionPartialCredit": 0, "allowFractions": false, "correctAnswerFraction": false, "minValue": "stdev-0.001", "maxValue": "stdev+0.001", "precision": 3, "type": "numberentry", "precisionType": "dp", "showPrecisionHint": false, "strictPrecision": false, "scripts": {}, "precisionMessage": "You have not given your answer to the correct precision.", "showCorrectAnswer": true, "marks": 1}], "type": "gapfill", "prompt": "

Standard deviation=[[0]] (Enter your answer to 3d.p.)

", "showCorrectAnswer": true, "marks": 0}], "statement": "

Calculate the mean, median, moderange, and standard deviation of the following set of numbers:

\n

\\[\\var{rowvector(number_list)}\\]

", "tags": ["ACC1012", "acc1012", "checked2015", "median", "mode", "range", "sample mean", "standard deviation", "statistics"], "rulesets": {}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "

29/11/2013

\n

Compute sample standard deviation, not population. (AJY)

\n

28/11/2013

\n

Complete overhaul. (AJY)

\n

23/07/2013:

\n

Question created. Tags added.

", "licence": "Creative Commons Attribution 4.0 International", "description": "
\n

Topics covered are calculating the mean, median, mode, range, and standard deviation.

\n
"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "

a)

\n

The mean of a set of numbers $\\left(x_1,\\ldots,x_N\\right)$ is given by

\n

\\[\\mu = \\frac{1}{N}\\sum_{i=1}^N x_i.\\]

\n

\n

b)

\n

The median is the middle value when the set of numbers is ordered.

\n

\n

c)

\n

The mode is the most common value in the set.

\n

\n

d)

\n

The range is the difference between the maximum value and the minimum value in the set.

\n

\n

e)

\n

The standard deviation is given by

\n

\\[\\sigma = \\sqrt{ \\frac{1}{N-1} \\left[ \\sum_{i=1}^N x_i^2 \\right] - \\mu^2}.\\]

"}, {"name": "Calculate probabilities from binomial distribution", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variable_groups": [], "variables": {"thisnumber": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(number1<6,random(2..3), if(number1<8,random(2..4),random(3..6)))", "description": "", "name": "thisnumber"}, "tol": {"templateType": "anything", "group": "Ungrouped variables", "definition": "0.001", "description": "", "name": "tol"}, "descx1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\"number of chocolate chip cookies in our sample:\"", "description": "", "name": "descx1"}, "thismany": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(15..20)", "description": "", "name": "thismany"}, "post": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\"% of biscuits made by a baker are chocolate chip cookies.\"", "description": "", "name": "post"}, "prob1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(tprob1,3)", "description": "", "name": "prob1"}, "this": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\"our selection contains exactly \"", "description": "", "name": "this"}, "v": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(thatnumber=1,0,1)", "description": "", "name": "v"}, "prob": {"templateType": "anything", "group": "Ungrouped variables", "definition": "thismany/100", "description": "", "name": "prob"}, "tprob1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "comb(number1,thisnumber)*prob^thisnumber*(1-prob)^(number1-thisnumber)", "description": "", "name": "tprob1"}, "else": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\"biscuits are selected at random.\"", "description": "", "name": "else"}, "something": {"templateType": "anything", "group": "Ungrouped variables", "definition": "''", "description": "", "name": "something"}, "thisaswell": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\"our selection contains no more than \"", "description": "", "name": "thisaswell"}, "things": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\"chocolate chip cookies.\"", "description": "", "name": "things"}, "descx": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\"the number of chocolate chip cookies\"", "description": "", "name": "descx"}, "sd": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(sqrt(number1*prob*(1-prob)),3)", "description": "", "name": "sd"}, "thatnumber": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,2)", "description": "", "name": "thatnumber"}, "tprob2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(thatnumber=2,(1-prob)^number1+number1*prob*(1-prob)^(number1-1)+number1*(number1-1)*prob^2*(1-prob)^(number1-2)/2,(1-prob)^number1+number1*prob*(1-prob)^(number1-1))", "description": "", "name": "tprob2"}, "prob2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(tprob2,3)", "description": "", "name": "prob2"}, "what": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\"daily sales.\"", "description": "", "name": "what"}, "pre": {"templateType": "anything", "group": "Ungrouped variables", "definition": "' '", "description": "", "name": "pre"}, "number1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(5..12)", "description": "", "name": "number1"}}, "ungrouped_variables": ["pre", "descx1", "something", "thisnumber", "what", "things", "descx", "tol", "prob", "thisaswell", "else", "thismany", "number1", "post", "prob2", "prob1", "thatnumber", "this", "v", "tprob1", "tprob2", "sd"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "functions": {}, "showQuestionGroupNames": false, "parts": [{"scripts": {}, "gaps": [{"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "number1", "minValue": "number1", "correctAnswerFraction": false, "marks": 0.25, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "prob", "minValue": "prob", "correctAnswerFraction": false, "marks": 0.25, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "number1*thismany/100", "minValue": "number1*thismany/100", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "sd+tol", "minValue": "sd-tol", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}], "type": "gapfill", "prompt": "\n

Assuming a binomial distribution for $X$ , {descX}, write down the values of $n$ and $p$.

\n

$X \\sim \\operatorname{bin}(n,p)$

\n

$n=\\; $?[[0]]        $p=\\;$?[[1]]

\n

Find $\\operatorname{E}[X]$ the expected {descX1}

\n

$\\operatorname{E}[X]=$?[[2]]

\n

Find the standard deviation for the {descX1}

\n

Standard deviation = ? [[3]] (to 3 decimal places).

\n\n \n \n", "showCorrectAnswer": true, "marks": 0}, {"scripts": {}, "gaps": [{"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "prob1+tol", "minValue": "prob1-tol", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "prob2+tol", "minValue": "prob2-tol", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}], "type": "gapfill", "prompt": "\n

Find the probability that {this} $\\var{thisnumber}$ {things}

\n

$\\operatorname{P}(X=\\var{thisnumber})=$? [[0]] (to 3 decimal places).

\n

 

\n

Find the probability that {thisaswell} {thatnumber} {things}

\n

Probability = ? [[1]] (to 3 decimal places).

\n\n \n \n", "showCorrectAnswer": true, "marks": 0}], "statement": "\n

{pre} $\\var{thismany}$ {post}

\n

{something} $\\var{number1}$ {else}

\n

 

\n\n \n \n", "tags": ["acc1012", "ACC1012", "binomial distribution", "Binomial Distribution", "Binomial distribution", "checked2015", "expectation", "expected number", "probabilities", "probability", "Probability", "sc", "standard deviation", "statistical distributions", "statistics"], "rulesets": {}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "\n\t\t \t\t \t\t \t\t \t\t

31/12/2012:

\n\t\t \t\t \t\t \t\t \t\t

Can be configured to other applications using the string variables supplied. Hence added tag sc.

\n\t\t \t\t \t\t \t\t \t\t

Not as yet properly tested.

\n\t\t \t\t \t\t \t\t \n\t\t \t\t \t\t \n\t\t \t\t \n\t\t \n\t\t", "licence": "Creative Commons Attribution 4.0 International", "description": "\n\t\t \t\t \t\t \t\t

Application of the binomial distribution given probabilities of success of an event.

\n\t\t \t\t \t\t \t\t

Finding probabilities using the binomial distribution.

\n\t\t \t\t \t\t \n\t\t \t\t \n\t\t \n\t\t"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "\n

a)

\n

1. $X \\sim \\operatorname{bin}(\\var{number1},\\var{prob})$, so $n= \\var{number1},\\;\\;p=\\var{prob}$.

\n

2. The expectation is given by $\\operatorname{E}[X]=n\\times p=\\var{number1}\\times \\var{prob}=\\var{number1*prob}$

\n

3. $\\operatorname{stdev}(X)=\\sqrt{n\\times p \\times (1-p)}=\\sqrt{\\var{number1}\\times \\var{prob} \\times \\var{1-prob}}=\\var{sd}$ to 3 decimal places.

\n

b)

\n

1. \\[ \\begin{eqnarray*}\\operatorname{P}(X = \\var{thisnumber}) &=& \\dbinom{\\var{number1}}{\\var{thisnumber}}\\times\\var{prob}^{\\var{thisnumber}}\\times(1-\\var{prob})^{\\var{number1-thisnumber}}\\\\& =& \\var{comb(number1,thisnumber)} \\times\\var{prob}^{\\var{thisnumber}}\\times\\var{1-prob}^{\\var{number1-thisnumber}}\\\\&=&\\var{prob1}\\end{eqnarray*} \\] to 3 decimal places.

\n

 

\n

2. 

\n

\\[ \\begin{eqnarray*}\\operatorname{P}(X \\leq \\var{thatnumber})& =& \\simplify[all,!collectNumbers]{P(X = 0) + P(X = 1) + {v}*P(X = 2)}\\\\& =& \\simplify[zeroFactor,zeroTerm,unitFactor]{{1 -prob} ^ {number1}+ {number1} *{prob} *{1 -prob} ^ {number1 -1} + {v} * ({number1} * {number1 -1}/2)* {prob} ^ 2 *( {1 -prob} ^ {number1 -2})}\\\\& =& \\var{prob2}\\end{eqnarray*} \\]

\n

to 3 decimal places.

\n

 

\n\n \n \n"}, {"name": "Calculate probabilities from frequency table", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variable_groups": [], "variables": {"q": {"templateType": "anything", "group": "Ungrouped variables", "definition": "2", "description": "", "name": "q"}, "a0": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1000..4000#1000)", "description": "", "name": "a0"}, "ans2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround((thismany-sum(n[0..v+1]))/thismany,2)", "description": "", "name": "ans2"}, "ans3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround((n[1]+n[2])/thismany,2)", "description": "", "name": "ans3"}, "thismany": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(300..1000#100)", "description": "", "name": "thismany"}, "n1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "round(thismany/random(3,6))", "description": "", "name": "n1"}, "sc": {"templateType": "anything", "group": "Ungrouped variables", "definition": "['A bank made '+{thismany}+' car loans last year. The amounts were as follows (\u00a3):']", "description": "", "name": "sc"}, "b0": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1000..3000#1000)", "description": "", "name": "b0"}, "data": {"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\n\n", "description": "", "name": "data"}, "n0": {"templateType": "anything", "group": "Ungrouped variables", "definition": "round(thismany/random(15,25))", "description": "", "name": "n0"}, "t": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(0..abs(a)-1)", "description": "", "name": "t"}, "ans1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(sum(n[0..t+1])/thismany,2)", "description": "", "name": "ans1"}, "n3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "round(thismany/random(11,14))", "description": "", "name": "n3"}, "k": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(0..abs(sc)-1)", "description": "", "name": "k"}, "o1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "a[v]", "description": "", "name": "o1"}, "v": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(0..abs(a)-1 except t)", "description": "", "name": "v"}, "n": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[n0,n1,thismany-n0-n1-n3,n3]", "description": "", "name": "n"}, "u1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "a[t]", "description": "", "name": "u1"}, "a": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[a0,a0+b0,a0+2*b0]", "description": "", "name": "a"}, "p": {"templateType": "anything", "group": "Ungrouped variables", "definition": "0", "description": "", "name": "p"}}, "ungrouped_variables": ["a", "sc", "p", "ans1", "k", "ans3", "u1", "thismany", "n", "q", "a0", "b0", "t", "v", "n0", "n1", "n3", "data", "ans2", "o1"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "functions": {"accumdisp": {"type": "string", "language": "jme", "definition": "if(k=0,'$\\\\var{a[0]}$','$\\\\var{a[0]}$ + '+accumdisp(a[1..abs(a)],k-1))", "parameters": [["a", "list"], ["k", "number"]]}}, "showQuestionGroupNames": false, "parts": [{"scripts": {}, "gaps": [{"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "ans1", "minValue": "ans1", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "ans2", "minValue": "ans2", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "ans3", "minValue": "ans3", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}], "type": "gapfill", "prompt": "\n

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

 

\n \n\n \n", "showCorrectAnswer": true, "marks": 0}], "statement": "\n

{sc[k]}

\n

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

\n

 

\n \n\n \n", "tags": ["ACC1012", "acc1012", "checked2015", "probability", "Probability", "statistics", "udf"], "rulesets": {}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "\n\t\t \t\t \t\t

28/12/2012:

\n\t\t \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 \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 \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 \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 \t\t \n\t\t \n\t\t", "licence": "Creative Commons Attribution 4.0 International", "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.

"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "\n

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.

\n \n\n \n"}, {"name": "Classify methods of sampling", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variable_groups": [], "variables": {"ch3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(c)", "description": "", "name": "ch3"}, "ch4": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(d)", "description": "", "name": "ch4"}, "b": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[\"A local bus company is planning a new route to serve four housing estates. Random samples of households are taken from each estate and sample members are asked to rate on a scale of 1 (strongly opposed) to 5 (strongly in favour) their reaction to the proposed service.\",\"A company has three divisions, and auditors are attempting to estimate the total amounts of the company's accounts receivable. Simple random samples of these accounts were taken for each of the three divisions.\",\"A company has three divisions, and auditors are attempting to estimate the total amounts of the company's accounts receivable. Simple random samples of these accounts were taken for each of the three divisions.\",\"This form of sampling reflects the major groupings within a population.\"]", "description": "", "name": "b"}, "c": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[\"The first item to be checked for faults on a production line is chosen at random, thereafter, every 100th item is checked.\",\"A credit card company wants to investigate the spending habits if its customers. From its lists, the first customer is selected at random; thereafter, every 25th customer is selected.\",\"In an inquiry on heating costs, we decide to sample every 4th house on the street.\",\"To sample 1% of its target population, consisting of 5000 members, a market research company chooses the first member at random; after that, every 100th member is also selected.\",\"This form of sampling could produce an unrepresentative sample because of patterns in the sampling frame.\"]", "description": "", "name": "c"}, "ch2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(b)", "description": "", "name": "ch2"}, "d": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[\"A company director believes she knows what characteristics make up the target population for a new product her company intends to launch. The company's team of market researchers check the viability of this new product by eliciting the opinions of the target population as specified by the director.\",\"Specific members of a population are sampled because of their known honesty and integrity.\",\"This form of sampling can provide a coherent and focussed sample by asking people with experience and relevant knowledge to provide their opinions.\",\"With this form of sampling, the researcher decides what he or she constitutes a representative sample.\"]", "description": "", "name": "d"}, "a": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[\"Under this form of sampling, if there are five hundred elements in the population, each element has a one-in-five hundred chance of being selected. \",\"One advantage of this form of sampling is that every element in the population has an equal chance of being selected.\",\"We are interested in the employment status of 25-40 year olds in South Tyneside. The names of all such people are obtained from the electoral roll and put into a hat; one hundred of these are then selected without replacement.\",\"One of six branches of a large retail outlet is to be selected for an audit. Each outlet is assigned a number from one to six, and then a fair, six-sided die is rolled to select the branch which will be audited.\"]", "description": "", "name": "a"}, "ch1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(a)", "description": "", "name": "ch1"}}, "ungrouped_variables": ["a", "c", "b", "d", "ch1", "ch2", "ch3", "ch4"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "functions": {}, "showQuestionGroupNames": false, "parts": [{"displayType": "radiogroup", "layout": {"type": "all", "expression": ""}, "choices": ["{ch1}", "{ch2}", "{ch3}", "{ch4}"], "matrix": [[1, -1, -1, -1], [-1, 1, -1, -1], [-1, -1, 1, -1], [-1, -1, -1, 1]], "prompt": "\n

Identify each of the following scenarios as one of the following:

\n \n

Note that you will lose 1 mark for each incorrect answer, however the least mark for this part of the question is 0.

\n \n", "type": "m_n_x", "maxAnswers": 0, "shuffleChoices": true, "marks": 0, "scripts": {}, "minMarks": 0, "minAnswers": 0, "maxMarks": 4, "shuffleAnswers": true, "showCorrectAnswer": true, "answers": ["Simple Random Samping", "Stratified Sampling", "Systematic Samping", "Judgmental Sampling"], "warningType": "none"}, {"layout": {"expression": ""}, "choices": ["{ch1}", "{ch2}", "{ch3}", "{ch4}"], "matrix": [[-1, -1, 1], [-1, -1, 1], [1, -1, -1], [-1, 1, -1]], "prompt": "\n

For each choice, state whether the form of the sampling described is random, quasi-random or non-random.

\n

As before, you will lose 1 mark for every incorrect answer, however the least mark for this part of the question is 0.

\n \n", "type": "m_n_x", "maxAnswers": 0, "shuffleChoices": true, "answers": ["Quasi-Random", "Non-random", "Random"], "scripts": {}, "minMarks": 0, "minAnswers": 0, "maxMarks": 4, "shuffleAnswers": true, "showCorrectAnswer": true, "marks": 0}], "statement": "

Answer the following questions on the sampling methods used in these situations.

", "tags": ["ACC1012", "acc1012", "checked2015"], "rulesets": {}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "", "licence": "Creative Commons Attribution 4.0 International", "description": ""}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": ""}, {"name": "Construct a stem-and-leaf plot", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variable_groups": [], "variables": {"darr1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "map(['$'+(v+y)+'$'+ ':']+arr1[y],y,0..4)", "description": "", "name": "darr1"}, "v": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(0..4)", "description": "", "name": "v"}, "arr1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "map(map(arr[y][p]-10*(y+v),p,0..r[y]-1),y,0..4)", "description": "", "name": "arr1"}, "arr": {"templateType": "anything", "group": "Ungrouped variables", "definition": "map(sort(repeat(10*y+random(0..9),r[y-v])),y,v..v+4)", "description": "", "name": "arr"}, "s": {"templateType": "anything", "group": "Ungrouped variables", "definition": "flattenint(arr)", "description": "", "name": "s"}, "u": {"templateType": "anything", "group": "Ungrouped variables", "definition": "map(map(if(p\n\nSTEMLEAF\n$\\var{v}$\n[[0]]\n[[1]]\n[[2]]\n[[3]]\n[[4]]\n\n$\\var{v+1}$\n[[5]]\n[[6]]\n[[7]]\n[[8]]\n[[9]]\n\n$\\var{v+2}$\n[[10]]\n[[11]]\n[[12]]\n[[13]]\n[[14]]\n\n$\\var{v+3}$\n[[15]]\n[[16]]\n[[17]]\n[[18]]\n[[19]]\n\n$\\var{v+4}$\n[[20]]\n[[21]]\n[[22]]\n[[23]]\n[[24]]\n\n\n\n \n", "showCorrectAnswer": true, "marks": 0}], "statement": "\n

Construct a stem-and-leaf plot for the following data. Input all numbers into the fields below.

\n

{table([ss],[])}

\n

 NOTE: All 25 fields have to be filled in. Input -1 if there is no number in a field.

\n

 

\n

 

\n \n", "tags": ["ACC1012", "acc1012", "checked2015", "statistics", "stem-and-leaf plots"], "rulesets": {}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "", "licence": "Creative Commons Attribution 4.0 International", "description": "

Given random set of data (between 13 and 23 numbers all less than 100), find their stem-and-leaf plot.

"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "\n

Ordering the data gives:

\n

{table([s],[])}

\n

Splitting into the groups of 10s gives

\n

{table(arr,[])}

\n

Then putting this into stem-and-leaf plot gives

\n

{table(darr1,['STEM'])}

\n \n"}, {"name": "Determine if variables are qualitative or quantitative", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variable_groups": [], "variables": {"qual1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[\"Types of PC used by small businesses in the north-east\",\"Marital status of questionnaire respondents\",\"Month of the year in which small shops record their highest sales\",\"Type of tenure for those in the licensed trade business\",\"Subjects studied at A level by students in this class\"]", "description": "", "name": "qual1"}, "quant2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[\"The number of people requiring a special in-flight meal\",\"The average volume of bottles of wine imported from South America\",\"Salaries of Newcastle University graduates six months after graduation\",\"The distance travelled by taxis for a particular cab firm every day\",\"Total annual sales for a large American departmental store\",\"The total cost of a student's text books for this semester\"]", "description": "", "name": "quant2"}, "m": {"templateType": "anything", "group": "Ungrouped variables", "definition": "transpose(matrix(list(cind),list(ind1)))", "description": "", "name": "m"}, "ch2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "switch(ind[1]=0,random(qual except ch1),random(quant except ch1))", "description": "", "name": "ch2"}, "qual": {"templateType": "anything", "group": "Ungrouped variables", "definition": "qual1+qual2", "description": "", "name": "qual"}, "ch3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "switch(ind[2]=0,random(qual except [ch1,ch2]),random(quant except [ch1,ch2]))", "description": "", "name": "ch3"}, "qual2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[\"Ice cream flavour preferred by children\",\"Brand of sportswear preferred by athletes\",\"Favourite type of film by UK cinema-goers\",\"Mobile phone price-plan\",\"Shape of swimming pools in local authority-run leisure centres\"]", "description": "", "name": "qual2"}, "ind1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "2*vector(ind)-vector(1,1,1)", "description": "", "name": "ind1"}, "quant1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[\"The number of orders received by a catering company\",\"The height of students taking Statistics courses at Newcastle this year\", \"Your quarterly gas bill\", \"The time spent on hold at a credit call centre\",\"The average shipping time for orders placed with a TV shopping channel\",\"The annual electricity bill for a large UK Supermarket\"]", "description": "", "name": "quant1"}, "quant": {"templateType": "anything", "group": "Ungrouped variables", "definition": "quant1+quant2", "description": "", "name": "quant"}, "cind": {"templateType": "anything", "group": "Ungrouped variables", "definition": "-1*ind1", "description": "", "name": "cind"}, "ind": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random([[0,0,0],[1,0,0],[0,1,0],[0,0,1],[0,1,1],[1,0,1],[1,1,0],[1,1,1]])", "description": "", "name": "ind"}, "ch1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "switch(ind[0]=0,random(qual),random(quant))", "description": "", "name": "ch1"}}, "ungrouped_variables": ["quant1", "quant2", "qual2", "cind", "qual1", "m", "ch1", "ch2", "ch3", "quant", "ind", "ind1", "qual"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "functions": {}, "showQuestionGroupNames": false, "parts": [{"displayType": "radiogroup", "minMarks": 0, "layout": {"type": "all", "expression": ""}, "choices": ["{ch1}", "{ch2}", "{ch3}"], "matrix": "m", "type": "m_n_x", "maxAnswers": 0, "shuffleChoices": true, "warningType": "none", "scripts": {}, "marks": 0, "minAnswers": 0, "maxMarks": 0, "shuffleAnswers": true, "showCorrectAnswer": true, "answers": ["Qualitative", "Quantitative"]}], "statement": "\n

State whether the following variables are Qualitative or Quantitative

\n

 

\n\n", "tags": ["ACC1012", "acc1012", "checked2015", "qualitative variables", "quantitative variables", "random variables", "statistics"], "rulesets": {}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "", "licence": "Creative Commons Attribution 4.0 International", "description": "

Choosing whether given random variables are qualitiative or quantitative.

"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": ""}, {"name": "Find coordinates of stationary points of polynomials", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variable_groups": [], "variables": {"y12": {"templateType": "anything", "group": "Ungrouped variables", "definition": "2(x12^3)-3(x12+x22)*x12^2+6*x12*x22*x12+c02", "description": "", "name": "y12"}, "y03": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-10..10)", "description": "", "name": "y03"}, "y32": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(y12For the following function:

\n

\\[ \\simplify{ y = 2x^3-{3*(x1+x2)}x^2+{x1*x2*6}x+{c0} } \\]

\n

Determine the coordinates and the nature of the stationary points.

\n

Minimum point: $\\big($ [[0]] $ , $ [[1]] $\\big)$ and maximum point: $\\big($ [[2]] $ , $ [[3]] $\\big)$

\n

Enter fractions in their simplest form.

", "showCorrectAnswer": true, "marks": 0}, {"scripts": {}, "gaps": [{"answer": "{x32}", "showCorrectAnswer": true, "vsetrange": [0, 1], "checkingaccuracy": 0.001, "checkvariablenames": false, "expectedvariablenames": [], "showpreview": false, "checkingtype": "absdiff", "scripts": {}, "type": "jme", "answersimplification": "all,fractionNumbers", "marks": 1, "vsetrangepoints": 5}, {"answer": "{y32}", "showCorrectAnswer": true, "vsetrange": [0, 1], "checkingaccuracy": 0.001, "checkvariablenames": false, "expectedvariablenames": [], "showpreview": false, "checkingtype": "absdiff", "scripts": {}, "type": "jme", "answersimplification": "all,fractionNumbers", "marks": 1, "vsetrangepoints": 5}, {"answer": "{x42}", "showCorrectAnswer": true, "vsetrange": [0, 1], "checkingaccuracy": 0.001, "checkvariablenames": false, "expectedvariablenames": [], "showpreview": false, "checkingtype": "absdiff", "scripts": {}, "type": "jme", "answersimplification": "all,fractionNumbers", "marks": 1, "vsetrangepoints": 5}, {"answer": "{y42}", "showCorrectAnswer": true, "vsetrange": [0, 1], "checkingaccuracy": 0.001, "checkvariablenames": false, "expectedvariablenames": [], "showpreview": false, "checkingtype": "absdiff", "scripts": {}, "type": "jme", "answersimplification": "all,fractionNumbers", "marks": 1, "vsetrangepoints": 5}], "type": "gapfill", "prompt": "

For the following function:

\n

\\[ \\simplify{y = 2x^3-3{(x12+x22)}x^2+6{x12*x22}x+{c02}} \\]

\n

Determine the coordinates and the nature of the stationary points.

\n

Minimum point: $\\big($ [[0]] $ , $ [[1]] $\\big)$ and maximum point: $\\big($ [[2]] $ , $ [[3]] $\\big)$

\n

Enter fractions in their simplest form.

", "showCorrectAnswer": true, "marks": 0}, {"scripts": {}, "gaps": [{"answer": "{x33}", "showCorrectAnswer": true, "vsetrange": [0, 1], "checkingaccuracy": 0.001, "checkvariablenames": false, "expectedvariablenames": [], "showpreview": false, "checkingtype": "absdiff", "scripts": {}, "type": "jme", "answersimplification": "all,fractionNumbers", "marks": 1, "vsetrangepoints": 5}, {"answer": "{y33}", "showCorrectAnswer": true, "vsetrange": [0, 1], "checkingaccuracy": 0.001, "checkvariablenames": false, "expectedvariablenames": [], "showpreview": false, "checkingtype": "absdiff", "scripts": {}, "type": "jme", "answersimplification": "all,fractionNumbers", "marks": 1, "vsetrangepoints": 5}, {"answer": "{x43}", "showCorrectAnswer": true, "vsetrange": [0, 1], "checkingaccuracy": 0.001, "checkvariablenames": false, "expectedvariablenames": [], "showpreview": false, "checkingtype": "absdiff", "scripts": {}, "type": "jme", "answersimplification": "all,fractionNumbers", "marks": 1, "vsetrangepoints": 5}, {"answer": "{y43}", "showCorrectAnswer": true, "vsetrange": [0, 1], "checkingaccuracy": 0.001, "checkvariablenames": false, "expectedvariablenames": [], "showpreview": false, "checkingtype": "absdiff", "scripts": {}, "type": "jme", "answersimplification": "all,fractionNumbers", "marks": 1, "vsetrangepoints": 5}], "type": "gapfill", "prompt": "

For the following function:

\n

\\[ \\simplify[All,fractionNumbers]{y = {1}/{3}x^3-{(x13+x23)}/{2}x^2+{x13*x23}x+{c03}} \\]

\n

Determine the coordinates and the nature of the stationary points.

\n

Minimum point: $\\big($ [[0]] $ , $ [[1]] $\\big)$ and maximum point: $\\big($ [[2]] $ , $ [[3]] $\\big)$

\n

Enter fractions in their simplest form.

", "showCorrectAnswer": true, "marks": 0}], "statement": "", "tags": ["ACC1012", "acc1012", "checked2015"], "rulesets": {}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "", "licence": "Creative Commons Attribution 4.0 International", "description": "

Finding the coordinates and determining the nature of the stationary points on a polynomial function

"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": ""}, {"name": "Find relative percentage frequencies", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variable_groups": [], "variables": {"daysopen": {"templateType": "anything", "group": "Ungrouped variables", "definition": "sum(norm1)", "description": "", "name": "daysopen"}, "forwhat": {"templateType": "anything", "group": "Ungrouped variables", "definition": "'for a large retailer in '+random(2010,2011,2012)", "description": "", "name": "forwhat"}, "things": {"templateType": "anything", "group": "Ungrouped variables", "definition": "'Sales'", "description": "", "name": "things"}, "m": {"templateType": "anything", "group": "Ungrouped variables", "definition": "max(freqdays1)", "description": "", "name": "m"}, "n1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "4", "description": "", "name": "n1"}, "units": {"templateType": "anything", "group": "Ungrouped variables", "definition": "'in thousands of pounds'", "description": "", "name": "units"}, "freqdays2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "revsort(repeat(random(2..m-1),n1-1))", "description": "", "name": "freqdays2"}, "r": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(0..5)", "description": "", "name": "r"}, "what": {"templateType": "anything", "group": "Ungrouped variables", "definition": "'daily sales'", "description": "", "name": "what"}, "freqdays1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "sort(repeat(random(2..50),n1))", "description": "", "name": "freqdays1"}, "s": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(5..15#5)", "description": "", "name": "s"}, "num": {"templateType": "anything", "group": "Ungrouped variables", "definition": "'Number of days'", "description": "", "name": "num"}, "norm1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "map(round(x),x,list((y/sum(freqdays))*vector(freqdays)))", "description": "", "name": "norm1"}, "a": {"templateType": "anything", "group": "Ungrouped variables", "definition": "map(s*x,x,0..7)", "description": "", "name": "a"}, "rel": {"templateType": "anything", "group": "Ungrouped variables", "definition": "map(precround(100*norm1[x]/daysopen,1),x,0..2*n1-2)", "description": "", "name": "rel"}, "y": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(300..320)", "description": "", "name": "y"}, "freqdays": {"templateType": "anything", "group": "Ungrouped variables", "definition": "freqdays1+freqdays2", "description": "", "name": "freqdays"}}, "ungrouped_variables": ["a", "what", "freqdays", "daysopen", "things", "m", "forwhat", "y", "s", "num", "rel", "freqdays1", "units", "n1", "freqdays2", "r", "norm1"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "functions": {"revsort": {"type": "list", "language": "jme", "definition": "list(-1*vector(sort(list(-1*vector(a)))))", "parameters": [["a", "list"]]}}, "showQuestionGroupNames": false, "parts": [{"scripts": {}, "gaps": [{"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "rel[0]", "minValue": "rel[0]", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "rel[1]", "minValue": "rel[1]", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "rel[2]", "minValue": "rel[2]", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "rel[3]", "minValue": "rel[3]", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "rel[4]", "minValue": "rel[4]", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "rel[5]", "minValue": "rel[5]", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "rel[6]", "minValue": "rel[6]", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}], "type": "gapfill", "prompt": "\n \n\n\n\n\n\n\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
{things} {num} Relative Percentages
$\\var{a[0]}\\le X \\lt \\var{a[1]}$$\\var{norm1[0]}$[[0]]
$\\var{a[1]}\\le X \\lt \\var{a[2]}$$\\var{norm1[1]}$[[1]]
$\\var{a[2]}\\le X \\lt \\var{a[3]}$$\\var{norm1[2]}$[[2]]
$\\var{a[3]}\\le X \\lt \\var{a[4]}$$\\var{norm1[3]}$[[3]]
$\\var{a[4]}\\le X \\lt \\var{a[5]}$$\\var{norm1[4]}$[[4]]
$\\var{a[5]}\\le X \\lt \\var{a[6]}$$\\var{norm1[5]}$[[5]]
$\\var{a[6]}\\le X \\lt \\var{a[7]}$$\\var{norm1[6]}$[[6]]
\n \n", "showCorrectAnswer": true, "marks": 0}], "statement": "\n

The following table shows {what}, $X$, {units} {forwhat}.

\n

Calculate the relative percentage frequencies (to one decimal place for all).

\n \n", "tags": ["ACC1012", "acc1012", "checked2015", "frequencies", "percentages", "relative percentage frequencies", "statistics"], "rulesets": {}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "", "licence": "Creative Commons Attribution 4.0 International", "description": "

Given a table of the number of days in which sales were between £x1000 and £(x+1)1000 find the relative percentage frequencies of these volume of sales.

"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "\n

We show how to calculate the relative percentage frequency for one range of values for  $\\var{a[r]} \\le X \\lt \\var{a[r+1]}$    - you can then check the rest.

\n

Note that there were $\\var{daysopen}$ days  in the year when sales took place. 

\n

There were $\\var{norm1[r]}$ days out of the  $\\var{daysopen}$ when there were between $\\var{a[r]}$ and $\\var{a[r+1]}$ thousand pounds worth of sales (including  $\\var{a[r]}$ thousand but not $\\var{a[r+1]}$ thousand) .

\n

Hence the relative frequency percentage for such sales is given by \\[100 \\times \\frac{\\var{norm1[r]}}{\\var{daysopen}}\\%=\\var{rel[r]}\\%\\] to one decimal place.

\n

 

\n \n"}, {"name": "Find stationary point of a curve and determine its nature", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variable_groups": [], "variables": {"q": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-10..10 except 0)", "description": "", "name": "q"}, "sy2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "a2*(sx2^2)+b2*sx2+c2", "description": "", "name": "sy2"}, "m": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(2,3,4)", "description": "", "name": "m"}, "sy1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "a1*(sx1^2)+b1*sx1+c1", "description": "", "name": "sy1"}, "b1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-6..6 except (-1..1))", "description": "", "name": "b1"}, "a1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "name": "a1"}, "b2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-6..6 except (-1..1))", "description": "", "name": "b2"}, "c1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-10..10 except (-1..1))", "description": "", "name": "c1"}, "c2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-10..10 except (-1..1))", "description": "", "name": "c2"}, "sx1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "-b1/(2*a1)", "description": "", "name": "sx1"}, "a2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-5..-2)", "description": "", "name": "a2"}, "sx2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "-b2/(2*a2)", "description": "", "name": "sx2"}}, "ungrouped_variables": ["a1", "sx1", "m", "sy1", "q", "sy2", "sx2", "a2", "b1", "b2", "c2", "c1"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "functions": {}, "showQuestionGroupNames": false, "parts": [{"scripts": {}, "gaps": [{"answer": "2*{a1}*x+{b1}", "vsetrange": [0, 1], "checkingaccuracy": 0.001, "checkvariablenames": false, "expectedvariablenames": [], "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "type": "jme", "showCorrectAnswer": true, "marks": 1, "vsetrangepoints": 5}, {"answer": "{sx1}", "showCorrectAnswer": true, "vsetrange": [0, 1], "checkingaccuracy": 0.001, "checkvariablenames": false, "expectedvariablenames": [], "showpreview": false, "checkingtype": "absdiff", "scripts": {}, "type": "jme", "answersimplification": "fractionnumbers", "marks": 1, "vsetrangepoints": 5}, {"answer": "{sy1}", "showCorrectAnswer": true, "vsetrange": [0, 1], "checkingaccuracy": 0.001, "checkvariablenames": false, "expectedvariablenames": [], "showpreview": false, "checkingtype": "absdiff", "scripts": {}, "type": "jme", "answersimplification": "fractionnumbers", "marks": 1, "vsetrangepoints": 5}, {"answer": "{2a1}", "vsetrange": [0, 1], "checkingaccuracy": 0.001, "checkvariablenames": false, "expectedvariablenames": [], "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "type": "jme", "showCorrectAnswer": true, "marks": 1, "vsetrangepoints": 5}, {"displayType": "radiogroup", "choices": ["

Maximum

", "

Minimum

", "

Point of inflection

"], "displayColumns": 0, "distractors": ["", "", ""], "shuffleChoices": false, "scripts": {}, "minMarks": 0, "type": "1_n_2", "maxMarks": 0, "showCorrectAnswer": true, "matrix": [0, 1, 0], "marks": 0}], "type": "gapfill", "prompt": "

Let $y = \\simplify{{a1}x^2 + {b1}x + {c1}}$.

\n

$\\dfrac{\\mathrm{d}y}{\\mathrm{d}x} = $ [[0]]

\n

Enter the coordinates of the stationary point of $y$: $\\big($ [[1]] $, $ [[2]] $\\big)$

\n

$\\dfrac{\\mathrm{d}^2y}{\\mathrm{d}x^2} = $ [[3]]

\n

What is the nature of the stationary point of $y$?

\n

[[4]]

", "showCorrectAnswer": true, "marks": 0}, {"scripts": {}, "gaps": [{"answer": "2*{a2}x+{b2}", "vsetrange": [0, 1], "checkingaccuracy": 0.001, "checkvariablenames": false, "expectedvariablenames": [], "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "type": "jme", "showCorrectAnswer": true, "marks": 1, "vsetrangepoints": 5}, {"answer": "{sx2}", "showCorrectAnswer": true, "vsetrange": [0, 1], "checkingaccuracy": 0.001, "checkvariablenames": false, "expectedvariablenames": [], "showpreview": false, "checkingtype": "absdiff", "scripts": {}, "type": "jme", "answersimplification": "fractionnumbers", "marks": 1, "vsetrangepoints": 5}, {"answer": "{sy2}", "showCorrectAnswer": true, "vsetrange": [0, 1], "checkingaccuracy": 0.001, "checkvariablenames": false, "expectedvariablenames": [], "showpreview": false, "checkingtype": "absdiff", "scripts": {}, "type": "jme", "answersimplification": "fractionnumbers", "marks": 1, "vsetrangepoints": 5}, {"answer": "2{a2}", "vsetrange": [0, 1], "checkingaccuracy": 0.001, "checkvariablenames": false, "expectedvariablenames": [], "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "type": "jme", "showCorrectAnswer": true, "marks": 1, "vsetrangepoints": 5}, {"displayType": "radiogroup", "choices": ["

Maximum

", "

Minimum

", "

Point of inflection

"], "displayColumns": 0, "distractors": ["", "", ""], "shuffleChoices": false, "scripts": {}, "minMarks": 0, "type": "1_n_2", "maxMarks": 0, "showCorrectAnswer": true, "matrix": [1, 0, 0], "marks": 0}], "type": "gapfill", "prompt": "

Let $z = \\simplify{{a2}x^2+{b2}x+{c2}}$.

\n

$\\dfrac{\\mathrm{d}z}{\\mathrm{d}x} = $ [[0]]

\n

Enter the coordinates of the stationary point of $z$: $\\big($ [[1]] $, $ [[2]] $\\big)$

\n

$\\dfrac{\\mathrm{d}^2z}{\\mathrm{d}x^2} = $ [[3]]

\n

What is the nature of the stationary point of $z$?

\n

[[4]]

", "showCorrectAnswer": true, "marks": 0}, {"scripts": {}, "gaps": [{"answer": "3*{m}*x^2", "vsetrange": [0, 1], "checkingaccuracy": 0.001, "checkvariablenames": false, "expectedvariablenames": [], "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "type": "jme", "showCorrectAnswer": true, "marks": 1, "vsetrangepoints": 5}, {"answer": "0", "showCorrectAnswer": true, "vsetrange": [0, 1], "checkingaccuracy": 0.001, "checkvariablenames": false, "expectedvariablenames": [], "showpreview": false, "checkingtype": "absdiff", "scripts": {}, "type": "jme", "answersimplification": "fractionnumbers", "marks": 1, "vsetrangepoints": 5}, {"answer": "{q}", "showCorrectAnswer": true, "vsetrange": [0, 1], "checkingaccuracy": 0.001, "checkvariablenames": false, "expectedvariablenames": [], "showpreview": false, "checkingtype": "absdiff", "scripts": {}, "type": "jme", "answersimplification": "fractionnumbers", "marks": 1, "vsetrangepoints": 5}, {"answer": "6*{m}*x", "vsetrange": [0, 1], "checkingaccuracy": 0.001, "checkvariablenames": false, "expectedvariablenames": [], "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "type": "jme", "showCorrectAnswer": true, "marks": 1, "vsetrangepoints": 5}, {"displayType": "radiogroup", "choices": ["

Maximum

", "

Minimum

", "

Point of inflection

"], "displayColumns": 0, "distractors": ["", "", ""], "shuffleChoices": false, "scripts": {}, "minMarks": 0, "type": "1_n_2", "maxMarks": 0, "showCorrectAnswer": true, "matrix": [0, 0, 1], "marks": 0}], "type": "gapfill", "prompt": "

Let $t = \\var{m}x^3+\\var{q}$.

\n

$\\dfrac{\\mathrm{d}t}{\\mathrm{d}x} = $ [[0]]

\n

Enter the coordinates of the stationary point of $t$: $\\big($ [[1]] $, $ [[2]] $\\big)$

\n

$\\dfrac{\\mathrm{d}^2t}{\\mathrm{d}x^2} = $ [[3]]

\n

What is the nature of the stationary point of $t$?

\n

[[4]]

", "showCorrectAnswer": true, "marks": 0}], "statement": "

For the following, find the stationary point and determine its nature. For your answers, where appropriate, write your solutions as fractions, NOT decimals, and cancel down where possible.

", "tags": ["ACC1012", "acc1012", "checked2015"], "rulesets": {}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "", "licence": "Creative Commons Attribution 4.0 International", "description": ""}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "

a)

\n

$\\dfrac{\\mathrm{d}y}{\\mathrm{d}x} = \\simplify{{2a1}x+{b1}}$.

\n

To find the $x$-coordinate of the stationary point, solve $\\frac{\\mathrm{d}y}{\\mathrm{d}x} = 0$ for $x$:

\n

\\[ \\begin{align} \\frac{\\mathrm{d}y}{\\mathrm{d}x} = \\simplify{{2a1}x + {b1}} &= 0 \\\\ x &= \\simplify[all,fractionNumbers]{{sx1}} \\end{align} \\]

\n

Find the $y$-coordinate by substituting this value of $x$ into the definition of $y(x)$:

\n

\\[\\begin{align} \\simplify[fractionnumbers]{y({sx1})} &= \\simplify[basic,fractionnumbers]{{a1}{sx1}^2+{b1}{sx1}+{c1}} \\\\ &= \\simplify[fractionnumbers]{{sy1}} \\end{align}\\]

\n

Finally, to determine the nature of the stationary point, look at $\\frac{\\mathrm{d}^2y}{\\mathrm{d}x^2}$ at $x = \\simplify[fractionnumbers]{{sx1}}$.

\n

\\[ \\frac{\\mathrm{d}^2y}{\\mathrm{d}x^2} = \\simplify{{2*a1}} \\]

\n

This is positive, so the stationary point is a minimum.

\n

b)

\n

$\\dfrac{\\mathrm{d}z}{\\mathrm{d}x} = \\simplify{{2a2}x+{b2}}$.

\n

To find the $x$-coordinate of the stationary point, solve $\\frac{\\mathrm{d}z}{\\mathrm{d}x} = 0$ for $x$:

\n

\\[ \\begin{align} \\frac{\\mathrm{d}z}{\\mathrm{d}x} = \\simplify{{2a2}x + {b2}} &= 0 \\\\ x &= \\simplify[all,fractionNumbers]{{sx2}} \\end{align} \\]

\n

Find the $y$-coordinate by substituting this value of $x$ into the definition of $z(x)$:

\n

\\[\\begin{align} \\simplify[fractionnumbers]{z({sx1})} &= \\simplify[basic,fractionnumbers]{{a2}{sx2}^2+{b2}{sx2}+{c2}} \\\\ &= \\simplify[fractionnumbers]{{sy2}} \\end{align}\\]

\n

Finally, to determine the nature of the stationary point, look at $\\frac{\\mathrm{d}^2z}{\\mathrm{d}x^2}$ at $x = \\simplify[fractionnumbers]{{sx2}}$.

\n

\\[ \\frac{\\mathrm{d}^2z}{\\mathrm{d}x^2} = \\simplify{{2*a2}} \\]

\n

This is negative, so the stationary point is a maximum.

\n

c)

\n

$\\dfrac{\\mathrm{d}t}{\\mathrm{d}x} = \\simplify{{3m}x^2}$.

\n

To find the $x$-coordinate of the stationary point, solve $\\frac{\\mathrm{d}t}{\\mathrm{d}x} = 0$ for $x$:

\n

\\[ \\begin{align} \\frac{\\mathrm{d}t}{\\mathrm{d}x} = \\simplify{{3m}x^2} &= 0 \\\\ x &= 0 \\end{align} \\]

\n

Find the $y$-coordinate by substituting this value of $x$ into the definition of $t(x)$:

\n

\\[\\begin{align} z(0) &= \\simplify[basic,fractionnumbers]{{m}*0^3 + {q}} \\\\ &= \\var{q} \\end{align}\\]

\n

Finally, to determine the nature of the stationary point, look at $\\frac{\\mathrm{d}^2t}{\\mathrm{d}x^2}$ at $x = 0$.

\n

\\[ \\frac{\\mathrm{d}^2t}{\\mathrm{d}x^2} = \\simplify{{6m}x} \\]

\n

\\[ \\left.\\frac{\\mathrm{d}^2t}{\\mathrm{d}x^2} \\right\\rvert_{x=0} = \\var{6m} \\times 0 = 0 \\]

\n

This is zero, so the stationary point is a point of inflection.

"}, {"name": "Calculate probabilities from normal distribution, ", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variable_groups": [], "variables": {"tol": {"templateType": "anything", "group": "Ungrouped variables", "definition": "0.01", "description": "", "name": "tol"}, "amount": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\"electricity consumption\"", "description": "", "name": "amount"}, "p1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(normalcdf(zupper,0,1),4)", "description": "", "name": "p1"}, "m": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(750..1250#50)", "description": "", "name": "m"}, "prob1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(1-p,2)", "description": "", "name": "prob1"}, "zupper": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround((upper-m)/s,2)", "description": "", "name": "zupper"}, "stuff": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\"a frozen foods warehouse each week in the summer months \"", "description": "", "name": "stuff"}, "lower": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(m-1.5*s..m-0.5s#5)", "description": "", "name": "lower"}, "zlower": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround((m-lower)/s,2)", "description": "", "name": "zlower"}, "s": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(60..100#10)", "description": "", "name": "s"}, "p": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(normalcdf(zlower,0,1),4)", "description": "", "name": "p"}, "upper": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(m+0.5s..m+1.5*s#5)", "description": "", "name": "upper"}, "units1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\"k Wh\"", "description": "", "name": "units1"}, "prob2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(1-p1,2)", "description": "", "name": "prob2"}}, "ungrouped_variables": ["units1", "upper", "lower", "p1", "m", "amount", "zupper", "p", "s", "stuff", "tol", "zlower", "prob2", "prob1"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "functions": {}, "showQuestionGroupNames": false, "parts": [{"scripts": {}, "gaps": [{"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "prob1+tol", "minValue": "prob1-tol", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "prob2+tol", "minValue": "prob2-tol", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}], "type": "gapfill", "prompt": "

Find the probability that in a particular week the {amount} is less than {lower} {units1}:

\n

Probability = ?[[0]](to 2  decimal places)

\n

Find the probability that in a particular week the {amount} is greater than {upper} {units1}:

\n

Probability = ?[[1]](to 2  decimal places)

", "showCorrectAnswer": true, "marks": 0}], "statement": "\n

The {amount}, $X$, of {stuff}  is normally distributed with mean {m}k and standard deviation {s}{units1}.

\n

i.e.   \\[X \\sim \\operatorname{N}(\\var{m},\\var{s}^2)\\]

\n

 

\n ", "tags": ["ACC1012", "checked2015", "MAS1403"], "rulesets": {}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "\n \t\t

1/1/2012:

\n \t\t

Can be configured to other applications using the string variables suppplied. Included tag sc.

\n \t\t", "licence": "Creative Commons Attribution 4.0 International", "description": "

Given a random variable $X$ normally distributed as $\\operatorname{N}(m,\\sigma^2)$ find probabilities $P(X \\gt a),\\; a \\gt m;\\;\\;P(X \\lt b),\\;b \\lt m$.

"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "

1. Converting to $\\operatorname{N}(0,1)$

\n

$\\simplify[all,!collectNumbers]{P(X < {lower}) = P(Z < ({lower} -{m}) / {s}) =1 -P(Z < {m-lower}/{s})} = 1-P(z<\\var{zlower})=1 -\\var{p} = \\var{prob1}$ to 2 decimal places.

\n

2. Converting to $\\operatorname{N}(0,1)$

\n

$\\simplify[all,!collectNumbers]{P(X > {upper}) = P(Z > ({upper} -{m}) / {s}) = 1 -P(Z < {upper-m}/{s})} = 1-P(z<\\var{zupper})=1-\\var{p1} = \\var{prob2}$ to 2 decimal places.

"}, {"name": "Decide if variable is binomial or Poisson, from description, ", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variable_groups": [], "variables": {"p2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "switch(t=0,random(0..abs(b)-1 except p1),random(0..abs(pd)-1 except p3))", "description": "", "name": "p2"}, "mm": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[[1,-1],[1-2*t,2*t-1],[-1,1]]", "description": "", "name": "mm"}, "b": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\n[\"20% of eggs from a family-run farm are bad. X is the number of bad eggs in a box of a dozen.\",\n \"A salesperson has a 50% chance of making a sale on a customer visit and she arranges 10 visits in a day. Let X be the number of sales that day.\",\n \"30% of items off a factory production line have been shown to have defects. Let A be the number of defectives in a box of 20 such items.\",\n \"One in ten new small businesses in the north-east goes bust within a year. Let X be the number of small businesses that fail in the next year out of thirty that have been set up.\",\n \"The probability that an office photocopier will fail on any given day is 0.15. The human resources office at Newcastle University has ten such photocopiers; Let Y be the number of photocopiers that fail today.\",\n \"Callers to the Vodaphone call centre will get through to an operator immediately with probability 0.25. X is the number of callers that speak to an operator immediately out of thirty such callers.\",\n \"Experience has shown that two in every ten components produced by a circuitboard company will be defective. A random sample of 100 components is inspected for defects, and D is the number of defectives in this sample.\"]\n", "description": "", "name": "b"}, "ch1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "b[p1]", "description": "", "name": "ch1"}, "p1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(0..abs(b)-1)", "description": "", "name": "p1"}, "ch2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "switch(t=0,b[p2],pd[p2])", "description": "", "name": "ch2"}, "p3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(0..abs(pd)-1)", "description": "", "name": "p3"}, "ch3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "pd[p3]", "description": "", "name": "ch3"}, "t": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(0,1)", "description": "", "name": "t"}, "pd": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\n[\"Y is the number of flights sold per hour by an online travel agency. This travel agency usually sells 10 flights per hour.\",\n \"X is the number of cars sold by a local garage in a month. This garage usually sells about 10 cars per month.\",\n \"The number of calls, Y, received at the British Passport Office in Durham occurs at the rate of 10 a minute.\",\n \"We are interested in X, the number of machine breakdowns in a day. Such breakdowns at a particular IT company occur at a rate of eight per week.\",\n \"X is the number of e-mails arriving in your inbox in a one hour period. On average you receive 3 e-mails per hour.\",\n \"On average, three patients arrive at a local Accident and Emergency department every hour. We count the number, X, of patients in an hour period.\",\n \"About five customers arrive at a fish shop queue every ten minutes during the lunch time rush. We count X, the number of customers arriving during the lunch time rush.\"]\n", "description": "", "name": "pd"}}, "ungrouped_variables": ["p2", "p3", "b", "mm", "ch3", "ch1", "ch2", "p1", "t", "pd"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "functions": {}, "showQuestionGroupNames": false, "parts": [{"displayType": "radiogroup", "minMarks": 0, "layout": {"type": "all", "expression": ""}, "choices": ["{ch1}", "{ch2}", "{ch3}"], "matrix": "mm", "type": "m_n_x", "maxAnswers": 0, "shuffleChoices": true, "warningType": "none", "scripts": {}, "marks": 0, "minAnswers": 0, "maxMarks": 0, "shuffleAnswers": false, "showCorrectAnswer": true, "answers": ["Binomial Distribution", "Poisson Distribution"]}], "statement": "\n

Which of the following random variables could be modelled with a binomial distribution and which could be modelled with a Poisson distribution?

\n

You will lose 1 mark for every incorrect answer. The minimum mark is 0.

\n ", "tags": ["ACC1012", "checked2015", "MAS1403"], "rulesets": {}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "

06/12/2013

\n

Replaced a Poisson scenario that wasn't strictly Poisson. (AJY)

\n

31/12/2012:

\n


Checked choices, OK. Added tag sc as examples can be easily added to via the arrays b and pd.

", "licence": "Creative Commons Attribution 4.0 International", "description": "

Given descriptions of  3 random variables, decide whether or not each is from a Poisson or Binomial distribution.

"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "

No solution given.

"}, {"name": "Probability, expectation and standard deviation of binomial distribution", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variable_groups": [], "variables": {"thisnumber": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(number1<6,random(2..3), if(number1<8,random(2..4),random(3..6)))", "name": "thisnumber", "description": ""}, "tol": {"templateType": "anything", "group": "Ungrouped variables", "definition": "0.001", "name": "tol", "description": ""}, "descx1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\"number of chocolate chip cookies in our sample:\"", "name": "descx1", "description": ""}, "thismany": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(15..20)", "name": "thismany", "description": ""}, "post": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\"% of biscuits made by a baker are chocolate chip cookies.\"", "name": "post", "description": ""}, "prob1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(tprob1,3)", "name": "prob1", "description": ""}, "this": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\"our selection contains exactly \"", "name": "this", "description": ""}, "v": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(thatnumber=1,0,1)", "name": "v", "description": ""}, "pre": {"templateType": "anything", "group": "Ungrouped variables", "definition": "' '", "name": "pre", "description": ""}, "tprob1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "binomialpdf(thisnumber,number1,prob)", "name": "tprob1", "description": ""}, "else": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\"biscuits are selected at random.\"", "name": "else", "description": ""}, "something": {"templateType": "anything", "group": "Ungrouped variables", "definition": "''", "name": "something", "description": ""}, "thisaswell": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\"our selection contains no more than \"", "name": "thisaswell", "description": ""}, "things": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\"chocolate chip cookies.\"", "name": "things", "description": ""}, "descx": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\"the number of chocolate chip cookies\"", "name": "descx", "description": ""}, "sd": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(sqrt(number1*prob*(1-prob)),3)", "name": "sd", "description": ""}, "thatnumber": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,2)", "name": "thatnumber", "description": ""}, "tprob2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "binomialcdf(thatnumber,number1,prob)", "name": "tprob2", "description": ""}, "prob2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(tprob2,3)", "name": "prob2", "description": ""}, "what": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\"daily sales.\"", "name": "what", "description": ""}, "prob": {"templateType": "anything", "group": "Ungrouped variables", "definition": "thismany/100", "name": "prob", "description": ""}, "number1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(5..12)", "name": "number1", "description": ""}}, "ungrouped_variables": ["pre", "descx1", "something", "thisnumber", "what", "things", "descx", "tol", "prob", "thisaswell", "else", "thismany", "number1", "post", "prob2", "prob1", "thatnumber", "this", "v", "tprob1", "tprob2", "sd"], "rulesets": {}, "functions": {}, "showQuestionGroupNames": false, "parts": [{"scripts": {}, "gaps": [{"correctAnswerFraction": false, "showPrecisionHint": false, "scripts": {}, "allowFractions": false, "type": "numberentry", "showCorrectAnswer": true, "minValue": "number1", "maxValue": "number1", "marks": 0.25}, {"correctAnswerFraction": false, "showPrecisionHint": false, "scripts": {}, "allowFractions": false, "type": "numberentry", "showCorrectAnswer": true, "minValue": "prob", "maxValue": "prob", "marks": 0.25}, {"correctAnswerFraction": false, "showPrecisionHint": false, "scripts": {}, "allowFractions": false, "type": "numberentry", "showCorrectAnswer": true, "minValue": "number1*thismany/100", "maxValue": "number1*thismany/100", "marks": 0.5}, {"correctAnswerFraction": false, "showPrecisionHint": false, "scripts": {}, "allowFractions": false, "type": "numberentry", "showCorrectAnswer": true, "minValue": "sd-tol", "maxValue": "sd+tol", "marks": 1}], "type": "gapfill", "showCorrectAnswer": true, "prompt": "\n

Assuming a binomial distribution for $X$ , {descX}, write down the values of $n$ and $p$.

\n

$X \\sim \\operatorname{bin}(n,p)$

\n

$n=\\; $?[[0]]        $p=\\;$?[[1]]

\n

Find $\\operatorname{E}[X]$ the expected {descX1}

\n

$\\operatorname{E}[X]=$?[[2]]

\n

Find the standard deviation for the {descX1}

\n

Standard deviation = ? [[3]] (to 3 decimal places).

\n ", "marks": 0}, {"scripts": {}, "gaps": [{"correctAnswerFraction": false, "showPrecisionHint": false, "scripts": {}, "allowFractions": false, "type": "numberentry", "showCorrectAnswer": true, "minValue": "prob1-tol", "maxValue": "prob1+tol", "marks": 1}, {"correctAnswerFraction": false, "showPrecisionHint": false, "scripts": {}, "allowFractions": false, "type": "numberentry", "showCorrectAnswer": true, "minValue": "prob2-tol", "maxValue": "prob2+tol", "marks": 1}], "type": "gapfill", "showCorrectAnswer": true, "prompt": "\n

Find the probability that {this} $\\var{thisnumber}$ {things}

\n

$\\operatorname{P}(X=\\var{thisnumber})=$? [[0]] (to 3 decimal places).

\n

 

\n

Find the probability that {thisaswell} {thatnumber} {things}

\n

Probability = ? [[1]] (to 3 decimal places).

\n ", "marks": 0}], "statement": "

{pre} $\\var{thismany}$ {post}

\n

{something} $\\var{number1}$ {else}

\n

 

\n

 

\n

 

\n

 

", "tags": ["checked2015", "MAS1403"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "

31/12/2012:

\n

Can be configured to other applications using the string variables supplied. Hence added tag sc.

\n

Not as yet properly tested.

\n

13/01/2013:

\n

Used stats extension functions binomialpdf and binomialcdf instead of calculating insitu.

", "licence": "Creative Commons Attribution 4.0 International", "description": "\n \t\t

Application of the binomial distribution given probabilities of success of an event.

\n \t\t

Finding probabilities using the binomial distribution.

\n \t\t"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "\n

a)

\n

1. $X \\sim \\operatorname{bin}(\\var{number1},\\var{prob})$, so $n= \\var{number1},\\;\\;p=\\var{prob}$.

\n

2. The expectation is given by $\\operatorname{E}[X]=n\\times p=\\var{number1}\\times \\var{prob}=\\var{number1*prob}$

\n

3. $\\operatorname{stdev}(X)=\\sqrt{n\\times p \\times (1-p)}=\\sqrt{\\var{number1}\\times \\var{prob} \\times \\var{1-prob}}=\\var{sd}$ to 3 decimal places.

\n

b)

\n

1. \\[ \\begin{eqnarray*}\\operatorname{P}(X = \\var{thisnumber}) &=& \\dbinom{\\var{number1}}{\\var{thisnumber}}\\times\\var{prob}^{\\var{thisnumber}}\\times(1-\\var{prob})^{\\var{number1-thisnumber}}\\\\& =& \\var{comb(number1,thisnumber)} \\times\\var{prob}^{\\var{thisnumber}}\\times\\var{1-prob}^{\\var{number1-thisnumber}}\\\\&=&\\var{prob1}\\end{eqnarray*} \\] to 3 decimal places.

\n

 

\n

2. 

\n

\\[ \\begin{eqnarray*}\\operatorname{P}(X \\leq \\var{thatnumber})& =& \\simplify[all,!collectNumbers]{P(X = 0) + P(X = 1) + {v}*P(X = 2)}\\\\& =& \\simplify[zeroFactor,zeroTerm,unitFactor]{{1 -prob} ^ {number1}+ {number1} *{prob} *{1 -prob} ^ {number1 -1} + {v} * ({number1} * {number1 -1}/2)* {prob} ^ 2 *( {1 -prob} ^ {number1 -2})}\\\\& =& \\var{prob2}\\end{eqnarray*} \\]

\n

to 3 decimal places.

\n

 

\n "}, {"name": "Probability, expectation and standard deviation of Poisson distribution", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variable_groups": [], "variables": {"thisnumber": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(thismany<8,thismany-1, random(3..7))", "description": "", "name": "thisnumber"}, "tol": {"templateType": "anything", "group": "Ungrouped variables", "definition": "0.001", "description": "", "name": "tol"}, "v": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(number1=2,0,1)", "description": "", "name": "v"}, "things": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\"sales.\"", "description": "", "name": "things"}, "tprob2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(number1=2,e^(-thismany)*(1+thismany),e^(-thismany)*(1+thismany+thismany^2/2))", "description": "", "name": "tprob2"}, "thisaswell": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\"a randomly selected employee receives a warning.\"", "description": "", "name": "thisaswell"}, "tprob1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "(thismany^thisnumber)*e^(-thismany)/fact(thisnumber)", "description": "", "name": "tprob1"}, "descx": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\"the number of sales per day\"", "description": "", "name": "descx"}, "sd": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(sqrt(thismany),3)", "description": "", "name": "sd"}, "thismany": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(5..10)", "description": "", "name": "thismany"}, "this": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\"a randomly selected employee makes exactly \"", "description": "", "name": "this"}, "what": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\"daily sales.\"", "description": "", "name": "what"}, "prob2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(tprob2,3)", "description": "", "name": "prob2"}, "prob1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(tprob1,3)", "description": "", "name": "prob1"}, "pre": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\"The mean number of sales per day at a telecommunications centre is \"", "description": "", "name": "pre"}, "number1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(thismany<8,2, 3)", "description": "", "name": "number1"}, "else": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\"per day.\"", "description": "", "name": "else"}, "something": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\"Employees receive a warning if they make less than \"", "description": "", "name": "something"}}, "ungrouped_variables": ["pre", "what", "this", "things", "number1", "descx", "else", "thismany", "something", "tol", "v", "tprob1", "sd", "tprob2", "prob2", "thisnumber", "thisaswell", "prob1"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "functions": {}, "showQuestionGroupNames": false, "parts": [{"scripts": {}, "gaps": [{"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "thismany", "minValue": "thismany", "correctAnswerFraction": false, "marks": 0.25, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "thismany", "minValue": "thismany", "correctAnswerFraction": false, "marks": 0.25, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "sd+tol", "minValue": "sd-tol", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}], "type": "gapfill", "prompt": "\n

Assuming a Poisson distribution for $X$, {descX}, write down the value of $\\lambda$.

\n

$X \\sim \\operatorname{Poisson}(\\lambda)$

\n

$\\lambda = $?[[0]]

\n

Find $\\operatorname{E}[X]$ the expected {descX}.

\n

$\\operatorname{E}[X]=$?[[1]]

\n

Find the standard deviation for {what}.

\n

Standard deviation = ? [[2]] (to 3 decimal places).

\n ", "showCorrectAnswer": true, "marks": 0}, {"scripts": {}, "gaps": [{"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "prob1+tol", "minValue": "prob1-tol", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "prob2+tol", "minValue": "prob2-tol", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}], "type": "gapfill", "prompt": "\n

Find the probability that {this} $\\var{thisnumber}$ {things}

\n

$\\operatorname{P}(X=\\var{thisnumber})=$? [[0]] (to 3 decimal places).

\n

 

\n

Find the probability that {thisaswell}

\n

Probability = ? [[1]] (to 3 decimal places).

\n ", "showCorrectAnswer": true, "marks": 0}], "statement": "\n

{pre} $\\var{thismany}$.

\n

{something} $\\var{number1}$ {else}

\n

 

\n ", "tags": ["checked2015", "MAS1403"], "rulesets": {}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "\n \t\t

31/12/2012:

\n \t\t

Can be configured to other applications using the string variables supplied. Hence added tag sc.

\n \t\t

Not as yet properly tested.

\n \t\t", "licence": "Creative Commons Attribution 4.0 International", "description": "\n \t\t

Application of the Poisson distribution given expected number of events per interval.

\n \t\t

Finding probabilities using the Poisson distribution.

\n \t\t"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "\n

a)

\n

1. $X \\sim \\operatorname{Poisson}(\\var{thismany})$, so $\\lambda = \\var{thismany}$.

\n

2. The expectation is given by $\\operatorname{E}[X]=\\lambda=\\var{thismany}$

\n

3. $\\operatorname{stdev}(X)=\\sqrt{\\lambda}=\\sqrt{\\var{thismany}}=\\var{sd}$ to 3 decimal places.

\n

b)

\n

1. \\[ \\begin{eqnarray*}\\operatorname{P}(X = \\var{thisnumber}) &=& \\frac{e ^ { -\\var{thismany}}\\var{thismany} ^ {\\var{thisnumber}}} {\\var{thisnumber}!}\\\\& =& \\var{prob1} \\end{eqnarray*} \\] to 3 decimal places.

\n

 

\n

2. If an employee receives a warning then he or she must have sold less than {number1}.

\n

Hence we need to find :

\n

\\[ \\begin{eqnarray*}\\operatorname{P}(X < \\var{number1})& =& \\simplify[all,!collectNumbers]{P(X = 0) + P(X = 1) + {v}*P(X = 2)}\\\\& =& \\simplify[all,!collectNumbers]{e ^ { -thismany} + {thismany} * e ^ { -thismany} + {v} * (({thismany} ^ 2 * e ^ { -thismany}) / 2)} \\\\&=& \\var{prob2} \\end{eqnarray*} \\]

\n

to 3 decimal places.

\n

 

\n "}, {"name": "Probability, expectation and variance of exponential distribution", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variable_groups": [], "variables": {"this": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\"customer arrivals at the RyanJet check-in desk at Newcastle Airport \"", "name": "this", "description": ""}, "ans2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(1/ra^2,3)", "name": "ans2", "description": ""}, "ans3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(tans3,3)", "name": "ans3", "description": ""}, "ans1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(1/ra,3)", "name": "ans1", "description": ""}, "thistime": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(0.8..1.8#0.1)", "name": "thistime", "description": ""}, "tol": {"templateType": "anything", "group": "Ungrouped variables", "definition": "0.001", "name": "tol", "description": ""}, "ra": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(0.2..1.2#0.1)", "name": "ra", "description": ""}, "that": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\"two customers arriving \"", "name": "that", "description": ""}, "tans3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "1-exp(-ra*thistime)", "name": "tans3", "description": ""}, "period": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\"minutes\"", "name": "period", "description": ""}}, "ungrouped_variables": ["that", "this", "ans1", "ans2", "ans3", "period", "ra", "tol", "tans3", "thistime"], "rulesets": {}, "showQuestionGroupNames": false, "functions": {}, "parts": [{"scripts": {}, "gaps": [{"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "ans1+tol", "minValue": "ans1-tol", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "ans2+tol", "minValue": "ans2-tol", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}], "type": "gapfill", "prompt": "\n

Find $\\operatorname{E}[X]$ between {this}:

\n

$\\operatorname{E}[X]=\\;$?[[0]]{period} (enter as a decimal correct to 3 decimal places).

\n

Find $\\operatorname{Var}(X)$:

\n

$\\operatorname{Var}(X)=\\;$?[[1]](enter as a decimal correct to 3 decimal places).

\n ", "showCorrectAnswer": true, "marks": 0}, {"scripts": {}, "gaps": [{"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "ans3+tol", "minValue": "ans3-tol", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}], "type": "gapfill", "prompt": "

Find the probability that the time between {that} is less than $\\var{thistime}$ {period}:

\n

 $P(X \\lt \\var{thistime})=\\;$?[[0]](enter as a decimal correct to 3 decimal places)

", "showCorrectAnswer": true, "marks": 0}], "variablesTest": {"condition": "", "maxRuns": 100}, "statement": "\n

The time,  in {period} between {this} follows an exponential distribution with rate $\\var{ra}$ i.e. 

\n

\\[X \\sim \\operatorname{exp}(\\var{ra})\\]

\n ", "tags": ["checked2015", "MAS1403"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "\n \t\t

1/01/2013:

\n \t\t

This question can be changed to other applications via string variables. Added tag sc.

\n \t\t", "licence": "Creative Commons Attribution 4.0 International", "description": "

Question on the exponential distribution involving a time intervals and arrivals application, finding expectation and variance. Also finding the probability that a time interval between arrivals is less than a given period. All parameters and times randomised. 

"}, "advice": "\n

If $X \\sim \\operatorname{exp}(\\lambda)$ then $\\displaystyle \\operatorname{E}[X] =\\frac{1}{\\lambda}$ and  $\\displaystyle \\operatorname{Var}(X)=\\frac{1}{\\lambda^2}$.

\n

Also $P(X \\lt a)=1-e^{-\\lambda a}$.

\n

a)

\n

If $X \\sim \\operatorname{exp}(\\var{ra})$ then:

\n

$\\displaystyle \\operatorname{E}[X] =\\frac{1}{\\lambda}=\\frac{1}{\\var{ra}}=\\var{ans1}$ to 3 decimal places.

\n

$\\displaystyle \\operatorname{Var}(X) =\\frac{1}{\\lambda^2}=\\frac{1}{\\var{ra}^2}=\\var{ans2}$ to 3 decimal places.

\n

b)

\n

$P(X \\lt \\var{thistime}) = 1 -(e ^ {-\\var{ ra} \\times \\var{thistime}}) = 1 -(e ^ { -\\var{ra * thistime}}) = \\var{ans3}$ to 3 decimal places.

\n "}, {"name": "Probability, expectation and variance of uniform distribution", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variable_groups": [], "variables": {"tol": {"templateType": "anything", "group": "Ungrouped variables", "definition": "0.001", "description": "", "name": "tol"}, "ans2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround((upper-lower)^2/12,3)", "description": "", "name": "ans2"}, "ans3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround((thisdis*1000-lower)/(upper-lower),3)", "description": "", "name": "ans3"}, "t": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(20..80)", "description": "", "name": "t"}, "ans1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "(upper+lower)/2", "description": "", "name": "ans1"}, "upper": {"templateType": "anything", "group": "Ungrouped variables", "definition": "lower+random(300..500#50)", "description": "", "name": "upper"}, "lower": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(500..1000#50)", "description": "", "name": "lower"}, "thisdis": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround((t*lower+(100-t)*upper)/100000,2)", "description": "", "name": "thisdis"}}, "ungrouped_variables": ["upper", "lower", "ans1", "ans2", "ans3", "thisdis", "t", "tol"], "rulesets": {}, "showQuestionGroupNames": false, "functions": {}, "parts": [{"scripts": {}, "gaps": [{"showCorrectAnswer": true, "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "correctAnswerFraction": false, "minValue": "ans1", "maxValue": "ans1", "marks": 1}, {"showCorrectAnswer": true, "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "correctAnswerFraction": false, "minValue": "ans2-tol", "maxValue": "ans2+tol", "marks": 1}], "type": "gapfill", "showCorrectAnswer": true, "prompt": "

Find $\\operatorname{E}[X]$, the expected distance in metres of the new supermarket from the town centre:

\n

$\\operatorname{E}[X]=\\;?$[[0]]m  (to 3 decimal places).

\n

Also find the variance $\\operatorname{Var}(X)$:

\n

 $\\operatorname{Var}(X)=\\;$?[[1]]  (to 3 decimal places).

\n

 

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

Find the probability that the supermarket opens within $\\var{thisdis}$ kilometres of the town centre.

\n

$P(X \\le \\var{thisdis}\\textrm{km})=\\;$?[[0]]

\n

(to 3 decimal places).

", "marks": 0}], "statement": "\n

A new supermarket plans to open somewhere on the outskirts of a town. In fact, $X$, the distance of a new supermarket from the town centre is Uniformly distributed between $\\var{lower}$ metres and $\\var{upper}$ metres i.e. 

\n

\\[X \\sim \\operatorname{U}(\\var{lower},\\var{upper})\\]

\n ", "tags": ["checked2015", "MAS1403"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "

1/01/2013:

\n

Although this application is fixed, it could be made into a \"scenario\" based question by introducing string variables, so added tag sc.

", "licence": "Creative Commons Attribution 4.0 International", "description": "

Exercise using a given uniform distribution $X$, calculating the expectation and variance. Also finding $P(X \\le a)$ for a given value $a$.

"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "

a) For a Uniform distribution \\[X \\sim \\operatorname{U}(\\var{lower},\\var{upper})\\] we have:

\n

$\\displaystyle \\operatorname{E}[X] = \\frac{\\var{lower}+\\var{upper}}{2}=\\var{ans1}$m

\n

$\\displaystyle \\operatorname{Var}(X) = \\frac{(\\var{upper}-\\var{lower})^2}{12}=\\frac{(\\var{upper-lower})^2}{12}=\\var{ans2}$ to 3 decimal places.

\n

b)

\n

$\\displaystyle P(X \\le \\var{thisdis}\\textrm{km})=\\frac{\\var{thisdis}\\times 1000 -\\var{lower}}{\\var{upper}-\\var{lower}}=\\var{ans3}$ to 3 decimal places.

"}, {"name": "Find a confidence interval for the population mean with variance unknown, , ", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Vicky Hall", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/659/"}, {"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "tags": ["checked2015"], "metadata": {"description": "

Finding the confidence interval at either 90%, 95% or 99% for the mean given the mean and standard deviation of a sample. The population variance is not given and so the t test has to be used. Various scenarios are included.

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "

The management of {sc[s]} wants to {dothis[s]}.

\n

A random sample of {spec} $\\var{n}$ {t[s]} gave a mean and standard deviation of {p}$\\var{m[s]}$ {units} and {p}$\\var{sd[s]}$ {units} respectively.

", "advice": "

1.

\n

The population variance is unknown. So we have to use the t tables to find the confidence interval.

\n

2.

\n

We now calculate the $\\var{confl}$ confidence interval:

\n

As we have $\\var{n}-1=\\var{n-1}$ degrees of freedom, the interval is given by:

\n

\\[ \\var{m[s]} \\pm t_{\\var{n-1}}\\sqrt{\\frac{\\var{sd[s]}^2}{\\var{n}}}\\]

\n

Looking up the t tables for $\\var{confl}$% we see that $t_{\\var{n-1}}=\\var{invt}$ to 3 decimal places.

\n

Hence:

\n

Lower value of the confidence interval $=\\;\\displaystyle \\var{m[s]} -\\var{invt} \\sqrt{\\frac{\\var{sd[s]} ^ 2} {\\var{n}}} =\\var{p} \\var{lci}$ {units} to 2 decimal places.

\n

Upper value of the confidence interval $=\\;\\displaystyle \\var{m[s]} +\\var{invt} \\sqrt{\\frac{\\var{sd[s]} ^ 2} {\\var{n}}} = \\var{p}\\var{uci}$ {units} to 2 decimal places.

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"s": {"name": "s", "group": "Ungrouped variables", "definition": "random(0..abs(sc)-1)", "description": "", "templateType": "anything", "can_override": false}, "sc1ch": {"name": "sc1ch", "group": "Ungrouped variables", "definition": "random(\"hotels\",\"motels\", \"Bed and Breakfasts\",\"budget hotels\")", "description": "", "templateType": "anything", "can_override": false}, "sc": {"name": "sc", "group": "Ungrouped variables", "definition": "\n [\"a national chain of \"+ sc1ch,\n \"a \"+sc2ch + \" chain of clothing shops \",\n \" a large factory \",\n \" a regional passenger airline in \"+sc4ch,\n \"Choclastic!, a company producing a variety of chocolate bars \",\n \" a large bakery \"]\n ", "description": "", "templateType": "anything", "can_override": false}, "t": {"name": "t", "group": "Ungrouped variables", "definition": "\n [\"vacated rooms was inspected by the management and this\",\n \"clothing outlets \",\n \"workers\",\n \"tickets \",\n \"chocolate bars \",\n sc6ch+\" \"]\n \n ", "description": "", "templateType": "anything", "can_override": false}, "sc4ch": {"name": "sc4ch", "group": "Ungrouped variables", "definition": "random(\"the Caribbean\",\"the Mediterranean\",\"North East England\",\"South West England\",\"California\")", "description": "", "templateType": "anything", "can_override": false}, "n": {"name": "n", "group": "Ungrouped variables", "definition": "random(10..30)", "description": "", "templateType": "anything", "can_override": false}, "sc2ch": {"name": "sc2ch", "group": "Ungrouped variables", "definition": "random(\"local\",\"national\")", "description": "", "templateType": "anything", "can_override": false}, "dothis": {"name": "dothis", "group": "Ungrouped variables", "definition": "\n [\"estimate the mean cost per room of repairing damage caused by its customers during a bank holiday weekend\",\n \"estimate the mean monthly sales of all of its outlets\",\n \"estimate the mean hours worked per week of all its employees\",\n \"estimate the mean cost of a ticket on its most popular route\",\n \"estimate the mean weight of \"+sc5ch+\" inside bars of its most popular product\",\n \"estimate the mean amount of saturated fat in its \"+ sc6ch]\n \n \n \n ", "description": "", "templateType": "anything", "can_override": false}, "invt": {"name": "invt", "group": "Ungrouped variables", "definition": "precround(tinvt,3)", "description": "", "templateType": "anything", "can_override": false}, "p": {"name": "p", "group": "Ungrouped variables", "definition": "switch(s=0 or s=1 or s=3,'\u00a3',' ')", "description": "", "templateType": "anything", "can_override": false}, "sc5ch": {"name": "sc5ch", "group": "Ungrouped variables", "definition": "random(\"caramel\",\"Turkish delight\",\"honeycomb\",\"nuts\")", "description": "", "templateType": "anything", "can_override": false}, "sc6ch": {"name": "sc6ch", "group": "Ungrouped variables", "definition": "random(\"Cornish pasties\",\"sausage rolls\",\"chicken pies\",\"minced beef pasties\")", "description": "", "templateType": "anything", "can_override": false}, "m": {"name": "m", "group": "Ungrouped variables", "definition": "\n [random(30..100#0.01),\n random(40000..80000#500),\n random(34..48#0.01),\n random(100..300#0.01),\n random(10..20#0.01),\n random(3.5..6#0.01)]\n \n ", "description": "", "templateType": "anything", "can_override": false}, "lci": {"name": "lci", "group": "Ungrouped variables", "definition": "precround(tlci,2)", "description": "", "templateType": "anything", "can_override": false}, "uci": {"name": "uci", "group": "Ungrouped variables", "definition": "precround(tuci,2)", "description": "", "templateType": "anything", "can_override": false}, "units": {"name": "units", "group": "Ungrouped variables", "definition": "switch(s=2,\"hours\",s=4,\"g\",s=5,\"g per 100g\",\" \")", "description": "", "templateType": "anything", "can_override": false}, "tuci": {"name": "tuci", "group": "Ungrouped variables", "definition": "m[s]+invt*sqrt(sd[s]^2/n)", "description": "", "templateType": "anything", "can_override": false}, "sd": {"name": "sd", "group": "Ungrouped variables", "definition": "\n [random(3..10#0.01),\n random(500..4000#0.5),\n random(2..5#0.01),\n random(10..40#0.01),\n random(1..3#0.01),\n random(0.5..1#0.01)]\n ", "description": "", "templateType": "anything", "can_override": false}, "tlci": {"name": "tlci", "group": "Ungrouped variables", "definition": "m[s]-invt*sqrt(sd[s]^2/n)", "description": "", "templateType": "anything", "can_override": false}, "spec": {"name": "spec", "group": "Ungrouped variables", "definition": "if(s=2,\"the timecards of \", \" \")", "description": "", "templateType": "anything", "can_override": false}, "tinvt": {"name": "tinvt", "group": "Ungrouped variables", "definition": "studenttinv((confl+100)/200,n-1)", "description": "", "templateType": "anything", "can_override": false}, "confl": {"name": "confl", "group": "Ungrouped variables", "definition": "random(90,95,99)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["m", "uci", "invt", "units", "lci", "spec", "sc2ch", "sc1ch", "tinvt", "confl", "tuci", "dothis", "sc4ch", "sc6ch", "n", "p", "s", "tlci", "t", "sc", "sc5ch", "sd"], "variable_groups": [], "functions": {"pounds": {"parameters": [["n", "number"]], "type": "number", "language": "javascript", "definition": "return Numbas.util.currency(n,'\u00a3','p');"}}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Is the population variance known or unknown?

\n

[[0]]

\n

Calculate a $\\var{confl}$% confidence interval $(a,b)$ for the population mean:

\n

$a=\\;${p}[[1]] {units}          $b=\\;${p}[[2]] {units}

\n

Enter both to 2 decimal places.

", "gaps": [{"type": "1_n_2", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": true, "displayType": "radiogroup", "displayColumns": 0, "showCellAnswerState": true, "choices": ["Known", "Unknown"], "matrix": [0, 1], "distractors": ["", ""]}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "lci-0.01", "maxValue": "lci+0.01", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "uci-0.01", "maxValue": "uci+0.01", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Find a confidence interval given the mean of a sample, , ", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Vicky Hall", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/659/"}, {"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "tags": ["checked2015"], "metadata": {"description": "

Finding the confidence interval at either 90%, 95% or 99% for the mean given the mean of a sample. The population variance is given and so the z values are used. Various scenarios are included.

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "\n

A company {sc[s]} {dothis[s]} $\\var{sd[s]}$ {units}.

\n

A random sample of $\\var{n}$ {t[s]} gives a mean  of $\\var{m[s]}$ {units}. 

\n

 

\n ", "advice": "

a)

\n

We use the z tables to find the confidence interval as we know the population variance.

\n

We now calculate the $\\var{confl}$% confidence interval.

\n

Note that $z_{\\var{confl/100}}=\\var{zval}$ and the confidence interval is given by:

\n

\\[ \\var{m[s]} \\pm z_{\\var{confl/100}}\\sqrt{\\frac{\\var{sd2}}{\\var{n}}}\\]

\n

Hence:

\n

Lower value of the confidence interval $=\\;\\displaystyle \\var{m[s]} -\\var{zval} \\sqrt{\\frac{\\var{sd2}} {\\var{n}}} = \\var{lci}${units} to 2 decimal places.

\n

Upper value of the confidence interval $=\\;\\displaystyle \\var{m[s]} +\\var{zval} \\sqrt{\\frac{\\var{sd2}} {\\var{n}}} = \\var{uci}${units} to 2 decimal places.

\n

b)

\n

Since $\\var{aim}$ {doornot} {lies} in the confidence interval the answer is {Correct}.

\n

 

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"aim": {"name": "aim", "group": "Ungrouped variables", "definition": "if(s=0,750,if(s=1,100,if(s=2,100,1500)))", "description": "", "templateType": "anything", "can_override": false}, "confl": {"name": "confl", "group": "Ungrouped variables", "definition": "random(90,95,99)", "description": "", "templateType": "anything", "can_override": false}, "sd": {"name": "sd", "group": "Ungrouped variables", "definition": "\n [random(800..1400#20),\n random(1200..1800#20),\n random(300..600#20),\n random(100..200#0.1)]\n \n ", "description": "", "templateType": "anything", "can_override": false}, "sd1": {"name": "sd1", "group": "Ungrouped variables", "definition": "if(s=3,sd[s],sqrt(sd[s]))", "description": "", "templateType": "anything", "can_override": false}, "sc4ch": {"name": "sc4ch", "group": "Ungrouped variables", "definition": "random(\"supermarkets\",\"clothing retailers\",\"department stores\",\"fast food outlets\")", "description": "", "templateType": "anything", "can_override": false}, "lies": {"name": "lies", "group": "Ungrouped variables", "definition": "if(test=0,\"lies\",\"lie\")", "description": "", "templateType": "anything", "can_override": false}, "howwell": {"name": "howwell", "group": "Ungrouped variables", "definition": "\n [\"On average, is the company reaching its target of 750g per bag?\",\n \"The bolts are designed to be 100mm long. Is the process satisfactory?\",\n \"The vending machines are supposed to fill 100ml cups. Is the machine working satisfactorily?\",\n \"The company aims for an average salary of \u00a31500 per month per worker. Is the aim being met?\"]\n ", "description": "", "templateType": "anything", "can_override": false}, "correct": {"name": "correct", "group": "Ungrouped variables", "definition": "if(test=0, \"yes\", \"no\")", "description": "", "templateType": "anything", "can_override": false}, "n": {"name": "n", "group": "Ungrouped variables", "definition": "random(20..100)", "description": "", "templateType": "anything", "can_override": false}, "sc2ch": {"name": "sc2ch", "group": "Ungrouped variables", "definition": "random(\"bolts\",\"screws\")", "description": "", "templateType": "anything", "can_override": false}, "dothis": {"name": "dothis", "group": "Ungrouped variables", "definition": "\n [var1 + \" is\",\n \"with a \"+var2+\" of\",\n var3+ \" is\",\n \"knows that the population standard deviation for the wages of employees is\"]\n \n \n \n \n ", "description": "", "templateType": "anything", "can_override": false}, "var3": {"name": "var3", "group": "Ungrouped variables", "definition": "random(\"The variance of the filling process \",\"The process variance \")", "description": "", "templateType": "anything", "can_override": false}, "sc3ch": {"name": "sc3ch", "group": "Ungrouped variables", "definition": "random(\"hot water.\",\"tea.\",\"coffee.\",\"hot chocolate.\",\"cappuccino.\")", "description": "", "templateType": "anything", "can_override": false}, "m": {"name": "m", "group": "Ungrouped variables", "definition": "\n [random(700..745),\n random(95..98),\n random(90..99),\n random(1000..2500#50)]\n \n \n ", "description": "", "templateType": "anything", "can_override": false}, "mm": {"name": "mm", "group": "Ungrouped variables", "definition": "[1-test,test]", "description": "", "templateType": "anything", "can_override": false}, "sc1ch": {"name": "sc1ch", "group": "Ungrouped variables", "definition": "random(\"flour.\",\"sugar.\",\"dried milk.\",\"instant coffee.\")", "description": "", "templateType": "anything", "can_override": false}, "var2": {"name": "var2", "group": "Ungrouped variables", "definition": "random(\"process variance \",\"population variance \")", "description": "", "templateType": "anything", "can_override": false}, "lci": {"name": "lci", "group": "Ungrouped variables", "definition": "precround(tlci,2)", "description": "", "templateType": "anything", "can_override": false}, "sc": {"name": "sc", "group": "Ungrouped variables", "definition": "\n [\"packs sacks of \"+sc1ch,\n \"manufactures \"+sc2ch,\n \"produces vending machines which fill cups with \"+sc3ch,\n \"in charge of the accounts of a large chain of \"+sc4ch\n ]\n \n ", "description": "", "templateType": "anything", "can_override": false}, "uci": {"name": "uci", "group": "Ungrouped variables", "definition": "precround(tuci,2)", "description": "", "templateType": "anything", "can_override": false}, "units": {"name": "units", "group": "Ungrouped variables", "definition": "switch(s=0,\"g\",s=1,\"mm\",s=2,\"ml\",\"pounds\")", "description": "", "templateType": "anything", "can_override": false}, "tuci": {"name": "tuci", "group": "Ungrouped variables", "definition": "m[s]+zval*sqrt(sd1^2/n)", "description": "", "templateType": "anything", "can_override": false}, "zval": {"name": "zval", "group": "Ungrouped variables", "definition": "if(confl=90,1.645,if(confl=95,1.96,2.576))", "description": "", "templateType": "anything", "can_override": false}, "tlci": {"name": "tlci", "group": "Ungrouped variables", "definition": "m[s]-zval*sqrt(sd1^2/n)", "description": "", "templateType": "anything", "can_override": false}, "spec": {"name": "spec", "group": "Ungrouped variables", "definition": "if(s=2,\"the timecards of \", \" \")", "description": "", "templateType": "anything", "can_override": false}, "s": {"name": "s", "group": "Ungrouped variables", "definition": "random(0..abs(sc)-1)", "description": "", "templateType": "anything", "can_override": false}, "test": {"name": "test", "group": "Ungrouped variables", "definition": "if(aim lci,0,1)", "description": "", "templateType": "anything", "can_override": false}, "doornot": {"name": "doornot", "group": "Ungrouped variables", "definition": "if(test=0, \" \",\"does not\")", "description": "", "templateType": "anything", "can_override": false}, "t": {"name": "t", "group": "Ungrouped variables", "definition": "\n [\"bags \",\n sc2ch,\n \"filled cups \",\n \"monthly wage slips \"]\n \n \n ", "description": "", "templateType": "anything", "can_override": false}, "var1": {"name": "var1", "group": "Ungrouped variables", "definition": "random(\"The variance of the filling process \",\"The process variance \")", "description": "", "templateType": "anything", "can_override": false}, "sd2": {"name": "sd2", "group": "Ungrouped variables", "definition": "if(s=3,sd[s]^2,sd[s])", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["sd1", "sd2", "howwell", "n", "doornot", "uci", "test", "confl", "spec", "var1", "var3", "var2", "sc2ch", "units", "zval", "sc1ch", "lci", "tuci", "lies", "mm", "dothis", "sc4ch", "m", "correct", "aim", "sc3ch", "s", "tlci", "t", "sc", "sd"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "\n

Calculate a  $\\var{confl}$% confidence interval $(a,b)$ for the population mean:

\n

$a=\\;$[[0]]{units}          $b=\\;$[[1]]{units}

\n

Enter both to 2 decimal places.

\n

 

\n ", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "lci-0.01", "maxValue": "lci+0.01", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "uci-0.01", "maxValue": "uci+0.01", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "\n

{howwell[s]}

\n

[[0]]

\n ", "gaps": [{"type": "1_n_2", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": 0, "showCellAnswerState": true, "choices": ["Yes", "No"], "matrix": "mm"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Find regression equation and correlation coefficient, ", "extensions": ["stats", "jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variable_groups": [], "variables": {"tol": {"templateType": "anything", "group": "Ungrouped variables", "definition": "0.001", "description": "", "name": "tol"}, "r1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[random(0..6),random(1..7),random(4..10),random(7..13),random(12..18),random(4..20),random(16..22),random(19..25),random(17..23),random(13..19),random(8..14),random(3..9)]", "description": "", "name": "r1"}, "spxy": {"templateType": "anything", "group": "Ungrouped variables", "definition": "sxy-t[0]*t[1]/n", "description": "", "name": "spxy"}, "a": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(1/n*(t[1]-spxy/ss[0]*t[0]),3)", "description": "", "name": "a"}, "tcorr": {"templateType": "anything", "group": "Ungrouped variables", "definition": "spxy/sqrt(ss[0]*ss[1])", "description": "", "name": "tcorr"}, "ssq": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[sum(map(x^2,x,r1)),sum(map(x^2,x,r2))]", "description": "", "name": "ssq"}, "prediction": {"templateType": "anything", "group": "Ungrouped variables", "definition": "round(a+b*thisval)", "description": "", "name": "prediction"}, "t": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[sum(r1),sum(r2)]", "description": "", "name": "t"}, "a1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(10..20)", "description": "", "name": "a1"}, "sumr": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(sum(map(res[x]^2,x,0..n-1)),3)", "description": "", "name": "sumr"}, "tol1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "0.01", "description": "", "name": "tol1"}, "beverage": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(\"home-brewed beer\",\"home-brewed lager\",\"specially-brewed beer\",\"super-strength lager\",\"cold-filtered lager\",\"ice-filtered cider\",\"cherry cider\")", "description": "", "name": "beverage"}, "n": {"templateType": "anything", "group": "Ungrouped variables", "definition": "12", "description": "", "name": "n"}, "ss": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[ssq[0]-t[0]^2/n,ssq[1]-t[1]^2/n]", "description": "", "name": "ss"}, "corr": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(tcorr,2)", "description": "", "name": "corr"}, "b": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(spxy/ss[0],3)", "description": "", "name": "b"}, "pub": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(\"Black Bull Inn\",\"County Inn\",\"Dog and Duck Pub\",\"Slug and Lettuce Pub\", \"Cross Keys Pub\",\"Newcastle Arms Pub\",\"Red Lion Pub\")", "description": "", "name": "pub"}, "res": {"templateType": "anything", "group": "Ungrouped variables", "definition": "map(precround(r2[x]-(a+b*r1[x]),2),x,0..n-1)", "description": "", "name": "res"}, "ch": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(0..11)", "description": "", "name": "ch"}, "sc": {"templateType": "anything", "group": "Ungrouped variables", "definition": "r1[ch]", "description": "", "name": "sc"}, "b1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(0.25..0.45#0.05)", "description": "", "name": "b1"}, "sxy": {"templateType": "anything", "group": "Ungrouped variables", "definition": "sum(map(r1[x]*r2[x],x,0..n-1))", "description": "", "name": "sxy"}, "thisval": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(15..22)", "description": "", "name": "thisval"}, "obj": {"templateType": "anything", "group": "Ungrouped variables", "definition": "['Jan','Feb','March','April','May','June','July','August','Sept','Oct','Nov','Dec']", "description": "", "name": "obj"}, "owner": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(\"Kevin\",\"Mary\",\"Bill\",\"Doreen\",\"Peter\",\"Helen\",\"Michael\",\"Samantha\")", "description": "", "name": "owner"}, "r2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "map(round(a1+b1*x+random(-9..9)),x,r1)", "description": "", "name": "r2"}, "ls": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(a+b*sc,2)", "description": "", "name": "ls"}, "tsqovern": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[t[0]^2/n,t[1]^2/n]", "description": "", "name": "tsqovern"}, "rsquared": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(spxy^2/(ss[0]*ss[1]),3)", "description": "", "name": "rsquared"}}, "ungrouped_variables": ["ch", "prediction", "b1", "owner", "sxy", "res", "spxy", "ls", "tol", "tcorr", "a", "ssq", "sumr", "pub", "a1", "thisval", "corr", "tsqovern", "b", "obj", "r1", "r2", "ss", "tol1", "n", "beverage", "t", "sc", "rsquared"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "functions": {"regressline": {"type": "html", "language": "javascript", "definition": "\n var div = Numbas.extensions.jsxgraph.makeBoard('600px','600px',\n{boundingBox:[-5,maxy,maxx,-5],\n axis:true,\n showNavigation:false,\n grid:false});\n var board = div.board; \nvar l1=board.create('text',[maxx/2,-2,'Temperature']);\nvar l2=board.create('text',[-2,maxy/2,'Sales']);\nvar names = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];\nfor (j=0;j<12;j++){ board.create('point',[r1[j],r2[j]],{fixed:true, style:3,name:'\\\\\\\\['+names[j]+'\\\\\\\\]'})};\nvar a1 = board.create('point',[minx+5,miny+5],{color:'blue'});\nvar b1 = board.create('point',[minx+7,miny+5],{color:'blue'});\nfunction updr(a,b){\n var s=0;\n for(var i=0;i<12;i++){\ns=s+Math.pow(r2[i]-a*r1[i]-b,2);}\ns=Numbas.math.niceNumber(Numbas.math.precround(s,2));\n$('#rsquared').text(s);}\n var li=board.create('line',[a1,b1], {straightFirst:false, straightLast:false});\n var a=0;\n var b=0;\n function dr(p){\n p.on('drag',function(){\n a = Numbas.math.niceNumber((b1.Y()-a1.Y())/(b1.X()-a1.X()));\n b = Numbas.math.niceNumber((a1.Y()*b1.X()-a1.X()*b1.Y())/(b1.X()-a1.X()));\n Numbas.exam.currentQuestion.parts[1].gaps[0].display.studentAnswer(a);\n Numbas.exam.currentQuestion.parts[1].gaps[1].display.studentAnswer(b);\n updr(a,b);\n })};\n dr(a1);\n dr(b1);\n \nreturn div;\n\n \n", "parameters": [["r1", "list"], ["r2", "list"], ["minx", "number"], ["maxx", "number"], ["miny", "number"], ["maxy", "number"]]}, "regfun": {"type": "html", "language": "javascript", "definition": "\n var div = Numbas.extensions.jsxgraph.makeBoard('600px','600px',\n{boundingBox:[-5,maxy,maxx,-5],\n axis:true,\n showNavigation:false,\n grid:true});\n var board = div.board; \nvar l1=board.create('text',[maxx/2,-2,'Temperature']);\nvar l2=board.create('text',[-2,maxy/2,'Sales']);\n var names = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];\n for (j=0;j<12;j++){ board.create('point',[r1[j],r2[j]],{fixed:true, style:3, strokecolor:\"#0000a0\", name:'\\\\\\\\['+names[j]+'\\\\\\\\]'})};\nvar regressionPolynomial = JXG.Math.Numerics.regressionPolynomial(1, r1, r2);\nvar reg = board.create('functiongraph',[regressionPolynomial],{strokeColor:'blue',name:'Regression Line.',withLabel:true}); \n //for(var i=0;i<12;i++){board.create(\"segment\",[[r1[i],r2[i]],[r1[i],regressionPolynomial(r1[i])]])};\nvar regExpression = regressionPolynomial.getTerm();\nvar regTeX = Numbas.jme.display.exprToLaTeX(regExpression,[],scope);\n\n//var t = board.create('text',[1,5,\n//function(){ return \"\\\\[r(Y) = \" + regExpression +'\\\\]';}\n//],\n//{strokeColor:'black',fontSize:18}); \n\nreturn div;\n \n", "parameters": [["r1", "list"], ["r2", "list"], ["maxx", "number"], ["maxy", "number"], ["rsquared", "number"], ["sumr", "number"]]}}, "showQuestionGroupNames": false, "parts": [{"scripts": {}, "gaps": [{"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "corr+tol1", "minValue": "corr-tol1", "correctAnswerFraction": false, "marks": 4, "showPrecisionHint": false}], "type": "gapfill", "prompt": "

Calculate the sample correlation coefficient $r$ for these data:

\n

$r=\\;$[[0]] (enter to 2 decimal places).

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

Calculate the equation of the best fitting regression line.

\n

\\[Y = \\alpha + \\beta X.\\] Find $\\alpha$ and $\\beta$ to 5 decimal places, then input them below to 3 decimal places. You will use these approximate values in the rest of the question. 

\n

$\\beta=\\;$[[0]],      $\\alpha=\\;$[[1]] (enter both to 3 decimal places).

\n

\n

Click on Show steps if you want more information on calculating $\\alpha$ and $\\beta$. You will not lose any marks by doing so.

\n

 

", "steps": [{"type": "information", "prompt": "

To find $\\alpha$ and $\\beta$ you first find  $\\displaystyle \\beta = \\frac{S_{XY}}{S_{XX}}$ where:

\n

$\\displaystyle S_{XY}=\\sum xy - n\\overline{x}\\overline{y}$

\n

$\\displaystyle S_{XX}=\\sum x^2 - n\\overline{x}^2$

\n

Then $\\displaystyle \\alpha = \\overline{y}-\\beta \\overline{x}$

\n

Now go back and fill in the values for $\\alpha$ and $\\beta$.

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

Next month, the average temperature in {owner}'s town is forecast to be  $\\var{thisval}^{\\small o}$C. Use the regression equation in the second part to predict sales of the {beverage} in that month.

\n

What is the predicted value of sales (in hundreds of pounds) ?

\n

Use the values of $\\alpha$ and $\\beta$ you input above to 3 decimal places.

\n

Enter the predicted sales here:  [[0]] (hundreds of pounds to the nearest whole number).

\n

", "showCorrectAnswer": true, "marks": 0}], "statement": "

{owner} owns the {pub}. {owner} believes that sales of {beverage} in the pub are linked to the average monthly temperature, with higher sales being recorded in months with higher temperatures. To investigate, {owner} records the average monthly temperature in the local town over a period of one year ($X$ degrees Celsius), along with total monthly sales of {beverage} ($Y$ hundred pounds). The results are shown in the table below: 

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
Month$\\var{obj[0]}$$\\var{obj[1]}$$\\var{obj[2]}$$\\var{obj[3]}$$\\var{obj[4]}$$\\var{obj[5]}$$\\var{obj[6]}$$\\var{obj[7]}$$\\var{obj[8]}$$\\var{obj[9]}$$\\var{obj[10]}$$\\var{obj[11]}$
$X$ (temperature)$\\var{r1[0]}$$\\var{r1[1]}$$\\var{r1[2]}$$\\var{r1[3]}$$\\var{r1[4]}$$\\var{r1[5]}$$\\var{r1[6]}$$\\var{r1[7]}$$\\var{r1[8]}$$\\var{r1[9]}$$\\var{r1[10]}$$\\var{r1[11]}$
$Y$ (sales, £100s)$\\var{r2[0]}$$\\var{r2[1]}$$\\var{r2[2]}$$\\var{r2[3]}$$\\var{r2[4]}$$\\var{r2[5]}$$\\var{r2[6]}$$\\var{r2[7]}$$\\var{r2[8]}$$\\var{r2[9]}$$\\var{r2[10]}$$\\var{r2[11]}$
\n

You are given the following information:

\n\n\n\n\n\n\n\n\n\n\n\n
$X$ $\\sum x=\\;\\var{t[0]}$$\\sum x^2=\\;\\var{ssq[0]}$
$Y$$\\sum y=\\;\\var{t[1]}$$\\sum y^2=\\;\\var{ssq[1]}$
\n

Also you are given $\\sum xy = \\var{sxy}$.

", "tags": ["ACC1012", "checked2015", "correlation", "data analysis", "fitted value", "linear regression", "MAS1043", "regression", "statistics"], "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "

04/02/2014:

\n

No advice as yet. Adapted from iassess question for ACE.

\n

18/02/2014:

\n

Slight changes in notation from Regression 3. No SSE

", "licence": "Creative Commons Attribution 4.0 International", "description": "

Find a regression equation given 12 months data on temperature and sales of a drink. 

"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "

For part a) you calculate $r$ using:

\n

\\[r=\\frac{S_{XY}}{\\sqrt{S_{XX} \\times S_{YY}}}\\] where :

\n

$\\displaystyle S_{XY}=\\sum xy - n\\overline{x}\\overline{y}$

\n

$\\displaystyle S_{XX}=\\sum x^2 - n\\overline{x}^2$

\n

$\\displaystyle S_{YY}=\\sum y^2 - n\\overline{y}^2$

\n

For part b): The regression line has equation:

\n

$\\simplify[all,!collectNumbers]{Y={a}+{b}X}$ and this is displayed below:  

\n

\n

{regfun(r1,r2,max(r1)+10,max(r2)+10,rsquared,sumr)}

\n

For part c):

\n

Predicted sales whem $X=\\var{thisval}^{\\small o}$C:

\n

\\[\\begin{align} Y&=\\simplify[all,!collectNumbers]{{a}+{b}* {thisval}}\\\\
&=\\var{{a+b*thisval}}\\\\
&=\\var{prediction}
\\end{align}\\] to nearest whole number of hundreds of pounds.

"}, {"name": "Perform a t-test to decide if two sample means differ, , ", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variable_groups": [], "variables": {"tol": {"templateType": "anything", "group": "Ungrouped variables", "definition": "0.001", "description": "", "name": "tol"}, "evi": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[\"None\",\"Slight\",\"Moderate\",\"Strong\"]", "description": "", "name": "evi"}, "n1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(5..15)", "description": "", "name": "n1"}, "confl": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[90,95,99]", "description": "", "name": "confl"}, "sd1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(65..90)", "description": "", "name": "sd1"}, "correctc": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(pval>1,\"There is evidence to suggest that average call times for male and female employees differ\",\"There is insufficent evidence to suggest that average call times for male and female employees differ\")", "description": "", "name": "correctc"}, "tval1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "abs(m-m1)*sqrt(n1*n2)/(tpsd*sqrt(n1+n2))", "description": "", "name": "tval1"}, "crit": {"templateType": "anything", "group": "Ungrouped variables", "definition": "map(precround(x,3),x,[studenttinv((90+100)/200,n-1),studenttinv((95+100)/200,n-1),studenttinv((99+100)/200,n-1)])", "description": "", "name": "crit"}, "this": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\"A call centre company wants to know if there is any difference between the average time spent on the telephone, per call to customers, between male and female employees.\"", "description": "", "name": "this"}, "n": {"templateType": "anything", "group": "Ungrouped variables", "definition": "n1+n2-1", "description": "", "name": "n"}, "tval": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(tval1,3)", "description": "", "name": "tval"}, "dothis": {"templateType": "anything", "group": "Ungrouped variables", "definition": "switch(pval <2, 'retain','reject')", "description": "", "name": "dothis"}, "pm": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[\"is greater than 10%\",\"lies between 5% and 10%\",\"lies between 1% and 5%\",\"is less than 1%\"]", "description": "", "name": "pm"}, "n2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(20..30)-n1", "description": "", "name": "n2"}, "mm": {"templateType": "anything", "group": "Ungrouped variables", "definition": "switch(pval=0,[1,0,0,0],pval=1,[0,1,0,0],pval=2,[0,0,1,0],[0,0,0,1])", "description": "", "name": "mm"}, "things": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\"male employees\"", "description": "", "name": "things"}, "m": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(220..380#10)", "description": "", "name": "m"}, "evi1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[\"no\",\"slight\",\"moderate\",\"strong\"]", "description": "", "name": "evi1"}, "units": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\"seconds\"", "description": "", "name": "units"}, "sd": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(55..85)", "description": "", "name": "sd"}, "m1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(280..400#10)", "description": "", "name": "m1"}, "fac": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(pval<2,\"There is evidence to suggest that average call times for male and female employees differ\",\"There is insufficent evidence to suggest that average call times for male and female employees differ\")", "description": "", "name": "fac"}, "tpsd": {"templateType": "anything", "group": "Ungrouped variables", "definition": "sqrt(((n1-1)*sd^2+(n2-1)*sd1^2)/(n-1))", "description": "", "name": "tpsd"}, "dmm": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(pval<2,[1,0],[0,1])", "description": "", "name": "dmm"}, "that": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\"the average time spent on the telephone \"", "description": "", "name": "that"}, "pval": {"templateType": "anything", "group": "Ungrouped variables", "definition": "switch(tvalStep 1: Null hypothesis

\n

If $\\mu_M$ is the mean for time spent by {things} and  $\\mu_F$ is the mean for time spent by {things1} then you are given that:

\n

$\\operatorname{H}_0\\;:\\;\\mu_M=\\mu_F$. 

\n

Step 2: Alternative Hypothesis

\n

$\\operatorname{H}_1\\;:\\;\\mu_M \\neq \\mu_F$. 

\n

 

\n ", "showCorrectAnswer": true, "scripts": {}, "marks": 0}, {"scripts": {}, "gaps": [{"answer": "t", "vsetrange": [0, 1], "checkingaccuracy": 0.001, "checkvariablenames": false, "expectedvariablenames": [], "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "type": "jme", "showCorrectAnswer": true, "marks": 1, "vsetrangepoints": 5}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "psd+tol", "minValue": "psd-tol", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "tval+tol", "minValue": "tval-tol", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}], "type": "gapfill", "prompt": "

Step 3: Test statistic

\n

Should we use the z or t test statistic? Input z or t.

\n

[[0]]

\n

Now calculate the pooled standard deviation: [[1]] (to 3 decimal places)

\n

 

\n

Now calculate the test statistic = ? [[2]]  (to 3 decimal places)

\n

 

\n

(Note that in this calculation you should use a value for the pooled standard deviation which is accurate to at least 5 decimal places and not the value you found to 3 decimal places above).

", "showCorrectAnswer": true, "marks": 0}, {"stepsPenalty": 0, "scripts": {}, "gaps": [{"displayType": "radiogroup", "choices": ["{pm[0]}", "{pm[1]}", "{pm[2]}", "{pm[3]}"], "displayColumns": 0, "distractors": ["", "", "", ""], "shuffleChoices": false, "scripts": {}, "minMarks": 0, "type": "1_n_2", "maxMarks": 0, "showCorrectAnswer": true, "matrix": "mm", "marks": 0}], "type": "gapfill", "prompt": "

Step 4:  p-value range

\n

Use tables to find a range for your p -value. 

\n

Choose the correct range here for p : [[0]]

\n

 

\n

Click on Show steps below to get more information on using the t tables to find the p-value range. You will not lose any marks.

\n

 

", "steps": [{"type": "information", "prompt": "

Click here to get more information about using t tables.

\n

You will also find the critical values of the t tables in this link.

", "showCorrectAnswer": true, "scripts": {}, "marks": 0}], "showCorrectAnswer": true, "marks": 0}, {"scripts": {}, "gaps": [{"displayType": "radiogroup", "choices": ["{evi[0]}", "{evi[1]}", "{evi[2]}", "{evi[3]}"], "displayColumns": 0, "distractors": ["", "", "", ""], "shuffleChoices": false, "scripts": {}, "minMarks": 0, "type": "1_n_2", "maxMarks": 0, "showCorrectAnswer": true, "matrix": "mm", "marks": 0}, {"displayType": "radiogroup", "choices": ["Retain", "Reject"], "displayColumns": 0, "distractors": ["", ""], "shuffleChoices": false, "scripts": {}, "minMarks": 0, "type": "1_n_2", "maxMarks": 0, "showCorrectAnswer": true, "matrix": "dmm", "marks": 0}, {"displayType": "radiogroup", "choices": ["{Correctc}", "{Fac}"], "displayColumns": 0, "distractors": ["", ""], "shuffleChoices": true, "scripts": {}, "minMarks": 0, "type": "1_n_2", "maxMarks": 0, "showCorrectAnswer": true, "matrix": [1, 0], "marks": 0}], "type": "gapfill", "prompt": "\n

 Given the $p$ - value and the range you have found, what is the strength of evidence against the null hypothesis?

\n

[[0]]

\n

Your Decision:

\n

[[1]]

\n

 

\n

Conclusion:

\n

[[2]]

\n ", "showCorrectAnswer": true, "marks": 0}], "statement": "\n

{this}

\n

A random  sample of $\\var{n1}$  {things} and $\\var{n2}$  {things1} gave the following results in {units}.

\n

{table([['Male',{m},{sd}],['Female',{m1},{sd1}]],[' ','Mean','Standard deviation'])}

\n

Perform an appropriate hypothesis test to see if there is any difference between {that} between {things} and {things1} (the null and alternative hypotheses have been set out for you).

\n ", "tags": ["ACC1012", "accept null hypothesis", "ACE2013", "alternative hypothesis", "checked2015", "comparing means", "degree of freedom", "diagram", "hypothesis testing", "link", "MAS1403", "null hypothesis", "p values", "pooled standard deviation", "population variance", "random sample", "reject null hypothesis", "sample mean", "sampling", "sc", "statistics", "Steps", "steps", "t tables", "t test", "test statistic", "two-tailed test"], "rulesets": {}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "\n \t\t

3/01/2012:

\n \t\t

Added tag sc as can be changed to other applications. Perhaps the tables used should be improved.

\n \t\t

Missing a diagram from the original iassess question, hence tag diagram added.

\n \t\t", "licence": "Creative Commons Attribution 4.0 International", "description": "

Given two sets of data, sample mean and sample standard deviation, on performance on the same task, make a decision as to whether or not the mean times differ. Population variance not given, so the t test has to be used in conjunction with the pooled sample standard deviation.

\n

Link to use of t tables and p-values in Show steps.

"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "


b)

\n

Step 3 : Test statistic

\n

We should use the   t statistic as the population variance is unknown.

\n

The pooled standard deviation  is given by :

\n

\\[s = \\sqrt{\\frac{\\var{n1 -1} \\times \\var{sd} ^ 2 + \\var{n2 -1} \\times \\var{sd1} ^ 2 }{\\var{n1} + \\var{n2} -2}} = \\var{tpsd} = \\var{psd}\\] to 3 decimal places.

\n

The test statistic is given by \\[t = \\frac{|\\var{m} -\\var{m1}|}{s \\sqrt{\\frac{1}{ \\var{n1} }+\\frac{1}{ \\var{n2}}}} = \\var{tval}\\] to 3 decimal places.

\n

(Using $s=\\var{tpsd}$ in this formula.)

\n

c)

\n

Step 4: p value range.

\n

As  the degree of freedom is $\\var{n1}+\\var{n2}-2=\\var{n-1}$ we use the $t_{\\var{n-1}}$ tables.  We have the following data from the tables:

\n

{table([['Critical Value',crit[0],crit[1],crit[2]]],['p value','10%','5%','1%'])}

\n

We see that the $p$ value {pm[pval]}.

\n

d)

\n

Step 5: Conclusion

\n

Hence there is {evi1[pval]} evidence against $\\operatorname{H}_0$ and so we {dothis} $\\operatorname{H}_0$.

\n

{Correctc}.

"}, {"name": "Perform t-test for hypothesis given sample mean and standard deviation", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variable_groups": [], "variables": {"tol": {"templateType": "anything", "group": "Ungrouped variables", "definition": "0.001", "description": "", "name": "tol"}, "dmm": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(pval<2,[1,0],[0,1])", "description": "", "name": "dmm"}, "thisamount": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(70..90)", "description": "", "name": "thisamount"}, "confl": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(90,95,99)", "description": "", "name": "confl"}, "pval": {"templateType": "anything", "group": "Ungrouped variables", "definition": "switch(tval1,\"There is sufficient evidence against the claim of the flight company.\",\"There is insufficient evidence against the claim of the flight company.\")", "description": "", "name": "correctc"}, "test": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\"A rival flight company decides to test their claim.\"", "description": "", "name": "test"}, "crit": {"templateType": "anything", "group": "Ungrouped variables", "definition": "map(precround(x,3),x,[studenttinv((90+100)/200,n-1),studenttinv((95+100)/200,n-1),studenttinv((99+100)/200,n-1)])", "description": "", "name": "crit"}, "this": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\"An online flight company makes the following claim:\"", "description": "", "name": "this"}, "n": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(10..30)", "description": "", "name": "n"}, "tval": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(tval1,3)", "description": "", "name": "tval"}, "dothis": {"templateType": "anything", "group": "Ungrouped variables", "definition": "switch(pval <2, 'retain','reject')", "description": "", "name": "dothis"}, "pm": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[\"is greater than 10%\",\"lies between 5% and 10%\",\"lies between 1% and 5%\",\"is less than 1%\"]", "description": "", "name": "pm"}, "mm": {"templateType": "anything", "group": "Ungrouped variables", "definition": "switch(pval=0,[1,0,0,0],pval=1,[0,1,0,0],pval=2,[0,0,1,0],[0,0,0,1])", "description": "", "name": "mm"}, "here": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(\"Barcelona\",\"Madrid\",\"Athens\",\"Berlin\",\"Palma\",\"Rome\",\"Paris\",\"Lisbon\")", "description": "", "name": "here"}, "things": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\"customers is taken.\"", "description": "", "name": "things"}, "m": {"templateType": "anything", "group": "Ungrouped variables", "definition": "thisamount+random(1..15)", "description": "", "name": "m"}, "claim": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\"The average cost of a flight with us to \"+ here + \" is just \u00a3\" + {thisamount} + \" (including all taxes and charges!)\"", "description": "", "name": "claim"}, "evi1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[\"no\",\"slight\",\"moderate\",\"strong\"]", "description": "", "name": "evi1"}, "tval1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "abs(m-thisamount)*sqrt(n)/stand", "description": "", "name": "tval1"}, "fac": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(pval<2,\"There is sufficient evidence against the claim of the flight company\",\"There is insufficient evidence against the claim of the flight company.\")", "description": "", "name": "fac"}, "evi": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[\"None\",\"Slight\",\"Moderate\",\"Strong\"]", "description": "", "name": "evi"}, "stand": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(15..25)", "description": "", "name": "stand"}, "resultis": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\"The mean cost of a flight to \"+ here + \" from this sample is \"", "description": "", "name": "resultis"}}, "ungrouped_variables": ["claim", "pval", "evi1", "crit", "tval1", "things", "stand", "tol", "test", "pm", "correctc", "resultis", "here", "fac", "confl", "evi", "this", "dothis", "m", "dmm", "n", "mm", "thisamount", "tval"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "functions": {}, "showQuestionGroupNames": false, "parts": [{"scripts": {}, "gaps": [{"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "thisamount", "minValue": "thisamount", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "thisamount", "minValue": "thisamount", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}], "type": "gapfill", "prompt": "\n

Step 1: Null Hypothesis

\n

$\\operatorname{H}_0\\;: \\; \\mu=\\;$[[0]]

\n

Step 2: Alternative Hypothesis

\n

$\\operatorname{H}_1\\;: \\; \\mu \\neq\\;$[[1]]

\n ", "showCorrectAnswer": true, "marks": 0}, {"scripts": {}, "gaps": [{"answer": "t", "vsetrange": [0, 1], "checkingaccuracy": 0.001, "checkvariablenames": false, "expectedvariablenames": [], "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "type": "jme", "showCorrectAnswer": true, "marks": 1, "vsetrangepoints": 5}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "tval+tol", "minValue": "tval-tol", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}], "type": "gapfill", "prompt": "

Step 3: Test statistic

\n

Should we use the z or t test statistic? [[0]] (enter z or t).

\n

Now calculate the test statistic = ? [[1]] (to 3 decimal places)

", "showCorrectAnswer": true, "marks": 0}, {"scripts": {}, "gaps": [{"displayType": "radiogroup", "choices": ["{pm[0]}", "{pm[1]}", "{pm[2]}", "{pm[3]}"], "displayColumns": 0, "distractors": ["", "", "", ""], "shuffleChoices": false, "scripts": {}, "minMarks": 0, "type": "1_n_2", "maxMarks": 0, "showCorrectAnswer": true, "matrix": "mm", "marks": 0}], "type": "gapfill", "prompt": "\n

Step 4: p-value

\n

Use tables to find a range for your $p$-value. 

\n

Choose the correct range here for $p$ : [[0]]

\n ", "showCorrectAnswer": true, "marks": 0}, {"scripts": {}, "gaps": [{"displayType": "radiogroup", "choices": ["{evi[0]}", "{evi[1]}", "{evi[2]}", "{evi[3]}"], "displayColumns": 0, "distractors": ["", "", "", ""], "shuffleChoices": false, "scripts": {}, "minMarks": 0, "type": "1_n_2", "maxMarks": 0, "showCorrectAnswer": true, "matrix": "mm", "marks": 0}, {"displayType": "radiogroup", "choices": ["Retain", "Reject"], "displayColumns": 0, "distractors": ["", ""], "shuffleChoices": false, "scripts": {}, "minMarks": 0, "type": "1_n_2", "maxMarks": 0, "showCorrectAnswer": true, "matrix": "dmm", "marks": 0}, {"displayType": "radiogroup", "choices": ["{Correctc}", "{Fac}"], "displayColumns": 0, "distractors": ["", ""], "shuffleChoices": true, "scripts": {}, "minMarks": 0, "type": "1_n_2", "maxMarks": 0, "showCorrectAnswer": true, "matrix": [1, 0], "marks": 0}], "type": "gapfill", "prompt": "\n

Step 5: Conclusion

\n

 

\n

Given the $p$ - value and the range you have found, what is the strength of evidence against the null hypothesis?

\n

[[0]]

\n

Your Decision:

\n

[[1]]

\n

 

\n

Conclusion:

\n

[[2]]

\n ", "showCorrectAnswer": true, "marks": 0}], "statement": "\n

{this} 

\n

{claim}

\n

{test}

\n

A sample of {n} {things}

\n

{resultis} £{m} with a standard  deviation of £{stand}.

\n

Perform an appropriate hypothesis test to see if the claim made by the online flight company is substantiated (use a two-tailed test).

\n ", "tags": ["checked2015", "MAS1403"], "rulesets": {}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "\n \t\t

2/01/2012:

\n \t\t

Added tag sc as has string variables in order to generate other scenarios.

\n \t\t

The jstat function studenttinv(critvalue,n-1) gives the critical p values correctly.

\n \t\t

Added tag diagram as the i-assess question advice has a nice graphic of the p-value and the appropriate decision.

\n \t\t", "licence": "Creative Commons Attribution 4.0 International", "description": "

Provided with information on a sample with sample mean and standard deviation, but no information on the population variance, use the t test to either accept or reject a given null hypothesis.

"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "\n

a)

\n

Step 1: Null Hypothesis

\n

$\\operatorname{H}_0\\;: \\; \\mu=\\;\\var{thisamount}$

\n

Step 2: Alternative Hypothesis

\n

$\\operatorname{H}_1\\;: \\; \\mu \\neq\\;\\var{thisamount}$

\n

b)

\n

We should use the t statistic as the population variance is unknown.

\n

The test statistic:

\n

\\[t =\\frac{ |\\var{m} -\\var{thisamount}|} {\\sqrt{\\frac{\\var{stand} ^ 2 }{\\var{n}}}} = \\var{tval}\\]

\n

to 3 decimal places.

\n

c)

\n

As  $n=\\var{n}$ we use the $t_{\\var{n-1}}$ tables.  We have the following data from the tables:

\n

{table([['Critical Value',crit[0],crit[1],crit[2]]],['p value','10%','5%','1%'])}

\n

We see that the $p$ value {pm[pval]}.

\n


d)

\n

Hence there is {evi1[pval]} evidence against $\\operatorname{H}_0$ and so we {dothis} $\\operatorname{H}_0$.

\n

{Correctc}

\n "}, {"name": "Perform z-test for hypothesis given sample mean and population variance", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variable_groups": [], "variables": {"tol": {"templateType": "anything", "group": "Ungrouped variables", "definition": "0.001", "description": "", "name": "tol"}, "dmm": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(pval<2,[1,0],[0,1])", "description": "", "name": "dmm"}, "confl": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(90,95,99)", "description": "", "name": "confl"}, "zval1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "abs(m-thismuch)*sqrt(n)/sqrt(thisvar)", "description": "", "name": "zval1"}, "pval": {"templateType": "anything", "group": "Ungrouped variables", "definition": "switch(zval1,\"There is sufficient evidence against the claim of the vending company.\",\n \"There is insufficient evidence against the claim of the vending company.\")", "description": "", "name": "correctc"}, "crit": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[1.282,1.645,2.326]", "description": "", "name": "crit"}, "this": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\"A vending machine fills cups with \"", "description": "", "name": "this"}, "thismuch": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(140..160)", "description": "", "name": "thismuch"}, "n": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(50..100)", "description": "", "name": "n"}, "dothis": {"templateType": "anything", "group": "Ungrouped variables", "definition": "switch(pval <2, 'retain','reject')", "description": "", "name": "dothis"}, "pm": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[\"is greater than 10%\",\"lies between 5% and 10%\",\"lies between 1% and 5%\",\"is less than 1%\"]", "description": "", "name": "pm"}, "mm": {"templateType": "anything", "group": "Ungrouped variables", "definition": "switch(pval=0,[1,0,0,0],pval=1,[0,1,0,0],pval=2,[0,0,1,0],[0,0,0,1])", "description": "", "name": "mm"}, "things": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\"cups is taken\"", "description": "", "name": "things"}, "m": {"templateType": "anything", "group": "Ungrouped variables", "definition": "thismuch-random(3..15)", "description": "", "name": "m"}, "claim": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\"The vending machine company claims each cup should be filled with \"", "description": "", "name": "claim"}, "evi1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[\"no\",\"slight\",\"moderate\",\"strong\"]", "description": "", "name": "evi1"}, "units": {"templateType": "anything", "group": "Ungrouped variables", "definition": "'ml'", "description": "", "name": "units"}, "zval": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(zval1,3)", "description": "", "name": "zval"}, "test": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\"Customers of the vending machine suspect the machine is under-filling.\"", "description": "", "name": "test"}, "fac": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(pval<2,\"There is sufficient evidence against the claim of the vending company\",\n \"There is insufficient evidence against the claim of the vending company.\")", "description": "", "name": "fac"}, "var": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\"the variance of the filling process is known to be \"", "description": "", "name": "var"}, "thisvar": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(300..500#10)", "description": "", "name": "thisvar"}, "evi": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[\"None\",\"Slight\",\"Moderate\",\"Strong\"]", "description": "", "name": "evi"}, "stand": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(15..25)", "description": "", "name": "stand"}, "resultis": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\"giving a mean of \"", "description": "", "name": "resultis"}}, "ungrouped_variables": ["claim", "var", "pval", "evi1", "crit", "zval1", "things", "tol", "units", "thismuch", "pm", "correctc", "resultis", "thisvar", "test", "zval", "fac", "confl", "evi", "mm", "dothis", "m", "dmm", "n", "this", "stand"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "functions": {}, "showQuestionGroupNames": false, "parts": [{"scripts": {}, "gaps": [{"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "thismuch", "minValue": "thismuch", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "thismuch", "minValue": "thismuch", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}], "type": "gapfill", "prompt": "\n

Step 1: Null Hypothesis

\n

$\\operatorname{H}_0\\;: \\; \\mu=\\;$[[0]]

\n

Step 2: Alternative Hypothesis

\n

$\\operatorname{H}_1\\;: \\; \\mu \\lt\\;$[[1]]

\n ", "showCorrectAnswer": true, "marks": 0}, {"scripts": {}, "gaps": [{"answer": "z", "vsetrange": [0, 1], "checkingaccuracy": 0.001, "checkvariablenames": false, "expectedvariablenames": [], "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "type": "jme", "showCorrectAnswer": true, "marks": 1, "vsetrangepoints": 5}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "zval+tol", "minValue": "zval-tol", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}], "type": "gapfill", "prompt": "

Step 3: Test statistic

\n

Should we use the z or t test statistic? [[0]] (enter z or t).

\n

Now calculate the test statistic = ? [[1]] (to 3 decimal places)

", "showCorrectAnswer": true, "marks": 0}, {"scripts": {}, "gaps": [{"displayType": "radiogroup", "choices": ["{pm[0]}", "{pm[1]}", "{pm[2]}", "{pm[3]}"], "displayColumns": 0, "distractors": ["", "", "", ""], "shuffleChoices": false, "scripts": {}, "minMarks": 0, "type": "1_n_2", "maxMarks": 0, "showCorrectAnswer": true, "matrix": "mm", "marks": 0}], "type": "gapfill", "prompt": "\n

Step 4: p-value

\n

Use tables to find a range for your $p$-value. 

\n

Choose the correct range here for $p$ : [[0]]

\n \n ", "showCorrectAnswer": true, "marks": 0}, {"scripts": {}, "gaps": [{"displayType": "radiogroup", "choices": ["{evi[0]}", "{evi[1]}", "{evi[2]}", "{evi[3]}"], "displayColumns": 0, "distractors": ["", "", "", ""], "shuffleChoices": false, "scripts": {}, "minMarks": 0, "type": "1_n_2", "maxMarks": 0, "showCorrectAnswer": true, "matrix": "mm", "marks": 0}, {"displayType": "radiogroup", "choices": ["Retain", "Reject"], "displayColumns": 0, "distractors": ["", ""], "shuffleChoices": false, "scripts": {}, "minMarks": 0, "type": "1_n_2", "maxMarks": 0, "showCorrectAnswer": true, "matrix": "dmm", "marks": 0}, {"displayType": "radiogroup", "choices": ["{Correctc}", "{Fac}"], "displayColumns": 0, "distractors": ["", ""], "shuffleChoices": true, "scripts": {}, "minMarks": 0, "type": "1_n_2", "maxMarks": 0, "showCorrectAnswer": true, "matrix": [1, 0], "marks": 0}], "type": "gapfill", "prompt": "\n

Step 5: Conclusion

\n

 

\n

Given the $p$ - value and the range you have found, what is the strength of evidence against the null hypothesis?

\n

[[0]]

\n

Your Decision:

\n

[[1]]

\n

 

\n

Conclusion:

\n

[[2]]

\n \n ", "showCorrectAnswer": true, "marks": 0}], "statement": "\n

{this} {stuff}

\n

{claim}$\\var{thismuch}${units} and {var} {thisvar}.

\n

{test}

\n

To investigate a sample of $\\var{n}$ {things} {resultis} $\\var{m}${units}. 

\n

Perform an appropriate hypothesis test to see if the claim made by the customers is substantiated.

\n ", "tags": ["checked2015", "MAS1403"], "rulesets": {}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "\n \t\t

2/01/2012:

\n \t\t

Added tag sc as has string variables in order to generate other scenarios.

\n \t\t

Added tag diagram as the i-assess question advice has a nice graphic of the p-value and the appropriate decision.

\n \t\t", "licence": "Creative Commons Attribution 4.0 International", "description": "

Provided with information on a sample with sample mean and known population variance, use the z test to either accept or reject a given null hypothesis.

"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "\n

a)

\n

Step 1: Null Hypothesis

\n

$\\operatorname{H}_0\\;: \\; \\mu=\\;\\var{thismuch}$

\n

Step 2: Alternative Hypothesis

\n

$\\operatorname{H}_1\\;: \\; \\mu \\lt\\;\\var{thismuch}$

\n

b)

\n

We should use the z statistic as the population variance is known.

\n

The test statistic:

\n

\\[z =\\frac{ |\\var{m} -\\var{thismuch}|} {\\sqrt{\\frac{\\var{thisvar}}{\\var{n}}}} = \\var{zval}\\]

\n

to 3 decimal places.

\n

c)

\n

{table([['Critical Value',crit[0],crit[1],crit[2]]],['p value','10%','5%','1%'])}

\n

We see that the $p$ value {pm[pval]}.

\n


d)

\n

Hence there is {evi1[pval]} evidence against $\\operatorname{H}_0$ and so we {dothis} $\\operatorname{H}_0$.

\n

{Correctc}

\n "}], "name": "", "pickQuestions": 0}], "name": "Accounting and Finance", "showQuestionGroupNames": false, "type": "question", "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "Questions used in a university course titled \"Accounting and Finance\""}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "extensions": ["jsxgraph", "stats"], "custom_part_types": [], "resources": []}