// Numbas version: exam_results_page_options {"name": "FY001 - 2021 Referral Exam", "metadata": {"description": "

FY001 Exam

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "duration": 7200, "percentPass": 0, "showQuestionGroupNames": false, "shuffleQuestionGroups": false, "showstudentname": true, "question_groups": [{"name": "Group", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questionNames": ["", "", "", "", "", "", "", "", "", "", ""], "variable_overrides": [[], [], [], [], [], [], [], [], [], [], []], "questions": [{"name": "Ugur's copy of Ugur's copy of Algebra: Solving quadratics by factorising", "extensions": [], "custom_part_types": [{"source": {"pk": 2, "author": {"name": "Christian Lawson-Perfect", "pk": 7}, "edit_page": "/part_type/2/edit"}, "name": "List of numbers", "short_name": "list-of-numbers", "description": "

The answer is a comma-separated list of numbers.

\n

The list is marked correct if each number occurs the same number of times as in the expected answer, and no extra numbers are present.

\n

You can optionally treat the answer as a set, so the number of occurrences doesn't matter, only whether each number is included or not.

", "help_url": "", "input_widget": "string", "input_options": {"correctAnswer": "join(\n if(settings[\"correctAnswerFractions\"],\n map(let([a,b],rational_approximation(x), string(a/b)),x,settings[\"correctAnswer\"])\n ,\n settings[\"correctAnswer\"]\n ),\n settings[\"separator\"] + \" \"\n)", "hint": {"static": false, "value": "if(settings[\"show_input_hint\"],\n \"Enter a list of numbers separated by {settings['separator']}.\",\n \"\"\n)"}, "allowEmpty": {"static": true, "value": true}}, "can_be_gap": true, "can_be_step": true, "marking_script": "bits:\nlet(b,filter(x<>\"\",x,split(studentAnswer,settings[\"separator\"])),\n if(isSet,list(set(b)),b)\n)\n\nexpected_numbers:\nlet(l,settings[\"correctAnswer\"] as \"list\",\n if(isSet,list(set(l)),l)\n)\n\nvalid_numbers:\nif(all(map(not isnan(x),x,interpreted_answer)),\n true,\n let(index,filter(isnan(interpreted_answer[x]),x,0..len(interpreted_answer)-1)[0], wrong, bits[index],\n warn(wrong+\" is not a valid number\");\n fail(wrong+\" is not a valid number.\")\n )\n )\n\nis_sorted:\nassert(sort(interpreted_answer)=interpreted_answer,\n multiply_credit(0.5,\"Not in order\")\n )\n\nincluded:\nmap(\n let(\n num_student,len(filter(x=y,y,interpreted_answer)),\n num_expected,len(filter(x=y,y,expected_numbers)),\n switch(\n num_student=num_expected,\n true,\n num_studentThe separate items in the student's answer

", "definition": "let(b,filter(x<>\"\",x,split(studentAnswer,settings[\"separator\"])),\n if(isSet,list(set(b)),b)\n)"}, {"name": "expected_numbers", "description": "", "definition": "let(l,settings[\"correctAnswer\"] as \"list\",\n if(isSet,list(set(l)),l)\n)"}, {"name": "valid_numbers", "description": "

Is every number in the student's list valid?

", "definition": "if(all(map(not isnan(x),x,interpreted_answer)),\n true,\n let(index,filter(isnan(interpreted_answer[x]),x,0..len(interpreted_answer)-1)[0], wrong, bits[index],\n warn(wrong+\" is not a valid number\");\n fail(wrong+\" is not a valid number.\")\n )\n )"}, {"name": "is_sorted", "description": "

Are the student's answers in ascending order?

", "definition": "assert(sort(interpreted_answer)=interpreted_answer,\n multiply_credit(0.5,\"Not in order\")\n )"}, {"name": "included", "description": "

Is each number in the expected answer present in the student's list the correct number of times?

", "definition": "map(\n let(\n num_student,len(filter(x=y,y,interpreted_answer)),\n num_expected,len(filter(x=y,y,expected_numbers)),\n switch(\n num_student=num_expected,\n true,\n num_studentHas every number been included the right number of times?

", "definition": "all(included)"}, {"name": "no_extras", "description": "

True if the student's list doesn't contain any numbers that aren't in the expected answer.

", "definition": "if(all(map(x in expected_numbers, x, interpreted_answer)),\n true\n ,\n incorrect(\"Your answer contains \"+extra_numbers[0]+\" but should not.\");\n false\n )"}, {"name": "interpreted_answer", "description": "A value representing the student's answer to this part.", "definition": "if(lower(studentAnswer) in [\"empty\",\"\u2205\"],[],\n map(\n if(settings[\"allowFractions\"],parsenumber_or_fraction(x,notationStyles), parsenumber(x,notationStyles))\n ,x\n ,bits\n )\n)"}, {"name": "mark", "description": "This is the main marking note. It should award credit and provide feedback based on the student's answer.", "definition": "if(studentanswer=\"\",fail(\"You have not entered an answer\"),false);\napply(valid_numbers);\napply(included);\napply(no_extras);\ncorrectif(all_included and no_extras)"}, {"name": "notationStyles", "description": "", "definition": "[\"en\"]"}, {"name": "isSet", "description": "

Should the answer be considered as a set, so the number of times an element occurs doesn't matter?

", "definition": "settings[\"isSet\"]"}, {"name": "extra_numbers", "description": "

Numbers included in the student's answer that are not in the expected list.

", "definition": "filter(not (x in expected_numbers),x,interpreted_answer)"}], "settings": [{"name": "correctAnswer", "label": "Correct answer", "help_url": "", "hint": "The list of numbers that the student should enter. The order does not matter.", "input_type": "code", "default_value": "", "evaluate": true}, {"name": "allowFractions", "label": "Allow the student to enter fractions?", "help_url": "", "hint": "", "input_type": "checkbox", "default_value": false}, {"name": "correctAnswerFractions", "label": "Display the correct answers as fractions?", "help_url": "", "hint": "", "input_type": "checkbox", "default_value": false}, {"name": "isSet", "label": "Is the answer a set?", "help_url": "", "hint": "If ticked, the number of times an element occurs doesn't matter, only whether it's included at all.", "input_type": "checkbox", "default_value": false}, {"name": "show_input_hint", "label": "Show the input hint?", "help_url": "", "hint": "", "input_type": "checkbox", "default_value": true}, {"name": "separator", "label": "Separator", "help_url": "", "hint": "The substring that should separate items in the student's list", "input_type": "string", "default_value": ",", "subvars": false}], "public_availability": "always", "published": true, "extensions": []}], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Lovkush Agarwal", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1358/"}, {"name": "Ugur Efem", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/14200/"}], "tags": [], "metadata": {"description": "

Some quadratics are to be solved by factorising

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

Solve the quadratic equations by factorising. If there is more than one solution, enter them all separated by a comma.

\n

-----------------------------------

", "advice": "

a) Observe that

\n

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

\n

Hence the solutions to $\\simplify{{a[1]*c[1]}x^2+{a[1]*d[1]+b[1]*c[1]}x+ {b[1]*d[1]}}= 0$ are $x=\\simplify{{-b[1]}/{a[1]}}$ and $x=\\simplify{{-d[1]}/{c[1]}}$.

\n

\n

b) Observe that

\n

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

\n

Hence the solutions to $\\simplify{{a[2]*c[2]}x^2+{a[2]*d[2]+b[2]*c[2]}x+ {b[2]*d[2]}}= 0$ are $x=\\simplify{{-b[2]}/{a[2]}}$ and $x=\\simplify{{-d[2]}/{c[2]}}$.

", "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"d": {"name": "d", "group": "Ungrouped variables", "definition": "map(num[j][3],j,0..4)", "description": "", "templateType": "anything", "can_override": false}, "solmin": {"name": "solmin", "group": "Ungrouped variables", "definition": "vector([min(-d[0]/c[0],-b[0]/a[0])]+[min(-d[1]/c[1],-b[1]/a[1])]+[min(-d[2]/c[2],-b[2]/a[2])]+[min(-d[3]/c[3],-b[3]/a[3])]+[min(-d[4]/c[4],-b[4]/a[4])])", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "map(num[j][1],j,0..4)", "description": "", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "map(num[j][2],j,0..4)", "description": "", "templateType": "anything", "can_override": false}, "solmax": {"name": "solmax", "group": "Ungrouped variables", "definition": "vector([max(-d[0]/c[0],-b[0]/a[0])]+[max(-d[1]/c[1],-b[1]/a[1])]+[max(-d[2]/c[2],-b[2]/a[2])]+[max(-d[3]/c[3],-b[3]/a[3])]+[max(-d[4]/c[4],-b[4]/a[4])])", "description": "", "templateType": "anything", "can_override": false}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "map(num[j][0],j,0..4)", "description": "", "templateType": "anything", "can_override": false}, "num": {"name": "num", "group": "Ungrouped variables", "definition": "[[1,random(6..7),1,random(2..5)]] +\nshuffle([\n [1,random(-4..-6),1,random(-3..3 except 0)],\n [1,random(-4..-6),random(2..3),random(-1..1 except 0)],\n [1,random(1,3,5),4,random(1,3,5)*random([1,-1])],\n [1,random(-4..-6),3,random([-1,1,-2,2])]\n ])", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["num", "a", "b", "c", "d", "solmax", "solmin"], "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": "

Factorise $\\simplify{{a[1]*c[1]}x^2+{a[1]*d[1]+b[1]*c[1]}x+ {b[1]*d[1]}}=$ [[0]]

\n

Hence solve $\\simplify{{a[1]*c[1]}x^2+{a[1]*d[1]+b[1]*c[1]}x+ {b[1]*d[1]}}=0$.

\n

[[1]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "({a[1]}x+{b[1]})({c[1]}x+{d[1]})", "answerSimplification": "std", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "musthave": {"strings": [")("], "showStrings": false, "partialCredit": 0, "message": ""}, "notallowed": {"strings": ["x^2", "x*x", "x x", "x(", "x*("], "showStrings": false, "partialCredit": 0, "message": ""}, "valuegenerators": [{"name": "x", "value": ""}]}, {"type": "list-of-numbers", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "[solmin[1],solmax[1]]", "allowFractions": true, "correctAnswerFractions": true, "isSet": false, "show_input_hint": true, "separator": ","}}], "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": "

Factorise $\\simplify{{a[2]*c[2]}x^2+{a[2]*d[2]+b[2]*c[2]}x+ {b[2]*d[2]}}=$ [[0]]

\n

Hence solve $\\simplify{{a[2]*c[2]}x^2+{a[2]*d[2]+b[2]*c[2]}x+ {b[2]*d[2]}}=0$.

\n

[[1]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "({a[2]}x+{b[2]})({c[2]}x+{d[2]})", "answerSimplification": "std", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "musthave": {"strings": [")("], "showStrings": false, "partialCredit": 0, "message": ""}, "notallowed": {"strings": ["x^2", "x*x", "x x", "x(", "x*("], "showStrings": false, "partialCredit": 0, "message": ""}, "valuegenerators": [{"name": "x", "value": ""}]}, {"type": "list-of-numbers", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "[solmin[2],solmax[2]]", "allowFractions": true, "correctAnswerFractions": true, "isSet": false, "show_input_hint": true, "separator": ","}}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Ugur's copy of Ugur's copy of Using the Quadratic Formula to Solve Equations of the Form $ax^2 +bx+c=0$", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Hannah Aldous", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1594/"}, {"name": "Ugur Efem", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/14200/"}], "tags": [], "metadata": {"description": "

Apply the quadratic formula to find the roots of a given equation. The quadratic formula is given in the steps if the student requires it.

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

Use the quadratic formula to calculate values for $x$ in these equations. Input the possible values as $x_1$ and $x_2$, where $x_1<x_2$.

\n

\n

Round your answers to two decimals. E.g. if you found 4.1567, round it up to 4.16; and if you found 6.653 round it down to 6.65.

", "advice": "

The quadratic formula is 

\n

\\[x={\\frac {-b\\pm\\sqrt{b^2-4\\times a\\times c}}{2a}}\\text{.}\\]

\n

a)

\n

We first rearrange our equation into the form $ax^2+bx+c=0$:

\n

\\[\\begin{align}
\\simplify{{b1}x^2+{b2}x+{b3}}&=0=\\var{b4}x\\\\
\\simplify{{b1}x^2+{b2-b4}x+{b3}}&=0\\text{.}
\\end{align}\\]

\n

We can then read off the values for $a, b$ and $c$, which are

\n

\\[\\begin{align}
a&=\\var{b1}\\text{,}\\\\
b&=\\var{b2-b4}\\text{,}\\\\
c&=\\var{b3}\\text{.}
\\end{align}\\]

\n

Substituting these values into the quadratic formula,

\n

\\[x = {\\frac {-\\var{b2-b4}\\pm\\sqrt{\\var{b2-b4}^2-4\\times \\var{b1}\\times \\var{b3}}}{2\\times\\var{b1}}},\\]

\n

we obtain solutions

\n

\\[\\begin{align}
x_1&=\\var{dpformat(p1,2)}\\text{,}\\\\
x_2&=\\var{dpformat(p2,2)}\\text{.}
\\end{align}\\]

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"a3": {"name": "a3", "group": "Ungrouped variables", "definition": "random(-30..4 except 0)", "description": "", "templateType": "anything", "can_override": false}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "random(15..20)", "description": "", "templateType": "anything", "can_override": false}, "a1": {"name": "a1", "group": "Ungrouped variables", "definition": "random(2..9)", "description": "", "templateType": "anything", "can_override": false}, "m": {"name": "m", "group": "Ungrouped variables", "definition": "random(9..a-1)", "description": "", "templateType": "anything", "can_override": false}, "b1": {"name": "b1", "group": "Ungrouped variables", "definition": "random(2..10 except a1)", "description": "", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "part 2", "definition": "random(-10..4 except 0)^2", "description": "", "templateType": "anything", "can_override": false}, "b4": {"name": "b4", "group": "Ungrouped variables", "definition": "random(-5..5)", "description": "", "templateType": "anything", "can_override": false}, "p2": {"name": "p2", "group": "Ungrouped variables", "definition": "(-(b2-b4)+((b2-b4)^2-4*b1*b3)^(1/2))/(2*b1)", "description": "", "templateType": "anything", "can_override": false}, "b3": {"name": "b3", "group": "Ungrouped variables", "definition": "random(-30..6 except a3)", "description": "", "templateType": "anything", "can_override": false}, "a4": {"name": "a4", "group": "Ungrouped variables", "definition": "random(1..15)", "description": "", "templateType": "anything", "can_override": false}, "x1": {"name": "x1", "group": "Ungrouped variables", "definition": "(-(a2)-((a2)^2-4*a1*(a3-a4))^(1/2))/(2*a1)", "description": "", "templateType": "anything", "can_override": false}, "p1": {"name": "p1", "group": "Ungrouped variables", "definition": "(-(b2-b4)-((b2-b4)^2-4*b1*b3)^(1/2))/(2*b1)", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "part 2", "definition": "2c^0.5+a1^2", "description": "", "templateType": "anything", "can_override": false}, "b2": {"name": "b2", "group": "Ungrouped variables", "definition": "random(20..35 except a2)", "description": "", "templateType": "anything", "can_override": false}, "a2": {"name": "a2", "group": "Ungrouped variables", "definition": "random(9..30 except a1)", "description": "", "templateType": "anything", "can_override": false}, "x2": {"name": "x2", "group": "Ungrouped variables", "definition": "(-(a2)+((a2)^2-4*a1*(a3-a4))^(1/2))/(2*a1)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a1", "a2", "a3", "a4", "b1", "b2", "b3", "b4", "x1", "p1", "p2", "x2", "a", "m"], "variable_groups": [{"name": "part 2", "variables": ["b", "c"]}], "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": "

$\\simplify{{b1}x^2+{b2}x+{b3}={b4}x}$

\n

$x_1=$ [[0]]

\n

$x_2=$ [[1]]

", "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": "p1", "maxValue": "p1", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "dp", "precision": "2", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": 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": "p2", "maxValue": "p2", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "dp", "precision": "2", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Ugur's copy of Solving linear simultaneous equations by elimination", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Lauren Richards", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1589/"}, {"name": "Ugur Efem", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/14200/"}], "metadata": {"description": "

This question tests the student's ability to solve simple linear equations by elimination. Part a) involves only having to manipulate one equation in order to solve, and part b) involves having to manipulate both equations in order to solve. 

", "licence": "Creative Commons Attribution 4.0 International"}, "rulesets": {}, "type": "question", "ungrouped_variables": [], "advice": "

a)

\n

\\begin{align}
\\var{h}x+\\var{k}y&=\\var{m}\\text{,}\\\\
\\var{j}x-\\var{l}y&=\\var{n}\\text{.}\\\\
\\end{align}

\n

To find the solution to these equations, we need to cancel one of the unknowns.

\n

Notice that $\\var{h}x$ in the first equation can be multiplied by $\\var{j/h}$ to match $\\var{j}x$ in the second equation. This means that we will only have to manipulate the first equation and can leave the second equation as it is.

\n

We have to multiply the entire first equation by $\\var{j/h}$, not just the $x$ term to ensure the equation still holds. 

\n

$\\var{h}x+\\var{k}y=\\var{m}$ multiplied by $\\var{j/h}$ gives $\\var{j}x+\\var{k*(j/h)}y=\\var{m*(j/h)}.$

\n

We now have a common $x$ term and we can cancel this by subtracting one equation from the other to find the $y$ term. 

\n

\\begin{align}
&&\\var{j}x+\\var{k*{j/h}}y&=\\var{m*(j/h)}\\\\
-&&\\var{j}x-\\var{l}y&=\\var{n}\\\\
&&\\overline{\\qquad} & \\overline{\\qquad}\\\\
&&0x+\\var{k*(j/h)+l}y&=\\var{m*(j/h)-n}\\\\[1em]
&&y&=\\frac{\\var{m*j/h-n}}{\\var{k*j/h+l}}\\\\
&&y&=\\var{y1}
\\end{align}

\n

We can find the corresponding value of $x$ by substituting this value for $y$ back into either of the original equations.

\n

\\begin{align}
\\var{h}x+(\\var{k}\\times\\var{y1})&=\\var{m}\\text{,}\\\\
\\var{h}x+\\var{k*y1}&=\\var{m}\\text{,}\\\\
\\var{h}x&=\\var{m-(k*y1)}\\text{,}\\\\
x&=\\var{x1}\\text{.}\\\\
\\end{align}

\n

Therefore, $x=\\var{x1}$ and $y=\\var{y1}$.

\n

b)

\n

\\begin{align}
\\var{a}x+\\var{b}y&=\\var{c}\\text{,}\\\\
\\var{d}x+\\var{f}y&=\\var{g}\\text{.}\\\\
\\end{align}

\n

To be able to solve the equations, we need to cancel one of the unknowns by manipulating the two equations so that the variable we wish to cancel is of the same value in each equation.

\n

Although we can choose to cancel either variable, $x$ or $y$, a good rule of thumb is to look at the lowest common multiples of the coefficients for each variable and cancel the variable with the lowest LCM.

\n

The LCM of the coefficients of the $x$ terms is $\\var{lcm(a,d)}$.

\n

The LCM of the coefficients of the $y$ terms is $\\var{lcm(b,f)}$.

\n

Therefore, we will choose to cancel the $x$ terms.

\n

We need to multiply the equations individually to achieve the lowest common multiple identified. 

\n

\\begin{align}
\\simplify{ {a}x + {b}y } &= \\var{c} &\\text{multiply by } \\var{lcm(a,d)/a} \\text { to obtain } && \\simplify{ {lcm(a,d)}x + {b*lcm(a,d)/a}y} &= \\var{c*lcm(a,d)/a} \\\\
\\simplify{ {d}x + {f}y } &= \\var{g} &\\text{multiply by } \\var{lcm(a,d)/d} \\text { to obtain } && \\simplify{ {lcm(a,d)}x + {b*lcm(a,d)/d}y} &= \\var{c*lcm(a,d)/d}
\\end{align}

\n

\n

We now have a common $x$ term, and can cancel this by subtracting one equation from the other.

\n

\\begin{align}
&& \\simplify{ {lcm(a,d)}x+{b*lcm(a,d)/a}y } = \\var{c*lcm(a,d)/a} \\\\
- && \\simplify{ {lcm(a,d)}x + {f*lcm(a,d)/d}y } = \\var{g*lcm(a,d)/d} \\\\
&& \\overline{\\simplify[]{ 0x+{b*lcm(a,d)/a-f*lcm(a,d)/d}y} = \\var{c*lcm(a,d)/a-g*lcm(a,d)/d}}
\\end{align}

\n

\\begin{align}
\\var{(b*lcm(a,d)/a)-(f*lcm(a,d)/d)}y &= \\var{(c*lcm(a,d)/a)-(g*lcm(a,d)/d)}\\text{,}\\\\
y &= \\var{y2}\\text{.}
\\end{align}

\n

We can find the corresponding value of $x$ by substituting thsi value of $y$ value back into either of the original equations.

\n

\\begin{align}
\\simplify[]{ {a}x + {b}{y2}} &= \\var{c} \\\\
\\simplify[]{ {a}x + {b*y2}} &= \\var{c} \\\\
\\var{a}x&=\\var{c-b*y2} \\\\
x &= \\var{x2} \\text{.}
\\end{align}

\n

Therefore, $x=\\var{x2}$ and $y=\\var{y2}$.

", "variable_groups": [{"name": "Part b", "variables": ["a", "b", "c", "d", "f", "g", "x2", "y2"]}, {"name": "part a", "variables": ["h", "j", "k", "l", "m", "n", "y1", "x1", "numerator", "divisor"]}], "statement": "", "parts": [{"scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "gapfill", "showCorrectAnswer": true, "marks": 0, "variableReplacements": [], "showFeedbackIcon": true, "prompt": "

Solve this set of simultaneous equations and give your answers for $x$ and $y$ below.

\n

\\begin{align}
\\simplify{{h}x+{k}y} &= \\var{m} \\text{,} \\\\
\\simplify{{j}x+{l}y} &= \\var{n} \\text{.}
\\end{align}

\n

$x =$ [[0]]

\n

$y =$ [[1]]

", "gaps": [{"correctAnswerFraction": false, "showCorrectAnswer": true, "notationStyles": ["plain", "en", "si-en"], "showFeedbackIcon": true, "allowFractions": true, "minValue": "x1", "scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "maxValue": "x1", "mustBeReduced": false, "marks": 1, "variableReplacements": [], "correctAnswerStyle": "plain", "mustBeReducedPC": 0}, {"correctAnswerFraction": false, "showCorrectAnswer": true, "notationStyles": ["plain", "en", "si-en"], "showFeedbackIcon": true, "allowFractions": true, "minValue": "y1", "scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "maxValue": "y1", "mustBeReduced": false, "marks": 1, "variableReplacements": [], "correctAnswerStyle": "plain", "mustBeReducedPC": 0}]}, {"scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "gapfill", "showCorrectAnswer": true, "marks": 0, "variableReplacements": [], "showFeedbackIcon": true, "prompt": "

Solve this set of simultaneous equations and give your answers for $x$ and $y$ below.

\n

\\begin{align}
\\simplify{{a}x + {b}y} &= \\var{c} \\text{,} \\\\
\\simplify{{d}x + {f}y} &= \\var{g} \\text{.}
\\end{align}

\n

$x =$ [[0]]

\n

$y =$ [[1]]

", "gaps": [{"correctAnswerFraction": false, "showCorrectAnswer": true, "notationStyles": ["plain", "en", "si-en"], "showFeedbackIcon": true, "allowFractions": true, "minValue": "x2", "scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "maxValue": "x2", "mustBeReduced": false, "marks": 1, "variableReplacements": [], "correctAnswerStyle": "plain", "mustBeReducedPC": 0}, {"correctAnswerFraction": false, "showCorrectAnswer": true, "notationStyles": ["plain", "en", "si-en"], "showFeedbackIcon": true, "allowFractions": true, "minValue": "y2", "scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "maxValue": "y2", "mustBeReduced": false, "marks": 1, "variableReplacements": [], "correctAnswerStyle": "plain", "mustBeReducedPC": 0}]}], "tags": ["elimination", "linear simultaneous equations", "solving linear simultaneous equations by elimination", "taxonomy"], "preamble": {"js": "", "css": ""}, "functions": {}, "variables": {"c": {"description": "", "group": "Part b", "definition": "a*x2+b*y2", "name": "c", "templateType": "anything"}, "a": {"description": "", "group": "Part b", "definition": "random(2..5)", "name": "a", "templateType": "anything"}, "numerator": {"description": "", "group": "part a", "definition": "m*(j/h)-n", "name": "numerator", "templateType": "anything"}, "l": {"description": "

Constant part of the LHS of the second equation in part a

", "group": "part a", "definition": "random(1..6)", "name": "l", "templateType": "anything"}, "n": {"description": "

RHS of the second equation in part a

", "group": "part a", "definition": "j*x1 + l*y1", "name": "n", "templateType": "anything"}, "g": {"description": "", "group": "Part b", "definition": "d*x2+f*y2", "name": "g", "templateType": "anything"}, "m": {"description": "

RHS of the first equation in part a

", "group": "part a", "definition": "h*x1 + k*y1", "name": "m", "templateType": "anything"}, "divisor": {"description": "", "group": "part a", "definition": "k*(j/h)+l", "name": "divisor", "templateType": "anything"}, "y1": {"description": "

Value of $x$ in part a

", "group": "part a", "definition": "random(-5..-1)*sgn(x1)", "name": "y1", "templateType": "anything"}, "y2": {"description": "

Value of $y$ in part b

", "group": "Part b", "definition": "random(-5..-1)*sgn(x2)", "name": "y2", "templateType": "anything"}, "x2": {"description": "

Value of $x$ in part b

", "group": "Part b", "definition": "random(-5..5)", "name": "x2", "templateType": "anything"}, "x1": {"description": "

Value of $x$ in part a

", "group": "part a", "definition": "random(-5..5)", "name": "x1", "templateType": "anything"}, "k": {"description": "

Constant part of the LHS of the first equation in part a

", "group": "part a", "definition": "random(1..6)", "name": "k", "templateType": "anything"}, "j": {"description": "

$x$ coefficient of the second equation in part a. An integer multiple of the $x$ coefficient of the second equation.

", "group": "part a", "definition": "h*random(2..3)", "name": "j", "templateType": "anything"}, "b": {"description": "

Coefficient of $y$ in the first equation of part b.

\n

", "group": "Part b", "definition": "random(a+1..7)", "name": "b", "templateType": "anything"}, "f": {"description": "

$y$ coefficient of the second equation in part b. Never an integer multiple of the $y$ coefficient in the first equation.

", "group": "Part b", "definition": "random(max(a,b)+1..12 except map(j*b,j,0..10/b))", "name": "f", "templateType": "anything"}, "h": {"description": "

$x$ coefficient of the first equation in part a

", "group": "part a", "definition": "random(2..5)", "name": "h", "templateType": "anything"}, "d": {"description": "

$x$ coefficient in the second equation of part b. Never an integer multiple of the $x$ coefficient in the first equation.

", "group": "Part b", "definition": "random(a+1..9 except map(j*a,j,0..10/a))", "name": "d", "templateType": "anything"}}, "variablesTest": {"maxRuns": 100, "condition": "lcm(a,d)

\n

", "advice": "

a)Domain of $f(x)$ is all real numbers except $\\frac{-\\var{d}}{\\var{c}}$.

\n

Let $y = \\frac{\\var{a}x \\ +\\ \\var{b}}{\\var{c}x\\ +\\ \\var{d}}$. Then 

\n

\n

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

\n

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

\n

$x(y\\var{c} -\\var{a}) = -y\\var{d} +\\var{b}$

\n

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

\n

\n

Hence $f^{-1}(x) = \\frac{-\\var{d}x +\\var{b}}{\\var{c}x -\\var{a}}$

\n

\n

Domain of $f^{-1}(x)$ is all real numbers except $\\frac{\\var{a}}{\\var{c}}$

\n

\n

b) Domain of $f(x)$ is all real numbers except $\\frac{\\var{k}}{\\var{q}}$.

\n

Let $y = \\frac{\\var{s}x \\ -\\ \\var{t}}{\\var{q}x\\ -\\ \\var{k}}$. Then 

\n

\n

$y\\var{q}x \\ -\\ y\\var{k} = \\var{s}x\\ -\\ \\var{t}$ 

\n

$y\\var{q}x -\\var{s}x\\ = y\\var{k} -\\var{t}$

\n

$x(y\\var{q} -\\var{s}) = y\\var{k} -\\var{t}$

\n

$x = \\frac{\\var{k}y -\\var{t}}{\\var{q}y -\\var{s}}$

\n

\n

Hence $f^{-1}(x) = \\frac{\\var{k}x -\\var{t}}{\\var{q}x -\\var{s}}$

\n

\n

Domain of $f^{-1}(x)$ is all real numbers except $\\frac{\\var{s}}{\\var{q}}$

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"b": {"name": "b", "group": "Ungrouped variables", "definition": "random(1..15 except a)", "description": "", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "random(1..9 except a)", "description": "", "templateType": "anything", "can_override": false}, "d": {"name": "d", "group": "Ungrouped variables", "definition": "random(1..15 except b except c)", "description": "", "templateType": "anything", "can_override": false}, "s": {"name": "s", "group": "Ungrouped variables", "definition": "random(1..15 except 0)", "description": "", "templateType": "anything", "can_override": false}, "t": {"name": "t", "group": "Ungrouped variables", "definition": "random(1..15 except s)", "description": "", "templateType": "anything", "can_override": false}, "q": {"name": "q", "group": "Ungrouped variables", "definition": "random(1..15 except s)", "description": "", "templateType": "anything", "can_override": false}, "k": {"name": "k", "group": "Ungrouped variables", "definition": "random(1..15 except t except q)", "description": "", "templateType": "anything", "can_override": false}, "j": {"name": "j", "group": "Ungrouped variables", "definition": "random(1..15 except 0)", "description": "", "templateType": "anything", "can_override": false}, "m": {"name": "m", "group": "Ungrouped variables", "definition": "random(1..15 except 0)", "description": "", "templateType": "anything", "can_override": false}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "random(1..15)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "b", "c", "d", "s", "t", "q", "k", "j", "m"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": true, "customName": "a)", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Let $f(x) = \\frac{\\var{a}x \\ +\\ \\var{b}}{\\var{c}x\\ +\\ \\var{d}}$. Find the natural domain of $f$, $f^{-1}$ and the natural domain of $f^{-1}$.

\n

Domain of $f$ is all real numbers except [[1]]

\n

$f^{-1}(x) =$ [[0]]

\n

Domain of $f^{-1}$ is all real numbers except [[2]]

", "gaps": [{"type": "jme", "useCustomName": true, "customName": "Gap 0", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "(-{d}x + {b})/({c}x - {a})", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "x", "value": ""}]}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "(-{d})/{c}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{a}/{c}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}], "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": "

Let $f(x) = \\frac{\\var{s}x \\ -\\ \\var{t}}{\\var{q}x\\ -\\ \\var{k}}$. Find the natural domain of $f$, $f^{-1}$ and the natural domain of $f^{-1}$.

\n

Domain of $f$ is all real numbers except [[0]]

\n

$f^{-1} =$ [[1]]

\n

Domain of $f^{-1}$ is all real numbers except [[2]]

", "gaps": [{"type": "jme", "useCustomName": true, "customName": "Gap 1", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{k}/{q}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}, {"type": "jme", "useCustomName": true, "customName": "Gap 0", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "({k}x - {t})/({q}x -{s})", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "x", "value": ""}]}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{s}/{q}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Exponential population growth from formula with inverse", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Ugur Efem", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/14200/"}], "tags": [], "metadata": {"description": "

Students are given an exponential equation and asked to evaluate it at two points.

\n

The constants in the exponential are randomised.

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "

A population of bacteria has a population, $P$, that can be described by the function $P = \\var{k} \\times \\var{a}^t $, where $t$ is the time in {timeperiod}.

", "advice": "

a) When $t=0$,

\n

$  P = \\var{k} \\times \\var{a}^t = \\var{k} \\times \\var{a}^0 = 1$

\n

\n

b) When $t = \\var{time}$,

