// Numbas version: exam_results_page_options {"navigation": {"onleave": {"message": "", "action": "none"}, "preventleave": true, "allowregen": true, "reverse": true, "showresultspage": "oncompletion", "browse": true, "showfrontpage": true}, "feedback": {"advicethreshold": 0, "showactualmark": true, "showanswerstate": true, "showtotalmark": true, "intro": "", "allowrevealanswer": true, "feedbackmessages": []}, "showstudentname": true, "timing": {"timeout": {"message": "", "action": "none"}, "allowPause": true, "timedwarning": {"message": "", "action": "none"}}, "question_groups": [{"pickQuestions": 1, "name": "Group", "pickingStrategy": "all-ordered", "questions": [{"name": "Using a speed and acceleration graph", "extensions": ["geogebra"], "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/"}], "variable_groups": [{"variables": ["a1", "b1", "c1", "d1", "z1", "f1"], "name": "speeds"}, {"variables": ["mab", "mbc", "mcd", "mde", "mef"], "name": "acceleration"}], "preamble": {"js": "", "css": ""}, "type": "question", "parts": [{"variableReplacementStrategy": "originalfirst", "type": "gapfill", "scripts": {}, "marks": 0, "showCorrectAnswer": true, "gaps": [{"maxMarks": 0, "type": "1_n_2", "showCorrectAnswer": true, "minMarks": 0, "distractors": ["", ""], "variableReplacementStrategy": "originalfirst", "displayType": "dropdownlist", "shuffleChoices": false, "showFeedbackIcon": true, "displayColumns": 0, "matrix": [0, "1"], "choices": ["

speed

", "

acceleration

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

speed

", "

acceleration

"], "scripts": {}, "variableReplacements": [], "marks": 0}], "variableReplacements": [], "showFeedbackIcon": true, "prompt": "

The green line with diamond shaped points maps the  [[0]] of the car whilst the blue line with circular points maps the [[1]] of the car.

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

Yes - a car could have a negative speed.

", "

No - a car can never have a negative speed.

"], "scripts": {}, "variableReplacements": [], "marks": 0}], "variableReplacements": [], "showFeedbackIcon": true, "prompt": "

The graph shows no negative speeds; is there ever a case where the car could've had a negative speed?  [[0]]

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

Yes - a car could have a negative acceleration.

", "

No - a car can never have a negative acceleration.

"], "scripts": {}, "variableReplacements": [], "marks": 0}], "variableReplacements": [], "showFeedbackIcon": true, "prompt": "

The graph shows some negative accelerations; is it possible for a car to have negative acceleration?  [[0]]

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

Calculate acceleration over the first $2$ seconds. Use the acceleration line on the graph to check your answer is correct.

\n

Acceleration $=$  [[0]] $m\\space/\\space s^2$

"}], "advice": "

a)

\n

We can analyse the nature of each line to find out which line resembles speed and which resembles acceleration. 

\n

\n

The speed line should be distinguishable from the acceleration line based on the fact speed is always positive and has a continuous function (a line where the points are joined). This suggests the blue line with circular points represents speed.

\n

Where as acceleration can often be discontinuous and can be negative where speeds are decreasing. This suggests that the green line with diamond shaped points is the acceleration line.

\n

b)

\n

Speed is a scalar quantity without direction so speed is positive no matter the direction it travels in. Therefore our answer is \"no- a car can never have a negative speed.\".

\n

c)

\n

By defintion, when an object is slowing down it has a negative acceleration as the acceleration measures that change in speed. Therefore, our answer is \"yes- a car could have negative acceleration.\".

\n

d)

\n

To calculate acceleration we use the point at $0$ seconds, with a $0$ m/s speed and the point at $2$ seconds with a $\\var{b1}$ m/s speed and we find the gradient of the line between them. To find the gradient of a straight line we can use:

\n

\\[
\\begin{align}
\\text{Gradient } &= \\frac{y_1-y_2}{x_1-x_2}\\\\
&= \\frac{\\var{b1-a1}}{2-0}\\\\
&=\\simplify[fractionNumbers,simplifyFractions,unitDenominator]{{b1-a1}/2} \\text{.}
\\end{align}
\\]

