// Numbas version: exam_results_page_options {"timing": {"timeout": {"action": "none", "message": ""}, "allowPause": true, "timedwarning": {"action": "none", "message": ""}}, "showQuestionGroupNames": false, "duration": 0, "name": "LTDS demo", "shuffleQuestions": false, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

A collection of questions to show off at a workshop for Newcastle's LTDS, June 2016.

"}, "type": "exam", "questions": [], "pickQuestions": 0, "feedback": {"showtotalmark": true, "showactualmark": true, "allowrevealanswer": true, "advicethreshold": 0, "showanswerstate": true}, "percentPass": 0, "question_groups": [{"questions": [{"name": "Numbas demo: JME part", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Chris Graham", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/369/"}], "variables": {"num_terms": {"name": "num_terms", "description": "", "templateType": "anything", "definition": "3", "group": "Ungrouped variables"}, "powers": {"name": "powers", "description": "", "templateType": "anything", "definition": "sort(shuffle(list(0..8))[0..3])", "group": "Ungrouped variables"}, "coefficients": {"name": "coefficients", "description": "", "templateType": "anything", "definition": "repeat(random(-10..10 except 0),num_terms)", "group": "Ungrouped variables"}}, "parts": [{"unitTests": [], "marks": 0, "sortAnswers": false, "steps": [{"unitTests": [], "marks": 0, "variableReplacements": [], "showCorrectAnswer": true, "prompt": "

The derivative of $x^n$ is given by the following:

\n

\$\\frac{\\mathrm{d}}{\\mathrm{d}x}(x^n) = n \\times x^{n-1} \$

\n

Enter the derivatives of each of the three terms in $f(x)$:

", "customMarkingAlgorithm": "", "type": "information", "scripts": {}, "customName": "", "useCustomName": false, "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst"}, {"valuegenerators": [{"name": "x", "value": ""}], "vsetRange": [0, 1], "unitTests": [], "checkingAccuracy": 0.001, "marks": 1, "vsetRangePoints": 5, "answer": "{coefficients[2]*powers[2]}*x^{powers[2]-1}", "variableReplacements": [], "type": "jme", "customName": "", "useCustomName": false, "checkVariableNames": false, "showFeedbackIcon": true, "showCorrectAnswer": true, "prompt": "

$\\frac{\\mathrm{d}}{\\mathrm{d}x}(\\simplify{{coefficients[2]}*x^{powers[2]}}) =$

", "failureRate": 1, "checkingType": "absdiff", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "showPreview": true, "variableReplacementStrategy": "originalfirst"}, {"valuegenerators": [{"name": "x", "value": ""}], "vsetRange": [0, 1], "unitTests": [], "checkingAccuracy": 0.001, "marks": 1, "vsetRangePoints": 5, "answer": "{coefficients[1]*powers[1]}*x^{powers[1]-1}", "variableReplacements": [], "type": "jme", "customName": "", "useCustomName": false, "checkVariableNames": false, "showFeedbackIcon": true, "showCorrectAnswer": true, "prompt": "

$\\frac{\\mathrm{d}}{\\mathrm{d}x}(\\simplify{{coefficients[1]}*x^{powers[1]}}) =$

", "failureRate": 1, "checkingType": "absdiff", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "showPreview": true, "variableReplacementStrategy": "originalfirst"}, {"valuegenerators": [{"name": "x", "value": ""}], "vsetRange": [0, 1], "unitTests": [], "checkingAccuracy": 0.001, "marks": 1, "vsetRangePoints": 5, "answer": "{coefficients[0]*powers[0]}*x^{powers[0]-1}", "variableReplacements": [], "type": "jme", "customName": "", "useCustomName": false, "checkVariableNames": false, "showFeedbackIcon": true, "showCorrectAnswer": true, "prompt": "

$\\frac{\\mathrm{d}}{\\mathrm{d}x}(\\simplify{{coefficients[0]}*x^{powers[0]}}) =$

", "failureRate": 1, "checkingType": "absdiff", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "showPreview": true, "variableReplacementStrategy": "originalfirst"}], "variableReplacements": [], "showCorrectAnswer": true, "prompt": "

Differentiate the following function.

\n

\$f(x) = \\simplify[all,!noLeadingMinus]{ {coefficients[2]}*x^{powers[2]} + {coefficients[1]}*x^{powers[1]} + {coefficients[0]}*x^{powers[0]} } \$

\n

$\\frac{\\mathrm{d}f}{\\mathrm{d}x} =$ [[0]]

", "stepsPenalty": "1", "gaps": [{"valuegenerators": [{"name": "x", "value": ""}], "vsetRange": [0, 1], "unitTests": [], "checkingAccuracy": 0.001, "marks": "4", "vsetRangePoints": 5, "answer": "{coefficients[2]*powers[2]}*x^{powers[2]-1} + {coefficients[1]*powers[1]}*x^{powers[1]-1} + {coefficients[0]*powers[0]}*x^{powers[0]-1}", "showFeedbackIcon": true, "variableReplacements": [], "showCorrectAnswer": true, "extendBaseMarkingAlgorithm": true, "customMarkingAlgorithm": "", "checkingType": "absdiff", "type": "jme", "scripts": {}, "customName": "", "useCustomName": false, "failureRate": 1, "checkVariableNames": false, "showPreview": true, "variableReplacementStrategy": "originalfirst"}], "customMarkingAlgorithm": "", "type": "gapfill", "scripts": {}, "customName": "", "useCustomName": false, "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst"}], "variable_groups": [], "tags": [], "ungrouped_variables": ["num_terms", "powers", "coefficients"], "variablesTest": {"maxRuns": 100, "condition": ""}, "preamble": {"js": "", "css": ""}, "metadata": {"description": "", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "

Numbas is really good at creating and marking randomised maths questions. In this question, you're given a random polynomial to differentiate.

\n

Notice how Numbas automatically simplifies the mathematical expressions so they look as if a human wrote them.

\n

See this question in the public editor

The derivative of $x^n$ is given by the following:

\n

\$\\frac{\\mathrm{d}}{\\mathrm{d}x}(x^n) = n \\times x^{n-1} \$

\n

We can compute the derivative of $f(x)$ by computing the derivatives of each of the three terms, and then adding them together.

\n

\\begin{align}
\\frac{\\mathrm{d}}{\\mathrm{d}x}(\\simplify{{coefficients[2]}*x^{powers[2]}}) &= \\simplify[basic]{{powers[2]}*{coefficients[2]}*x^({powers[2]}-1)} \\\\
&= \\simplify{{coefficients[2]*powers[2]}*x^{powers[2]-1}}
\\end{align}

\n

\\begin{align}
\\frac{\\mathrm{d}}{\\mathrm{d}x}(\\simplify{{coefficients[1]}*x^{powers[1]}}) &= \\simplify[basic]{{powers[1]}*{coefficients[1]}*x^({powers[1]}-1)} \\\\
&= \\simplify{{coefficients[1]*powers[1]}*x^{powers[1]-1}}
\\end{align}

\n

The derivative of a constant is $0$. So,

\n

\$\\frac{\\mathrm{d}}{\\mathrm{d}x}(\\var{coefficients[0]}) = 0 \$

\n

\\begin{align}
\\frac{\\mathrm{d}}{\\mathrm{d}x}(\\simplify{{coefficients[0]}*x^{powers[0]}}) &= \\simplify[basic]{{powers[0]}*{coefficients[0]}*x^({powers[0]}-1)} \\\\
&= \\simplify{{coefficients[0]*powers[0]}*x^{powers[0]-1}}
\\end{align}