\n

$P = \\var{k} \\times \\var{a}^\\var{time} = \\var{answer_raw}$

\n

When this is rounded to the nearest whole number, we get

\n

$P = \\var{answer}$

\n

\n

c) We need to take $t = -2$,

\n

$P = \\var{k} \\times \\var{a}^{-2} = \\var{ansc}$,

\n

When this is rounded to the nearest whole number, we get

\n

$P = \\var{ansc_r}$.

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"a": {"name": "a", "group": "Ungrouped variables", "definition": "1 + random(10..70)/100", "description": "", "templateType": "anything", "can_override": false}, "k": {"name": "k", "group": "Ungrouped variables", "definition": "random(1..10000)", "description": "", "templateType": "anything", "can_override": false}, "timeperiod": {"name": "timeperiod", "group": "Ungrouped variables", "definition": "timeperiodlist[timeperiodchoice]", "description": "", "templateType": "anything", "can_override": false}, "timeperiodchoice": {"name": "timeperiodchoice", "group": "Ungrouped variables", "definition": "random(0..3)", "description": "", "templateType": "anything", "can_override": false}, "timeperiodlist": {"name": "timeperiodlist", "group": "Ungrouped variables", "definition": "['days','weeks','months','years']", "description": "", "templateType": "anything", "can_override": false}, "time": {"name": "time", "group": "Ungrouped variables", "definition": "random(2..15)", "description": "", "templateType": "anything", "can_override": false}, "l": {"name": "l", "group": "Ungrouped variables", "definition": "random(k+2000, k+2500, k+3000, k+3500)", "description": "", "templateType": "anything", "can_override": false}, "k_over_l": {"name": "k_over_l", "group": "Ungrouped variables", "definition": "k/l", "description": "", "templateType": "anything", "can_override": false}, "ansc": {"name": "ansc", "group": "Ungrouped variables", "definition": "k*(a^(-2))", "description": "", "templateType": "anything", "can_override": false}, "ansc_r": {"name": "ansc_r", "group": "Ungrouped variables", "definition": "round(ansc)", "description": "", "templateType": "anything", "can_override": false}, "answer": {"name": "answer", "group": "Ungrouped variables", "definition": "round(answer_raw)", "description": "", "templateType": "anything", "can_override": false}, "answer_raw": {"name": "answer_raw", "group": "Ungrouped variables", "definition": "k*a^time", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "k", "timeperiod", "timeperiodchoice", "timeperiodlist", "time", "l", "k_over_l", "ansc", "ansc_r", "answer", "answer_raw"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "numberentry", "useCustomName": true, "customName": "Part a)", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

What is the initial population, $P$, when $t$ = 0?

", "minValue": "{k}", "maxValue": "{k}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

What is the population, $P$, when $t = \\var{time}$ {timeperiod}

\n

Round your answer to the nearest whole number.

", "minValue": "round({k}*{a}^{time})", "maxValue": "round({k}*{a}^{time})", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"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": "

What was the population, $P$, 2 {timeperiod} ago

\n

Round your answer to the nearest whole number.

\n

[[0]]

", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "Gap 0", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "round({k}*{a}^{-2})", "maxValue": "round({k}*{a}^{-2})", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "NC Math 3 Solve an exponential decay problem -- Depreciation", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Terry Young", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3130/"}], "ungrouped_variables": ["A", "r", "rPercent", "dFactor", "tDepreciate", "valueNow"], "parts": [{"customMarkingAlgorithm": "", "displayAnswer": "Decay", "scripts": {}, "unitTests": [], "showFeedbackIcon": true, "prompt": "

Is the value of the truck exponential growth or decay?

", "answer": "decay", "showCorrectAnswer": true, "type": "patternmatch", "customName": "", "marks": 1, "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "useCustomName": false, "matchMode": "exact", "adaptiveMarkingPenalty": 0, "variableReplacements": []}, {"customMarkingAlgorithm": "", "scripts": {}, "unitTests": [], "gaps": [{"correctAnswerFraction": false, "showFractionHint": true, "type": "numberentry", "maxValue": "A", "correctAnswerStyle": "plain", "extendBaseMarkingAlgorithm": true, "useCustomName": false, "mustBeReduced": false, "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "minValue": "A", "scripts": {}, "mustBeReducedPC": 0, "customName": "", "variableReplacements": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "marks": 1, "unitTests": [], "variableReplacementStrategy": "originalfirst", "notationStyles": ["plain", "en", "si-en"], "allowFractions": false}], "showFeedbackIcon": true, "prompt": "

What is the original value of the truck?

\n

$\\$$[[0]]

", "showCorrectAnswer": true, "type": "gapfill", "customName": "", "marks": 0, "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "useCustomName": false, "sortAnswers": false, "adaptiveMarkingPenalty": 0, "variableReplacements": []}, {"customMarkingAlgorithm": "", "displayAnswer": "{rPercent}%", "scripts": {}, "unitTests": [], "showFeedbackIcon": true, "prompt": "

What is the growth or decay rate as a percent?

", "answer": "{rPercent}%", "showCorrectAnswer": true, "type": "patternmatch", "customName": "", "marks": 1, "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "useCustomName": false, "matchMode": "exact", "adaptiveMarkingPenalty": 0, "variableReplacements": []}, {"customMarkingAlgorithm": "", "scripts": {}, "unitTests": [], "gaps": [{"correctAnswerFraction": false, "precisionPartialCredit": "50", "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "precisionType": "dp", "type": "numberentry", "maxValue": "valueNow", "correctAnswerStyle": "plain", "extendBaseMarkingAlgorithm": true, "useCustomName": false, "precision": "2", "adaptiveMarkingPenalty": 0, "showPrecisionHint": false, "customMarkingAlgorithm": "", "minValue": "valueNow", "scripts": {}, "mustBeReducedPC": 0, "precisionMessage": "Money always is expressed with two decimal places.", "variableReplacements": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "strictPrecision": true, "marks": 1, "unitTests": [], "variableReplacementStrategy": "originalfirst", "customName": "", "allowFractions": false}], "showFeedbackIcon": true, "prompt": "

What is the value of the truck $\\var{tDepreciate}$ years after it was built?

\n

$\\$$[[0]]

", "showCorrectAnswer": true, "type": "gapfill", "customName": "", "marks": 0, "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "useCustomName": false, "sortAnswers": false, "adaptiveMarkingPenalty": 0, "variableReplacements": []}], "functions": {}, "advice": "", "preamble": {"js": "", "css": ""}, "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"tDepreciate": {"group": "Ungrouped variables", "definition": "random(2..6)", "name": "tDepreciate", "description": "", "templateType": "anything"}, "dFactor": {"group": "Ungrouped variables", "definition": "1-r", "name": "dFactor", "description": "", "templateType": "anything"}, "r": {"group": "Ungrouped variables", "definition": "random(0.1..0.25#0.01)", "name": "r", "description": "", "templateType": "anything"}, "rPercent": {"group": "Ungrouped variables", "definition": "100*r", "name": "rPercent", "description": "", "templateType": "anything"}, "valueNow": {"group": "Ungrouped variables", "definition": "precround(A*(dFactor)^tDepreciate,2)", "name": "valueNow", "description": "", "templateType": "anything"}, "A": {"group": "Ungrouped variables", "definition": "random(40000..80000)", "name": "A", "description": "", "templateType": "anything"}}, "tags": [], "statement": "

The value, $y$, of a truck can be modeled by $ y = \\var{A}(\\var{dFactor})^t $, where $t$ is the number of years since the truck was built.

", "rulesets": {}, "variable_groups": [], "metadata": {"licence": "All rights reserved", "description": ""}}, {"name": "Ugur's copy of Using the Logarithm Equivalence $\\log_ba=c \\Longleftrightarrow a=b^c$", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Hannah Aldous", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1594/"}, {"name": "Ugur Efem", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/14200/"}], "tags": [], "metadata": {"description": "

Rearrange some expressions involving logarithms by applying the relation $\\log_b(a) = c \\iff a = b^c$.

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

a)

\n

i)

\n

We can rearrange logarithms using indices. 

\n

\\[\\log_ba=c \\Longleftrightarrow a=b^c\\]

\n

Using this equivalence we can rewrite $\\log_\\var{f}x=\\var{f1}$.

\n

\\[\\begin{align}
x&= \\var{f}^\\var{f1} \\\\
&=\\var{f^f1}
\\end{align}\\]

\n

\n

b)

\n

i)

