// Numbas version: exam_results_page_options {"duration": 0, "navigation": {"onleave": {"message": "", "action": "none"}, "browse": true, "preventleave": true, "allowregen": true, "reverse": true, "showfrontpage": true, "showresultspage": "oncompletion"}, "timing": {"timeout": {"message": "", "action": "none"}, "timedwarning": {"message": "", "action": "none"}, "allowPause": true}, "question_groups": [{"pickingStrategy": "all-ordered", "pickQuestions": 1, "name": "Group", "questions": [{"name": "Applied y-intercepts: Investing in boats", "extensions": ["geogebra", "random_person"], "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": "Bradley Bush", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1521/"}], "metadata": {"description": "

This question provides an example of an initial bank account investment with a fixed return and tests the student's understanding of an application of intercepts.

", "licence": "Creative Commons Attribution 4.0 International"}, "ungrouped_variables": ["p", "friend", "m", "c", "bal"], "type": "question", "advice": "

a)

\n

The balance increases by £{m} each year, so $m = \\var{m}$.

\n

We know that at $x = 9$ years, $y = \\var{bal}$. Substituting these values into the equation, we obtain

\n

\\[ \\var{bal} = \\var{m} \\times 9 + c \\]

\n

Rearrange this to find $c$:

\n

\\begin{align}
c &= \\var{bal} - \\var{m} \\times 9 \\\\
&= \\var{bal} - \\var{m*9} \\\\
&= \\var{c} 
\\end{align}

\n

So the formula for the account balance is

\n

\\[y = \\var{m}x+\\var{c}\\text{.}\\]

\n

b)

\n

The constant term $\\var{c}$ determines the point at which the line crosses the $y$-axis. This point is called the $y$-intercept.

\n

c)

\n

The initial investment is the value of $y$ at $x = 0$, so it's £{c}$.

\n

d)

\n

It is useful to plot the graph of {friend['name']}'s savings account against your own for comparison ({friend['name']}'s balance is shown as a dashed line):

\n

{geogebra_applet('gpFmg3Ex',[[\"p\",p],[\"m\",m],[\"c\",c]])}

\n

Using this graph, we can see that only two of the statements are true:

\n\n

As the gradients of the two lines on the graph are the same, we can eliminate the other two statements about the lines converging and about having a higher gradient.

", "variable_groups": [], "rulesets": {}, "statement": "

You are a forgetful investor set on saving enough money to buy a new fishing boat for when you retire.

\n

Your savings account manager tells you your savings account is worth £{formatnumber(bal,\"en\")}. 

\n

You have forgotten the principal amount you started with the account with; however you do know that you have been saving for exactly nine years now and your manager informs you that the bank has been paying you a premium of £{m} per year.

\n

Your account manager shows you this graph, which plots account balance over time for a given principal amount.

\n

The line on the graph below can be repositioned by dragging the slider.

\n

{geogebra_applet('HtnCWSSQ',[[\"p\",p],[\"m\",m],[\"c\",c]])} 

", "parts": [{"scripts": {}, "gaps": [{"showpreview": true, "vsetrangepoints": 5, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "checkingaccuracy": 0.001, "showFeedbackIcon": true, "checkvariablenames": false, "type": "jme", "answer": "{m}x+{c}", "scripts": {}, "variableReplacements": [], "checkingtype": "absdiff", "vsetrange": [0, 1], "marks": 1, "expectedvariablenames": []}], "type": "gapfill", "showCorrectAnswer": true, "marks": 0, "variableReplacements": [], "showFeedbackIcon": true, "prompt": "

With $y$ representing the account balance and $x$ the number of years the account has been open, give an expression for the balance in the form $y=mx+c$.

\n

$y=$ [[0]]

\n

", "variableReplacementStrategy": "originalfirst"}, {"shuffleChoices": true, "type": "1_n_2", "minMarks": 0, "showCorrectAnswer": true, "prompt": "

Which of the following elements of the graph corresponds to the constant part of the equation?

", "showFeedbackIcon": true, "displayColumns": 0, "choices": ["

y-intercept

", "

x-intercept

", "

z-intercept

", "

The origin

"], "scripts": {}, "distractors": ["", "", "", ""], "maxMarks": 0, "variableReplacementStrategy": "originalfirst", "marks": 0, "variableReplacements": [], "matrix": ["1", 0, 0, 0], "displayType": "dropdownlist"}, {"scripts": {}, "gaps": [{"showpreview": true, "vsetrangepoints": 5, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "checkingaccuracy": 0.001, "showFeedbackIcon": true, "checkvariablenames": false, "type": "jme", "answer": "{c}", "scripts": {}, "variableReplacements": [], "checkingtype": "absdiff", "vsetrange": [0, 1], "marks": 1, "expectedvariablenames": []}], "type": "gapfill", "showCorrectAnswer": true, "marks": 0, "variableReplacements": [], "showFeedbackIcon": true, "prompt": "

From your answer to the last question, state the initial investment you made towards saving for your new fishing boat.

\n

Initial investment $=$ $£$[[0]].

", "variableReplacementStrategy": "originalfirst"}, {"shuffleChoices": true, "type": "m_n_2", "maxAnswers": 0, "minMarks": 0, "showCorrectAnswer": true, "minAnswers": 0, "prompt": "

Your friend, {friend['name']}, is considerably wealthier than you are, so {friend['pronouns']['they']} {if(friend['gender']='neutral','start','starts')} with twice the investment you did but still {if(friend['gender']='neutral','receive','receives')} the same annual payment of $£\\var{m}$.

\n

Which of the following statements comparing the graph of {friend['name']}'s account balance to yours are true?

", "showFeedbackIcon": true, "displayColumns": "1", "choices": ["

The gradient is equal and hence {friend['pronouns']['their']} line would be parallel to yours.

", "

The plot of {friend['pronouns']['their']} balance crosses the $y$-axis at a higher point than yours.

", "

The plot of {friend['pronouns']['their']} balance has a higher gradient.

", "

The plots of your balance and {friend['pronouns']['theirs']} cross at some point.

"], "scripts": {}, "distractors": ["", "", "", ""], "maxMarks": 0, "variableReplacementStrategy": "originalfirst", "marks": 0, "variableReplacements": [], "matrix": ["1", "1", 0, 0], "displayType": "checkbox", "warningType": "none"}], "tags": ["applications of y-intercepts", "taxonomy", "y-intercept"], "preamble": {"css": "", "js": ""}, "functions": {}, "variables": {"bal": {"description": "", "group": "Ungrouped variables", "definition": "m*9+c", "name": "bal", "templateType": "anything"}, "c": {"description": "", "group": "Ungrouped variables", "definition": "random(995,1005,1010,1015,1020,1025)", "name": "c", "templateType": "anything"}, "p": {"description": "

not intercept, starting intercept

", "group": "Ungrouped variables", "definition": "1100", "name": "p", "templateType": "anything"}, "friend": {"description": "", "group": "Ungrouped variables", "definition": "random_person()", "name": "friend", "templateType": "anything"}, "m": {"description": "", "group": "Ungrouped variables", "definition": "random(15,30,45)", "name": "m", "templateType": "anything"}}, "variablesTest": {"maxRuns": 100, "condition": ""}}, {"name": "Arithmetic sequences in an ice cream shop", "extensions": ["random_person"], "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/"}], "metadata": {"description": "

Given the common difference and first term of an arithmetic sequence, work out the index of the nth term of the sequence.

\n

Framed as a word problem with ticket numbers in an ice cream shop.

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

We know that every $\\var{d}^{\\text{th}}$ ticket after the first receives strawberry ice cream. So, the sequence of ticket numbers which get strawberry ice cream starts like this:

\n

\\[ 1, \\var{d+1}, \\var{2d+1}, \\var{3d+1}, \\ldots \\]

\n

The numbers on the tickets for strawberry ice cream form an arithmetic sequence: the first term is $1$ and the common difference is $\\var{d}$.

\n

We can write down a formula for the $n^{\\text{th}}$ term in this sequence and rearrange it to find how many customers received strawberry ice cream before {person['name']}.

\n

The general formula for an arithmetic sequence is

\n

\\[a_n = a_1 + (n-1)d \\]

\n

where

\n\n

We know that $a_n = \\var{1+d*index}$, $a_1 = 1$, and $d = \\var{d}$, and we want to find $n$.

\n

Substituting these values from the formula gives

\n

\\begin{align}
a_n &= a_1 + (n-1)d \\\\
\\var{1+d*index} &= 1 + (n -1)\\var{d}\\,.
\\end{align}

\n

Now we rearrange this to find $n$:

\n

\\begin{align}
\\var{1+d*index-1} &= \\var{d}n - \\var{d} \\\\
\\var{d*index +d} &= \\var{d}n \\\\
n &= \\var{(d*index + d)/d}.
\\end{align}

\n

This is the number of people who received strawberry ice cream up to and including {person['name']}. Removing {person['name']} leaves $\\var{index}$ customers who received strawberry ice cream before {person['name']} did.

", "variable_groups": [], "statement": "

When customers enter an ice cream shop they receive a numbered ticket for a free sample.

\n

There are $\\var{d}$ flavours of ice cream that the shop alternates through sequentially.

\n

The first ticket was number $1$ and the person with this ticket received strawberry ice cream.

\n

{person['name']} was given ticket number $\\var{1+d*(index)}$ and also received strawberry ice cream.

", "parts": [{"correctAnswerFraction": false, "stepsPenalty": 0, "mustBeReducedPC": 0, "prompt": "

How many customers before {person['name']} have tried the strawberry ice-cream?

", "showFeedbackIcon": true, "allowFractions": false, "minValue": "index", "notationStyles": ["plain", "en", "si-en"], "scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "maxValue": "index", "mustBeReduced": false, "steps": [{"scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "information", "showCorrectAnswer": true, "prompt": "

Use the arithmetic formula,

\n

\\[a_n = a_1 + (n-1)d \\]

\n

where
$a_n$ - The n$^{th}$ term in an arithmetic sequence 
$a_1$ - The $1^{st}$ term in an arithmetic sequence 
$n$ - Term number
$d$ - The common difference.

", "variableReplacements": [], "showFeedbackIcon": true, "marks": 0}, {"correctAnswerFraction": false, "showCorrectAnswer": true, "mustBeReducedPC": 0, "prompt": "

For this arithmetic sequence, what is $a_1$?

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

What is $d$?

", "showFeedbackIcon": true, "allowFractions": false, "minValue": "{d}", "notationStyles": ["plain", "en", "si-en"], "scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "maxValue": "{d}", "mustBeReduced": false, "marks": 1, "variableReplacements": [], "correctAnswerStyle": "plain"}], "marks": "3", "variableReplacements": [], "correctAnswerStyle": "plain", "showCorrectAnswer": true}], "tags": ["arithmetic sequence", "calculate the term number", "common difference", "nth term", "sequences", "taxonomy"], "preamble": {"css": "", "js": ""}, "functions": {}, "variables": {"person": {"description": "", "group": "Ungrouped variables", "definition": "random_person()", "name": "person", "templateType": "anything"}, "index": {"description": "", "group": "Ungrouped variables", "definition": "random(14..34 except [20, 21, 22, 30, 31, 32, 40])", "name": "index", "templateType": "anything"}, "d": {"description": "", "group": "Ungrouped variables", "definition": "random(6..12 except 10)", "name": "d", "templateType": "anything"}}, "variablesTest": {"maxRuns": 100, "condition": ""}}, {"name": "Calculate density given mass and volume", "extensions": ["random_person"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Elliott Fletcher", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1591/"}], "advice": "

a)

\n

We are told that the ball has a volume of $\\var{volume}\\text{cm}^3$ and a mass of $\\var{mass}$g, and we are asked to calculate the density of the box in g/cm$^3$.

\n

The formula for density is

\n

\\[\\begin{align} \\text{Density} &= \\frac{\\text{Mass}}{\\text{Volume}} \\\\[4pt]
&= \\frac{\\var{mass}}{\\var{volume}} \\\\[4pt]
&= \\var{density} \\\\
&= \\var{precround(density,2)}\\text{g/cm}^3\\text{.} \\\\
\\end{align}\\]

\n

b)

\n

Since the density of the ball is {if(density>1,'greater','smaller')} than the density of water, {person['name']}'s ball will {if(density>1,'sink','float')}.

\n

", "statement": "

A solid object placed in water will sink if its density is greater than that of water ($1\\text{g/cm}^3$).

\n

{person['name']}'s toy ball has a volume of $\\var{volume}\\text{cm}^3$ and a mass of $\\var{mass}$g. Whilst playing, {person['pronouns']['they']} drops {person['pronouns']['their']} ball into a pond.

", "variables": {"mass": {"name": "mass", "group": "Ungrouped variables", "definition": "random(55..65)", "templateType": "anything", "description": "

mass of the box

"}, "person": {"name": "person", "group": "Ungrouped variables", "definition": "random_person()", "templateType": "anything", "description": ""}, "density": {"name": "density", "group": "Ungrouped variables", "definition": "mass/volume", "templateType": "anything", "description": ""}, "volume": {"name": "volume", "group": "Ungrouped variables", "definition": "random(40..70 except mass)", "templateType": "anything", "description": "

Volume of box

"}, "mark_matrix": {"name": "mark_matrix", "group": "Ungrouped variables", "definition": "[if(density<1,1,0),if(density>1,1,0)]", "templateType": "anything", "description": ""}}, "tags": ["calculating density", "compound units", "Compound units", "density", "mass", "taxonomy", "Volume", "volume"], "ungrouped_variables": ["volume", "mass", "density", "person", "mark_matrix"], "functions": {}, "metadata": {"description": "

Calculate the density of an object given its mass and volume.

", "licence": "Creative Commons Attribution 4.0 International"}, "parts": [{"scripts": {}, "steps": [{"scripts": {}, "variableReplacements": [], "type": "information", "showCorrectAnswer": true, "marks": 0, "prompt": "

The relationship between density, mass and volume is

\n

\\[\\text{Density} = \\frac{\\text{Mass}}{\\text{Volume}}.\\]

", "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst"}], "variableReplacements": [], "gaps": [{"notationStyles": ["plain", "en", "si-en"], "mustBeReduced": false, "variableReplacements": [], "mustBeReducedPC": 0, "precisionPartialCredit": 0, "strictPrecision": false, "correctAnswerFraction": false, "minValue": "density", "allowFractions": false, "correctAnswerStyle": "plain", "showFeedbackIcon": true, "scripts": {}, "maxValue": "density", "showCorrectAnswer": true, "precision": "2", "type": "numberentry", "showPrecisionHint": false, "marks": 1, "precisionType": "dp", "variableReplacementStrategy": "originalfirst", "precisionMessage": "

Round your answer to $3$ significant figures.

"}], "type": "gapfill", "showCorrectAnswer": true, "marks": 0, "prompt": "

What is the density of the ball? 

\n

[[0]] g/cm$^3$.      Round your answer to $2$ decimal places.

", "stepsPenalty": 0, "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst"}, {"variableReplacements": [], "maxMarks": 0, "displayType": "radiogroup", "choices": ["

It floats

", "

It sinks

"], "scripts": {}, "displayColumns": 0, "showCorrectAnswer": true, "type": "1_n_2", "shuffleChoices": false, "prompt": "

Does {person['name']}'s ball float or sink?

", "marks": 0, "showFeedbackIcon": true, "matrix": "mark_matrix", "variableReplacementStrategy": "originalfirst", "minMarks": 0}], "type": "question", "variable_groups": [], "preamble": {"js": "", "css": ""}, "variablesTest": {"condition": "", "maxRuns": 100}, "rulesets": {}}, {"name": "Calculating a simple rate of pay", "extensions": ["random_person"], "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": "Elliott Fletcher", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1591/"}], "tags": ["compound units", "Compound units", "rate of pay", "taxonomy"], "metadata": {"description": "

Calculate a rate of pay (in pounds per week) given the total pay over a given period of time.

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

{pname} gets paid a total of $£\\var{payment}$ at the end of {their} summer job; {they} work{s} for $\\var{weeks}$ weeks.

", "advice": "

We are told that {pname} gets paid a total of $£\\var{payment}$ at the end of {their} summer job and that {they} work{s} at {their} job for $\\var{weeks}$ weeks.

\n

To calculate the amount of money {pname} gets paid per week, we divide the total amount of money that {they} earn{s} at the end of {their} job by how many weeks that {they} work{s} for.

\n

\\[£\\displaystyle\\frac{\\var{payment}}{\\var{weeks}} = £\\var{{payment/weeks}}.\\]

\n

Therefore {pname} gets paid $£\\var{{payment/weeks}}$/week.

\n

Note that in compound measures, a forward slash symbol / is often used instead of the word 'per'. So $£\\var{{payment/weeks}}$/week means the same as $£\\var{{payment/weeks}}$ per week.

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"person": {"name": "person", "group": "A person", "definition": "random_person()", "description": "

A random person

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

Number of weeks person works for

", "templateType": "anything", "can_override": false}, "payment": {"name": "payment", "group": "Ungrouped variables", "definition": "random(1400,1600,1800)", "description": "

amount person gets paid

", "templateType": "anything", "can_override": false}, "pname": {"name": "pname", "group": "A person", "definition": "person[\"name\"]", "description": "", "templateType": "anything", "can_override": false}, "they": {"name": "they", "group": "A person", "definition": "person[\"pronouns\"][\"they\"]", "description": "", "templateType": "anything", "can_override": false}, "their": {"name": "their", "group": "A person", "definition": "person[\"pronouns\"][\"their\"]", "description": "", "templateType": "anything", "can_override": false}, "theirs": {"name": "theirs", "group": "A person", "definition": "person[\"pronouns\"][\"theirs\"]", "description": "", "templateType": "anything", "can_override": false}, "s": {"name": "s", "group": "A person", "definition": "if(person[\"gender\"]=\"neutral\",\"\",\"s\")", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["payment", "weeks"], "variable_groups": [{"name": "A person", "variables": ["person", "pname", "they", "their", "theirs", "s"]}], "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": "

How much does {pname} get paid per week?

\n

£[[0]]/week

", "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": "{payment}/{weeks}", "maxValue": "{payment}/{weeks}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Calculating expected values using theoretical probability and experimental probability", "extensions": ["random_person"], "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": "Elliott Fletcher", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1591/"}], "tags": ["dice", "Dice", "Expected Values", "Expected values", "Experimental Probability", "experimental probability", "Experimental probability", "probability", "Probability", "Relative Frequency", "relative frequency", "taxonomy", "Theoretical Probability", "theoretical probability"], "metadata": {"description": "

This question assesses

\n\n

The question also helps to show students how using experimental probability and theoretical probability results in different expected values of an outcome.

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

{pname} rolls an unbiased six-sided die $\\var{no_rolls}$ times.

", "advice": "

a)

\n

Firstly, we must calculate the theoretical probability of rolling either a $\\var{num1}$ or a $\\var{num2}$.

\n

Both $\\var{num1}$ and $\\var{num2}$ only appear once on an unbiased six-sided die, so there are only $2$ possible outcomes where we roll either a $\\var{num1}$ or a $\\var{num2}$.

\n

There are $6$ possible outcomes when we roll an unbiased six-sided die.

\n

Therefore, the theoretical probability of rolling either a $\\var{num1}$ or a $\\var{num2}$ is

\n

\\[\\displaystyle\\frac{2}{6} = \\displaystyle\\frac{1}{3}.\\]

\n

Then the expected number of times that {pname} rolls either a $\\var{num1}$ or a $\\var{num2}$ is

\n

\\[\\var{no_rolls} \\times \\displaystyle\\frac{1}{3} = \\var{{no_rolls}/3}.\\]

\n

b)

\n

We are told that in {pronouns['their']} experiment, {pname} obtained either a $\\var{num1}$ or a $\\var{num2}$ on $\\var{Obtained}$ occasions. 

\n

Recall the formula for the relative frequency of an outcome.

\n

\\[ \\text{Relative Frequency} = \\displaystyle\\frac{\\text{Frequency of an outcome}}{\\text{Number of trials}}.\\]

\n

The Number of trials in the experiment is $\\var{no_rolls}$ and the frequency of the desired outcome is $\\var{Obtained}$.

\n

So the relative frequency of rolling either a $\\var{num1}$ or a $\\var{num2}$ is $\\displaystyle\\frac{\\var{Obtained}}{\\var{no_rolls}}$.

\n

c)

\n

The same die is now thrown $\\var{more_rolls}$ times.

\n

We know from b) that the relative frequency of rolling either a $\\var{num1}$ or a $\\var{num2}$ with this die was $\\displaystyle\\simplify{{Obtained}/{no_rolls}}$.

\n

Therefore using the experimental data, the number of times we would expect {pname} to roll either a $\\var{num1}$ or a $\\var{num2}$ in $\\var{more_rolls}$ throws of the die is

\n

\\[\\var{more_rolls} \\times \\displaystyle\\simplify{{Obtained}/{no_rolls}} = \\var{{more_rolls}*{Obtained}/{no_rolls}}.\\]

\n

On the other hand, we know from a) that the theoretical probability of rolling either a $\\var{num1}$ or a $\\var{num2}$ with this die is $\\displaystyle\\frac{1}{3}$.