\n

We can then compare the graph to our this answer in order to check that our calculation is correct and we see that we the same answer as was given.

\n

", "tags": ["acceleration", "graphs", "speed and acceleration graph", "taxonomy"], "variables": {"area": {"templateType": "anything", "description": "", "definition": "d2farea+c1*2+b1+c1+b1", "name": "area", "group": "Ungrouped variables"}, "d2farea": {"templateType": "anything", "description": "", "definition": "2*z1+d1+f1", "name": "d2farea", "group": "Ungrouped variables"}, "mab": {"templateType": "anything", "description": "", "definition": "(b1-a1)/2", "name": "mab", "group": "acceleration"}, "b1": {"templateType": "anything", "description": "", "definition": "random(6,8,10)+a1\n", "name": "b1", "group": "speeds"}, "mef": {"templateType": "anything", "description": "", "definition": "(f1-z1)/2", "name": "mef", "group": "acceleration"}, "a1": {"templateType": "anything", "description": "", "definition": "0\n", "name": "a1", "group": "speeds"}, "d1": {"templateType": "anything", "description": "", "definition": "c1", "name": "d1", "group": "speeds"}, "f1": {"templateType": "anything", "description": "", "definition": "2", "name": "f1", "group": "speeds"}, "c1": {"templateType": "anything", "description": "", "definition": "random(8,10,12,14)+b1", "name": "c1", "group": "speeds"}, "mde": {"templateType": "anything", "description": "", "definition": "(z1-d1)/2", "name": "mde", "group": "acceleration"}, "mbc": {"templateType": "anything", "description": "", "definition": "(c1-b1)/2", "name": "mbc", "group": "acceleration"}, "mcd": {"templateType": "anything", "description": "", "definition": "(d1-c1)/2", "name": "mcd", "group": "acceleration"}, "z1": {"templateType": "anything", "description": "", "definition": "c1-random(8,10,12)", "name": "z1", "group": "speeds"}}, "rulesets": {}, "variablesTest": {"condition": "", "maxRuns": 100}, "functions": {}, "ungrouped_variables": ["d2farea", "area"], "statement": "

You are part of a team analysing a high speed car race. You are given the following graph mapping both the speed and acceleration of one particular car as it drives around a section of the race course. The horizontal axis plots time in seconds whilst the vertical axis maps speed and acceleration in metres per second and metres per second squared respectively.

\n