\n

We can use the equivalence to rewrite our equation.

\n

\\[\\log_ba=c \\Longleftrightarrow a=b^c\\]

\n

We can write out our values to makes it easier.

\n

\\[\\begin{align}
a&=x \\\\
b&=\\var{g1}\\\\
c&=y+\\var{g2}
\\end{align}\\]

\n

Then we can write out our equation in the required form.

\n

\\[x=\\var{g1}^{y+\\var{g2}}\\]

\n

\n

c)

\n

We can use the same equivalence as in part b)

\n

\\[\\log_ba=c \\Longleftrightarrow a=b^c\\]

\n

We have

\n

\\begin{align}
a&=y+\\var{h1} \\\\
b&=x\\\\
c&=\\var{h2}\\text{.} \\\\ \\\\
\\log_{x}(y+\\var{h1}) &= \\var{h2} \\\\
\\implies y+\\var{h1} &= x^{\\var{h2}} \\\\
x &= (y+\\var{h1})^{\\frac{1}{\\var{h2}}}
\\end{align}

\n

\n

d) 

\n

The two in this list that don't equal $x$ are $\\log_e(x)$ and $\\log_{10}(x)$.

\n

\\[\\begin{align}
\\log_e(x)&=\\ln(x)\\\\
\\log_{10}(x)&=\\log(x)\\text{.}
\\end{align}\\]

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"h2": {"name": "h2", "group": "part3", "definition": "random(2..4)", "description": "", "templateType": "anything", "can_override": false}, "f3": {"name": "f3", "group": "Ungrouped variables", "definition": "random(3..8)", "description": "", "templateType": "anything", "can_override": false}, "h1": {"name": "h1", "group": "part3", "definition": "random(1..10 except h2)", "description": "", "templateType": "anything", "can_override": false}, "g2": {"name": "g2", "group": "part 2", "definition": "random(2..10except g1)", "description": "", "templateType": "anything", "can_override": false}, "f2": {"name": "f2", "group": "Ungrouped variables", "definition": "random(2..10 except f3 f)", "description": "", "templateType": "anything", "can_override": false}, "f5": {"name": "f5", "group": "Ungrouped variables", "definition": "random(2..6 except f1)", "description": "", "templateType": "anything", "can_override": false}, "f4": {"name": "f4", "group": "Ungrouped variables", "definition": "random(5..12 except f2 f)", "description": "", "templateType": "anything", "can_override": false}, "f1": {"name": "f1", "group": "Ungrouped variables", "definition": "random(2..5 except f)", "description": "", "templateType": "anything", "can_override": false}, "g1": {"name": "g1", "group": "part 2", "definition": "random(2..10)", "description": "", "templateType": "anything", "can_override": false}, "f": {"name": "f", "group": "Ungrouped variables", "definition": "random(2..10)", "description": "", "templateType": "anything", "can_override": false}, "g3": {"name": "g3", "group": "part 2", "definition": "random(2..10except g1 g2)", "description": "", "templateType": "anything", "can_override": false}, "g4": {"name": "g4", "group": "part 2", "definition": "random(2..10except g1 g2 g3)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["f", "f2", "f1", "f3", "f4", "f5"], "variable_groups": [{"name": "part 2", "variables": ["g3", "g2", "g4", "g1"]}, {"name": "part3", "variables": ["h1", "h2"]}], "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": "

Rearrange the equation to find $x$.

\n

$\\log_\\var{f}(x)=\\var{f1}$ 

\n

$x=$ [[0]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{f^f1}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}], "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": "