\n

Using the theoretical probability, the number of times we would expect {pname} to roll either a $\\var{num1}$ or a $\\var{num2}$ in $\\var{more_rolls}$ throws of the die is 

\n

\\[\\var{more_rolls} \\times \\displaystyle\\frac{1}{3} = \\var{{more_rolls}/3}.\\]

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"num2": {"name": "num2", "group": "Ungrouped variables", "definition": "random(4,5,6)", "description": "

Second number.

", "templateType": "anything", "can_override": false}, "pronouns": {"name": "pronouns", "group": "Ungrouped variables", "definition": "person['pronouns']", "description": "", "templateType": "anything", "can_override": false}, "Obtained": {"name": "Obtained", "group": "Ungrouped variables", "definition": "(no_rolls*multiplier)/10", "description": "

Number of times the event is obtained in the experiment.

", "templateType": "anything", "can_override": false}, "pname": {"name": "pname", "group": "Ungrouped variables", "definition": "person['name']", "description": "", "templateType": "anything", "can_override": false}, "no_rolls": {"name": "no_rolls", "group": "Ungrouped variables", "definition": "random(210..390 #30)", "description": "

Number of rolls of the die.

", "templateType": "anything", "can_override": false}, "verbs": {"name": "verbs", "group": "Ungrouped variables", "definition": "if(person['gender']='neutral','','s')", "description": "", "templateType": "anything", "can_override": false}, "multiplier": {"name": "multiplier", "group": "Ungrouped variables", "definition": "random(5,6,7)", "description": "

multiplier for the value of Obtained variable

", "templateType": "anything", "can_override": false}, "num1": {"name": "num1", "group": "Ungrouped variables", "definition": "random(1,2,3)", "description": "

First number.

", "templateType": "anything", "can_override": false}, "person": {"name": "person", "group": "Ungrouped variables", "definition": "random_person()", "description": "", "templateType": "anything", "can_override": false}, "more_rolls": {"name": "more_rolls", "group": "Ungrouped variables", "definition": "random(600..780 #30)", "description": "

Number of extra rolls of the die

", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["no_rolls", "num1", "num2", "Obtained", "more_rolls", "multiplier", "person", "pronouns", "pname", "verbs"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": "fraction {\n display: inline-block;\n vertical-align: middle;\n}\nfraction > numerator, fraction > denominator {\n float: left;\n width: 100%;\n text-align: center;\n line-height: 2.5em;\n}\nfraction > numerator {\n border-bottom: 1px solid;\n padding-bottom: 5px;\n}\nfraction > denominator {\n padding-top: 5px;\n}\nfraction input {\n line-height: 1em;\n}\n\nfraction .part {\n margin: 0;\n}\n\n.table-responsive, .fractiontable {\n display:inline-block;\n}\n.fractiontable {\n padding: 0; \n border: 0;\n}\n\n.fractiontable .tddenom \n{\n text-align: center;\n}\n\n.fractiontable .tdnum \n{\n border-bottom: 1px solid black; \n text-align: center;\n}\n\n\n.fractiontable tr {\n height: 3em;\n}\n"}, "parts": [{"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, "prompt": "

Based on the theoretical probability of rolling a $\\var{num1}$ or a $\\var{num2}$, how many times would you expect {pronouns['them']} to roll either one of these numbers?

", "minValue": "{no_rolls}*1/3", "maxValue": "{no_rolls}*1/3", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "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": "

After performing the experiment, {pname} reports that {pronouns['they']} rolled either a $\\var{num1}$ or a $\\var{num2}$ on $\\var{Obtained}$ occasions.

\n

Calculate the relative frequency of rolling either a $\\var{num1}$ or a $\\var{num2}$.

\n

Enter your answer as a fraction.

\n

$\\text{Relative Frequency} =$ [[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": "obtained/no_rolls", "maxValue": "obtained/no_rolls", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

If {pname} rolled the same die $\\var{more_rolls}$ more times, how many times could {pronouns['they']} expect to roll either a $\\var{num1}$ or a $\\var{num2}$?

\n

Based on the experimental data: [[0]]

\n

Based on the theoretical probability: [[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": "{more_rolls}*({Obtained}/{no_rolls})", "maxValue": "{more_rolls}*({Obtained}/{no_rolls})", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{more_rolls}/3", "maxValue": "{more_rolls}/3", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Compound units : shopping for bananas", "extensions": ["random_person"], "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": "Elliott Fletcher", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1591/"}], "metadata": {"description": "

This question assesses the student's ability to use some given information involving two different units of measurement to rewrite the information as a compound measure.

", "licence": "Creative Commons Attribution 4.0 International"}, "rulesets": {}, "type": "question", "ungrouped_variables": ["person", "a", "b", "b_pack", "b_single", "mark_matrix"], "advice": "

a)

\n

The pack price at Fine Fare supermarket is {b_pack}, which converted to pence is {b}p.

\n

The price per banana at Fine Fare supermarket is

\n

\\[ \\var{b} \\div 5 = \\var{b_single}\\text{p.}\\]

\n

b)

\n

As the price at Hintons supermarket is cheaper, {person['pronouns']['they']} should shop there.

\n

c)

\n

The new price per banana at Fine Fare Supermarket is

\n

\\begin{align}
\\var{b} \\div 6 &= \\var{if(isint(b/6),b/6,dpformat(b/6,1))}\\text{p.} \\\\
\\end{align}

\n

Since the price at Hintons Supermarket is still cheaper, {person['name']} should not change {person['pronouns']['their']} decision.

\n

Since the price at Fine Fare Supermarket is now cheaper, {person['name']} should change {person['pronouns']['their']} decision.

\n

", "variable_groups": [], "statement": "

{person['name']} is shopping for bananas and has two local supermarkets:

\n

Hintons Supermarket charges {a}p per banana.

\n

Fine Fare Supermarket charges {b_pack} for a pack of 5 bananas.

", "parts": [{"scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "gapfill", "showCorrectAnswer": true, "prompt": "

What is the price per banana (in pence) at Fine Fare Supermarket?

\n

[[0]]p/banana

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

If {person['name']} is interested in getting the best value for money per banana, which supermarket should {person['pronouns']['they']} shop at?

", "choices": ["

Hintons Supermarket

", "

Fine Fare Supermarket

"], "scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "1_n_2", "maxMarks": 0, "marks": 0, "distractors": ["", ""], "matrix": ["1", 0], "displayType": "radiogroup"}, {"shuffleChoices": false, "minMarks": 0, "showCorrectAnswer": true, "displayColumns": 0, "showFeedbackIcon": true, "prompt": "

{person['name']} notices that some of the bags of bananas at Fine Fare Supermarket contain 6 bananas and wonders if that will make a difference to {person['pronouns']['their']} decision. Assuming that {person['pronouns']['they']} can get hold of a pack of 6 bananas at Fine Fare, which supermarket should {person['pronouns']['they']} now shop at?

", "choices": ["

Hintons Supermarket

", "

Fine Fare Supermarket

"], "scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "1_n_2", "maxMarks": 0, "marks": 0, "variableReplacements": [], "matrix": "mark_matrix", "displayType": "radiogroup"}], "tags": ["compound measures", "Compound measures", "Compound units of measurement", "price", "rate of pay", "taxonomy"], "preamble": {"css": "", "js": ""}, "functions": {}, "variables": {"b_pack": {"description": "

formatted price of the pack

", "group": "Ungrouped variables", "definition": "currency(b/100,\"\u00a3\",\"p\")", "name": "b_pack", "templateType": "anything"}, "b_single": {"description": "

Single banana price at fine fare

", "group": "Ungrouped variables", "definition": "b/5", "name": "b_single", "templateType": "anything"}, "a": {"description": "

cost per banana in Hintons

", "group": "Ungrouped variables", "definition": "random(12..19)", "name": "a", "templateType": "anything"}, "b": {"description": "

Price of pack of bananas at Fine Fare

", "group": "Ungrouped variables", "definition": "a*5+random(5..20#5 except a)", "name": "b", "templateType": "anything"}, "person": {"description": "", "group": "Ungrouped variables", "definition": "random_person()", "name": "person", "templateType": "anything"}, "mark_matrix": {"description": "", "group": "Ungrouped variables", "definition": "if(b/6>a,[1,0],[0,1])", "name": "mark_matrix", "templateType": "anything"}}, "variablesTest": {"maxRuns": 100, "condition": ""}}, {"name": "Converting units of height (feet/inches/cm)", "extensions": ["random_person"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Chris Graham", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/369/"}], "variable_groups": [], "preamble": {"js": "", "css": ""}, "type": "question", "parts": [{"stepsPenalty": 0, "type": "gapfill", "showCorrectAnswer": true, "gaps": [{"correctAnswerFraction": false, "mustBeReduced": false, "type": "numberentry", "showCorrectAnswer": true, "notationStyles": ["plain", "en", "si-en"], "variableReplacementStrategy": "originalfirst", "mustBeReducedPC": 0, "showFeedbackIcon": true, "correctAnswerStyle": "plain", "allowFractions": false, "scripts": {}, "minValue": "cm", "maxValue": "cm", "marks": "2", "variableReplacements": []}], "marks": 0, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "scripts": {}, "showFeedbackIcon": true, "prompt": "

What is {person['name']}'s height in centimetres? 

\n

[[0]]cm      round your answer to the nearest cm

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

We have information on how to convert feet to inches and inches to cm, but not feet to cm. We will therefore first convert the height into inches only.

\n

What is $5$ft in inches?

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

What is {person['name']}'s height in inches?

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

We can now use the conversion rate for inches to cm to find {person['name']}'s height in cm.

"}]}, {"variableReplacementStrategy": "originalfirst", "type": "gapfill", "showCorrectAnswer": true, "gaps": [{"correctAnswerFraction": false, "mustBeReduced": false, "type": "numberentry", "showCorrectAnswer": true, "precisionMessage": "You have not given your answer to the correct precision.", "precisionPartialCredit": 0, "mustBeReducedPC": 0, "showFeedbackIcon": true, "precisionType": "dp", "correctAnswerStyle": "plain", "allowFractions": false, "scripts": {}, "strictPrecision": false, "minValue": "cm/100", "maxValue": "cm/100", "marks": 1, "variableReplacements": [], "showPrecisionHint": false, "precision": "2", "variableReplacementStrategy": "originalfirst", "notationStyles": ["plain", "en", "si-en"]}], "marks": 0, "variableReplacements": [], "scripts": {}, "showFeedbackIcon": true, "prompt": "

What is {person['name']}'s height in metres?

\n

[[0]]m        round your answer to 2 decimal places

\n

"}], "advice": "

\n

\n

{person['name']} is $5$ft $\\var{inches}$ inches tall.

\n

a)

\n

To find {person['name']}'s height into cm, we first convert it into inches. 

\n

We can convert feet into inches by multiplying by $12$. So $5$ feet is

\n

\\[ 5\\times12=60 \\text{ inches.}\\]

\n

Therefore $5$ft $\\var{inches}$ inches is 

\n

\\[
60+\\var{inches} = \\var{60+inches}\\text{ inches.}
\\]

\n

We can now convert this to cm by multiplying by $2.54$.

\n

\\[\\var{60+inches}\\times2.54=\\var{cm}\\text{ cm, rounded to the nearest integer.}\\]

\n

b)

\n

To convert centimetres into metres, we divide by $100$:

\n

\\[\\var{cm}\\div100=\\var{dpformat(cm/100,2)} \\text{ metres.}\\]

\n

Therefore, {person['name']} is $\\var{dpformat(cm/100,2)}$ metres tall. 

\n

\n

", "tags": ["taxonomy"], "variables": {"cm": {"templateType": "anything", "description": "", "definition": "precround((inchfeet*2.54),0)", "name": "cm", "group": "Ungrouped variables"}, "inchfeet": {"templateType": "anything", "description": "", "definition": "(5*12)+inches", "name": "inchfeet", "group": "Ungrouped variables"}, "person": {"templateType": "anything", "description": "", "definition": "random_person()", "name": "person", "group": "Ungrouped variables"}, "s": {"templateType": "anything", "description": "", "definition": "if(person['gender']='neutral','','s')", "name": "s", "group": "Ungrouped variables"}, "inches": {"templateType": "anything", "description": "", "definition": "random(4..11)", "name": "inches", "group": "Ungrouped variables"}}, "rulesets": {}, "functions": {}, "ungrouped_variables": ["person", "inches", "inchfeet", "cm", "s"], "statement": "

{person['name']} is $5$ft $\\var{inches}$ inches tall and would like to find {person['pronouns']['their']} height in cm.

\n

{capitalise(person['pronouns']['they'])} find{s} the following unit conversion table:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$1$ foot$12$ inches
$1$ inch$2.54$ cm
$1$ metre$100$ cm
", "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Convert a height given in feet and inches into cm and then metres.

"}, "variablesTest": {"condition": "", "maxRuns": "1000"}}, {"name": "Converting units of length (km/m/miles)", "extensions": ["random_person"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Chris Graham", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/369/"}], "variable_groups": [], "variables": {"miles": {"templateType": "anything", "definition": "km*km_to_miles", "description": "", "name": "miles", "group": "Ungrouped variables"}, "location": {"templateType": "anything", "definition": "random('Boston', 'Edinburgh', 'Great Welsh', 'London')", "description": "", "name": "location", "group": "Ungrouped variables"}, "km_to_miles": {"templateType": "anything", "definition": "0.62", "description": "

conversion rate km to miles

", "name": "km_to_miles", "group": "Ungrouped variables"}, "person": {"templateType": "anything", "definition": "random_person()", "description": "", "name": "person", "group": "Ungrouped variables"}, "km": {"templateType": "anything", "definition": "random(24..28#2)", "description": "", "name": "km", "group": "Ungrouped variables"}}, "type": "question", "parts": [{"showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "type": "gapfill", "scripts": {}, "marks": 0, "showCorrectAnswer": true, "variableReplacements": [], "gaps": [{"correctAnswerFraction": false, "mustBeReduced": false, "type": "numberentry", "showCorrectAnswer": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "allowFractions": false, "scripts": {}, "minValue": "km*1000", "maxValue": "km*1000", "marks": 1, "variableReplacements": []}], "prompt": "

The week before the event, {person['name']} goes on a final training run. An app on {person['pronouns']['their']} phone tells {person['pronouns']['them']} that {person['pronouns']['they']} ran $\\var{km}$ km. 

\n

What was the length of {person['pronouns']['their']} training run in metres?

\n

[[0]] metres. 

\n

\n

"}, {"showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "type": "gapfill", "scripts": {}, "marks": 0, "showCorrectAnswer": true, "variableReplacements": [], "gaps": [{"correctAnswerFraction": false, "precisionType": "dp", "type": "numberentry", "showPrecisionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain", "showCorrectAnswer": true, "precisionPartialCredit": 0, "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "allowFractions": false, "scripts": {}, "strictPrecision": false, "maxValue": "miles+0.5", "precision": 0, "marks": 1, "mustBeReduced": false, "variableReplacements": [], "minValue": "miles-0.5", "mustBeReducedPC": 0, "precisionMessage": "You have not given your answer to the correct precision."}], "prompt": "

Use the approximate conversion, $1$ kilometre = $0.62$ miles, to find the length of {person['pronouns']['their']} training run in miles. 

\n

[[0]] miles.      Round your answer to the nearest mile. 

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

{person['name']} knows that the {location} Marathon is 26 miles. Use the conversion rate in part b) to find the approximate length in km.

\n

[[0]] km        round your answer to the nearest km

"}], "advice": "

a)

\n

{person['name']}'s training run is $\\var{km}$ km long. 

\n

To convert $\\var{km}$ km into metres, we multiply $\\var{km}$ by $1000$. 

\n

\\[\\var{km}\\times1000= \\var{km*1000}\\text{ metres.}\\]

\n

\n

b)

\n

To convert $\\var{km}$ km into miles, we multiply $\\var{km}$ by the conversion rate given: $0.62$.

\n

\\[\\begin{align}
\\var{km}\\times\\frac{5}{8}&= \\var{miles}\\\\
&=\\var{dpformat(miles,0)}\\text{ miles, rounded to the nearest integer.}
\\end{align}\\]

\n

c)

\n

The {location} Marathon is $26$ miles long. To convert to km we multiply by the inverse of the conversion rate given in part b):

\n

\\[ 26 \\times \\frac{1}{0.62} = 42\\text{ miles, rounded to the nearest integer.} \\]

\n

", "tags": ["taxonomy"], "preamble": {"js": "", "css": ""}, "rulesets": {}, "functions": {}, "ungrouped_variables": ["km_to_miles", "km", "miles", "person", "location"], "statement": "

{person['name']} is training for the {location} Marathon.

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

Convert from km to metres and miles, and miles to km.

"}, "variablesTest": {"condition": "", "maxRuns": 100}}, {"name": "Converting units of volume (cc/cm^3/litres/m^3)", "extensions": ["random_person"], "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": "Chris Graham", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/369/"}], "variable_groups": [], "variables": {"metres_cubed": {"templateType": "anything", "definition": "cc*(10^-6)", "description": "", "name": "metres_cubed", "group": "Ungrouped variables"}, "cc": {"templateType": "anything", "definition": "random(1200..3000#200)", "description": "", "name": "cc", "group": "Ungrouped variables"}, "s": {"templateType": "anything", "definition": "if(person['gender']='neutral','','s')", "description": "", "name": "s", "group": "Ungrouped variables"}, "person": {"templateType": "anything", "definition": "random_person()", "description": "", "name": "person", "group": "Ungrouped variables"}, "litres": {"templateType": "anything", "definition": "cc/1000", "description": "", "name": "litres", "group": "Ungrouped variables"}}, "type": "question", "parts": [{"variableReplacementStrategy": "originalfirst", "type": "gapfill", "showCorrectAnswer": true, "gaps": [{"correctAnswerFraction": false, "mustBeReduced": false, "type": "numberentry", "showCorrectAnswer": true, "notationStyles": ["plain", "en", "si-en"], "variableReplacementStrategy": "originalfirst", "mustBeReducedPC": 0, "showFeedbackIcon": true, "correctAnswerStyle": "plain", "allowFractions": false, "scripts": {}, "minValue": "litres", "maxValue": "litres", "marks": 1, "variableReplacements": []}], "marks": 0, "variableReplacements": [], "scripts": {}, "showFeedbackIcon": true, "prompt": "

{person['name']} applies to find out how much the insurance for the car would cost, but is required to state the engine size in litres. 

\n

What is the engine size in litres?

\n

 [[0]] litres. 

\n

"}, {"variableReplacementStrategy": "originalfirst", "type": "gapfill", "showCorrectAnswer": true, "gaps": [{"correctAnswerFraction": false, "mustBeReduced": false, "type": "numberentry", "showCorrectAnswer": true, "notationStyles": ["plain", "en", "si-en"], "precisionPartialCredit": 0, "mustBeReducedPC": 0, "scripts": {}, "showFeedbackIcon": true, "precisionType": "dp", "minValue": "metres_cubed", "correctAnswerStyle": "plain", "allowFractions": false, "showPrecisionHint": false, "strictPrecision": false, "maxValue": "metres_cubed", "precision": "4", "marks": "2", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "precisionMessage": "You have not given your answer to the correct precision."}], "marks": 0, "variableReplacements": [], "scripts": {}, "showFeedbackIcon": true, "prompt": "

The specification of a second car gives the engine size in m$^3$. In order for {person['name']} to make a comparison {person['pronouns']['they']} convert{s} the engine size of the first car to cubic metres.

\n

What is the engine size of the first car in units of m$^3$?

\n

[[0]]m$^3$      Give your answer to 4 decimal places

"}], "advice": "

a)

\n

The advertised engine size is $\\var{cc}$ cubic centimetres. To convert cubic centimetres to litres, we divide by $1000$. 

\n

\\[\\var{cc}\\div 1000= \\var{litres}\\text{ litres.}\\]

\n

b)