\n

Hence,

\n

\$\\frac{\\mathrm{d}f}{\\mathrm{d}x} = \\simplify{ {coefficients[2]*powers[2]}*x^{powers[2]-1} + {coefficients[1]*powers[1]}*x^{powers[1]-1} + {coefficients[0]*powers[0]}*x^{powers[0]-1} } \$

", "functions": {}, "rulesets": {}}, {"name": "Numbas demo: multiple choice", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}], "parts": [{"extendBaseMarkingAlgorithm": true, "prompt": "

John, Paul, George and Ringo stand in alphabetical order. Who goes first?

", "adaptiveMarkingPenalty": 0, "maxMarks": 0, "showCellAnswerState": true, "showFeedbackIcon": true, "customName": "Choose one from a list", "unitTests": [], "customMarkingAlgorithm": "", "scripts": {}, "useCustomName": true, "choices": ["

John

", "

Paul

", "

George

", "

Ringo

"], "showCorrectAnswer": true, "variableReplacements": [], "marks": 0, "displayType": "radiogroup", "displayColumns": 0, "shuffleChoices": false, "distractors": ["J comes after G in the alphabet, so John comes after George", "P comes after J in the alphabet, so Paul comes after John", "", "R comes after P in the alphabet, so Ringo comes after Paul"], "variableReplacementStrategy": "originalfirst", "matrix": [0, 0, "1", 0], "type": "1_n_2", "minMarks": 0}, {"extendBaseMarkingAlgorithm": true, "prompt": "

Which of the following numbers are congruent to $1$ modulo $3$?

", "adaptiveMarkingPenalty": 0, "maxMarks": 0, "showCellAnswerState": true, "showFeedbackIcon": true, "customName": "Choose several from a list", "unitTests": [], "customMarkingAlgorithm": "", "scripts": {}, "minAnswers": "0", "useCustomName": true, "choices": ["

1

", "

2

", "

3

", "

4

", "

5

", "

6

", "

7

", "

8

", "

9

"], "showCorrectAnswer": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "marks": 0, "displayType": "checkbox", "displayColumns": "3", "shuffleChoices": false, "distractors": ["", "2 is not congruent to 1, mod 3", "3 is congruent to 0, mod 3", "", "5 is congruent to 2, mod 3", "6 is congruent to 0, mod 3", "", "8 is congruent to 2, mod 3", "9 is congruent to 0, mod 3"], "maxAnswers": "0", "matrix": ["1", "-1", "-1", "1", "-1", "-1", "1", "-1", "-1"], "type": "m_n_2", "warningType": "none", "minMarks": 0}, {"extendBaseMarkingAlgorithm": true, "adaptiveMarkingPenalty": 0, "maxMarks": 0, "showCellAnswerState": true, "showFeedbackIcon": true, "customName": "Match choices with answers", "unitTests": [], "customMarkingAlgorithm": "", "scripts": {}, "shuffleChoices": true, "useCustomName": true, "choices": ["Dodo", "Blue whale", "Human", "Pterodactyl"], "showCorrectAnswer": true, "variableReplacements": [], "shuffleAnswers": true, "variableReplacementStrategy": "originalfirst", "marks": 0, "layout": {"expression": "", "type": "all"}, "displayType": "checkbox", "minAnswers": 0, "maxAnswers": 0, "matrix": [["1", "-1", "1"], ["1", "-1", "-1"], ["1", "-1", "-1"], ["-1", "1", "1"]], "type": "m_n_x", "warningType": "none", "minMarks": 0, "answers": ["Warm-blooded", "Can fly", "Extinct"]}], "statement": "

Numbas has comprehensive support for multiple choice questions. The order of choices can be randomised, the marking matrix can be calculated from question variables, and you can write specific feedback for each choice.

\n

See this question in the public editor

", "rulesets": {}, "ungrouped_variables": [], "variables": {}, "metadata": {"description": "", "licence": "Creative Commons Attribution 4.0 International"}, "preamble": {"css": "", "js": ""}, "tags": [], "functions": {}, "advice": "", "variablesTest": {"condition": "", "maxRuns": 100}, "variable_groups": []}, {"name": "Numbas demo: part types", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}], "parts": [{"extendBaseMarkingAlgorithm": true, "showCorrectAnswer": true, "prompt": "

Baloo's garden is $\\var{a}$m wide and $\\var{b}$m long.

\n

What is the area of Baloo's garden?

\n

Area = [[0]]m2