Make $x$ the subject of the following equation.

\n

$\\log_\\var{g1}(x)=y+\\var{g2}$

\n

$x=$ [[0]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{g1}^(y+{g2})", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "y", "value": ""}]}], "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": "

Make $x$ the subject of the equation, leaving your answer in the form $a^{\\frac{1}{b}}$.

\n

$\\log_x(y+\\var{h1})=\\var{h2}$

\n

$x=$ [[0]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "(y+{h1})^(1/{h2})", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "y", "value": ""}]}], "sortAnswers": false}, {"type": "m_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, "prompt": "

Which of the following expressions are equivalent to $x$?

", "minMarks": 0, "maxMarks": 0, "shuffleChoices": true, "displayType": "checkbox", "displayColumns": 0, "minAnswers": 0, "maxAnswers": 0, "warningType": "none", "showCellAnswerState": true, "markingMethod": "sum ticked cells", "choices": ["

$\\log_a(a^x)$

", "

$a^{\\log_a(x)}$

", "

$e^{\\ln(x)}$

", "

$\\log_{10}(x)$

", "

$\\log_e(x)$

", "

$\\ln(e^x)$

"], "matrix": ["1", "1", "1", "-5", "-5", "1"], "distractors": ["", "", "", "", "", ""]}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Ugur's copy of Logarithms1", "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": "Wan Mekwi", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4058/"}, {"name": "Ugur Efem", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/14200/"}], "tags": [], "metadata": {"description": "\n \t\t

Given a sum of logs, all numbers are integers,

\n \t\t

$\\log_b(a_1)+\\alpha\\log_b(a_2)+\\beta\\log_b(a_3)$ write as $\\log_b(a)$ for some fraction $a$.

\n \t\t

Also calculate to 3 decimal places $\\log_b(a)$. 

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

Answer the following question on logarithms.

", "advice": "\n

The rules for combining logs are

\n

\\[\\begin{eqnarray*}&1.&  \\log_b(ac)&=&\\log_b(a)+\\log_b(c)\\\\ \\\\ &2.&  \\log_b\\left(\\frac{a}{c}\\right)&=&\\log_b(a)-\\log_b(c)\\\\ \\\\ &3.&  \\log_b(a^r)&=&r\\log_b(a) \\end{eqnarray*} \\]

\n

We see that:

\n

\\[\\begin{eqnarray*}\\log_{\\var{b}}(\\var{a_1})-\\var{r_1}\\log_{\\var{b}}(\\var{a_2})+\\var{r_2}\\log_{\\var{b}}(\\var{a_3})&=&\\log_{\\var{b}}(\\var{a_1})-\\log_{\\var{b}}(\\var{a_2}^{\\var{r_1}})+\\log_{\\var{b}}(\\var{a_3}^{\\var{r_2}})\\mbox{ using 3.}\\\\&=&\\log_{\\var{b}}(\\var{a_1})-\\log_{\\var{b}}(\\var{a_2^r_1})+\\log_{\\var{b}}(\\var{a_3^r_2})\\\\&=&\\log_{\\var{b}}(\\var{a_1}\\times \\var{a_3^r_2})-\\log_{\\var{b}}(\\var{a_2^r_1}) \\mbox{ using 1.}\\\\&=&\\log_{\\var{b}}\\left(\\frac{\\var{a_1}\\times \\var{a_3^r_2}}{\\var{a_2^r_1}}\\right) \\mbox{ using 2.}\\\\&=&\\log_{\\var{b}}\\left(\\frac{\\var{a_1*a_3^r_2}}{\\var{a_2^r_1}}\\right)\\\\&=&\\log_{\\var{b}}\\left(\\simplify[all,fractionnumbers]{{a_1*a_3^r_2}/{a_2^r_1}}\\right)\\mbox{ on cancelling common factors}.\\end{eqnarray*}\\]

\n

Hence $\\displaystyle c=\\simplify[all,fractionnumbers]{{a_1*a_3^r_2}/{a_2^r_1}}$.

\n

To calculate $\\displaystyle \\log_{\\var{b}}\\left(\\simplify[all,fractionnumbers]{{a_1*a_3^r_2}/{a_2^r_1}}\\right)$ to 4 decimal places we use the fact that for any positive base $b$:

\n

\\[\\log_b(c)=\\frac{\\ln(c)}{\\ln(b)}=\\frac{\\log_{10}(c)}{\\log_{10}(b)}\\]

\n

and we can use either of the log functions, $\\ln$ or $\\log_{10}$ on our calculators to find the value.

\n

Using $\\ln$ we find:

\n

\\[ \\log_{\\var{b}}\\left(\\simplify[all,fractionnumbers]{{a_1*a_3^r_2}/{a_2^r_1}}\\right)=\\frac{\\ln\\left(\\simplify[all,fractionnumbers]{{a_1*a_3^r_2}/{a_2^r_1}}\\right)}{\\ln(\\var{b})}=\\var{ans}\\] to 4 decimal places.

\n ", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"c": {"name": "c", "group": "Ungrouped variables", "definition": "a_1*a_3^r_2/a_2^r_1", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(2..9)", "description": "", "templateType": "anything", "can_override": false}, "a_3": {"name": "a_3", "group": "Ungrouped variables", "definition": "random(2..8)", "description": "", "templateType": "anything", "can_override": false}, "a_2": {"name": "a_2", "group": "Ungrouped variables", "definition": "random(2,4,8)*random(3,9)", "description": "", "templateType": "anything", "can_override": false}, "a_1": {"name": "a_1", "group": "Ungrouped variables", "definition": "random(5..20)", "description": "", "templateType": "anything", "can_override": false}, "r_1": {"name": "r_1", "group": "Ungrouped variables", "definition": "random(2..3)", "description": "", "templateType": "anything", "can_override": false}, "r_2": {"name": "r_2", "group": "Ungrouped variables", "definition": "random(2..3)", "description": "", "templateType": "anything", "can_override": false}, "tol": {"name": "tol", "group": "Ungrouped variables", "definition": "0.0001", "description": "", "templateType": "anything", "can_override": false}, "ans": {"name": "ans", "group": "Ungrouped variables", "definition": "precround(log(c)/log(b),4)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["c", "b", "a_3", "a_2", "a_1", "r_1", "r_2", "tol", "ans"], "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

Find a fraction or integer $c$ such that:

\n

$\\log_{\\var{b}}(\\var{a_1})-\\var{r_1}\\log_{\\var{b}}(\\var{a_2})+\\var{r_2}\\log_{\\var{b}}(\\var{a_3})=\\log_{\\var{b}}(c)$ 

\n

$c=\\;$[[0]].

\n

Input $c$ as an integer or as a fraction and not as a decimal.

\n

Now calculate $\\log_{\\var{b}}(c)$ to 4 decimal places:

\n

$\\log_{\\var{b}}(c)=\\;$[[1]].

\n

 

\n

 

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{a_1*a_3^r_2}/{a_2^r_1}", "answerSimplification": "all,fractionnumbers", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}, {"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": "{ans-tol}", "maxValue": "{ans+tol}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Ugur's copy of Write down and apply the formula for an arithmetic sequence.", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Ugur Efem", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/14200/"}], "tags": [], "metadata": {"description": "

Given the first few terms of an arithmetic sequence, write down its formula, then find a couple of particular terms.

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

In this question, consider the sequence

\n

\\[ a = \\var{a1}, \\; \\var{a1+d}, \\; \\var{a1+d*2}, \\; \\var{a1+d*3}, \\; \\ldots \\]

\n

A helpful person has drawn out a table of the terms so far.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$\\boldsymbol{n}$$1$$2$$3$$4$$\\ldots$
$\\boldsymbol{a_n}$$\\var{a1}$$\\var{a1+d}$$\\var{a1+2d}$$\\var{a1+3d}$$\\ldots$
", "advice": "

The formula for the $n^\\text{th}$ term, $a_n$, of an arithmetic sequence is

\n

\\[ a_n=a_1+(n-1)d \\text{.} \\]

\n

$a_1$ is the first term, and $d$ is the common difference between adjacent terms.

\n

a)