\n

In order to convert to cubic metres, we first note that 

\n

\\[ 1 \\text{cm} = 0.01 \\text{m.} \\]

\n

An example of a volume of $1\\text{cm}^3$ is a cube with $1$cm sides. Converting each side into metres,

\n

\\begin{align}
1\\text{cm}^3 &= 1\\text{cm}\\times1\\text{cm}\\times1\\text{cm} \\\\
&= 0.01\\text{m}\\times0.01\\text{m}\\times0.01\\text{m} \\\\
&= 0.000001\\text{m}^3 \\text{.}
\\end{align}

\n

Therefore $\\var{cc}\\text{cm}^3$ is 

\n

\\[ \\var{cc} \\times 0.000001 = \\var{metres_cubed}\\text{m}^3\\text{.} \\]

", "tags": ["taxonomy"], "preamble": {"css": "", "js": ""}, "rulesets": {}, "variablesTest": {"condition": "", "maxRuns": 100}, "functions": {}, "ungrouped_variables": ["person", "litres", "cc", "s", "metres_cubed"], "statement": "

{person['name']} is looking to buy a car. {capitalise(person['pronouns']['they'])} find{s} one advertised with an engine size of $\\var{cc}$cc. 

\n

{person['name']} recognises that 'cc' stands for units of cubic centimetres (cm$^3$) and knows the following conversions:

\n\n\n\n\n\n\n\n\n\n\n\n
$1$ m$100$ cm
$1$ litre$1000\\text{cm}^3$ 
", "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Convert figures for car engine sizes between cc (cm^3), litres, and m^3.

"}}, {"name": "Cumulative percent decrease", "extensions": ["random_person"], "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": "Stanislav Duris", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1590/"}, {"name": "Elliott Fletcher", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1591/"}], "type": "question", "tags": ["decrease", "percentages", "taxonomy"], "variablesTest": {"condition": "", "maxRuns": "1000"}, "variables": {"test": {"definition": "precround(precround(price*((100-perc)/100)^5, 2)*((100-perc)/100)^(n-5), 2)", "description": "

Calculated value of price2 to ensure we mention rounding errors in advice only when needed.

", "templateType": "anything", "name": "test", "group": "Part b)"}, "pricee3": {"definition": "precround(price*((100 - perc)/100)^(testn-2),2)", "description": "", "templateType": "anything", "name": "pricee3", "group": "Part b)"}, "person": {"definition": "random_person()", "description": "", "templateType": "anything", "name": "person", "group": "Part b)"}, "testn": {"definition": "random(6..9)", "description": "

Number of months in total.

", "templateType": "anything", "name": "testn", "group": "Part b)"}, "pricee1": {"definition": "precround(price*((100 - perc)/100)^(testn),2)", "description": "

The resulting price after the total of testn months.

", "templateType": "anything", "name": "pricee1", "group": "Part b)"}, "n": {"definition": "if(pricee2 < threshold, testn-1, testn)", "description": "", "templateType": "anything", "name": "n", "group": "Part b)"}, "threshold": {"definition": "siground(pricee1+5,2)", "description": "", "templateType": "anything", "name": "threshold", "group": "Part b)"}, "price": {"definition": "random(300..800) + 0.99", "description": "

The original price.

", "templateType": "anything", "name": "price", "group": "Part a)"}, "price2": {"definition": "if(pricee2 < threshold, pricee2, pricee1)", "description": "", "templateType": "anything", "name": "price2", "group": "Part b)"}, "perc": {"definition": "random(2..4 #0.5)", "description": "

Percentage decrease per month.

", "templateType": "anything", "name": "perc", "group": "Part a)"}, "pricee2": {"definition": "precround(price*((100 - perc)/100)^(testn-1),2)", "description": "", "templateType": "anything", "name": "pricee2", "group": "Part b)"}}, "statement": "

A smartphone's value decreases by $\\var{perc}$% every month. The original price when it is released is $£\\var{price}$.

", "variable_groups": [{"name": "Part a)", "variables": ["price", "perc"]}, {"name": "Part b)", "variables": ["threshold", "pricee1", "pricee2", "pricee3", "testn", "test", "price2", "n", "person"]}], "parts": [{"showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "type": "gapfill", "variableReplacementStrategy": "originalfirst", "stepsPenalty": 0, "gaps": [{"correctAnswerFraction": false, "precisionMessage": "

Round your answer to $2$ decimal places.

", "precisionPartialCredit": 0, "scripts": {}, "maxValue": "precround(price*((100-perc)/100)^5, 2)", "variableReplacementStrategy": "originalfirst", "allowFractions": false, "precision": "2", "precisionType": "dp", "notationStyles": ["plain", "en", "si-en"], "showFeedbackIcon": true, "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "mustBeReduced": false, "minValue": "precround(price*((100-perc)/100)^5, 2)", "showPrecisionHint": true, "marks": "2", "variableReplacements": [], "strictPrecision": false, "showCorrectAnswer": true, "type": "numberentry"}], "showFeedbackIcon": true, "prompt": "

How much will the smartphone be worth after $5$ months?

\n

£ [[0]]

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

The original price of the phone is $£\\var{price}$ and we are told that the price decreases by $\\var{perc}$% every month.

\n

", "marks": 0}, {"correctAnswerFraction": false, "scripts": {}, "maxValue": "1-{perc}/100", "variableReplacementStrategy": "originalfirst", "allowFractions": false, "notationStyles": ["plain", "en", "si-en"], "showFeedbackIcon": true, "prompt": "

What is the decimal multiplier for the decrease in the smartphones each month?

", "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "mustBeReduced": false, "minValue": "1-{perc}/100", "variableReplacements": [], "marks": "0.5", "showCorrectAnswer": true, "type": "numberentry"}, {"precisionMessage": "

Round your answer to $2$ decimal places.

", "precisionPartialCredit": 0, "scripts": {}, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "prompt": "

Multiply the original price by the decimal multiplier to obtain the price after 1 month.

", "mustBeReducedPC": 0, "mustBeReduced": false, "minValue": "{price}*(1-{perc}/100)", "variableReplacements": [], "marks": "0.5", "strictPrecision": false, "showCorrectAnswer": true, "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "precision": "2", "maxValue": "{price}*(1-{perc}/100)", "precisionType": "dp", "correctAnswerStyle": "plain", "showPrecisionHint": true}, {"precisionMessage": "

Round your answer to $2$ decimal places.

", "precisionPartialCredit": 0, "scripts": {}, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "prompt": "

Multiply your answer above by the decimal multiplier to obtain the price after 2 months. 

\n

Note that this is the same as multiplying the original price by $d^2$, where $d$ is the decimal multiplier.

", "mustBeReducedPC": 0, "mustBeReduced": false, "minValue": "{price}*(1-{perc}/100)^2", "variableReplacements": [], "marks": "0.5", "strictPrecision": false, "showCorrectAnswer": true, "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "precision": "2", "maxValue": "{price}*(1-{perc}/100)^2", "precisionType": "dp", "correctAnswerStyle": "plain", "showPrecisionHint": true}], "marks": 0}, {"scripts": {}, "variableReplacements": [], "type": "gapfill", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "gaps": [{"correctAnswerFraction": false, "scripts": {}, "maxValue": "n-5", "variableReplacementStrategy": "originalfirst", "allowFractions": false, "notationStyles": ["plain", "en", "si-en"], "showFeedbackIcon": true, "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "mustBeReduced": false, "minValue": "n-5", "variableReplacements": [], "marks": "2", "showCorrectAnswer": true, "type": "numberentry"}], "showFeedbackIcon": true, "prompt": "

{person['name']} has $£\\var{threshold}$ to spend on a smartphone. After how many more full months will {person['pronouns']['they']} be able to afford the smartphone?

\n

[[0]] months

", "marks": 0}], "ungrouped_variables": [], "rulesets": {}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Given the original price of a smartphone and the rate at which it decreases, calculate its price after a given number of months. In the second part, calculate the time remaining until the price goes below a certain point.

"}, "preamble": {"css": "", "js": ""}, "functions": {}, "advice": "

a)

\n

We can use the multiplier method to calculate the new price. If the price decreases by {perc}%, this its value is {100-perc}% of the original value after 1 month. The decimal multiplier for {100-perc}% is

\n

\\[\\frac{\\var{100-perc}}{100} = \\var{(100-perc)/100} \\text{.}\\]

\n

Each month our smartphone's value can be found by multiplying the previous month's value by the decimal multiplier. For example, after the first month, the value is

\n

\\[ \\var{(100-perc)/100} \\times\\mathrm{£}\\var{price} = \\mathrm{£}\\var{dpformat(price*(100-perc)/100,2)}\\text{.} \\]

\n

To calculate the price after 5 months, we multiply the original price of the smartphone by our multiplier 5 times:

\n

\\[ \\begin{align} \\text{Final worth} &= \\var{price} \\times \\var{(100-perc)/100} \\times \\var{(100-perc)/100} \\times \\var{(100-perc)/100} \\times \\var{(100-perc)/100} \\times \\var{(100-perc)/100} \\\\&=  \\var{price} \\times \\var{(100-perc)/100}^{5} \\\\&= £\\var{precround(price*((100-perc)/100)^5, 2)} {.} \\end{align}\\]

\n

b)

\n

From part a), the value after 5 months is  £$\\var{precround(price*((100-perc)/100)^5, 2)}$. Continuing to multiply the price by the decimal multiplier,

\n

\\[£\\var{precround(price*((100-perc)/100)^5, 2)} \\times \\var{(100-perc)/100} = £\\var{precround(precround(price*((100-perc)/100)^5, 2)*(100-perc)/100, 2)}\\]

\n

\\[£\\var{precround(price*((100-perc)/100)^5, 2)} \\times \\var{(100-perc)/100}^2 = £\\var{precround(precround(price*((100-perc)/100)^6, 2)*(100-perc)/100, 2)}\\]

\n

\\[£\\var{precround(price*((100-perc)/100)^5, 2)} \\times \\var{(100-perc)/100}^3 = £\\var{precround(precround(price*((100-perc)/100)^7, 2)*(100-perc)/100, 2)}\\]

\n

\\[£\\var{precround(price*((100-perc)/100)^5, 2)} \\times \\var{(100-perc)/100}^4 = £\\var{precround(precround(price*((100-perc)/100)^8, 2)*(100-perc)/100, 2)}\\]

\n

\n

The smartphone's value will be below $£\\var{threshold}$ after {n-5} more months ({n} months in total since its release).

"}, {"name": "Find bounds for distance and time spent running, given imprecise measurements", "extensions": ["random_person"], "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": "Stanislav Duris", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1590/"}], "metadata": {"description": "

Multiplication and division of upper and lower bounds.

", "licence": "Creative Commons Attribution 4.0 International"}, "ungrouped_variables": ["speed", "distance", "time", "atime", "person", "pronouns", "verbs"], "statement": "

{person['name']} is a keen runner. {capitalise(pronouns['they'])} run{verbs} at an average speed of {speed}km/h, rounded to the nearest integer.

", "variable_groups": [], "rulesets": {}, "type": "question", "advice": "

We're not certain about some of the measurements given in this question - we only know the rounded values. This means that the true value could be lower or higher than the given measurement.

\n

We can find upper and lower bounds for the given measurements. Any values we go on to calculate will also be uncertain and have upper and lower bounds.

\n

\n

To find bounds for a given measurement, we divide the degree of accuracy by 2 and subtract or add this to our estimate to get lower and upper bounds respectively.

\n

For example, $52$ rounded to the nearest integer has a lower bound of $51.5$ and an upper bound of $52.5$.

\n

a)

\n

The distance travelled is given by

\n

\\[ d = \\text{Average speed} \\times \\text{Time taken} \\]

\n

We find bounds for speed and time first.

\n

Lower bound for speed: $\\var{speed} - 0.5 = \\var{speed - 0.5} \\text{ km/h}$

\n

Upper bound for speed: $\\var{speed} + 0.5 = \\var{speed + 0.5} \\text{ km/h}$

\n

First, note that the speed is given in km/h and we want to find the distance in km. We will convert the given time into hours. 

\n

Lower bound for time taken:

\n

\\begin{align} \\var{atime} - 0.5 &= \\var{atime - 0.5} \\text{ min} \\\\[0.5em]
&= \\frac{\\var{atime - 0.5}}{60} \\text{ h}
\\end{align}

\n

Upper bound for time taken:

\n

\\begin{align} \\var{atime} + 0.5 &= \\var{atime + 0.5} \\text{ min} \\\\[0.5em]
&= \\frac{\\var{atime + 0.5}}{60} \\text{ h}
\\end{align}

\n

Since we're multiplying the speed and time together, the lower bound for distance is the slowest speed multiplied by the shortest time:

\n

\\begin{align}
\\text{Lower bound} &= \\text{lower bound for speed} \\times \\text{lower bound for time}\\\\
&= \\var{speed - 0.5} \\times \\frac{\\var{(atime - 0.5)}}{60} \\\\
&= \\var{precround((speed-0.5)*(atime - 0.5)/60, 2 )} \\text{ km} \\quad \\text{(rounded to 2 decimal places).}
\\end{align}

\n

The upper bound for distance is the fastest speed multiplied by the longest time:

\n

\\begin{align}
\\text{Upper bound} &= \\text{upper bound for speed} \\times \\text{upper bound for time} \\\\
&= \\var{speed + 0.5} \\times \\frac{\\var{atime + 0.5}}{60} \\\\
&= \\var{precround((speed+0.5)*(atime + 0.5)/60, 2 )} \\text{ km} \\quad \\text{(rounded to 2 decimal places).}
\\end{align}

\n

Hence,

\n

\\[\\var{precround((speed-0.5)*(atime - 0.5)/60, 2 )} \\leq d \\lt \\var{precround((speed+0.5)*(atime + 0.5)/60, 2 )} \\text{.}\\]

\n

\n

b)

\n

We're told the speed and the distance travelled, so the time taken is given by

\n

\\[ t = \\frac{\\text{Distance travelled}}{\\text{Average speed}} \\]

\n

We found upper and lower bounds for {person['name']}'s average speed above.

\n

The distance of the evening run is given to the nearest kilometre, so we can compute bounds as follows:

\n

Lower bound for distance: $\\var{distance} - 0.5 = \\var{distance - 0.5} \\mathrm{km}$

\n

Upper bound for distance: $\\var{distance} + 0.5 = \\var{distance + 0.5} \\mathrm{km}$

\n

\n

The upper bound for the time taken is the longest distance divided by the slowest speed:

\n

\\begin{align}
\\text{Upper bound} &= \\text{upper bound for distance} \\div \\text{lower bound for speed} \\\\
&= \\var{distance + 0.5} \\div \\var{speed - 0.5} \\\\
&= \\var{(distance + 0.5)/(speed - 0.5)} \\text{ hours.}
\\end{align}

\n

We're asked for the answer in minutes, to two decimal places.

\n