{geogebra_applet('qEUWCdWt',[[\"a1\",a1],[\"b1\",b1],[\"c1\",c1],[\"d1\",d1],[\"z1\",z1],[\"f1\",f1]])} 

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

A graph shows both the speed and acceleration of a car. Identify which line corresponds to which measurement, and calculate the acceleration during a portion of time.

"}}, {"name": " Using a speed graph to find distance", "extensions": ["geogebra"], "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": "

Use a piecewise linear graph of speed against time to find the distance travelled by a car.

\n

Finally, use the total distance travelled to find the average speed.

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

We can use a speed graph to calculate the distance travelled in a given time interval by finding the area under the line between the start and end times.

\n

a)

\n

The shape made by the speed curve, the line $x=0$, and the lines $t=4$ and $t=6$ seconds is a rectangle, so we can work out the area of this section by multiplying the width by the height.

\n

The rectangle is $2$ seconds wide, and $\\var{c1}$ ms-1 high.

\n

\\begin{align}
\\text{Area} &= \\text{width} \\times \\text{height}\\\\
&= 2 \\times\\var{c1}\\\\
&=\\simplify{2{c1}}\\text{.}
\\end{align}

\n

So the distance covered in this two second interval is $\\simplify{2{c1}}$ m.

\n

b)

\n

The shape made by the line and $x=0$ between $0$ and $2$ seconds forms a right-angled triangle with width $2$ and height $\\var{b1}$.

\n

\\begin{align}
\\text{Area}&=  \\frac{1}{2}\\times \\text{width} \\times \\text{height}\\\\
&= \\frac{1}{2} \\times 2 \\times \\var{b1}\\\\
&=\\var{b1} \\text{.}
\\end{align}

\n

So therefore,the distance covered in this two second interval, and our answer, is $\\simplify{{b1}}$ meters.

\n

c)

\n

The shape made by the speed curve and $x=0$ between $2$ and $4$ seconds forms a trapezium. This can be broken down in to a right angle triangle (let's call this $A$) and a rectangle (we'll call this $B$).

\n

Triangle $A$ has width $2$ m and height $\\var{c1}-\\var{b1}$ ms-1.

\n

\\begin{align}
A &=  \\frac{1}{2}\\times \\text{width} \\times \\text{height}\\\\
&= \\frac{1}{2}\\times2 \\times\\ (\\var{c1}-\\var{b1})\\\\
&= \\var{c1}-\\var{b1}\\\\
&=\\simplify{{c1}-{b1}}\\text{.}
\\end{align}

\n

We can work out the area of the rectangle $B$ by multiplying its width, $2$ seconds, by its height, $\\var{b1}$ ms-1:

\n

\\begin{align}
B &=  \\text{width} \\times \\text{height}\\\\
&= 2 \\times(\\var{c1}-\\var{b1})\\\\
&=2 \\times \\simplify{{c1}-{b1}}\\\\
&=\\simplify{2{c1-b1}}\\text{.}
\\end{align}

\n

We can now work out the whole area under the line by adding these two areas together:

\n

\\begin{align}
\\text{Area} &= A + B \\\\
&=\\simplify{{c1}-{b1}} + \\simplify{2{c1-b1}} \\\\
&=\\simplify{2{c1-b1}+{c1}-{b1}} \\text{.}
\\end{align}

\n

The distance covered in this interval is $\\var{2(c1-b1)+c1-b1}$ m.

\n

d)

\n

Speed is the distance travelled per unit of time.

\n

\\begin{align}
\\text{speed} &= \\frac{\\text{distance}}{\\text{time}} \\\\[0.5em]
&= \\frac{\\var{area}}{10} \\\\[0.5em]
&=\\simplify[!fractionNumbers]{{area/10}} \\text{ ms}^{-1}\\text{.}
\\end{align}

", "variable_groups": [{"name": "speeds", "variables": ["a1", "b1", "c1", "d1", "z1", "f1"]}, {"name": "acceleration", "variables": ["mab", "mbc", "mcd", "mde", "mef"]}], "statement": "

You are part of an elite team analysing a high speed car race. You are given the following graph mapping the speed of one particular car as it drives around a section of the race course. The horizontal axis plots time in seconds whilst the vertical axis maps speed in metres per second ($ms^{-1}$).

\n