\n

In the given sequence, the common difference is $\\var{a1+d} - \\var{a1} = \\var{d}$, and the first term is $\\var{a1}$.

\n

So, the formula for this sequence is

\n

\\[ a_n = \\var{a1} + (n-1) \\times \\var{d} \\text{.} \\]

\n

b)

\n

\\[ a_\\var{small} = \\var{a1} + (\\var{small}-1) \\times \\var{d} = \\var{a1+(small-1)*d} \\text{.} \\]

\n

c)

\n

\\[ a_\\var{large} = \\var{a1} + (\\var{large}-1) \\times \\var{d} = \\var{a1+(large-1)*d} \\text{.} \\]

\n

d) 

\n

\\[S_n = \\frac{n(a_1 + a_n)}{2}\\] 

\n

Plug in the values to get $S_{\\var{medium}} = \\frac{\\var{medium}(\\var{a1} + \\var{amed})}{2} = \\var{ansd} $

\n

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"large": {"name": "large", "group": "Ungrouped variables", "definition": "random(10..50#5)*10", "description": "

A large index to compute

", "templateType": "anything", "can_override": false}, "small": {"name": "small", "group": "Ungrouped variables", "definition": "random(6..10)", "description": "

A small index to compute

", "templateType": "anything", "can_override": false}, "a1": {"name": "a1", "group": "Ungrouped variables", "definition": "random(1..90)", "description": "

The first term in the sequence

", "templateType": "anything", "can_override": false}, "d": {"name": "d", "group": "Ungrouped variables", "definition": "random(3..13 except 10)", "description": "", "templateType": "anything", "can_override": false}, "medium": {"name": "medium", "group": "Ungrouped variables", "definition": "random(10..20)", "description": "", "templateType": "anything", "can_override": false}, "amed": {"name": "amed", "group": "Ungrouped variables", "definition": "a1+(medium-1)*d", "description": "", "templateType": "anything", "can_override": false}, "ansd": {"name": "ansd", "group": "Ungrouped variables", "definition": "(medium*(a1 + amed))/2", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a1", "d", "small", "large", "medium", "amed", "ansd"], "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": "