\\begin{align} 
\\var{(distance + 0.5)/(speed - 0.5)} \\text{ hours} &= \\var{(distance + 0.5)/(speed - 0.5)}\\times 60  \\text{ min} \\\\
&= \\var{precround((distance + 0.5)/(speed - 0.5)*60, 2)} \\text{ minutes} \\quad \\text{(rounded to 2 decimal places)}
\\end{align}

\n

\n

The lower bound for time is the shortest distance divided by the fastest speed:

\n

\\begin{align}
\\text{Lower bound} &= \\text{lower bound for distance} \\div \\text{upper bound for speed} \\\\
&= \\var{distance - 0.5} \\div \\var{speed + 0.5} \\\\
&= \\var{(distance - 0.5)/(speed + 0.5)}  \\text{ hours.}
\\end{align}

\n

Converting into minutes, to two decimal places:

\n

\\begin{align} 
\\var{(distance - 0.5)/(speed + 0.5)} \\text{ hours} &= \\var{(distance - 0.5)/(speed + 0.5)}\\times 60  \\text{ min} \\\\
&= \\var{precround((distance - 0.5)/(speed + 0.5)*60, 2)} \\text{ min.}
\\end{align}

\n

Therefore, we cannot confidently say {person['name']}'s time was less than {time*60 +1} minutes as the upper bound for {pronouns['their']} time, $\\var{precround((distance + 0.5)/(speed - 0.5)*60, 2)}$ minutes, is above this threshold.

", "parts": [{"scripts": {}, "steps": [{"scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "information", "showCorrectAnswer": true, "prompt": "

We're not certain about some of the measurements given in this question - we only know the rounded values. This means that the true value could be lower or higher than the given measurement.

\n

Compute upper and lower bounds for {person['name']}'s average speed and the time spent running, then use those to find upper and lower bounds for the distance travelled.

", "variableReplacements": [], "showFeedbackIcon": true, "marks": 0}], "type": "gapfill", "variableReplacements": [], "marks": 0, "showCorrectAnswer": true, "prompt": "

Suppose {person['name']} ran for {atime} minutes, rounded to the nearest minute.

\n

Using the rounded figures for {pronouns['their']} average speed and time spent running, calculate upper and lower bounds for the distance, $d$, that {person['name']} ran.

\n

Round your answers to two decimal places.

\n

[[0]] $\\leq d \\lt$ [[1]]km

", "gaps": [{"correctAnswerFraction": false, "variableReplacements": [], "precisionPartialCredit": 0, "mustBeReducedPC": 0, "notationStyles": ["plain", "en", "si-en"], "marks": 1, "precision": "2", "showFeedbackIcon": true, "precisionType": "dp", "minValue": "{speed - 0.5}*{(atime - 0.5)/60}", "scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "maxValue": "{speed - 0.5}*{(atime - 0.5)/60}", "mustBeReduced": false, "allowFractions": false, "strictPrecision": false, "correctAnswerStyle": "plain", "precisionMessage": "You have not given your answer to the correct precision.", "showPrecisionHint": false, "showCorrectAnswer": true}, {"correctAnswerFraction": false, "variableReplacements": [], "precisionPartialCredit": 0, "mustBeReducedPC": 0, "notationStyles": ["plain", "en", "si-en"], "marks": 1, "precision": "2", "showFeedbackIcon": true, "precisionType": "dp", "minValue": "{speed + 0.5}*{(atime + 0.5)/60}", "scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "maxValue": "{speed + 0.5}*{(atime + 0.5)/60}", "mustBeReduced": false, "allowFractions": false, "strictPrecision": false, "correctAnswerStyle": "plain", "precisionMessage": "You have not given your answer to the correct precision.", "showPrecisionHint": false, "showCorrectAnswer": true}], "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "stepsPenalty": 0}, {"scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "gapfill", "variableReplacements": [], "showCorrectAnswer": true, "prompt": "

Now consider {person['name']}'s evening run. {capitalise(pronouns['they'])} covered a distance of {precround(distance,0)}km, rounded to the nearest kilometre.

\n

{capitalise(pronouns['their'])} friend's record time for the evening run is exactly {time*60 +1} minutes.

\n

Can we confidently say that {person['name']} beat {pronouns['their']} friend's record?

\n

First, calculate the lower and upper bounds for {person['name']}'s time, $t$.

\n

Round your answers to two decimal places.

\n

[[0]] $\\leq t \\lt $ [[1]] minutes

", "gaps": [{"correctAnswerFraction": false, "variableReplacements": [], "precisionPartialCredit": 0, "mustBeReducedPC": 0, "notationStyles": ["plain", "en", "si-en"], "marks": 1, "precision": "2", "showFeedbackIcon": true, "precisionType": "dp", "minValue": "({precround(distance,0) - 0.5}/{speed + 0.5})*60", "scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "maxValue": "({precround(distance,0) - 0.5}/{speed + 0.5})*60", "mustBeReduced": false, "allowFractions": false, "strictPrecision": false, "correctAnswerStyle": "plain", "precisionMessage": "You have not given your answer to the correct precision.", "showPrecisionHint": false, "showCorrectAnswer": true}, {"correctAnswerFraction": false, "variableReplacements": [], "precisionPartialCredit": 0, "mustBeReducedPC": 0, "notationStyles": ["plain", "en", "si-en"], "marks": 1, "precision": "2", "showFeedbackIcon": true, "precisionType": "dp", "minValue": "({precround(distance,0) + 0.5}/{speed - 0.5})*60", "scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "maxValue": "({precround(distance,0) + 0.5}/{speed - 0.5})*60", "mustBeReduced": false, "allowFractions": false, "strictPrecision": false, "correctAnswerStyle": "plain", "precisionMessage": "You have not given your answer to the correct precision.", "showPrecisionHint": false, "showCorrectAnswer": true}], "showFeedbackIcon": true, "marks": 0}, {"scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "gapfill", "variableReplacements": [], "showCorrectAnswer": true, "prompt": "

Therefore, we [[0]] confidently say {pronouns['their']} time was less than {time*60+1} minutes as the [[1]] bound for time is [[2]] the given threshold of {time*60+1} mins.

", "gaps": [{"shuffleChoices": false, "type": "1_n_2", "minMarks": 0, "showCorrectAnswer": true, "displayColumns": 0, "showFeedbackIcon": true, "choices": ["

can

", "

cannot

"], "distractors": ["", ""], "scripts": {}, "variableReplacementStrategy": "originalfirst", "maxMarks": 0, "marks": 0, "variableReplacements": [], "matrix": [0, "1"], "displayType": "dropdownlist"}, {"shuffleChoices": true, "type": "1_n_2", "minMarks": 0, "showCorrectAnswer": true, "displayColumns": 0, "showFeedbackIcon": true, "choices": ["

upper

", "

lower

"], "distractors": ["", ""], "scripts": {}, "variableReplacementStrategy": "originalfirst", "maxMarks": 0, "marks": 0, "variableReplacements": [], "matrix": ["1", 0], "displayType": "dropdownlist"}, {"shuffleChoices": true, "type": "1_n_2", "minMarks": 0, "showCorrectAnswer": true, "displayColumns": 0, "showFeedbackIcon": true, "choices": ["

above

", "

below

", "

equal to

"], "distractors": ["", "", ""], "scripts": {}, "variableReplacementStrategy": "originalfirst", "maxMarks": 0, "marks": 0, "variableReplacements": [], "matrix": ["1", 0, 0], "displayType": "dropdownlist"}], "showFeedbackIcon": true, "marks": 0}], "tags": ["division", "limits of accuracy", "lower bounds", "multiplication", "random names", "taxonomy", "upper bounds"], "preamble": {"css": "", "js": ""}, "functions": {}, "variables": {"pronouns": {"description": "", "definition": "person['pronouns']", "group": "Ungrouped variables", "name": "pronouns", "templateType": "anything"}, "distance": {"description": "

Distance in kms.

", "definition": "speed*time", "group": "Ungrouped variables", "name": "distance", "templateType": "anything"}, "atime": {"description": "

Time in minutes

", "definition": "random(5..30 #5)", "group": "Ungrouped variables", "name": "atime", "templateType": "anything"}, "verbs": {"description": "", "definition": "if(person['gender']='neutral','','s')", "group": "Ungrouped variables", "name": "verbs", "templateType": "anything"}, "person": {"description": "", "definition": "random_person()", "group": "Ungrouped variables", "name": "person", "templateType": "anything"}, "time": {"description": "

Time in hours.

", "definition": "random(0.25..1 #0.25)", "group": "Ungrouped variables", "name": "time", "templateType": "anything"}, "speed": {"description": "

Speed in km/h.

", "definition": "random(7..11)", "group": "Ungrouped variables", "name": "speed", "templateType": "anything"}}, "variablesTest": {"maxRuns": "1000", "condition": ""}}, {"name": "Partial sum of an arithmetic sequence - birthday money", "extensions": ["random_person"], "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/"}], "variable_groups": [{"variables": ["person", "pronouns"], "name": "A person"}], "functions": {}, "rulesets": {}, "ungrouped_variables": ["m", "n", "c", "ci", "ni", "b", "first"], "metadata": {"description": "

The amount of money a person gets on their birthday follows an arithmetic sequence.

\n

Calculate the amount on a given birthday, then calculate the sum up to that point.

", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "advice": "

We are told that {person['name']}'s parents deposit a uniformly increasing amount of money into a savings account for {person['name']} every year on {person['name']}'s birthday.

\n

We are also given the amount of money that {person['pronouns']['their']} parents deposit into the account on {person['pronouns']['their']} first $3$ birthdays:

\n\n

a)

\n

To calculate the amount of money {person['name']}'s parents would deposit into the savings account on {person['pronouns']['their']} 21st birthday, if {pronouns['their']} parents maintained this pattern, we use the equation

\n

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

\n

where

\n\n

To identify the first term and common difference of the sequence we can use a table like the one below.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$n$$1$$2$$3$
$a_n$$\\mathbf{\\var{first}}$$\\var{b[1]+first}$$\\var{b[1]*2+first}$
First differences$\\mathbf{\\var{b[1]}}$$\\mathbf{\\var{b[1]}}$
\n

The first term and common difference have been highlighted in bold: $a_1 = \\var{first}$ and $d = \\var{b[1]}$.

\n

Now we can use these to calculate $a_{21}$, giving us

\n

\\begin{align}
a_{21}&=\\var{first}+\\var{b[1]} \\times (21-1) \\\\
&=\\var{first+b[1]*(20)}\\text{.} \\\\
\\end{align}

\n

So, assuming that {person['name']}'s parents do maintain this pattern, on {pronouns['their']} 21st birthday {pronouns['their']} parents will deposit $£\\var{first+b[1]*(20)}$ into the savings account.

\n

b)

\n

We are now asked to calculate the total amount of money that {person['name']}'s parents will have added to this savings account over 21 years, including the money that {pronouns['their']} parents will deposit into the account on {pronouns['their']} 21st birthday.

\n

This question involves calculating the sum using the equation

\n

\\[\\sum\\limits_{i=1}^n{a_i}=\\frac{n}{2}(a_1+a_n)\\text{.}\\]

\n

We know from part a) that

\n

\\begin{align}
a_1&=\\var{first},\\\\
n&=21,\\\\
a_{21}&= \\var{first+b[1]*(20)}.
\\end{align}

\n

Using our formula for the sum,

\n

\\begin{align}
\\sum\\limits_{i=1}^n{a_i}&=\\frac{n}{2}(a_1+a_n)\\\\
&=\\frac{\\var{21}}{2}(\\var{first}+\\var{first+b[1]*(21-1)})\\\\
&=\\var{21*(first+first+b[1]*(20))/2}\\text{.}
\\end{align}

\n

Therefore, over 21 years {person['name']}'s parents will have added a total of $£\\var{21*(first+first+b[1]*(20))/2}$ to this savings account!

", "statement": "

{person['name']}'s parents deposit a uniformly increasing amount of money into a savings account for {pronouns['them']} every year on {pronouns['their']} birthday:

\n\n

{person['name']} wants to know the total amount of money that will be in this savings account, excluding interest, after {pronouns['their']} 21st birthday, if {pronouns['their']} parents maintain this pattern.

", "preamble": {"js": "", "css": ""}, "variables": {"c": {"name": "c", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "repeat(random(3..13 except[10]),8)"}, "n": {"name": "n", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "repeat(random(3..9),7)"}, "person": {"name": "person", "description": "

A random person

", "templateType": "anything", "group": "A person", "definition": "random_person()"}, "m": {"name": "m", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "repeat(random(2..10),5)"}, "first": {"name": "first", "description": "

first term in the sequence

", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(10..15 #5)"}, "pronouns": {"name": "pronouns", "description": "", "templateType": "anything", "group": "A person", "definition": "person['pronouns']"}, "ni": {"name": "ni", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "repeat(random(19..40),10)"}, "b": {"name": "b", "description": "

a

", "templateType": "anything", "group": "Ungrouped variables", "definition": "repeat(random(10..25 #5), 3)"}, "ci": {"name": "ci", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "repeat(random(6..20),10)"}}, "parts": [{"variableReplacementStrategy": "originalfirst", "prompt": "

How much money will {person['name']}'s parents deposit into the savings account on {pronouns['their']} 21st birthday, if {pronouns['their']} parents maintain this pattern? 

\n

£[[0]].

", "stepsPenalty": 0, "gaps": [{"answer": "{first+b[1]*(20)}", "showpreview": true, "expectedvariablenames": [], "vsetrangepoints": 5, "variableReplacementStrategy": "originalfirst", "checkingtype": "absdiff", "type": "jme", "checkingaccuracy": 0.001, "variableReplacements": [], "vsetrange": [0, 1], "checkvariablenames": false, "showFeedbackIcon": true, "scripts": {}, "marks": 1, "showCorrectAnswer": true}], "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "type": "gapfill", "marks": 0, "steps": [{"variableReplacementStrategy": "originalfirst", "prompt": "

Use the arithmetic formula,

\n

\\[a_n = a_1 + (n-1)d, \\]

\n

where

\n", "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "type": "information", "marks": 0, "showCorrectAnswer": true}, {"variableReplacementStrategy": "originalfirst", "correctAnswerStyle": "plain", "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "correctAnswerFraction": false, "maxValue": "{first}", "allowFractions": false, "prompt": "

What is the value of $a_1$?

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

What is the value of $d$?

", "mustBeReducedPC": 0, "minValue": "{b[1]}", "mustBeReduced": false, "variableReplacements": [], "showFeedbackIcon": true, "showCorrectAnswer": true, "marks": "0.2", "scripts": {}}, {"variableReplacementStrategy": "originalfirst", "prompt": "

Now use the formula to calculate $a_{21}$.

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

How much money will {person['name']}'s parents have added to this savings account over $21$ years in total, including the money that {person['pronouns']['their']} parents will deposit into the account on {person['pronouns']['their']} $21^{st}$ birthday?

\n

£[[0]].

\n

", "stepsPenalty": 0, "gaps": [{"variableReplacementStrategy": "originalfirst", "correctAnswerStyle": "plain", "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "correctAnswerFraction": false, "maxValue": "{21*(first+first+b[1]*(20))/2}", "allowFractions": false, "mustBeReducedPC": 0, "minValue": "{21*(first+first+b[1]*(20))/2}", "mustBeReduced": false, "variableReplacements": [], "showFeedbackIcon": true, "showCorrectAnswer": true, "marks": 1, "scripts": {}}], "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "type": "gapfill", "marks": 0, "steps": [{"variableReplacementStrategy": "originalfirst", "prompt": "

The sum of an arithmetic sequence $a_1, a_2, \\ldots, a_n$ is calculated by the following formula.

\n

\\[\\sum\\limits_{i=1}^n{a_i}=\\frac{n}{2}(a_1+a_n)\\text{.}\\]

", "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "type": "information", "marks": 0, "showCorrectAnswer": true}], "showCorrectAnswer": true}], "tags": ["Arithmetic sequences", "Arithmetic Sequences", "arithmetic sequences", "nth term", "partial sums", "random names", "sequences", "taxonomy"], "variablesTest": {"maxRuns": 100, "condition": ""}}, {"name": "Rounding and estimating calculations - painting a room", "extensions": ["random_person"], "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/"}], "type": "question", "statement": "

{person['name']} just bought a new house. {capitalise(pronouns['their'])} new bedroom's wall and ceiling are currently painted white, but {pronouns['they']} would like to paint these {colour}.

\n

The dimensions of the floor are $\\var{length}\\,\\mathrm{m} \\times \\var{width}\\,\\mathrm{m}$ and the room is $\\var{height}\\,\\mathrm{m}$ high. 

\n

{person['name']} want{verbs} to know how much paint to buy so {pronouns['they']} can paint all four walls and the ceiling {colour}.

", "variablesTest": {"condition": "mod(rall,15)<>0", "maxRuns": 100}, "variables": {"buckets": {"description": "", "name": "buckets", "group": "Calculations", "templateType": "anything", "definition": "ceil(rall/bucket_area)"}, "bucket_area": {"description": "

The area that can be painted with one bucket of paint.

", "name": "bucket_area", "group": "Calculations", "templateType": "anything", "definition": "15"}, "colour": {"description": "", "name": "colour", "group": "Random bits", "templateType": "anything", "definition": "random(\"green\", \"red\", \"orange\", \"yellow\", \"blue\", \"purple\", \"pink\")"}, "width": {"description": "", "name": "width", "group": "Random bits", "templateType": "anything", "definition": "random(2.50..5.00 #0.1) + random(0.01..0.09 #0.01)"}, "w": {"description": "", "name": "w", "group": "Calculations", "templateType": "anything", "definition": "ceil(width)"}, "verbs": {"description": "", "name": "verbs", "group": "Person", "templateType": "anything", "definition": "if(person['gender']='neutral','','s')"}, "height": {"description": "", "name": "height", "group": "Random bits", "templateType": "anything", "definition": "random(2.10..2.70 #0.1) + random(0.01..0.09 #0.01)"}, "h": {"description": "", "name": "h", "group": "Calculations", "templateType": "anything", "definition": "ceil(height)"}, "rall": {"description": "", "name": "rall", "group": "Calculations", "templateType": "anything", "definition": "rceiling + rwall1*2 + rwall2*2"}, "pronouns": {"description": "", "name": "pronouns", "group": "Person", "templateType": "anything", "definition": "person['pronouns']"}, "length": {"description": "", "name": "length", "group": "Random bits", "templateType": "anything", "definition": "random(3.50..8.00 #0.1) + random(0.01..0.09 #0.01)"}, "person": {"description": "", "name": "person", "group": "Person", "templateType": "anything", "definition": "random_person()"}, "rwall1": {"description": "", "name": "rwall1", "group": "Calculations", "templateType": "anything", "definition": "l*h"}, "rwall2": {"description": "", "name": "rwall2", "group": "Calculations", "templateType": "anything", "definition": "w*h"}, "rceiling": {"description": "", "name": "rceiling", "group": "Calculations", "templateType": "anything", "definition": "w*l"}, "l": {"description": "", "name": "l", "group": "Calculations", "templateType": "anything", "definition": "ceil(length)"}}, "functions": {}, "tags": ["random names", "taxonomy"], "variable_groups": [{"name": "Random bits", "variables": ["colour", "height", "width", "length"]}, {"name": "Person", "variables": ["person", "pronouns", "verbs"]}, {"name": "Calculations", "variables": ["h", "w", "l", "rwall1", "rwall2", "rceiling", "rall", "bucket_area", "buckets"]}], "parts": [{"scripts": {}, "variableReplacements": [], "type": "gapfill", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "gaps": [{"scripts": {}, "minMarks": 0, "distractors": ["", ""], "variableReplacementStrategy": "originalfirst", "displayType": "radiogroup", "choices": ["

Overestimate and therefore we round each measurement up.

", "

Underestimate and therefore we round each measurement down.

"], "showFeedbackIcon": true, "shuffleChoices": false, "displayColumns": "1", "variableReplacements": [], "marks": 0, "matrix": ["1", 0], "showCorrectAnswer": true, "maxMarks": 0, "type": "1_n_2"}], "showFeedbackIcon": true, "prompt": "

Is it better to overestimate or underestimate in this situation?

\n

[[0]]

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

Rounding each measurement to the nearest metre, estimate the whole area to be painted {colour}.

\n

[[0]] m2

\n

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

The room is {length}m long, {width}m wide, and {height}m high.

\n

Round each measurement in the direction you decided on above. 

", "marks": 0}, {"correctAnswerFraction": false, "scripts": {}, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "allowFractions": false, "maxValue": "ceil(length)", "showFeedbackIcon": true, "prompt": "

Round the length to the nearest metre.

", "minValue": "ceil(length)", "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "marks": "0.1", "showCorrectAnswer": true}, {"correctAnswerFraction": false, "scripts": {}, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "allowFractions": false, "maxValue": "ceil(width)", "showFeedbackIcon": true, "prompt": "

Round the width to the nearest metre.

", "minValue": "ceil(width)", "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "marks": "0.1", "showCorrectAnswer": true}, {"correctAnswerFraction": false, "scripts": {}, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "allowFractions": false, "maxValue": "ceil(height)", "showFeedbackIcon": true, "prompt": "

Round the height to the nearest metre.

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

One bucket of {colour} paint is enough to paint an area of 15m2. How many buckets should {person['name']} buy to ensure {pronouns['they']} {if(person['gender']='neutral','have','has')} enough paint?

\n

[[0]]

", "marks": 0}], "ungrouped_variables": [], "rulesets": {}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Estimate the number of buckets of paint to buy, by rounding measurements of a room up to the nearest metre and estimating the total area.

"}, "preamble": {"css": "", "js": ""}, "advice": "

a)

\n

It is much better to have spare paint than not to have enough of it. So it is better to overestimate the area.

\n

Therefore, we round each measurement up.

\n

b)

\n

We round each of our measurements up to the nearest whole metre:

\n

Length: $\\var{length}\\,\\mathrm{m} \\approx \\var{l}\\,\\mathrm{m}$.

\n

Width: $\\var{width}\\,\\mathrm{m} \\approx \\var{w}\\,\\mathrm{m}$.

\n

Height: $\\var{height}\\,\\mathrm{m} \\approx \\var{h}\\,\\mathrm{m}$.

\n

The total area consists of five areas: two walls of $\\var{l}\\,\\text{m} \\times \\var{h}\\,\\text{m}$ (length by height); two walls of $\\var{w}\\,\\text{m} \\times \\var{h}\\,\\text{m}$ (width by height); and a ceiling of $\\var{l}\\,\\text{m} \\times \\var{w}\\,\\text{m}$ (length by width).

\n

\\[ \\begin{align}
\\var{l}\\,\\text{m} \\times \\var{h}\\,\\text{m} &= \\var{l*h}\\,\\text{m}^2
\\\\ \\var{w}\\,\\text{m} \\times \\var{h}\\,\\text{m} &= \\var{w*h}\\,\\text{m}^2
\\\\ \\var{l}\\,\\text{m} \\times \\var{w}\\,\\text{m} &= \\var{l*w}\\,\\text{m}^2
\\end{align}\\]

\n

Therefore, the total area {person['name']} needs to paint is

\n

\\[ \\var{2*l*h} + \\var{2*w*h} + \\var{l*w} \\,\\mathrm{m}^2 = \\var{rall}\\,\\mathrm{m}^2 \\text{.} \\]

\n

c)

\n

The exact number of buckets needed is

\n

\\[\\var{rall}\\,\\text{m}^2 \\div 15\\,\\text{m}^2 = \\var{rall/15} \\text{.}\\]

\n

{person['name']} can only buy a whole number of buckets, so {pronouns['they']} need{verbs} to decide between {buckets-1} and {buckets} paint buckets. As it is better to buy more paint than not buy enough, {pronouns['they']} should buy {buckets} buckets of {colour} paint.

"}, {"name": "Straight line equation application: measuring sunflower height", "extensions": ["jsxgraph", "random_person"], "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": "Chris Graham", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/369/"}, {"name": "Vicky Hall", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/659/"}, {"name": "Bradley Bush", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1521/"}], "metadata": {"description": "

An applied example of the use of two points on a graph to develop a straight line function, then use the t estimate and predict. MCQ's are also used to develop student understanding of the uses of gradient and intercepts as well as the limitations of prediction.

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

{person['name']} is given a sunflower seedling for {person['pronouns']['their']} 30th birthday (day $0$) and observes its height. {capitalise(person['pronouns']['they'])} make{s} the following observations later that week:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
Observation    A     B
Day     $\\var{xa}$     $\\var{xb}$
height (cm)     $\\var{ya}$     $\\var{yb}$
\n

{person['name']} plots the 2 points:

\n

{plotPoints()}

", "variables": {"m": {"group": "Ungrouped variables", "name": "m", "description": "

The gradient

", "templateType": "anything", "definition": "random(2..3)"}, "yb": {"group": "point coordinates", "name": "yb", "description": "

y coordinate of point B

", "templateType": "anything", "definition": "m*xb+c"}, "d": {"group": "Ungrouped variables", "name": "d", "description": "

A number of days after receiving the seedling, on which the height is estimated

", "templateType": "anything", "definition": "random([10,14,20])"}, "ya": {"group": "point coordinates", "name": "ya", "description": "

y coordinate of point A

", "templateType": "anything", "definition": "m*xa+c"}, "c": {"group": "Ungrouped variables", "name": "c", "description": "

The intercept

", "templateType": "anything", "definition": "random(2..4)"}, "s": {"group": "Random person", "name": "s", "description": "

He makes, they make.

", "templateType": "anything", "definition": "if(person['gender']='neutral','','s')"}, "xb": {"group": "point coordinates", "name": "xb", "description": "

x coordinate of point B

", "templateType": "anything", "definition": "xa+1"}, "person": {"group": "Random person", "name": "person", "description": "

A random person

", "templateType": "anything", "definition": "random_person()"}, "xa": {"group": "point coordinates", "name": "xa", "description": "

x coordinate of point a

", "templateType": "anything", "definition": "random(3..5)"}}, "tags": ["assessing the accuracy of a graph", "estimations", "gradient", "interpreting graphs", "interpreting the gradient", "limitations of a line equation based on data used to create the equation", "line equation", "Straight Line", "straight line", "taxonomy", "using graphs to estimate a y value", "y-intercept"], "ungrouped_variables": ["m", "c", "d"], "functions": {"advicePoints": {"language": "javascript", "type": "html", "parameters": [], "definition": "//point coordinate variables\nvar xa = Numbas.jme.unwrapValue(scope.variables.xa);\nvar xb = Numbas.jme.unwrapValue(scope.variables.xb);\nvar ya = Numbas.jme.unwrapValue(scope.variables.ya);\nvar yb = Numbas.jme.unwrapValue(scope.variables.yb);\nvar m = Numbas.jme.unwrapValue(scope.variables.m);\nvar c = Numbas.jme.unwrapValue(scope.variables.c);\n\n//make board\nvar div = Numbas.extensions.jsxgraph.makeBoard('400px','400px',{boundingBox:[-1,yb+5,xb+3,-2],grid: true});\nvar board = div.board;\nquestion.board = board;\n\n\n//points (with nice colors)\nvar a = board.create('point',[xa,ya],{name: 'A', size: 7, fillColor: 'blue' , strokeColor: 'lightblue' , highlightFillColor: 'lightblue', highlightStrokeColor: 'yellow', fixed: true, showInfobox: true});\nvar b = board.create('point',[xb,yb],{name: 'B', size: 7, fillColor: 'blue' , strokeColor: 'lightblue' , highlightFillColor: 'lightblue', highlightStrokeColor: 'yellow',fixed: true, showInfobox: true});\n\n\n//ans(was tree) is defined at the end and nscope looks important\n//but they're both variables\n\nvar correct_line = board.create('functiongraph',[function(x){ return m*x+c},-2,22], {strokeColor:\"green\",setLabelText:'mx+c',visible: true, strokeWidth: 4, highlightStrokeColor: 'green'} )\n\n\n\nquestion.signals.on('HTMLAttached',function(e) {\nko.computed(function(){\nvar expr = question.parts[2].gaps[0].display.studentAnswer();\n//define ans as this \ncorrect_line.updateCurve();\nboard.update();\n});\n });\n\n\nreturn div;"}, "plotPoints": {"language": "javascript", "type": "html", "parameters": [], "definition": "//point coordinate variables\nvar xa = Numbas.jme.unwrapValue(scope.variables.xa);\nvar xb = Numbas.jme.unwrapValue(scope.variables.xb);\nvar ya = Numbas.jme.unwrapValue(scope.variables.ya);\nvar yb = Numbas.jme.unwrapValue(scope.variables.yb);\nvar m = Numbas.jme.unwrapValue(scope.variables.m);\nvar c = Numbas.jme.unwrapValue(scope.variables.c);\n\n//make board\nvar div = Numbas.extensions.jsxgraph.makeBoard('400px','400px',{boundingBox:[-1,yb+5,xb+3,-2],grid: true});\nvar board = div.board;\nquestion.board = board;\n\n\n//points (with nice colors)\nvar a = board.create('point',[xa,ya],{name: 'A', size: 7, fillColor: 'blue' , strokeColor: 'lightblue' , highlightFillColor: 'lightblue', highlightStrokeColor: 'yellow', fixed: true, showInfobox: true});\nvar b = board.create('point',[xb,yb],{name: 'B', size: 7, fillColor: 'blue' , strokeColor: 'lightblue' , highlightFillColor: 'lightblue', highlightStrokeColor: 'yellow',fixed: true, showInfobox: true});\n\n\n//ans(was tree) is defined at the end and nscope looks important\n//but they're both variables\n var ans;\n var nscope = new Numbas.jme.Scope([scope,{variables:{x:new Numbas.jme.types.TNum(0)}}]);\n//this is the beating heart of whatever plots the function,\n//I've changed this from being curve to functiongraph\n var line = board.create('functiongraph',[function(x){\nif(ans) {\n try {\nnscope.variables.x.value = x;\n var val = Numbas.jme.evaluate(ans,nscope).value;\n return val;\n }\n catch(e) {\nreturn 163;\n }\n}\nelse\n return 163;\n },-2,22]\n , {strokeColor:\"blue\",strokeWidth: 4} );\n \nvar correct_line = board.create('functiongraph',[function(x){ return m*x+c},-2,22], {strokeColor:\"green\",setLabelText:'mx+c',visible: false, strokeWidth: 4, highlightStrokeColor: 'green'} )\n\nquestion.lines = {\n l:line, c:correct_line\n}\n\n question.signals.on('HTMLAttached',function(e) {\nko.computed(function(){\nvar expr = question.parts[2].gaps[0].display.studentAnswer();\n\n//define ans as this \ntry {\n ans = Numbas.jme.compile(expr,scope);\n}\ncatch(e) {\n ans = null;\n}\nline.updateCurve();\ncorrect_line.updateCurve();\nboard.update();\n});\n });\n\n\nreturn div;"}}, "preamble": {"js": "", "css": ""}, "advice": "

a)