{geogebra_applet('cecdYjwp',[[\"a1\",a1],[\"b1\",b1],[\"c1\",c1],[\"d1\",d1],[\"z1\",z1],[\"f1\",f1]])} 

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

Use the graph to calculate the distance the car travels between $4$ and $6$ seconds.

\n

Distance travelled $=$  [[0]]metres

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

Use the graph to calculate the distance the car travels between $0$ and $2$ seconds.

\n

Distance travelled $=$  [[0]]metres

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

Use the graph to calculate the distance the car travels between $2$ and $4$ seconds.

\n

Distance travelled $=$  [[0]]metres

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

The car travelled $\\var{area}$ metres over the $10$ second period. Calculate the average speed of the the car over the $10$ seconds in metres per second. Give your answer as a whole number or a decimal to $1$ decimal place.

\n

Average speed $=$ [[0]] ms-1

", "variableReplacements": [], "showFeedbackIcon": true, "marks": 0, "gaps": [{"correctAnswerFraction": false, "variableReplacements": [], "strictPrecision": true, "showCorrectAnswer": true, "mustBeReducedPC": 0, "precision": "1", "showFeedbackIcon": true, "precisionType": "dp", "minValue": "{area/10}", "notationStyles": ["plain", "en", "si-en"], "scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "maxValue": "{area/10}", "mustBeReduced": false, "allowFractions": false, "marks": 1, "precisionPartialCredit": 0, "correctAnswerStyle": "plain", "showPrecisionHint": true, "precisionMessage": "You have not given your answer to the correct precision."}]}], "tags": ["average speed", "calculating distance", "constant accelerations", "distance", "Distance", "graphs", "speed graph", "taxonomy"], "preamble": {"css": "", "js": ""}, "functions": {}, "variables": {"d2farea": {"description": "", "group": "Ungrouped variables", "definition": "2*z1+d1+f1", "name": "d2farea", "templateType": "anything"}, "c1": {"description": "", "group": "speeds", "definition": "random(8,10,12,14)+b1", "name": "c1", "templateType": "anything"}, "a1": {"description": "", "group": "speeds", "definition": "0\n", "name": "a1", "templateType": "anything"}, "d1": {"description": "", "group": "speeds", "definition": "c1", "name": "d1", "templateType": "anything"}, "b1": {"description": "", "group": "speeds", "definition": "random(6,8,10)+a1\n", "name": "b1", "templateType": "anything"}, "area": {"description": "", "group": "Ungrouped variables", "definition": "d2farea+c1*2+b1+c1+b1", "name": "area", "templateType": "anything"}, "z1": {"description": "", "group": "speeds", "definition": "c1-random(8,10,12)", "name": "z1", "templateType": "anything"}, "mbc": {"description": "", "group": "acceleration", "definition": "(c1-b1)/2", "name": "mbc", "templateType": "anything"}, "mde": {"description": "", "group": "acceleration", "definition": "(z1-d1)/2", "name": "mde", "templateType": "anything"}, "mab": {"description": "", "group": "acceleration", "definition": "(b1-a1)/2", "name": "mab", "templateType": "anything"}, "mef": {"description": "", "group": "acceleration", "definition": "(f1-z1)/2", "name": "mef", "templateType": "anything"}, "f1": {"description": "", "group": "speeds", "definition": "2", "name": "f1", "templateType": "anything"}, "mcd": {"description": "", "group": "acceleration", "definition": "(d1-c1)/2", "name": "mcd", "templateType": "anything"}}, "variablesTest": {"maxRuns": 100, "condition": ""}}, {"name": "Creating Frequency Tables", "extensions": ["stats"], "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/"}], "rulesets": {}, "functions": {"tally": {"parameters": [["n", "number"]], "language": "javascript", "type": "string", "definition": "var s = ''\n// Add strikethrough if n>=5\n// For simplicity, I have not handled the case where n reaches 10, which is unlikely.\nif(n>=5){\n s = '|||| ';\n n = n-5;\n}\n// Tally for each n\nfor (i=1; i <= n; i++) { \n s+= '|';\n}\nreturn ''+s+'';"}}, "ungrouped_variables": ["data", "frequencies", "tallies"], "metadata": {"description": "

Present some given data in a frequency table.

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

\n

Frequency is the number of times that an event occurs (in this case, obtaining a certain score) within a particular experiment (in this case, the exam).

\n

We are given enough data that keeping a mental count of the frequencies is difficult:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$\\var{data[0]}$$\\var{data[1]}$$\\var{data[2]}$$\\var{data[3]}$$\\var{data[4]}$$\\var{data[5]}$$\\var{data[6]}$$\\var{data[7]}$$\\var{data[8]}$$\\var{data[9]}$
$\\var{data[10]}$$\\var{data[11]}$$\\var{data[12]}$$\\var{data[13]}$$\\var{data[14]}$$\\var{data[15]}$$\\var{data[16]}$$\\var{data[17]}$$\\var{data[18]}$$\\var{data[19]}$
\n

Therefore, a better way to approach this problem would be to add an extra column to the frequency table, as illustrated below, to tally the number of students with each score. The number of tally marks for each score can then be read off and insterted into the frequency column.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
ScoreTallyFrequency
$0${tallies[0]}$\\var{frequencies[0]}$
$1${tallies[1]}$\\var{frequencies[1]}$
$2${tallies[2]}$\\var{frequencies[2]}$
$3${tallies[3]}$\\var{frequencies[3]}$
$4${tallies[4]}$\\var{frequencies[4]}$
$5${tallies[5]}$\\var{frequencies[5]}$
$6${tallies[6]}$\\var{frequencies[6]}$
$7${tallies[7]}$\\var{frequencies[7]}$
$8${tallies[8]}$\\var{frequencies[8]}$
$9${tallies[9]}$\\var{frequencies[9]}$
$10${tallies[10]}$\\var{frequencies[10]}$
\n



", "statement": "

A maths test in a Year 7 class of $20$ students was scored out of $10$. The marks awarded to the students were as follows:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$\\var{data[0]}$$\\var{data[1]}$$\\var{data[2]}$$\\var{data[3]}$$\\var{data[4]}$$\\var{data[5]}$$\\var{data[6]}$$\\var{data[7]}$$\\var{data[8]}$$\\var{data[9]}$
$\\var{data[10]}$$\\var{data[11]}$$\\var{data[12]}$$\\var{data[13]}$$\\var{data[14]}$$\\var{data[15]}$$\\var{data[16]}$$\\var{data[17]}$$\\var{data[18]}$$\\var{data[19]}$
", "preamble": {"css": "", "js": ""}, "tags": ["Frequency", "Frequency Table", "frequency table", "Frequency table", "taxonomy"], "parts": [{"variableReplacementStrategy": "originalfirst", "prompt": "

\n

Complete the frequency table for this data.

\n

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
ScoreFrequency
$0$[[0]]
$1$[[1]]
$2$[[2]]
$3$[[3]]
$4$[[4]]
$5$[[5]]
$6$[[6]]
$7$[[7]]
$8$[[8]]
$9$[[9]]
$10$[[10]]
\n

", "gaps": [{"mustBeReducedPC": 0, "marks": 1, "correctAnswerStyle": "plain", "variableReplacementStrategy": "originalfirst", "type": "numberentry", "correctAnswerFraction": false, "maxValue": "{frequencies[0]}", "allowFractions": false, "minValue": "{frequencies[0]}", "mustBeReduced": false, "variableReplacements": [], "showFeedbackIcon": true, "showCorrectAnswer": true, "notationStyles": ["plain", "en", "si-en"], "scripts": {}}, {"mustBeReducedPC": 0, "marks": 1, "correctAnswerStyle": "plain", "variableReplacementStrategy": "originalfirst", "type": "numberentry", "correctAnswerFraction": false, "maxValue": "{frequencies[1]}", "allowFractions": false, "minValue": "{frequencies[1]}", "mustBeReduced": false, "variableReplacements": [], "showFeedbackIcon": true, "showCorrectAnswer": true, "notationStyles": ["plain", "en", "si-en"], "scripts": {}}, {"mustBeReducedPC": 0, "marks": 1, "correctAnswerStyle": "plain", "variableReplacementStrategy": "originalfirst", "type": "numberentry", "correctAnswerFraction": false, "maxValue": "{frequencies[2]}", "allowFractions": false, "minValue": "{frequencies[2]}", "mustBeReduced": false, "variableReplacements": [], "showFeedbackIcon": true, "showCorrectAnswer": true, "notationStyles": ["plain", "en", "si-en"], "scripts": {}}, {"mustBeReducedPC": 0, "marks": 1, "correctAnswerStyle": "plain", "variableReplacementStrategy": "originalfirst", "type": "numberentry", "correctAnswerFraction": false, "maxValue": "{frequencies[3]}", "allowFractions": false, "minValue": "{frequencies[3]}", "mustBeReduced": false, "variableReplacements": [], "showFeedbackIcon": true, "showCorrectAnswer": true, "notationStyles": ["plain", "en", "si-en"], "scripts": {}}, {"mustBeReducedPC": 0, "marks": 1, "correctAnswerStyle": "plain", "variableReplacementStrategy": "originalfirst", "type": "numberentry", "correctAnswerFraction": false, "maxValue": "{frequencies[4]}", "allowFractions": false, "minValue": "{frequencies[4]}", "mustBeReduced": false, "variableReplacements": [], "showFeedbackIcon": true, "showCorrectAnswer": true, "notationStyles": ["plain", "en", "si-en"], "scripts": {}}, {"mustBeReducedPC": 0, "marks": 1, "correctAnswerStyle": "plain", "variableReplacementStrategy": "originalfirst", "type": "numberentry", "correctAnswerFraction": false, "maxValue": "{frequencies[5]}", "allowFractions": false, "minValue": "{frequencies[5]}", "mustBeReduced": false, "variableReplacements": [], "showFeedbackIcon": true, "showCorrectAnswer": true, "notationStyles": ["plain", "en", "si-en"], "scripts": {}}, {"mustBeReducedPC": 0, "marks": 1, "correctAnswerStyle": "plain", "variableReplacementStrategy": "originalfirst", "type": "numberentry", "correctAnswerFraction": false, "maxValue": "{frequencies[6]}", "allowFractions": false, "minValue": "{frequencies[6]}", "mustBeReduced": false, "variableReplacements": [], "showFeedbackIcon": true, "showCorrectAnswer": true, "notationStyles": ["plain", "en", "si-en"], "scripts": {}}, {"mustBeReducedPC": 0, "marks": 1, "correctAnswerStyle": "plain", "variableReplacementStrategy": "originalfirst", "type": "numberentry", "correctAnswerFraction": false, "maxValue": "{frequencies[7]}", "allowFractions": false, "minValue": "{frequencies[7]}", "mustBeReduced": false, "variableReplacements": [], "showFeedbackIcon": true, "showCorrectAnswer": true, "notationStyles": ["plain", "en", "si-en"], "scripts": {}}, {"mustBeReducedPC": 0, "marks": 1, "correctAnswerStyle": "plain", "variableReplacementStrategy": "originalfirst", "type": "numberentry", "correctAnswerFraction": false, "maxValue": "{frequencies[8]}", "allowFractions": false, "minValue": "{frequencies[8]}", "mustBeReduced": false, "variableReplacements": [], "showFeedbackIcon": true, "showCorrectAnswer": true, "notationStyles": ["plain", "en", "si-en"], "scripts": {}}, {"mustBeReducedPC": 0, "marks": 1, "correctAnswerStyle": "plain", "variableReplacementStrategy": "originalfirst", "type": "numberentry", "correctAnswerFraction": false, "maxValue": "{frequencies[9]}", "allowFractions": false, "minValue": "{frequencies[9]}", "mustBeReduced": false, "variableReplacements": [], "showFeedbackIcon": true, "showCorrectAnswer": true, "notationStyles": ["plain", "en", "si-en"], "scripts": {}}, {"mustBeReducedPC": 0, "marks": 1, "correctAnswerStyle": "plain", "variableReplacementStrategy": "originalfirst", "type": "numberentry", "correctAnswerFraction": false, "maxValue": "{frequencies[10]}", "allowFractions": false, "minValue": "{frequencies[10]}", "mustBeReduced": false, "variableReplacements": [], "showFeedbackIcon": true, "showCorrectAnswer": true, "notationStyles": ["plain", "en", "si-en"], "scripts": {}}], "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "type": "gapfill", "marks": 0, "showCorrectAnswer": true}], "variables": {"data": {"name": "data", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "repeat(min(max(precround(normalsample(6,2.5),0),0),10),20)"}, "tallies": {"name": "tallies", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "map(tally(frequencies[x]),x,0..10)"}, "frequencies": {"name": "frequencies", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "map(\nlen(filter(x=j,x,data)),\nj,0..10)"}}, "variablesTest": {"maxRuns": 100, "condition": ""}}, {"name": "Complete a frequency table and find the measures of central tendency", "extensions": ["stats"], "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": "Stanislav Duris", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1590/"}], "tags": ["Frequency Table", "frequency table", "Frequency table", "taxonomy"], "metadata": {"description": "

Given a table of data, calculate the mean, mode and median, and complete a frequency table.

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

30 random students were asked about the number of siblings they have. These are their responses:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$\\var{a[0]}$$\\var{a[1]}$$\\var{a[2]}$$\\var{a[3]}$$\\var{a[4]}$$\\var{a[5]}$$\\var{a[6]}$$\\var{a[7]}$$\\var{a[8]}$$\\var{a[9]}$
$\\var{a[10]}$$\\var{a[11]}$$\\var{a[12]}$$\\var{a[13]}$$\\var{a[14]}$$\\var{a[15]}$$\\var{a[16]}$$\\var{a[17]}$$\\var{a[18]}$$\\var{a[19]}$
$\\var{a[20]}$$\\var{a[21]}$$\\var{a[22]}$$\\var{a[23]}$$\\var{a[24]}$$\\var{a[25]}$$\\var{a[26]}$$\\var{a[27]}$$\\var{a[28]}$$\\var{a[29]}$
\n

", "advice": "

a)