Write out an expression for $a_n$, the $n^{\\text{th}}$ term of the sequence, in terms of $n$.

\n

$a_n =$ [[0]]

\n

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{a1}+(n-1){d}", "answerSimplification": "basic", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "n", "value": ""}]}], "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

Find the $\\var{small}^{\\text{th}}$ term

\n

$a_{\\var{small}} = $ [[0]]

\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": "a1+(small-1)*d", "maxValue": "a1+(small-1)*d", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "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": "

Find the $\\var{large}^{\\text{th}}$ term

\n

$a_{\\var{large}} = $[[0]]

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "a1+(large-1)*d", "maxValue": "a1+(large-1)*d", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "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": "

Find the sum of first $\\var{medium}$ terms.

\n

$S_{\\var{medium}} =$ [[0]]

", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "gap sum", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "({medium}*({a1} + {amed}))/2", "maxValue": "({medium}*({a1} + {amed}))/2", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Ugur's copy of Probability of picking a particular colour ball from a bag", "extensions": [], "custom_part_types": [], "resources": [["question-resources/dice.svg", "/srv/numbas/media/question-resources/dice.svg"]], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Ugur Efem", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/14200/"}], "tags": [], "metadata": {"description": "

A bag contains balls of three different colours. You're told how many there are of each, and asked the probability of picking a ball of a particular colour.

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

a)For equally likely outcomes, you can calculate the probability of a particular event occurring by using the formula