\n

The gradient is the ratio of vertical change ($y_2-y_1$) to horizontal change ($x_2-x_1$).

\n

\\[ m = \\frac{y_2-y_1}{x_2-x_1}=\\frac{\\simplify[!collectNumbers]{{yb}-{ya}}}{\\simplify[!collectNumbers]{{xb}-{xa}}}=\\frac{\\simplify{{yb}-{ya}}}{\\simplify{{xb}-{xa}}}=\\simplify[simplifyFractions,unitDenominator]{({yb-ya})/({xb-xa})}\\text{.}\\]

\n

b)

\n

Rearranging the equation $y=mx+c$ for $c$ and using point A:

\n

\\[ c = y_1-mx_1 = \\var{ya}-\\var{m}\\times\\var{xa}=\\simplify{{ya-m*xa}}\\text{.}\\]

\n

We then check this against point $B$:

\n

\\[ y_2 = mx_2 + c = \\simplify[fractionNumbers]{{m}{xb}+{c}}=\\simplify{{m}*{xb}+{c}}\\text{.}\\]

\n

b)

\n

We now substitute the values for $m$ and $c$ into the equation of a straight line, $y=mx+c$,

\n

\\[y=\\simplify[!noLeadingMinus,unitFactor]{{m} x+ {c}}\\text{.}\\]

\n

{advicePoints()}

\n

c)

\n

The gradient represents the vertical change (height in cm) per unit of the horizontal axis (days): the change in height of the sunflower per day.

\n

d)

\n

Substituting $x=\\var{d}$ into the straight line equation, the height $y$ after $\\var{d}$ days is

\n

\\begin{align}
y&=\\simplify{{m}}x+\\var{c}\\\\
&=\\simplify[]{{m}{d}}+\\var{c}\\\\
&=\\var{m*d+c}\\text{cm.}
\\end{align}

\n

e)

\n

Substituting $x=\\var{1826}$ into the straight line equation, the height $y$ after $1826$ days is

\n

\\begin{align}
y&=\\simplify{{m}}x+\\var{c}\\\\
&=\\simplify[]{{m}1826} + \\var{c}\\\\
&=\\var{m*1826+c}\\text{cm.}
\\end{align}

\n

Note that this is $\\var{(m*1826+c)/100}$ metres. In 2014, a sunflower of $9.17$ metres was entered into the Guinness World Records as tallest sunflower.

\n

f)

\n

Possible reasons that the prediction will not be accurate are:

\n\n

Invalid reasons that the prediction will not be accurate are:

\n", "variable_groups": [{"variables": ["xa", "xb", "ya", "yb"], "name": "point coordinates"}, {"variables": ["person", "s"], "name": "Random person"}], "rulesets": {}, "variablesTest": {"condition": "\n", "maxRuns": 100}, "parts": [{"scripts": {}, "variableReplacements": [], "unitTests": [], "useCustomName": false, "customName": "", "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true, "sortAnswers": false, "showCorrectAnswer": true, "gaps": [{"notationStyles": ["plain", "en", "si-en"], "mustBeReduced": false, "variableReplacements": [], "unitTests": [], "useCustomName": false, "minValue": "m", "correctAnswerFraction": true, "customName": "", "allowFractions": true, "correctAnswerStyle": "plain", "variableReplacementStrategy": "originalfirst", "scripts": {}, "maxValue": "m", "showCorrectAnswer": true, "type": "numberentry", "showFractionHint": true, "mustBeReducedPC": 0, "customMarkingAlgorithm": "", "marks": 1, "showFeedbackIcon": true, "extendBaseMarkingAlgorithm": true}], "type": "gapfill", "prompt": "

What is the gradient, $m$, of the straight line between the two points?

\n

$m =$ [[0]]

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

Use the gradient and the coordinates of the two points to find the height of the sunflower when {person['name']} received it.

\n

[[0]] cm.

", "customMarkingAlgorithm": "", "marks": 0, "variableReplacementStrategy": "originalfirst"}, {"scripts": {"mark": {"order": "after", "script": "console.log(this.question.lines.c)\nthis.question.lines.l.setAttribute({strokeColor: this.credit==1 ? 'green' : 'red'});\nthis.question.lines.c.setAttribute({visible: this.credit==1 ? false : true});\n"}}, "variableReplacements": [], "unitTests": [], "useCustomName": false, "customName": "", "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true, "sortAnswers": false, "showCorrectAnswer": true, "gaps": [{"valuegenerators": [{"name": "x", "value": ""}], "variableReplacements": [], "unitTests": [], "useCustomName": false, "showPreview": true, "variableReplacementStrategy": "originalfirst", "customName": "", "extendBaseMarkingAlgorithm": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "scripts": {}, "showCorrectAnswer": true, "failureRate": 1, "type": "jme", "checkVariableNames": false, "marks": 1, "customMarkingAlgorithm": "", "answer": "{m}*x+{c}", "vsetRange": [0, 1], "showFeedbackIcon": true, "vsetRangePoints": 5}], "type": "gapfill", "prompt": "

Let $y$ be the sunflower height and $x$ the time, in days, since {person['name']} received the sunflower. What is the equation of the straight line between the points?

\n

$y(x) = $ [[0]]

\n

Use the preview on {person['name']}'s plot to check your answer.

", "customMarkingAlgorithm": "", "marks": 0, "variableReplacementStrategy": "originalfirst"}, {"marks": 0, "displayType": "radiogroup", "unitTests": [], "choices": ["

The length of time taken in days for the sunflower to grow $1$ cm 

", "

The change in height (in cm) of the sunflower over $1$ day

", "

The width of the ruler used to measure the sunflower 

", "

All of the above

"], "scripts": {}, "distractors": ["", "", "", ""], "shuffleChoices": false, "prompt": "

What does the gradient represent?

", "showCellAnswerState": true, "useCustomName": false, "minMarks": 0, "variableReplacements": [], "maxMarks": 0, "customName": "", "extendBaseMarkingAlgorithm": true, "matrix": [0, "1", 0, 0], "displayColumns": "1", "showCorrectAnswer": true, "type": "1_n_2", "customMarkingAlgorithm": "", "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst"}, {"scripts": {}, "variableReplacements": [], "unitTests": [], "useCustomName": false, "customName": "", "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true, "sortAnswers": false, "showCorrectAnswer": true, "gaps": [{"notationStyles": ["plain", "en", "si-en"], "mustBeReduced": false, "variableReplacements": [], "unitTests": [], "useCustomName": false, "minValue": "d*m+c", "correctAnswerFraction": false, "customName": "", "allowFractions": false, "correctAnswerStyle": "plain", "variableReplacementStrategy": "originalfirst", "scripts": {}, "maxValue": "d*m+c", "showCorrectAnswer": true, "type": "numberentry", "showFractionHint": true, "mustBeReducedPC": 0, "customMarkingAlgorithm": "", "marks": 1, "showFeedbackIcon": true, "extendBaseMarkingAlgorithm": true}], "type": "gapfill", "prompt": "

{person['name']} uses the straight line equation to predict the future height of the sunflower. What will the height be on day $\\var{d}$?

\n

[[0]] cm

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

{person['name']} wonders if {person['pronouns']['they']} can guess what the height of the sunflower will be on {person['pronouns']['their']} 35th birthday. {capitalise(person['pronouns']['they'])} work{s} out that this is day 1826. Using the straight line equation, what would the height be on day 1826?

\n

[[0]] cm

", "customMarkingAlgorithm": "", "marks": 0, "variableReplacementStrategy": "originalfirst"}, {"variableReplacementStrategy": "originalfirst", "displayType": "checkbox", "unitTests": [], "choices": ["

Sunflower height as a function of time may not have a straight linear relationship.

", "

The observations only span a very limited time range.

", "

There are multiple straight linear relationships that could be obtained using the same $2$ data points.

", "

Sunflower height never actually increases over time.

"], "scripts": {}, "distractors": ["", "", "", ""], "shuffleChoices": false, "marks": 0, "showCellAnswerState": true, "useCustomName": false, "minMarks": 0, "variableReplacements": [], "maxMarks": "1", "prompt": "

{person['name']} doubts {person['pronouns']['their']} result. Which of the following reason(s) may mean that the height on {person['pronouns']['their']} 35th birthday is not accurate?

", "customName": "", "warningType": "none", "extendBaseMarkingAlgorithm": true, "matrix": ["0.5", "0.5", "-0.5", "-0.5"], "displayColumns": "1", "showCorrectAnswer": true, "type": "m_n_2", "maxAnswers": 0, "customMarkingAlgorithm": "", "showFeedbackIcon": true, "minAnswers": 0}]}, {"name": "The probability of an event not happening - five friends play mini golf", "extensions": ["random_person"], "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": "Chris Graham", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/369/"}, {"name": "Elliott Fletcher", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1591/"}], "tags": ["complement", "Complement", "complementary", "Probabilities sum to 1", "probability", "Probability"], "metadata": {"description": "

Given the probabilities that each of four out of five friends will win a round of mini-golf, work out the probability that the fifth friend won't win, then use that to find the probability that they will win.

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

Five friends are playing a game of mini-golf.

\n

The probability that each person wins the game, $\\mathrm{P}(\\text{Person})$, is given in the table.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
Person{people[0]['name']}{people[1]['name']}{people[2]['name']}{people[3]['name']}{people[4]['name']}
$\\mathrm{P}(\\text{Person})$$\\var{probs[0]}$$\\var{probs[1]}$$\\var{probs[2]}$$\\var{probs[3]}$
", "advice": "

All probability situations can be reduced to two possible outcomes: success or failure.

\n

When we express the outcomes in this way we say that they are complementary.

\n

The sum of the probability of an event and its complement is always $1$.

\n

If $\\mathrm{P}(\\mathrm{E})$ is the probability of an event $\\mathrm{E}$ happening and $\\mathrm{P}(\\bar{\\mathrm{E}})$ is the probability of that event not happening then

\n

\\[\\mathrm{P}(\\mathrm{E}) +\\mathrm{P}(\\bar{\\mathrm{E}}) = 1.\\]

\n

Rearranging this equation gives:

\n

\\[\\mathrm{P}(\\bar{\\mathrm{E}}) = 1 - \\mathrm{P}(\\mathrm{E})\\]

\n

We can think of this game as having two possible outcomes: either {pname} wins or {pname} doesn't win.

\n

This means that

\n

\\[\\mathrm{P}(\\var{pname}) + \\mathrm{P}(\\text{not } \\var{pname}) = 1 \\text{.}\\]

\n

\n

a)

\n

If {pname} doesn't win the game then that means that one of the other four players must win the game.

\n

So the probability of {pname} not winning the game is the same as the probability of any of the other four players winning the game.

\n

Therefore

\n

\\begin{align}
\\mathrm{P}(\\text{not }\\var{pname}) &= \\mathrm{P}(\\var{people[0]['name']})+\\mathrm{P}(\\var{people[1]['name']})+\\mathrm{P}(\\var{people[3]['name']})+\\mathrm{P}(\\var{people[4]['name']}) \\\\
&= \\var{latex(join(probs,' + '))}\\\\
&= \\var{sum(probs)}.
\\end{align}