\n

Organising the data in a frequency table helps to make mistakes less likely when calculating statistics from our data, summarising the responses all in one place with fewer numbers.

\n

Each row of the frequency column gives the number of students with the corresponding number of siblings.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
Number of siblingsFrequency
$0$$\\var{freq[0]}$
$1$$\\var{freq[1]}$
$2$$\\var{freq[2]}$
$3$$\\var{freq[3]}$
$4$$\\var{freq[4]}$
$5$$\\var{freq[5]}$
$6$$\\var{freq[6]}$
Total$30$
\n

Always remember to check whether your frequency column adds up to the total (here, it is $30$) to make sure you have not left out any responses.

\n

b)

\n

Mean

\n

The mean number of siblings is the total number of siblings, $\\sum x$, divided by the number of students in the sample, $n$.

\n

\\begin{align}  
\\sum x &= 0 \\times \\var{freq[0]} + 1 \\times \\var{freq[1]} + 2 \\times \\var{freq[2]} + 3 \\times \\var{freq[3]} + 4 \\times \\var{freq[4]} + 5 \\times \\var{freq[5]} + 6 \\times \\var{freq[6]}
\\\\
&= 0 + \\var{1*freq[1]} + \\var{2*freq[2]} + \\var{3*freq[3]} + \\var{4*freq[4]} + \\var{5*freq[5]} + \\var{6*freq[6]} \\\\&= \\var{sum(a)} \\text{.}
\\end{align}