\n

$\\text{Probability of an event} = \\displaystyle\\frac{\\text{number of favourable outcomes}}{\\text{total number of outcomes}}$.

\n

\n

We are told that the bag contains $\\var{red}$ red balls, $\\var{blue}$ blue balls and $\\var{green}$ green balls and that one ball is removed from the bag at random.

\n

The total number of balls in the bag before the chosen ball is removed is 

\n

\\[\\var{red}+\\var{blue}+\\var{green} = \\var{total}.\\]

\n

As the ball is being removed randomly from the bag, there is an equal probability of selecting any one of the $\\var{total}$ balls.

\n

Therefore, the probability of the chosen ball being blue is

\n

\\[
P(\\text{blue}) = \\displaystyle\\frac{\\text{number of favourable outcomes}}{\\text{total number of outcomes}} = \\displaystyle\\frac{\\var{blue}}{\\var{total}}
\\]

\n

\n

b) In total there are $\\var{red1} + n$ balls. Probability choosing one green ball is therefore $\\frac{n}{\\var{red1} + n}$. 

\n

We are given that $\\frac{n}{\\var{red1} + n} = \\frac{\\var{a}}{\\var{b}}$. Cross multiplication gives $\\var{b}n = \\var{a}\\times\\var{red1} + \\var{a}n$. 

\n

Simplfying yields $n = \\var{ansb}$

\n

\n

c) In total there are $\\var{red2}+\\var{blue2} +\\var{green}$ balls. Probability of picking a red ball is $\\frac{\\var{red2}}{\\var{red2}+\\var{blue2} +\\var{green}}$. Probability of picking a blue ball is $\\frac{\\var{blue2}}{\\var{red2}+\\var{blue2} +\\var{green}}$. Total probability is tehir sum:

\n

\\[\\frac{\\var{red2}+\\var{blue2}}{\\var{red2}+\\var{blue2} +\\var{green}}.\\]

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"red": {"name": "red", "group": "Ungrouped variables", "definition": "random(15,16,17,18,19)", "description": "

number of red balls in part c

", "templateType": "anything", "can_override": false}, "green": {"name": "green", "group": "Ungrouped variables", "definition": "random(4,5,8,10)", "description": "

number of green balls in part c.

", "templateType": "anything", "can_override": false}, "total": {"name": "total", "group": "Ungrouped variables", "definition": "red+blue+green", "description": "

total number of balls in part c

", "templateType": "anything", "can_override": false}, "blue": {"name": "blue", "group": "Ungrouped variables", "definition": "random(6,7,8,9,11,13)", "description": "

number of blue balls in part c

", "templateType": "anything", "can_override": false}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "random(1,2,3)", "description": "", "templateType": "anything", "can_override": false}, "red1": {"name": "red1", "group": "Ungrouped variables", "definition": "random(5,7,11)", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "a+red1", "description": "", "templateType": "anything", "can_override": false}, "ansb": {"name": "ansb", "group": "Ungrouped variables", "definition": "(a*red1)/(b-a)", "description": "", "templateType": "anything", "can_override": false}, "red2": {"name": "red2", "group": "Ungrouped variables", "definition": "red+1", "description": "", "templateType": "anything", "can_override": false}, "blue2": {"name": "blue2", "group": "Ungrouped variables", "definition": "blue+1", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": "100"}, "ungrouped_variables": ["red", "blue", "green", "total", "a", "red1", "b", "ansb", "red2", "blue2"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": true, "customName": "Part a)", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

A bag contains $\\var{red}$ red balls, $\\var{blue}$ blue balls and $\\var{green}$ green balls. One ball is chosen from the bag at random. What is the probability that the chosen ball will be blue?

\n

[[0]]

", "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": ["

$\\displaystyle\\frac{\\var{red+green}}{\\var{total}}$

", "

$\\displaystyle\\frac{\\var{blue}}{\\var{green+red}}$

", "

$\\displaystyle\\frac{\\var{blue}}{\\var{total}}$

", "

$\\displaystyle\\frac{1}{\\var{blue}}$

", "

$\\displaystyle\\frac{1}{\\var{total}}$

"], "matrix": [0, 0, "1", 0, 0], "distractors": ["This is the probability of not picking a blue ball.", "Divide by the total number of outcomes, not the number of unfavourable outcomes.", "", "Divide the number of favourable outcomes by the total number of outcomes.", "There's more than one blue ball."]}], "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": "

A bag contains $\\var{red1}$ red balls and $n$ green balls. Find $n$ is the probability of choosing a green ball is $\\frac{\\var{a}}{\\var{b}}$.

\n

$n =$ [[0]]

", "gaps": [{"type": "jme", "useCustomName": true, "customName": "Gap 0", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "({a}*{red1})/({b}-{a})", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}], "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": "

A bag contains $\\var{red2}$ red balls, $\\var{blue2}$ blue balls and $\\var{green}$ green balls. One ball is chosen from the bag at random. What is the probability that the chosen ball will be blue or red?  Enter your answer as a fraction

\n

[[0]]