\n

b)

\n

Rearranging the equation above gives

\n

\\[\\mathrm{P}(\\var{pname}) = 1 - \\mathrm{P}(\\text{not } \\var{pname}).\\]

\n

We know from a) that $\\mathrm{P}(\\text{not } \\var{pname}) = \\var{sum(probs)}$.

\n

Therefore

\n

\\begin{align}
\\mathrm{P}(\\var{pname}) &= 1 - \\mathrm{P}(\\text{not } \\var{pname})\\\\
&= 1 - \\var{sum(probs)}\\\\
&= \\var{1-sum(probs)}.
\\end{align}

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"probs": {"name": "probs", "group": "Ungrouped variables", "definition": "map(precround(raw_probs[j]/sum(raw_probs),2),j,0..3)", "description": "

The probability of each of the first 4 friends winning the game. The missing person isn't included, so their probability can be 1 minus the sum of the rest, accumulating any rounding errors.

", "templateType": "anything", "can_override": false}, "pname": {"name": "pname", "group": "Ungrouped variables", "definition": "person['name']", "description": "", "templateType": "anything", "can_override": false}, "person": {"name": "person", "group": "Ungrouped variables", "definition": "people[2]", "description": "

The person whose probability is not given.

", "templateType": "anything", "can_override": false}, "raw_probs": {"name": "raw_probs", "group": "Ungrouped variables", "definition": "repeat(random(0..1#0),5)", "description": "

Uniform random values for each of the five friends. Their winning probabilities will be in proportion to this.

", "templateType": "anything", "can_override": false}, "people": {"name": "people", "group": "Ungrouped variables", "definition": "random_people(5)", "description": "", "templateType": "anything", "can_override": false}, "p_not_name": {"name": "p_not_name", "group": "Ungrouped variables", "definition": "sum(probs)", "description": "

The probability that the chosen person does not win.

", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["people", "raw_probs", "probs", "person", "pname", "p_not_name"], "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": "

What is $\\mathrm{P}(\\text{not } \\var{pname})$?

\n

[[0]]

\n

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

What is $\\mathrm{P}(\\var{pname})$?

\n

[[0]]

", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "P({name})", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [{"variable": "p_not_name", "part": "p0g0", "must_go_first": false}], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "1-p_not_name", "maxValue": "1-p_not_name", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Using compound units - room hire price per hour and per minute", "extensions": ["random_person"], "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/"}], "tags": ["taxonomy"], "metadata": {"description": "

Given the cost of hiring a room for a given number of hours, compare with competing prices given per hour and per minute.

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

{pname} has been tasked with booking a room for a {hours}-hour meeting.

", "advice": "

a)

\n

The price per hour is the total price divide by the number of hours.

\n

\\[ \\text{Price per hour} = \\frac{\\var{block_price_per_hour*hours}}{\\var{hours}} = £\\var{dpformat(block_price_per_hour,2)} \\text{ per hour} \\]

\n

b)

\n

The price is given in pence per minute. To convert to pounds per minute, divide by $100$:

\n

\\[ \\var{100*competitor_price_per_minute} \\text{ p/minute} = £\\var{dpformat(competitor_price_per_minute,2)} \\text{ per minute} \\]

\n

Then to convert to pounds per hour, multiply by $60$:

\n

\\[ £\\var{dpformat(competitor_price_per_minute,2)} \\text{ per minute} = £\\var{dpformat(competitor_price_per_minute*60,2)} \\text{ per hour} \\]

\n

c)

\n

{pname} should choose the method with the lowest cost per hour, which is {best_method}.

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"competitor_price_per_minute": {"name": "competitor_price_per_minute", "group": "Ungrouped variables", "definition": "floor(100*block_price_per_hour/60*(1+random(0.1..0.3#0)*random(-1,1)))/100", "description": "

Price of booking at RoomCo, the competitor, in pounds per minute

", "templateType": "anything", "can_override": false}, "pronouns": {"name": "pronouns", "group": "Person", "definition": "person['pronouns']", "description": "", "templateType": "anything", "can_override": false}, "best_method": {"name": "best_method", "group": "Ungrouped variables", "definition": "switch(\n min(prices)=block_price_per_hour,\n 'paying in advance at ACME',\n min(prices)=single_price_per_hour,\n 'pay-as-you-go at ACME',\n 'paying per minute at RoomCo'\n)", "description": "

A description of the cheapest method.

", "templateType": "anything", "can_override": false}, "block_price_per_hour": {"name": "block_price_per_hour", "group": "Ungrouped variables", "definition": "random(10..25#0.25)", "description": "

Price of booking the room at ACME in advance, in pounds per hour

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

Length of the meeting in hours

", "templateType": "anything", "can_override": false}, "pname": {"name": "pname", "group": "Person", "definition": "person['name']", "description": "", "templateType": "anything", "can_override": false}, "marking_matrix": {"name": "marking_matrix", "group": "Ungrouped variables", "definition": "let(best,min(prices),\n map(if(x=best,1,0),x,prices)\n)", "description": "

Marking matrix for the \"which method is best\" part.

", "templateType": "anything", "can_override": false}, "single_price_per_hour": {"name": "single_price_per_hour", "group": "Ungrouped variables", "definition": "block_price_per_hour+random(0.5..2#0.25)*random(-1,1)", "description": "

Pay-as-you-go price at ACME, in pounds per hour

", "templateType": "anything", "can_override": false}, "verbs": {"name": "verbs", "group": "Person", "definition": "if(person['gender']='neutral','','s')", "description": "", "templateType": "anything", "can_override": false}, "prices": {"name": "prices", "group": "Ungrouped variables", "definition": "[block_price_per_hour,single_price_per_hour,60*competitor_price_per_minute]", "description": "", "templateType": "anything", "can_override": false}, "person": {"name": "person", "group": "Person", "definition": "random_person()", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": "100"}, "ungrouped_variables": ["hours", "block_price_per_hour", "single_price_per_hour", "competitor_price_per_minute", "marking_matrix", "prices", "best_method"], "variable_groups": [{"name": "Person", "variables": ["person", "pronouns", "pname", "verbs"]}], "functions": {"pounds": {"parameters": [["n", "number"]], "type": "string", "language": "jme", "definition": "currency(n,\"\u00a3\",\"p\")"}}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

{pname} is quoted a price of {pounds(block_price_per_hour*hours)} by ACME Office Services to book a room in advance for {hours} hours, or {pounds(single_price_per_hour)} per hour in a pay-as-you-go scheme.

\n

To compare the two prices, {pronouns['they']} decide{verbs} to convert the advance booking price to a price per hour.

\n

Price per hour: £ [[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": "block_price_per_hour", "maxValue": "block_price_per_hour", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "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}, {"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 competitor, RoomCo, is offering meeting rooms charged by the minute, at {pounds(competitor_price_per_minute)} per minute.

\n

To compare this price to ACME's offer, {pname} decide{verbs} to convert it to a price per hour.

\n

Price per hour: £ [[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": "60*competitor_price_per_minute", "maxValue": "60*competitor_price_per_minute", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "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}, {"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, "prompt": "

How should {pname} book the room?

", "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": "1", "showCellAnswerState": true, "choices": ["

Pay in advance at ACME

", "

Pay-as-you-go at ACME

", "

Pay per minute at RoomCo

"], "matrix": "marking_matrix"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Using compound units: price/weight of sweets", "extensions": ["random_person"], "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": "Elliott Fletcher", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1591/"}], "tags": ["Compound units", "compound units", "conversion", "measurements", "rate of pay", "speed", "taxonomy", "unit pricing", "using compound units"], "metadata": {"description": "

This question assesses the students ability to calculate and convert between different types of compound units, including rates of pay, speed and unit pricing.

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

{pname} goes to {pronouns['their']} local shop and buys a bag containing $\\var{weight}$g of sweets for £$\\var{cost}$.

", "advice": "

a)

\n

We are given the price of a bag of $\\var{weight}$ grams of sweets.

\n

To find the price per 100g of sweets we divide the price of a bag of sweets by its weight in grams and then multiply this by $100$.

\n

\\[\\displaystyle\\frac{\\var{cost}}{\\var{weight}} \\times 100 = \\var{(100*cost/weight)}.\\] 

\n

\\begin{align}
\\displaystyle\\frac{\\var{cost}}{\\var{weight}} \\times 100 &= \\var{(100*cost/weight)}\\\\ &= \\var{dpformat(100*cost/weight,2)} \\; (\\text{rounded to $2$ decimal places}).
\\end{align}

\n

The sweets cost {pounds(100*cost/weight)} per 100g.

\n

b)

\n

To convert the cost from pounds per $100$ grams to pounds per kilogram we need to use the fact that $1\\text{g} = \\displaystyle\\frac{1}{1000}\\text{kg}$.

\n

This means that $100\\text{g} = \\displaystyle\\frac{1}{10}\\text{kg}$.

\n

We know from a) that sweets cost {pounds(100*cost/weight)} per 100g, which is the same as {pounds(100*cost/weight)} per $\\frac{1}{10}$kg.

\n

We want the price per one kilogram of sweets, so we multiply by $10$.

\n

Note that we use the actual value of $\\displaystyle\\frac{\\var{cost}}{\\var{weight}} \\times 100 = \\var{100*cost/weight}$ here to ensure that our final answer is accurate.

\n

\\begin{align}
\\var{100*cost/{weight}} \\times 10 &= \\var{dpformat(1000*{cost}/{weight},2)} \\; (2 \\; \\text{d.p})
\\end{align}

\n

So, the sweets cost {pounds(1000*cost/weight)} per kg.

\n

c)

\n

We worked out in part a) that sweets cost {pounds(100*cost/weight)} per 100g when bought in the bag, so at {pounds(pick_n_mix_cost)} per 100g the Pick'n'Mix is {if(pick_n_mix_cost<100*cost/weight,'cheaper','more expensive')} than buying the bag.

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"pronouns": {"name": "pronouns", "group": "Ungrouped variables", "definition": "person['pronouns']", "description": "", "templateType": "anything", "can_override": false}, "cost": {"name": "cost", "group": "Ungrouped variables", "definition": "precround(cost_per_g*weight,1)-0.01", "description": "

Cost of a bag of sweets - always ends in .x9 to look like a real price.

", "templateType": "anything", "can_override": false}, "max_kg_cost": {"name": "max_kg_cost", "group": "Ungrouped variables", "definition": "max(precround(1000*cost/weight,2), precround(100*cost/weight,2)*10)", "description": "

Minimum acceptable cost per kg - using the rounded cost per 100g can introduce an error.

", "templateType": "anything", "can_override": false}, "pname": {"name": "pname", "group": "Ungrouped variables", "definition": "person['name']", "description": "", "templateType": "anything", "can_override": false}, "pick_n_mix_cost": {"name": "pick_n_mix_cost", "group": "Ungrouped variables", "definition": "precround(100*cost/weight,2)+random(-15..15 except -2..2)*0.01", "description": "

Cost of the sweets at the Pick'n'Mix, per 100g.

", "templateType": "anything", "can_override": false}, "min_kg_cost": {"name": "min_kg_cost", "group": "Ungrouped variables", "definition": "min(precround(1000*cost/weight,2), precround(100*cost/weight,2)*10)", "description": "

Minimum acceptable cost per kg - using the rounded cost per 100g can introduce an error.

", "templateType": "anything", "can_override": false}, "weight": {"name": "weight", "group": "Ungrouped variables", "definition": "random(150..200)", "description": "

Weight of a bag of sweets, in grams

", "templateType": "anything", "can_override": false}, "person": {"name": "person", "group": "Ungrouped variables", "definition": "random_person()", "description": "", "templateType": "anything", "can_override": false}, "cost_per_g": {"name": "cost_per_g", "group": "Ungrouped variables", "definition": "random(0.005..0.02#0)", "description": "

Cost of the sweets per gram, in pounds.

\n

Between 50p and £2 per 100g.

", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": "10000"}, "ungrouped_variables": ["weight", "cost_per_g", "cost", "min_kg_cost", "max_kg_cost", "person", "pname", "pronouns", "pick_n_mix_cost"], "variable_groups": [], "functions": {"pounds": {"parameters": [["n", "number"]], "type": "string", "language": "jme", "definition": "currency(n,\"\u00a3\",\"p\")"}}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

How much do the sweets cost per $100$ grams?

\n

£[[0]] per $100$g

", "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": "100*cost/weight", "maxValue": "100*cost/weight", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "precisionType": "dp", "precision": "2", "precisionPartialCredit": 0, "precisionMessage": "

Round your answer to $2$ decimal places.

", "strictPrecision": false, "showPrecisionHint": false, "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": "

How much is this in pounds per kilogram?

\n

£[[0]]  per kg

", "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": "1000*cost/weight", "maxValue": "1000*cost/weight", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "precisionType": "dp", "precision": "2", "precisionPartialCredit": 0, "precisionMessage": "

Round your answer to $2$ decimal places.

", "strictPrecision": false, "showPrecisionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"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, "prompt": "

{pname} notices that the same sweets are available from the Pick'n'Mix for {pounds(pick_n_mix_cost)} per 100g.

\n

Should {pronouns['they']} buy {pronouns['their']} sweets from the Pick'n'Mix instead?

", "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": 0, "showCellAnswerState": true, "choices": ["

Yes, the Pick'n'Mix is cheaper.

", "

No, the Pick'n'Mix is more expensive.

"], "matrix": "if(pick_n_mix_cost<100*cost/weight,[1,0],[0,1])"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}]}], "percentPass": 0, "showstudentname": true, "showQuestionGroupNames": false, "feedback": {"showanswerstate": true, "allowrevealanswer": true, "advicethreshold": 0, "showactualmark": true, "feedbackmessages": [], "showtotalmark": true, "intro": ""}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

A selection of questions which use the \"random person\" extension to randomise the names of people in the question text.

"}, "name": "Questions using the random person extension", "type": "exam", "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}], "extensions": ["geogebra", "jsxgraph", "random_person"], "custom_part_types": [], "resources": []}