\n

The total number of students $n$ is $30$.

\n

Therefore the mean is

\n

\\begin{align}
\\bar{x} &= \\frac{\\sum x}{n} \\\\
&= \\frac{\\var{sum(a)}}{30} \\\\
&= \\var{mean} \\text{.}
\\end{align}

\n

Rounding the answer to 2 decimal places, we get $\\var{precround(mean, 2)}$.

\n

Mode

\n

The mode is the value with the highest frequency. Here, the mode is $\\var{mode}$ siblings, with frequency $\\var{freq[mode]}$.

\n

Median

\n

The median is the \"middle\" value in the sample, when arranged in numerical order.

\n

Since $n = 30$, we have two middle values in this data (15th and 16th place). We can count from the top of the table until we locate rows where these middle values lie, as the numbers in the table are already sorted by order.

\n

Here, both $15$th and $16$th value lie in the row $\\var{asa[14]}$.Here, the $15$th value lies in the row $\\var{asa[14]}$ while the $16$th value lies in the row $\\var{asa[15]}$.

\n

As $15$th value $= 16$th value $= \\var{asa[14]}$, the median is $\\var{asa[14]}$.As $15$th value $= \\var{asa[14]}$ and $16$th value $= \\var{asa[15]}$, we need to find their mean.

\n