", "variableReplacements": [], "type": "gapfill", "marks": 0, "adaptiveMarkingPenalty": 0, "sortAnswers": false, "customName": "Number entry", "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "unitTests": [], "customMarkingAlgorithm": "", "scripts": {}, "useCustomName": true, "gaps": [{"extendBaseMarkingAlgorithm": true, "mustBeReducedPC": 0, "adaptiveMarkingPenalty": 0, "allowFractions": false, "mustBeReduced": false, "showFeedbackIcon": true, "customName": "", "unitTests": [], "maxValue": "a*b", "correctAnswerStyle": "plain", "scripts": {}, "useCustomName": false, "customMarkingAlgorithm": "", "showCorrectAnswer": true, "minValue": "a*b", "variableReplacements": [], "marks": 1, "notationStyles": ["plain", "en", "si-en"], "showFractionHint": true, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "correctAnswerFraction": false}]}, {"extendBaseMarkingAlgorithm": true, "showCorrectAnswer": true, "prompt": "

Conjugate the verb être.

\n

Je [[0]]

\n

Tu [[1]]

\n

Il/elle [[2]]

\n

Nous [[3]]

\n

Ils/elles [[4]]

\n

Vous [[5]]

\n

Differentiate the following function:

\n

\$f(x) = \\simplify[all,!noLeadingMinus]{{c}x^2+{d}x+{f}} \$

\n

$\\frac{\\mathrm{d}f}{\\mathrm{d}x} =$ [[0]]

\n

", "variableReplacements": [], "type": "gapfill", "marks": 0, "adaptiveMarkingPenalty": 0, "sortAnswers": false, "customName": "Gap-fill", "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "unitTests": [], "customMarkingAlgorithm": "", "scripts": {}, "useCustomName": true, "gaps": [{"checkingAccuracy": 0.001, "extendBaseMarkingAlgorithm": true, "answer": "{2*c}x+{d}", "adaptiveMarkingPenalty": 0, "checkingType": "absdiff", "failureRate": 1, "showFeedbackIcon": true, "customName": "", "checkVariableNames": false, "unitTests": [], "customMarkingAlgorithm": "", "showPreview": true, "scripts": {}, "showCorrectAnswer": true, "variableReplacements": [], "marks": 1, "vsetRange": [0, 1], "valuegenerators": [{"value": "", "name": "x"}], "useCustomName": false, "variableReplacementStrategy": "originalfirst", "type": "jme", "vsetRangePoints": 5}]}, {"allowResize": true, "extendBaseMarkingAlgorithm": true, "prompt": "

Enter a $3 \\times 3$ identity matrix.

", "tolerance": 0, "adaptiveMarkingPenalty": 0, "allowFractions": false, "showFeedbackIcon": true, "customName": "Matrix entry", "unitTests": [], "markPerCell": false, "numColumns": 1, "scripts": {}, "customMarkingAlgorithm": "", "correctAnswerFractions": false, "showCorrectAnswer": true, "variableReplacements": [], "numRows": 1, "marks": 1, "useCustomName": true, "variableReplacementStrategy": "originalfirst", "correctAnswer": "id(3)", "type": "matrix"}], "statement": "

You can ask students to enter numbers, text, or mathematical expressions.

\n

See this question on the public editor.

", "rulesets": {}, "ungrouped_variables": ["a", "b", "c", "d", "f"], "variables": {"b": {"templateType": "randrange", "group": "Ungrouped variables", "description": "", "definition": "random(1 .. 10#1)", "name": "b"}, "a": {"templateType": "randrange", "group": "Ungrouped variables", "description": "", "definition": "random(1 .. 10#1)", "name": "a"}, "d": {"templateType": "randrange", "group": "Ungrouped variables", "description": "", "definition": "random(-10 .. 10#1)", "name": "d"}, "c": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "definition": "random(-10..10 except 0)", "name": "c"}, "f": {"templateType": "randrange", "group": "Ungrouped variables", "description": "", "definition": "random(-10 .. 10#1)", "name": "f"}}, "metadata": {"description": "

Showing off the part types.

", "licence": "Creative Commons Attribution 4.0 International"}, "preamble": {"css": "", "js": ""}, "tags": [], "functions": {}, "advice": "", "variablesTest": {"condition": "a=4 and b=8", "maxRuns": "1000"}, "variable_groups": []}, {"name": "Numbas demo: Motion under gravity", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}], "variables": {"mh": {"name": "mh", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "precround(V^2/(2*g),2)"}, "t1": {"name": "t1", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "precround(t,2)"}, "t": {"name": "t", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "V/g"}, "v": {"name": "v", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(50..100)"}, "g": {"name": "g", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "9.81"}}, "parts": [{"gaps": [{"showpreview": true, "marks": 1, "expectedvariablenames": ["t", "z", "g"], "answer": "{v}t-1/2g*t^2", "vsetrangepoints": 5, "variableReplacements": [], "showCorrectAnswer": true, "vsetrange": [0, 1], "checkingaccuracy": 0.001, "type": "jme", "scripts": {}, "checkingtype": "absdiff", "checkvariablenames": true, "variableReplacementStrategy": "originalfirst"}], "type": "gapfill", "scripts": {}, "marks": 0, "variableReplacements": [], "showCorrectAnswer": true, "prompt": "

{graphsolution()}

\n

Input the vertical distance $z$ as a  function of $t$.

\n

Note that at $t=0$ we have $z=0$ and that $\\displaystyle \\frac{dz}{dt}=\\var{v}m/s$.

\n

Input gravitational acceleration as $g$.

\n

$z=$ [[0]]

\n

Your formula is plotted in the graph above. The vertical axis represents $z$ and the horizontal axis represents $t$.

\n

Note that the blue line indicates that:

\n
\n
1. Your solution should go through $(0,0)$;
2. \n
3. Your solution should have this line as the tangent to the curve at $(0,0)$, because $\\displaystyle \\frac{\\mathrm{d}z}{\\mathrm{d}t}=\\var{v}\\; m/s$.
4. \n

Time taken to reach maximum height = [[0]] $s$ (accurate to $2$ decimal places)

\n

Maximum height = [[1]] $m$ (accurate to $2$ decimal places)

", "variableReplacementStrategy": "originalfirst"}], "variable_groups": [], "tags": ["2nd order differential equation", "acceleration", "applied mathematics", "Calculus", "calculus", "Differential equations", "differential equations", "graphs", "initial conditions", "integration", "interactive", "Jsxgraph", "jsxgraph", "modelling", "motion under gravity", "ode", "ODE", "plot solution", "second order differential equation", "velocity"], "ungrouped_variables": ["t", "v", "mh", "g", "t1"], "statement": "

A Numbas question can include interactive graphics, such as this plot of the trajectory given by the student's answer.

\n

See this question in the public editor

\n

A ball is thrown upwards, and moves according to the equation $\\displaystyle{\\frac{d^2z}{dt^2}=-g}$
(where $z(t)$ is distance in metres measured upwards from the ground and the constant acceleration of gravity, $g$ , is given as $9.81\\;m/s^2$).

\n

The ball is projected upwards with a speed $\\var{v}\\;m/s$.

", "preamble": {"js": "", "css": ""}, "metadata": {"description": "

Customised for the Numbas demo exam

\n

Motion under gravity. Object is projected vertically with initial velocity $V\\;m/s$. Find time to maximum height and the maximum height. Now includes an interactive plot.

", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "variablesTest": {"maxRuns": 100, "condition": ""}, "functions": {"advicegraph": {"parameters": [], "type": "html", "definition": "var v = Numbas.jme.unwrapValue(scope.variables.v);\nvar mh = Numbas.jme.unwrapValue(scope.variables.mh);\nvar t = Numbas.jme.unwrapValue(scope.variables.t1);\nvar g = Numbas.jme.unwrapValue(scope.variables.g);\nvar div = Numbas.extensions.jsxgraph.makeBoard('400px','400px',\n {boundingBox:[-3,mh+50,2*t+2,-50],\n axis:false,\n showNavigation:false,\n grid:false});\nvar brd = div.board; \n var xas = brd.create('line',[[0,0],[1,0]], { strokeColor: 'black',fixed:true});\n var xticks = brd.create('ticks',[xas,1],{\ndrawLabels: true,\nlabel: {offset: [-4, -10]},\nminorTicks: 0\n });\n var yas = brd.create('line',[[0,0],[0,1]], { strokeColor: 'black',fixed:true});\n var yticks = brd.create('ticks',[yas,50],{\ndrawLabels: true,\nlabel: {offset: [-20, 0]},\nminorTicks: 0\n }); \nfunction traj(x){return v*x-g*Math.pow(x,2)/2;}\nvar p=brd.create('point',[0,0],{fixed:true,name:'',size:1});\n//var q=brd.create('line',[[0,0],[1,v]],{fixed:true,name:'',dash:2});\nvar r=brd.create('point',[t,0],{fixed:true,name:'A',size:1});\nvar s=brd.create('point',[t,mh],{fixed:true,name:'B',size:1});\nvar maxh=brd.create(\"segment\",[[0,mh],[t,mh]],{dash:1,strokeColor:'green'});\nvar gr=brd.create(\"functiongraph\",[traj,0,2*t],{strokeColor:'blue',strokeWidth:2});\nvar halft=brd.create(\"segment\",[[t,0],[t,traj(t)]],{dash:1,strokeColor:'green'});\nreturn div;", "language": "javascript"}, "graphsolution": {"parameters": [], "type": "html", "definition": "var v = Numbas.jme.unwrapValue(scope.variables.v);\nvar mh = Numbas.jme.unwrapValue(scope.variables.mh);\nvar t = Numbas.jme.unwrapValue(scope.variables.t1);\nvar g = Numbas.jme.unwrapValue(scope.variables.g);\nvar div = Numbas.extensions.jsxgraph.makeBoard('400px','400px',\n {boundingBox:[-3,mh+10,2*t+2,-50],\n axis:false,\n showNavigation:false,\n grid:false});\nvar brd = div.board; \n var xas = brd.create('line',[[0,0],[1,0]], { strokeColor: 'black',fixed:true});\n var xticks = brd.create('ticks',[xas,1],{\ndrawLabels: true,\nlabel: {offset: [-4, -10]},\nminorTicks: 0\n });\n var yas = brd.create('line',[[0,0],[0,1]], { strokeColor: 'black',fixed:true});\n var yticks = brd.create('ticks',[yas,50],{\ndrawLabels: true,\nlabel: {offset: [-20, 0]},\nminorTicks: 0\n }); \nvar p=brd.create('point',[0,0],{fixed:true,name:'',size:1});\nvar q=brd.create('line',[[0,0],[1,v]],{fixed:true,name:'',dash:2});\nvar tree;\n//x is the variable in the equation to be input\n var nscope = new Numbas.jme.Scope([scope,{variables:{t:new Numbas.jme.types.TNum(0)}}]);\n//create a functiongraph from the student input\nfunction userf(t){\nif(tree) {\n try {\nnscope.variables.t.value = t;\n//the user input is evaluated at x=t\n var val = Numbas.jme.evaluate(tree,nscope).value;\n return val;\n }\n catch(e) {\nreturn 0;\n }\n}\nelse\n return 0;\n}\nvar curve=brd.create('functiongraph',[userf,0,2*t],{strokeColor:'red',strokeWidth:2});\n\n //pick up the student answer and is parsed\n $('body').on('question-html-attached',function(e,question,qd) {\nko.computed(function(){\nvar expr = question.parts[0].gaps[0].display.studentAnswer();\ntry {\n tree = Numbas.jme.compile(expr,scope);\n}\ncatch(e) {\n tree = null;\n}\ncurve.updateCurve();\n\nbrd.update();\n});\n }); \n\nreturn div;\n ", "language": "javascript"}}, "advice": " #### a) \n Integrating$\\displaystyle{\\frac{\\mathrm{d}^2z}{\\mathrm{d}t^2}=-g}$once gives the velocity$\\displaystyle{\\frac{\\mathrm{d}z}{\\mathrm{d}t}=-gt+A}$. \n But$A=\\var{v}$as the velocity is$\\var{V}\\;m/s$at$t=0. \n So the velocity is \n \\begin{align} \\frac{\\mathrm{d}z}{\\mathrm{d}t} &= \\var{v}-gt & (1) \\end{align} \n Integrating again gives \n \$z = \\var{v}t-\\frac{g}{2}t^2+B \$ \n andB=0$as$z=0$at$t=0. \n Hence the distance travelled upwards is given by \n \\begin{align} z &= \\var{v}t-\\frac{g}{2}t^2 & (2) \\end{align} \n {advicegraph()} \n #### b) \n The timet_{\\text{max}}$taken to reach maximum height is the time satisfying$\\displaystyle{\\frac{dz}{dt}=0}$\n$t_{\\text{max}}$is given from equation$(1)by \n \\begin{align} \\var{v} - gt_{\\text{max}} &= 0 \\\\ gt_{\\text{max}} &= \\var{v} \\\\ t_{\\text{max}} &= \\frac{\\var{v}}{g} \\\0.5em] &= \\frac{\\var{v}}{9.81} \\\\[0.5em] &= \\var{t1} \\end{align} \n (to 2 decimal places) \n This is at the point A in the graph above. \n #### c) \n The maximum height z_{\\text{max}} is given from equation (2) by substituting in the value t_{\\text{max}}= \\var{v}/g, giving \n \\begin{align} z_{\\text{max}} &= \\var{v} \\times \\frac{\\var{v}}{g} - \\frac{g}{2}\\left(\\frac{\\var{v}}{g}\\right)^2 \\\\ &= \\frac{\\var{v}^2}{g}-\\frac{g\\var{v}^2}{2g^2} \\\\ &= \\frac{\\var{v}^2}{2g} \\\\ &= \\var{mh}\\;m \\end{align} \n (to 2 decimal places) \n This is at the point B in the graph above. ", "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}}, {"name": "Numbas demo: video", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}], "variable_groups": [], "parts": [{"stepsPenalty": 1, "gaps": [{"vsetrange": [11, 12], "showpreview": true, "marks": 3, "notallowed": {"partialCredit": 0, "strings": ["."], "message": " Input all numbers as fractions or integers and not decimals. ", "showStrings": false}, "answer": "({d-a*c}/{b-a})*ln(x+{a})+({d-b*c}/{a-b})*ln(x+{b})+C", "vsetrangepoints": 5, "variableReplacements": [], "showCorrectAnswer": true, "expectedvariablenames": [], "checkingaccuracy": 0.001, "type": "jme", "scripts": {}, "checkingtype": "absdiff", "checkvariablenames": false, "answersimplification": "std", "variableReplacementStrategy": "originalfirst"}], "type": "gapfill", "marks": 0, "scripts": {}, "steps": [{"type": "information", "marks": 0, "scripts": {}, "variableReplacements": [], "showCorrectAnswer": true, "prompt": " First of all, factorise the denominator. \n You have to find a and b such that \\simplify[std]{x^2+{a+b}*x+{a*b}=(x+a)*(x+b)} \n Then use partial fractions to write: \\[\\simplify[std]{({c}*x+{d})/((x +a)*(x+b)) = A/(x+a)+B/(x+b)}\ \n for suitable integers or fractionsA$and$B$. \n This video solves a similar, simpler example. \n ", "variableReplacementStrategy": "originalfirst"}], "variableReplacements": [], "showCorrectAnswer": true, "prompt": "$I=$[[0]] \n Enter the constant of integration as$C$. \n Click on Show steps for help if you need it: you'll be given a hint, and see a video which solves a similar example. ", "variableReplacementStrategy": "originalfirst"}], "statement": " It's easy to include videos in Numbas questions. In this question, if the student gets stuck they can click on \"Show steps\" to be given a hint, and shown a video of someone working through a similar problem. \n See this question in the public editor \n Find the following integral. \n \$I = \\simplify[std]{Int(({c}*x+{d})/(x^2+{a+b}*x+{a*b}),x )}\$ ", "showQuestionGroupNames": false, "tags": ["2 distinct linear factors", "Calculus", "calculus", "completing the square", "constant of integration", "factorising a quadratic", "indefinite integration", "integrals", "integration", "logarithms", "partial fractions", "Steps", "steps", "two distinct linear factors", "video"], "ungrouped_variables": ["a", "c", "b", "d", "s3", "s2", "s1", "b1", "d1"], "functions": {}, "preamble": {"js": "", "css": ""}, "metadata": {"description": " Customised for the Numbas demo exam \n Factorise$x^2+cx+d$into 2 distinct linear factors and then find$\\displaystyle \\int \\frac{ax+b}{x^2+cx+d}\\;dx,\\;a \\neq 0$using partial fractions or otherwise. \n Video in Show steps. ", "notes": "\n \t\t \t\t 5/08/2012: \n \t\t \t\t Added tags. \n \t\t \t\t Added description. \n \t\t \t\t Added decimal point as forbidden string. \n \t\t \t\t Note the checking range is chosen so that the arguments of the log terms are always positive - could have used abs - might be better? \n \t\t \t\t Improved display of Advice. \n \t\t \t\t Added information about Show steps, also introduced penalty of 1 mark. \n \t\t \t\t Added !noLeadingMinus to ruleset std for display purposes. \n \t\t \n \t\t", "licence": "Creative Commons Attribution 4.0 International"}, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "questions": [], "pickQuestions": 0}], "type": "question", "variablesTest": {"maxRuns": 100, "condition": ""}, "advice": " First we factorise$\\simplify[std]{x^2+{a+b}*x+{a*b}=(x+{a})*(x+{b})}$. You can do this by spotting the factors or by completing the square. \n Next we use partial fractions to find$A$and$B$such that \n \$\\simplify[std]{({c}*x+{d})/((x +{a})*(x+{b})) = A/(x+{a})+B/(x+{b})} \$ \n Multiplying both sides of the equation by$\\displaystyle \\simplify[std]{1/((x +{a})*(x+{b}))}, we obtain \n \\begin{align} && \\simplify[std]{A*(x+{b})+B*(x+{a})} &= \\simplify[std]{{c}*x+{d}}\\\\ \\Rightarrow && \\simplify[std]{(A+B)*x+{b}*A+{a}*B} &= \\simplify[std]{{c}*x+{d}} \\end{align} \n Coefficients of similar powers ofx$on each side of the equation must be equal, so we can write down two new equations identifying the coefficients on each side: \n Constant term:$\\simplify[std]{{b}*A+{a}*B = {d}}$\n Coefficent of$x$:$ \\simplify[std]{A+B={c}}$which gives$A =\\var{c} -B$\n On solving these equations, we obtain$\\displaystyle \\simplify[std]{A = {d-a*c}/{b-a}}$and$\\displaystyle \\simplify[std]{B={d-b*c}/{a-b}}, which gives \n \$\\simplify[std]{({c}*x+{d})/((x +{a})*(x+{b})) = ({d-a*c}/{b-a})*(1/(x+{a}) )+({d-b*c}/{a-b})*(1/(x+{b}))} \$ \n So \n \\begin{align} I &= \\simplify[std]{int(({c}*x+{d})/(x^2+{a+b}*x+{a*b}),x )} \\\0.5em] &= \\simplify[std]{int(({c}*x+{d})/((x +{a})*(x+{b})),x )} \\\\[0.5em] &= \\simplify[std]{({d-a*c}/{b-a})*(int(1/(x+{a}),x)) +({d-b*c}/{a-b})int(1/(x+{b}),x)} \\\\[0.5em] &= \\simplify[std]{({d-a*c}/{b-a})*ln(x+{a})+({d-b*c}/{a-b})*ln(x+{b})+C} \\end{align} ", "variables": {"c": {"name": "c", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(2..9)"}, "s2": {"name": "s2", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,-1)"}, "b1": {"name": "b1", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "s2*random(1..9)"}, "a": {"name": "a", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "s1*random(1..9)"}, "d": {"name": "d", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "if(d1=a*c,if(d1+1=b*c,d1+2,d1+1),if(d1=b*c,if(d1+1=a*c,d1+2,d1+1),d1))"}, "b": {"name": "b", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "if(b1=a,b1+s3,b1)"}, "s3": {"name": "s3", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,-1)"}, "d1": {"name": "d1", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "s3*random(1..9)"}, "s1": {"name": "s1", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,-1)"}}, "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}}, {"name": "Adaptive marking: Independent two sample t-test", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}], "parts": [{"sortAnswers": false, "showFeedbackIcon": true, "useCustomName": false, "stepsPenalty": 0, "gaps": [{"useCustomName": false, "precisionPartialCredit": 0, "notationStyles": ["plain", "en", "si-en"], "maxValue": "mean1", "unitTests": [], "type": "numberentry", "scripts": {}, "correctAnswerFraction": false, "showPrecisionHint": false, "allowFractions": false, "marks": 0.5, "correctAnswerStyle": "plain", "precision": "3", "precisionType": "dp", "showFeedbackIcon": true, "mustBeReduced": false, "variableReplacements": [], "minValue": "mean1", "strictPrecision": false, "extendBaseMarkingAlgorithm": true, "adaptiveMarkingPenalty": 0, "customName": "", "precisionMessage": "You have not given your answer to the correct precision.", "customMarkingAlgorithm": "", "mustBeReducedPC": 0, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst"}, {"useCustomName": false, "precisionPartialCredit": 0, "notationStyles": ["plain", "en", "si-en"], "maxValue": "sd1", "unitTests": [], "type": "numberentry", "scripts": {}, "correctAnswerFraction": false, "showPrecisionHint": false, "allowFractions": false, "marks": 0.5, "correctAnswerStyle": "plain", "precision": "3", "precisionType": "dp", "showFeedbackIcon": true, "mustBeReduced": false, "variableReplacements": [], "minValue": "sd1", "strictPrecision": false, "extendBaseMarkingAlgorithm": true, "adaptiveMarkingPenalty": 0, "customName": "", "precisionMessage": "You have not given your answer to the correct precision.", "customMarkingAlgorithm": "", "mustBeReducedPC": 0, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst"}, {"useCustomName": false, "precisionPartialCredit": 0, "notationStyles": ["plain", "en", "si-en"], "maxValue": "mean2", "unitTests": [], "type": "numberentry", "scripts": {}, "correctAnswerFraction": false, "showPrecisionHint": false, "allowFractions": false, "marks": 0.5, "correctAnswerStyle": "plain", "precision": "3", "precisionType": "dp", "showFeedbackIcon": true, "mustBeReduced": false, "variableReplacements": [], "minValue": "mean2", "strictPrecision": false, "extendBaseMarkingAlgorithm": true, "adaptiveMarkingPenalty": 0, "customName": "", "precisionMessage": "You have not given your answer to the correct precision.", "customMarkingAlgorithm": "", "mustBeReducedPC": 0, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst"}, {"useCustomName": false, "precisionPartialCredit": 0, "notationStyles": ["plain", "en", "si-en"], "maxValue": "sd2", "unitTests": [], "type": "numberentry", "scripts": {}, "correctAnswerFraction": false, "showPrecisionHint": false, "allowFractions": false, "marks": 0.5, "correctAnswerStyle": "plain", "precision": "3", "precisionType": "dp", "showFeedbackIcon": true, "mustBeReduced": false, "variableReplacements": [], "minValue": "sd2", "strictPrecision": false, "extendBaseMarkingAlgorithm": true, "adaptiveMarkingPenalty": 0, "customName": "", "precisionMessage": "You have not given your answer to the correct precision.", "customMarkingAlgorithm": "", "mustBeReducedPC": 0, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst"}, {"useCustomName": false, "precisionPartialCredit": 0, "notationStyles": ["plain", "en", "si-en"], "maxValue": "t_statistic", "unitTests": [], "type": "numberentry", "scripts": {}, "correctAnswerFraction": false, "showPrecisionHint": false, "allowFractions": false, "marks": 1, "correctAnswerStyle": "plain", "precision": "3", "precisionType": "dp", "showFeedbackIcon": true, "mustBeReduced": false, "variableReplacements": [{"part": "p0g0", "variable": "mean1", "must_go_first": false}, {"part": "p0g1", "variable": "sd1", "must_go_first": false}, {"part": "p0g2", "variable": "mean2", "must_go_first": false}, {"part": "p0g3", "variable": "sd2", "must_go_first": false}], "minValue": "t_statistic", "strictPrecision": false, "extendBaseMarkingAlgorithm": true, "adaptiveMarkingPenalty": 0, "customName": "", "precisionMessage": " You have not given your answer to the correct precision. ", "customMarkingAlgorithm": "", "mustBeReducedPC": 0, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst"}], "steps": [{"showFeedbackIcon": true, "useCustomName": false, "prompt": " The two-sample t-statistic for two independent sets of data where one set has n_1 data points and the other set n_2 data points is calculated as follows: \n \\[T = \\frac{(\\overline{x}_1-\\overline{x}_2)-(\\mu_1-\\mu_2)}{s\\times\\sqrt{\\frac{1}{n_1}+\\frac{1}{n_2}}}\\;\\;\\;\ \n where\\overline{x}_1,\\;\\overline{x}_2$are the sample means and \n \$s^2=\\frac{(n_1-1)s_1^2+(n_2-1)s_2^2}{n_1+n_2-2}\$ \n where$s_1,\\;s_2$are the sample standard deviations. \n Use the values you calculated to 3 decimal places in order to find$T$. ", "unitTests": [], "variableReplacements": [], "extendBaseMarkingAlgorithm": true, "type": "information", "adaptiveMarkingPenalty": 0, "customName": "", "scripts": {}, "marks": 0, "customMarkingAlgorithm": "", "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst"}], "prompt": " Find the mean and standard deviations of the scores of the two groups. Round your answers to 3 decimal places. \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n MeanStandard deviation Group 1[[0]][[1]] Group 2[[2]][[3]] \n Now find the two sample t-test statistic$T$using the values you have just calculated and enter it here: [[4]] ", "unitTests": [], "variableReplacements": [], "extendBaseMarkingAlgorithm": true, "type": "gapfill", "adaptiveMarkingPenalty": 0, "customName": "", "scripts": {}, "marks": 0, "customMarkingAlgorithm": "", "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst"}, {"displayType": "radiogroup", "useCustomName": false, "variableReplacements": [{"part": "p0g4", "variable": "t_statistic", "must_go_first": false}], "unitTests": [], "type": "1_n_2", "scripts": {}, "marks": 0, "matrix": "decision_marking_matrix", "customMarkingAlgorithm": "", "showFeedbackIcon": true, "displayColumns": "1", "prompt": " Given the value$|T|$of the t-statistic you have found, choose the range for the$p$value by looking up the t tables: ", "extendBaseMarkingAlgorithm": true, "minMarks": 0, "variableReplacementStrategy": "alwaysreplace", "shuffleChoices": false, "adaptiveMarkingPenalty": 0, "customName": "", "choices": ["$p$is less than$0.1\\%$", "$p$lies between$0.1\\%$and$1\\%$", "$p$lies between$1 \\%$and$5\\%$", "$p$lies between$5 \\%$and$10\\%$", "$p$is greater than$10\\%$"], "maxMarks": 0, "showCorrectAnswer": true, "showCellAnswerState": true}, {"displayType": "radiogroup", "useCustomName": false, "variableReplacements": [{"part": "p1", "variable": "scenario", "must_go_first": false}], "unitTests": [], "type": "1_n_2", "scripts": {}, "marks": 0, "matrix": "decision_marking_matrix", "customMarkingAlgorithm": "", "showFeedbackIcon": true, "displayColumns": 0, "prompt": " Given the$p$-value and the range you have found, what is the strength of evidence against the null hypothesis that there is no difference in the average times for the left and right hands? ", "extendBaseMarkingAlgorithm": true, "minMarks": 0, "variableReplacementStrategy": "alwaysreplace", "shuffleChoices": false, "adaptiveMarkingPenalty": 0, "customName": "", "choices": [" Very Strong Evidence ", " Strong Evidence ", " Evidence ", " Weak Evidence ", " No Evidence "], "maxMarks": 0, "showCorrectAnswer": true, "showCellAnswerState": true}, {"displayType": "radiogroup", "useCustomName": false, "variableReplacements": [{"part": "p2", "variable": "scenario", "must_go_first": false}], "unitTests": [], "type": "1_n_2", "scripts": {}, "marks": 0, "matrix": "decision_marking_matrix", "customMarkingAlgorithm": "", "showFeedbackIcon": true, "displayColumns": "1", "prompt": " What do you decide based on the above analysis? ", "extendBaseMarkingAlgorithm": true, "minMarks": 0, "variableReplacementStrategy": "alwaysreplace", "shuffleChoices": false, "adaptiveMarkingPenalty": 0, "customName": "", "choices": [" We reject the null hypothesis at the$0.1\\%$level ", " We reject the null hypothesis at the$1\\%$level. ", " We reject the null hypothesis at the$5\\%$level. ", " We do not reject the null hypothesis but consider further investigation. ", " We do not reject the null hypothesis. "], "maxMarks": 0, "showCorrectAnswer": true, "showCellAnswerState": true}], "variables": {"p_value_range": {"definition": "['is less than$0.001$','lies between$0.001$and$0.01$','lies between$0.01$and$0.05$','lies between$0.05$and$0.10$','is greater than$0.10$'][scenario]", "description": " Describe where the p-value lies in relation to the critical values ", "templateType": "anything", "group": "Advice messages", "name": "p_value_range"}, "sigma2": {"definition": "random(8..10#0.2)", "description": " Population standard deviation of sample 2 ", "templateType": "anything", "group": "Setup", "name": "sigma2"}, "t99": {"definition": "2.878", "description": "", "templateType": "anything", "group": "Critical t-values", "name": "t99"}, "n2": {"definition": "10", "description": " Size of sample 2 ", "templateType": "anything", "group": "Setup", "name": "n2"}, "t999": {"definition": "3.922", "description": "", "templateType": "anything", "group": "Critical t-values", "name": "t999"}, "t_statistic_range": {"definition": "['is greater than$\\\\var{t999}$','lies between$\\\\var{t99}$and$\\\\var{t999}$','lies between$\\\\var{t95}$and$\\\\var{t99}$','lies between$\\\\var{t90}$and$\\\\var{t95}$','is less than$\\\\var{t90}$'][scenario]", "description": " Describe where the t-statistic lies in relation to the critical values ", "templateType": "anything", "group": "Advice messages", "name": "t_statistic_range"}, "mu2": {"definition": "random(65..75#0.5)", "description": " Population mean of sample 2 ", "templateType": "anything", "group": "Setup", "name": "mu2"}, "evidence_strength": {"definition": "['very strong','strong','slight','no','no'][scenario]", "description": " How much evidence is there against the null hypothesis? ", "templateType": "anything", "group": "Advice messages", "name": "evidence_strength"}, "n1": {"definition": "10", "description": " Size of sample 1 ", "templateType": "anything", "group": "Setup", "name": "n1"}, "mu1": {"definition": "random(55..75#0.5)", "description": " Population mean of sample 1 (we'll generate samples from different distributions to produce different outcomes) ", "templateType": "anything", "group": "Setup", "name": "mu1"}, "reject": {"definition": "if(scenario<2,'do reject','do not reject')", "description": " Do we reject the null hypothesis? ", "templateType": "anything", "group": "Advice messages", "name": "reject"}, "p_value": {"definition": "ttest(abs(t_statistic),19,2)", "description": " p-value corresponding to the t-statistic ", "templateType": "anything", "group": "Stats", "name": "p_value"}, "t_statistic": {"definition": "(mean1-mean2)*sqrt(n1*n2)/(s*sqrt(n1+n2))", "description": "", "templateType": "anything", "group": "Stats", "name": "t_statistic"}, "t90": {"definition": "1.734", "description": "", "templateType": "anything", "group": "Critical t-values", "name": "t90"}, "decision_marking_matrix": {"definition": "[\n [1,0,0,0,0],\n [0,1,0,0,0],\n [0,0,1,0,0],\n [0,0,0,1,0],\n [0,0,0,0,1]\n][scenario]", "description": " Marking matrix for the multiple choice questions ", "templateType": "anything", "group": "Advice messages", "name": "decision_marking_matrix"}, "sd2": {"definition": "precround(pstdev(r2),3)", "description": " Sample standard deviation of sample 2 ", "templateType": "anything", "group": "Stats", "name": "sd2"}, "t95": {"definition": "2.101", "description": "", "templateType": "anything", "group": "Critical t-values", "name": "t95"}, "r1": {"definition": "repeat(round(normalsample(mu1,sigma1)),n1)", "description": " Sample 1 ", "templateType": "anything", "group": "Samples", "name": "r1"}, "mean1": {"definition": "mean(r1)", "description": " Sample mean of sample 1 ", "templateType": "anything", "group": "Stats", "name": "mean1"}, "mean2": {"definition": "mean(r2)", "description": " Sample mean of sample 1 ", "templateType": "anything", "group": "Stats", "name": "mean2"}, "r2": {"definition": "repeat(round(normalsample(mu2,sigma2)),n2)", "description": " Sample 2 ", "templateType": "anything", "group": "Samples", "name": "r2"}, "scenario": {"definition": "sum(map(abs(t_statistic)Which scenario are we in - how many critical values of the t distribution does t_statistic exceed? ", "templateType": "anything", "group": "Advice messages", "name": "scenario"}, "sigma1": {"definition": "random(8..10#0.2)", "description": " Population standard deviation of sample 1 ", "templateType": "anything", "group": "Setup", "name": "sigma1"}, "sd1": {"definition": "precround(pstdev(r1),3)", "description": " Sample standard deviation of sample 1 ", "templateType": "anything", "group": "Stats", "name": "sd1"}, "s": {"definition": "precround(sqrt(((n1-1)*sd1^2+(n2-1)*sd2^2)/(n1+n2-2)),3)", "description": " Used in the formula for the t statistic ", "templateType": "anything", "group": "Stats", "name": "s"}}, "statement": " An educational psychologist claimed that the order in which questions were asked affected the student’s ability to answer them correctly and hence their total score. In order to test this,$20$students were randomly divided into two groups of$10$. The first group were given questions in increasing order of difficulty and the second group in decreasing order of difficulty. The ordered test scores obtained were: \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  Group 1 Group 2 {r1[0]} {r1[1]} {r1[2]} {r1[3]} {r1[4]} {r1[5]} {r1[6]} {r1[7]} {r1[8]} {r1[9]} {r2[0]} {r2[1]} {r2[2]} {r2[3]} {r2[4]} {r2[5]} {r2[6]} {r2[7]} {r2[8]} {r2[9]} \n Carry out a two-sample t-test to decide if there is evidence of a difference in the average test scores for the two sets of students. ", "tags": ["average", "data analysis", "differences", "elementary statistics", "hypothesis testing", "mean", "standard deviation", "statistics", "stats", "t-test", "two sample t-test", "variance"], "ungrouped_variables": [], "variable_groups": [{"variables": ["n1", "n2", "mu1", "sigma1", "mu2", "sigma2"], "name": "Setup"}, {"variables": ["r1", "r2"], "name": "Samples"}, {"variables": ["mean1", "sd1", "mean2", "sd2", "s", "t_statistic", "p_value"], "name": "Stats"}, {"variables": ["scenario", "decision_marking_matrix", "reject", "evidence_strength", "t_statistic_range", "p_value_range"], "name": "Advice messages"}, {"variables": ["t90", "t95", "t99", "t999"], "name": "Critical t-values"}], "functions": {"pstdev": {"definition": "sqrt(len(l)/(len(l)-1))*stdev(l)", "parameters": [["l", "list"]], "type": "number", "language": "jme"}}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": " Two sample t-test to see if there is a difference between scores on questions between two groups when the questions are asked in a different order. "}, "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "advice": " We test the following hypothesis, \n$H_0:\\; \\mu_1=\\mu_2$versus$H_1:\\; \\mu_1 \\neq \\mu_2$\n We find that the mean score of Group 1 is$\\overline{x}_1=\\var{mean1}$with standard deviation$s_1=\\var{sd1}$and the mean score of Group 2 is$\\overline{x}_2=\\var{mean2}$with standard deviation$s_2=\\var{sd2}$. \n (All calculated to 3 decimal places.) \n Using the formula for the two-sample$t$-statistic as shown above with$n_1=n_2=10$: \n The estimate of the pooled variance is calculated to be: \n \$s^2=\\frac{(n_1-1)s_1^2+(n_2-1)s_2^2}{n_1+n_2-2}= \\frac{\\var{n1-1}\\times \\var{sd1}^2+\\var{n2-1}\\times \\var{sd2}^2}{\\var{n1+n2-2}}=\\var{s^2}.\$ \n Hence$s = \\sqrt{\\var{s^2}}=\\var{s}to 3 decimal places. \n We find that the t-statistic has value: \n \\begin{align} T &= \\frac{(\\overline{x}_1-\\overline{x}_2)-(\\mu_1-\\mu_2)}{s\\sqrt{\\frac{1}{n_1}+\\frac{1}{n_2}}} \\\\ &= \\frac{(\\var{mean1}-\\var{mean2})-(0)}{\\var{s}\\sqrt{\\frac{1}{\\var{n1}}+\\frac{1}{\\var{n2}}}} \\\\ &= \\var{t_statistic} \\end{align} \n Our test statistic is|T|=\\var{abs(t_statistic)}$. \n Given that we have$n_1+n_2-2=18$degrees of freedom, we look up this value on the T-distribution table for$t_{18}$\n \$\\begin{array}{r|rrrrr}&0.10&0.05&0.01&0.001\\\\\\hline18&1.734&2.101&2.878&3.922\\end{array}\$ \n We see that the t-statistic {t_statistic_range} and the table tells us that the$p$value {p_value_range}. \n Hence we conclude that we {reject} the null hypothesis. There is {evidence_strength} evidence of a difference between the average scores of the two groups. ", "variablesTest": {"condition": "", "maxRuns": 100}, "preamble": {"css": "", "js": ""}}, {"name": "GeoGebra test - motion on a slope", "extensions": ["geogebra"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}], "functions": {}, "ungrouped_variables": [], "tags": [], "preamble": {"css": "", "js": ""}, "advice": " Either construct the intersection of two circles centred at$\\mathbf{a}$and$\\mathbf{b}$, or use the Regular Polygon tool. \n (I could embed another GeoGebra applet here) ", "rulesets": {}, "parts": [{"stepsPenalty": 0, "precisionType": "dp", "prompt": " What is the total force acting on the mass, along the slope? Enter your answer in$\\mathrm{N}$, to 2 decimal places. ", "precisionMessage": " You have not given your answer to the correct precision. ", "allowFractions": false, "variableReplacements": [], "maxValue": "mass*acceleration", "strictPrecision": false, "minValue": "mass*acceleration", "variableReplacementStrategy": "originalfirst", "steps": [{"prompt": " There are two forces acting on the mass: gravity and friction. ", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "information"}, {"precisionType": "dp", "prompt": " What is the force due to gravity, in the direction of the slope? Enter your answer in$\\mathrm{N}$, to 2 decimal places. ", "precisionMessage": "You have not given your answer to the correct precision.", "allowFractions": false, "variableReplacements": [], "maxValue": "mass*a_gravity", "strictPrecision": false, "minValue": "mass*a_gravity", "variableReplacementStrategy": "originalfirst", "precisionPartialCredit": 0, "correctAnswerFraction": false, "showCorrectAnswer": true, "precision": "2", "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"precisionType": "dp", "prompt": " What is the force due to friction, in the direction of the slope? Enter your answer in$\\mathrm{N}$, to 2 decimal places. ", "precisionMessage": " You have not given your answer to the correct precision. ", "allowFractions": false, "variableReplacements": [], "maxValue": "mass*a_friction", "strictPrecision": false, "minValue": "mass*a_friction", "variableReplacementStrategy": "originalfirst", "precisionPartialCredit": 0, "correctAnswerFraction": false, "showCorrectAnswer": true, "precision": "2", "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}], "precisionPartialCredit": 0, "correctAnswerFraction": false, "showCorrectAnswer": true, "precision": "2", "scripts": {}, "marks": "3", "type": "numberentry", "showPrecisionHint": false}, {"displayColumns": 0, "prompt": " What happens to the mass next? ", "matrix": "if(acceleration=0,[0,1,0],[1,0,0])", "shuffleChoices": false, "variableReplacements": [], "choices": [" It moves down the slope. ", " It moves up the slope. ", " It remains stationary. "], "variableReplacementStrategy": "originalfirst", "maxMarks": 0, "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "1_n_2", "displayType": "radiogroup", "minMarks": 0}, {"precisionType": "dp", "prompt": " At what time does the mass reach the ground? Enter your answer in seconds to 2 decimal places, or$0$if the mass never reaches the ground. ", "precisionMessage": " You have not given your answer to the correct precision. ", "allowFractions": false, "variableReplacements": [], "maxValue": "t_ground", "strictPrecision": false, "minValue": "t_ground", "variableReplacementStrategy": "originalfirst", "precisionPartialCredit": 0, "correctAnswerFraction": false, "showCorrectAnswer": true, "precision": "2", "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}], "statement": " A mass of$\\var{mass}\\,\\mathrm{kg}$is resting on a plane inclined at$\\var{incline}^{\\circ}$to the horizontal. The distance along the plane from the ground to the mass is$\\var{distance}\\mathrm{m}$. \n A gravitational force of$9.8\\,\\mathrm{N/kg}$is acting on the mass, and the coefficient of friction between the plane and the mass is$\\mu = \\var{c_friction}$. \n {geogebra_applet('xn3p5x73',[[\"height\",height],[\"c_\\{friction\\}\",c_friction],[\"mass\",mass]],[])} ", "variable_groups": [{"variables": ["height", "c_friction", "mass", "incline", "distance"], "name": "Setup"}, {"variables": ["slope", "gravity", "a_gravity", "a_friction", "acceleration_naive", "acceleration"], "name": "Acceleration"}, {"variables": ["t_ground"], "name": "Answer"}], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"slope": {"definition": "vector(cos(radians(incline)),sin(radians(incline)))", "templateType": "anything", "group": "Acceleration", "name": "slope", "description": ""}, "acceleration": {"definition": "if(acceleration_naive<0,acceleration_naive,0)", "templateType": "anything", "group": "Acceleration", "name": "acceleration", "description": ""}, "incline": {"definition": "precround(degrees(arctan(height/50)),1)", "templateType": "anything", "group": "Setup", "name": "incline", "description": ""}, "t_ground": {"definition": "if(acceleration=0,0,sqrt(-2*distance/acceleration))", "templateType": "anything", "group": "Answer", "name": "t_ground", "description": ""}, "distance": {"definition": "45", "templateType": "anything", "group": "Setup", "name": "distance", "description": ""}, "a_friction": {"definition": "let(f,dot(matrix([[0,1],[-1,0]])*slope,gravity)*c_friction,\n min(f,-a_gravity)\n)", "templateType": "anything", "group": "Acceleration", "name": "a_friction", "description": ""}, "c_friction": {"definition": "random(0.01..0.5#0.01)", "templateType": "anything", "group": "Setup", "name": "c_friction", "description": ""}, "gravity": {"definition": "vector(0,-9.8)", "templateType": "anything", "group": "Acceleration", "name": "gravity", "description": ""}, "a_gravity": {"definition": "dot(gravity,slope)", "templateType": "anything", "group": "Acceleration", "name": "a_gravity", "description": ""}, "mass": {"definition": "random(5..35#5)", "templateType": "anything", "group": "Setup", "name": "mass", "description": ""}, "acceleration_naive": {"definition": "a_gravity+a_friction", "templateType": "anything", "group": "Acceleration", "name": "acceleration_naive", "description": ""}, "height": {"definition": "random(10..40)", "templateType": "anything", "group": "Setup", "name": "height", "description": ""}}, "metadata": {"description": " Given the gradient of a slope and the coefficient of friction for a mass resting on it, use the equations of motion to calculate how it moves. \n Includes a GeoGebra rendering of the model. ", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}, {"name": "Embed geogebra with deployggb.js", "extensions": ["geogebra"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}], "functions": {}, "ungrouped_variables": ["a", "a_def", "b", "b_def"], "tags": [], "preamble": {"css": "", "js": ""}, "advice": " Either construct the intersection of two circles centred at$\\mathbf{a}$and$\\mathbf{b}$, or use the Regular Polygon tool. \n Here's one way of doing it: \n {geogebra_applet('eG6ezhKk',[[\"A\",a_def],[\"B\",b_def]],[])} ", "rulesets": {}, "parts": [{"prompt": " Construct an equilateral triangle with corners at the two given points, using the Polygon tool (it's not sufficient to create line segments between the corners). \n {geogebra_applet('HjFhq32N',[[\"A\",a_def],[\"B\",b_def]],[[\"Tool1\",\"p0g0\"]])} \n When your construction is complete, this part will be marked correct. ", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "extension"}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}], "statement": " In this question, the position of point$\\mathbf{a}$is picked randomly, and$\\mathbf{B}$is 3 units to its left. \n$\\mathbf{a} = \\var{a}\$

", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"a": {"definition": "vector(random(3..5#0.25),random(1..2#0.25))", "templateType": "anything", "group": "Ungrouped variables", "name": "a", "description": ""}, "b_def": {"definition": "\"(\"+b[0]+\",\"+b[1]+\")\"", "templateType": "anything", "group": "Ungrouped variables", "name": "b_def", "description": ""}, "b": {"definition": "a-vector(3,0)", "templateType": "anything", "group": "Ungrouped variables", "name": "b", "description": ""}, "a_def": {"definition": "\"(\"+a[0]+\",\"+a[1]+\")\"", "templateType": "anything", "group": "Ungrouped variables", "name": "a_def", "description": ""}}, "metadata": {"description": "

A sneak peek at a really clever integration of GeoGebra with Numbas.

", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}], "pickingStrategy": "all-ordered", "name": "", "pickQuestions": 0}], "allQuestions": true, "navigation": {"showresultspage": "oncompletion", "onleave": {"action": "none", "message": ""}, "browse": true, "preventleave": false, "allowregen": true, "reverse": true, "showfrontpage": true}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}], "extensions": ["geogebra", "jsxgraph", "stats"], "custom_part_types": [], "resources": []}