", "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": "({red2}+{blue2})/({red2}+{blue2}+{green})", "maxValue": "({red2}+{blue2})/({red2}+{blue2}+{green})", "correctAnswerFraction": false, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Ugur's copy of Ugur's copy of Mean, Median, Mode", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}, {"name": "Harry Flynn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/976/"}, {"name": "Paul Finley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2232/"}, {"name": "Ugur Efem", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/14200/"}], "functions": {}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a1", "a3", "a2", "a5", "a4", "a7", "a6"], "parts": [{"showCorrectAnswer": true, "gaps": [{"answer": "{precround(1/7*(a1+a2+a3+a4+a5+a6+a7),2)}", "showpreview": true, "scripts": {}, "vsetrange": [0, 1], "expectedvariablenames": [], "answersimplification": "std", "vsetrangepoints": 5, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "type": "jme", "showCorrectAnswer": true, "checkingaccuracy": 0.01, "checkingtype": "absdiff", "checkvariablenames": false, "showFeedbackIcon": true, "marks": 2}], "scripts": {}, "prompt": "

$\\text{mean}=\\;\\;$[[0]] (correct to two decimal places)

", "marks": 0, "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "variableReplacements": [], "type": "gapfill"}, {"showCorrectAnswer": true, "gaps": [{"notationStyles": ["plain", "en", "si-en"], "scripts": {}, "correctAnswerFraction": false, "marks": 2, "variableReplacementStrategy": "originalfirst", "allowFractions": false, "variableReplacements": [], "type": "numberentry", "showCorrectAnswer": true, "maxValue": "{a4}", "mustBeReduced": false, "minValue": "{a4}", "mustBeReducedPC": 0, "correctAnswerStyle": "plain", "showFeedbackIcon": true}], "scripts": {}, "prompt": "

$\\text{median}=\\;\\;$[[0]]

", "marks": 0, "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "variableReplacements": [], "type": "gapfill"}, {"showCorrectAnswer": true, "gaps": [{"notationStyles": ["plain", "en", "si-en"], "scripts": {}, "correctAnswerFraction": false, "marks": 2, "variableReplacementStrategy": "originalfirst", "allowFractions": false, "variableReplacements": [], "type": "numberentry", "showCorrectAnswer": true, "maxValue": "{a2}", "mustBeReduced": false, "minValue": "{a2}", "mustBeReducedPC": 0, "correctAnswerStyle": "plain", "showFeedbackIcon": true}], "scripts": {}, "prompt": "

$\\text{mode}=\\;\\;$[[0]]

", "marks": 0, "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "variableReplacements": [], "type": "gapfill"}], "variables": {"a7": {"definition": "random(131..140)", "name": "a7", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "a2": {"definition": "random(116..121)", "name": "a2", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "a6": {"definition": "random(126..130)", "name": "a6", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "a4": {"definition": "random(122..125)", "name": "a4", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "a1": {"definition": "random(110..115)", "name": "a1", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "a3": {"definition": "a2", "name": "a3", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "a5": {"definition": "random(126..130 except a6)", "name": "a5", "group": "Ungrouped variables", "description": "", "templateType": "anything"}}, "tags": [], "statement": "

The fuel emissions (in g/km of CO2) of a sample of 7 diesel cars of similar type have been recorded as follows:

\n

$\\var{a2}, \\var{a7}, \\var{a1}, \\var{a5}, \\var{a3}, \\var{a6}$ and $\\var{a4}$.

\n

Calculate the mean, median and mode of these emissions.

", "metadata": {"description": "
\n

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

\n

rebelmaths

\n
", "licence": "Creative Commons Attribution 4.0 International"}, "variable_groups": [], "rulesets": {"std": ["all", "!collectNumbers", "!noLeadingMinus"]}, "preamble": {"js": "", "css": ""}, "advice": "

Mean: Add up all the numbers and divide by the number of numbers.

\n

Median: middle value

\n

Mode: most common value

\n

", "type": "question"}]}], "allowPrinting": true, "navigation": {"allowregen": false, "reverse": true, "browse": true, "allowsteps": false, "showfrontpage": true, "showresultspage": "review", "navigatemode": "sequence", "onleave": {"action": "none", "message": "

You have not finished answering the question

"}, "preventleave": true, "startpassword": ""}, "timing": {"allowPause": false, "timeout": {"action": "warn", "message": "

You run out of time!

"}, "timedwarning": {"action": "warn", "message": "

Last 5 Minutes!

"}}, "feedback": {"showactualmark": false, "showtotalmark": true, "showanswerstate": false, "allowrevealanswer": false, "advicethreshold": 0, "intro": "", "reviewshowscore": true, "reviewshowfeedback": true, "reviewshowexpectedanswer": true, "reviewshowadvice": false, "feedbackmessages": []}, "diagnostic": {"knowledge_graph": {"topics": [], "learning_objectives": []}, "script": "diagnosys", "customScript": ""}, "contributors": [{"name": "Ugur Efem", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/14200/"}], "extensions": ["stats"], "custom_part_types": [{"source": {"pk": 2, "author": {"name": "Christian Lawson-Perfect", "pk": 7}, "edit_page": "/part_type/2/edit"}, "name": "List of numbers", "short_name": "list-of-numbers", "description": "

The answer is a comma-separated list of numbers.

\n

The list is marked correct if each number occurs the same number of times as in the expected answer, and no extra numbers are present.

\n

You can optionally treat the answer as a set, so the number of occurrences doesn't matter, only whether each number is included or not.

", "help_url": "", "input_widget": "string", "input_options": {"correctAnswer": "join(\n if(settings[\"correctAnswerFractions\"],\n map(let([a,b],rational_approximation(x), string(a/b)),x,settings[\"correctAnswer\"])\n ,\n settings[\"correctAnswer\"]\n ),\n settings[\"separator\"] + \" \"\n)", "hint": {"static": false, "value": "if(settings[\"show_input_hint\"],\n \"Enter a list of numbers separated by {settings['separator']}.\",\n \"\"\n)"}, "allowEmpty": {"static": true, "value": true}}, "can_be_gap": true, "can_be_step": true, "marking_script": "bits:\nlet(b,filter(x<>\"\",x,split(studentAnswer,settings[\"separator\"])),\n if(isSet,list(set(b)),b)\n)\n\nexpected_numbers:\nlet(l,settings[\"correctAnswer\"] as \"list\",\n if(isSet,list(set(l)),l)\n)\n\nvalid_numbers:\nif(all(map(not isnan(x),x,interpreted_answer)),\n true,\n let(index,filter(isnan(interpreted_answer[x]),x,0..len(interpreted_answer)-1)[0], wrong, bits[index],\n warn(wrong+\" is not a valid number\");\n fail(wrong+\" is not a valid number.\")\n )\n )\n\nis_sorted:\nassert(sort(interpreted_answer)=interpreted_answer,\n multiply_credit(0.5,\"Not in order\")\n )\n\nincluded:\nmap(\n let(\n num_student,len(filter(x=y,y,interpreted_answer)),\n num_expected,len(filter(x=y,y,expected_numbers)),\n switch(\n num_student=num_expected,\n true,\n num_studentThe separate items in the student's answer

", "definition": "let(b,filter(x<>\"\",x,split(studentAnswer,settings[\"separator\"])),\n if(isSet,list(set(b)),b)\n)"}, {"name": "expected_numbers", "description": "", "definition": "let(l,settings[\"correctAnswer\"] as \"list\",\n if(isSet,list(set(l)),l)\n)"}, {"name": "valid_numbers", "description": "

Is every number in the student's list valid?

", "definition": "if(all(map(not isnan(x),x,interpreted_answer)),\n true,\n let(index,filter(isnan(interpreted_answer[x]),x,0..len(interpreted_answer)-1)[0], wrong, bits[index],\n warn(wrong+\" is not a valid number\");\n fail(wrong+\" is not a valid number.\")\n )\n )"}, {"name": "is_sorted", "description": "

Are the student's answers in ascending order?

", "definition": "assert(sort(interpreted_answer)=interpreted_answer,\n multiply_credit(0.5,\"Not in order\")\n )"}, {"name": "included", "description": "

Is each number in the expected answer present in the student's list the correct number of times?

", "definition": "map(\n let(\n num_student,len(filter(x=y,y,interpreted_answer)),\n num_expected,len(filter(x=y,y,expected_numbers)),\n switch(\n num_student=num_expected,\n true,\n num_studentHas every number been included the right number of times?

", "definition": "all(included)"}, {"name": "no_extras", "description": "

True if the student's list doesn't contain any numbers that aren't in the expected answer.

", "definition": "if(all(map(x in expected_numbers, x, interpreted_answer)),\n true\n ,\n incorrect(\"Your answer contains \"+extra_numbers[0]+\" but should not.\");\n false\n )"}, {"name": "interpreted_answer", "description": "A value representing the student's answer to this part.", "definition": "if(lower(studentAnswer) in [\"empty\",\"\u2205\"],[],\n map(\n if(settings[\"allowFractions\"],parsenumber_or_fraction(x,notationStyles), parsenumber(x,notationStyles))\n ,x\n ,bits\n )\n)"}, {"name": "mark", "description": "This is the main marking note. It should award credit and provide feedback based on the student's answer.", "definition": "if(studentanswer=\"\",fail(\"You have not entered an answer\"),false);\napply(valid_numbers);\napply(included);\napply(no_extras);\ncorrectif(all_included and no_extras)"}, {"name": "notationStyles", "description": "", "definition": "[\"en\"]"}, {"name": "isSet", "description": "

Should the answer be considered as a set, so the number of times an element occurs doesn't matter?

", "definition": "settings[\"isSet\"]"}, {"name": "extra_numbers", "description": "

Numbers included in the student's answer that are not in the expected list.

", "definition": "filter(not (x in expected_numbers),x,interpreted_answer)"}], "settings": [{"name": "correctAnswer", "label": "Correct answer", "help_url": "", "hint": "The list of numbers that the student should enter. The order does not matter.", "input_type": "code", "default_value": "", "evaluate": true}, {"name": "allowFractions", "label": "Allow the student to enter fractions?", "help_url": "", "hint": "", "input_type": "checkbox", "default_value": false}, {"name": "correctAnswerFractions", "label": "Display the correct answers as fractions?", "help_url": "", "hint": "", "input_type": "checkbox", "default_value": false}, {"name": "isSet", "label": "Is the answer a set?", "help_url": "", "hint": "If ticked, the number of times an element occurs doesn't matter, only whether it's included at all.", "input_type": "checkbox", "default_value": false}, {"name": "show_input_hint", "label": "Show the input hint?", "help_url": "", "hint": "", "input_type": "checkbox", "default_value": true}, {"name": "separator", "label": "Separator", "help_url": "", "hint": "The substring that should separate items in the student's list", "input_type": "string", "default_value": ",", "subvars": false}], "public_availability": "always", "published": true, "extensions": []}], "resources": [["question-resources/dice.svg", "/srv/numbas/media/question-resources/dice.svg"]]}