\\[ \\displaystyle \\begin{align} \\frac{\\var{asa[14]} + \\var{asa[15]}}{2} &=  \\frac{\\var{asa[14] + asa[15]}}{2} \\\\&= \\var{median} \\text{.} \\end{align}\\]

\n

This is the median for this data.

\n

", "rulesets": {}, "variables": {"m": {"name": "m", "group": "Final data", "definition": "mode(a)", "description": "", "templateType": "anything"}, "a2": {"name": "a2", "group": "Ungrouped variables", "definition": "shuffle(repeat(random(0..1), 13) + 0 + 2 + 2 + repeat(random(2..3), 10) + repeat(random(4..5), 3) + random(0..6))", "description": "", "templateType": "anything"}, "a1": {"name": "a1", "group": "Ungrouped variables", "definition": "shuffle(repeat(random(0..1), 13) + 0 + 2 + 2 + repeat(random(2..3), 10) + repeat(random(4..5), 3) + random(0..6))", "description": "", "templateType": "anything"}, "modea1": {"name": "modea1", "group": "Ungrouped variables", "definition": "mode(a1)", "description": "", "templateType": "anything"}, "mode": {"name": "mode", "group": "Final data", "definition": "m[0]", "description": "", "templateType": "anything"}, "mean": {"name": "mean", "group": "Final data", "definition": "mean(a)", "description": "", "templateType": "anything"}, "modea2": {"name": "modea2", "group": "Ungrouped variables", "definition": "mode(a2)", "description": "", "templateType": "anything"}, "a3": {"name": "a3", "group": "Ungrouped variables", "definition": "shuffle(repeat(0, 7) + repeat(1, 10) + repeat(2, 5) + repeat(3, 4) + repeat(4, 2) + repeat(5,1) + repeat(6,1))", "description": "", "templateType": "anything"}, "freq": {"name": "freq", "group": "Final data", "definition": "map(\nlen(filter(x=j,x,a)),\nj, 0..6)", "description": "", "templateType": "anything"}, "median": {"name": "median", "group": "Final data", "definition": "median(a)", "description": "", "templateType": "anything"}, "a": {"name": "a", "group": "Final data", "definition": "if(len(modea1) = 1, a1, if(len(modea2) = 1, a2, a3))", "description": "", "templateType": "anything"}, "modea3": {"name": "modea3", "group": "Ungrouped variables", "definition": "mode(a3)", "description": "", "templateType": "anything"}, "asa": {"name": "asa", "group": "Final data", "definition": "sort(a)", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": "1000"}, "ungrouped_variables": ["a1", "modea1", "a2", "modea2", "a3", "modea3"], "variable_groups": [{"name": "Final data", "variables": ["a", "mean", "median", "m", "mode", "freq", "asa"]}], "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": "

Complete the following frequency table:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
Number of siblingsFrequency
$0$[[0]]
$1$[[1]]
$2$[[2]]
$3$[[3]]
$4$[[4]]
$5$[[5]]
$6$[[6]]
Total$30$
\n

", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "0 siblings", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "freq[0]", "maxValue": "freq[0]", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "1 sibling", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "freq[1]", "maxValue": "freq[1]", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "2 siblings", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "freq[2]", "maxValue": "freq[2]", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "3 siblings", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "freq[3]", "maxValue": "freq[3]", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "4 siblings", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "freq[4]", "maxValue": "freq[4]", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "5 siblings", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "freq[5]", "maxValue": "freq[5]", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "6 siblings", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "freq[6]", "maxValue": "freq[6]", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Find the mean, mode and median for this data.

\n

Mean = [[0]]

\n

Mode =  [[1]]

\n

Median =  [[2]]

", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "Mean", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "mean", "maxValue": "mean", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "dp", "precision": "2", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "Mode", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "mode", "maxValue": "mode", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "Median", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "median", "maxValue": "median", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}]}], "name": "Presenting data", "showQuestionGroupNames": false, "percentPass": 0, "metadata": {"description": "

Questions on presenting data in charts or tables.

", "licence": "Creative Commons Attribution 4.0 International"}, "duration": 0, "type": "exam", "contributors": [{"name": "Chris Graham", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/369/"}, {"name": "Lauren Frances Desoysa", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2490/"}], "extensions": ["geogebra", "stats"], "custom_part_types": [], "resources": []}