// Numbas version: finer_feedback_settings {"name": "SD06 Reading a Histogram", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "SD06 Reading a Histogram", "tags": [], "metadata": {"description": "

Reading a value from a histogram.

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

The histogram shows information about distances run on a Sunday by some randomly asked people in a park. 

\n
\n

", "advice": "

a)

\n

To calculate the frequencies using the following formula:

\n

frequency = class width $\\times$ frequency density 

\n

Hence our table becomes:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
Distance, $km$Frequency 
$0 < t \\leq 10$$10 \\times \\var{yo0} = \\var{freq0}$
$10 < t \\leq 15$$5 \\times \\var{yo1} = \\var{freq1}$
$15 < t \\leq 20$$5 \\times \\var{yo2} = \\var{freq2}$
$20 < t \\leq 30$$10 \\times \\var{yo3} = \\var{freq3}$
\n

Hence, to find the total number of people that ran that day:

\n

$\\var{freq0} + \\var{freq1} + \\var{freq2} + \\var{freq3} = \\var{total}.$

\n

b) 

\n

The frequency of runners that ran less than $10km$ is found by calculating the frequency from the first bar on the histogram:

\n

class width $\\times$ frequency density $= 10 \\times \\var{yo0} = \\var{freq0}$.

\n

c)

\n

The frequency of runners that ran between $15km$ and $20km$ is found by calculating the frequency from the third bar on the histogram:

\n

class width $\\times$ frequency density $= 5 \\times \\var{yo2} = \\var{freq2}$.

\n

d)

\n

To estimate how many runners ran more than $25km$ we need again need to use the frequency = class width \\times frequency density formula.

\n

Here the class width is $5$ because we are looking for the frequency of runners that ran between $25km$ and $30km$ from the college.

\n

Frequency $= 5 \\times \\var{yo3} = \\var{5*yo3}.$

\n

If this number is a decimal we round up to get $\\var{m25}$.

\n

e)

\n

As in part d),to estimate how many runners ran less than $7km$ we use the frequency = class width \\times frequency density formula.

\n

Here the class width is $7$ because we are looking for the frequency of runners that ran between 0 and 7 km.

\n

Frequency $= 7 \\times \\var{yo0} = \\var{7*yo0}.$

\n

If this number is a decimal we round up to get $\\var{l7}$.

\n

f)

\n

To estimate how many runners ran between $5km$ and $12.5km$ we use a method similar to that in part d) and e) but, this time, we need to use information from both the first and second bar on the histogram. 

\n

Let's first calculate how many runners ran between $5km$ and $10km$:

\n

frequency $=$ class width $\\times$ frequency density $= 5 \\times \\var{yo0} = \\var{5*yo0}$.

\n

Now we need to calculate how many runners ran between $10km$ and $12.5km$:

\n

frequency $=$ class width $\\times$ frequency density $= 2.5 \\times \\var{yo1} = \\var{2.5*yo1}$.

\n

Putting this together the number of runners that ran between $5km$ and $12.5km$ is $\\var{5*yo0} + \\var{2.5*yo1} = \\var{5*yo0 + 2.5*yo1}.$

\n

If this number is a decimal we round up to get $\\var{ef}.$

\n

g)

\n

The number of runners that ran between $10km$ and $14km$ is $4 \\times \\var{yo1} = \\var{4*yo1}.$

If this number is a decimal we round up to get $\\var{eh}.$

\n

i)

\n

The number of runners that ran further than $18km$ is:

\n

$2 \\times \\var{yo2} + 10 \\times \\var{yo3} = \\var{2*yo2} + \\var{freq3} = \\var{2*yo2+freq3}.$

If this number is a decimal we round up to get $\\var{ej}.$

\n

Did you get a decimal answer? Were you surprised to see a whole number answer when you got a decimal on one of the estimate questions? Look at the context of the question, you cannot have $0.5$ of a student so we round our answers up to the next whole number!

\n

Use this link to find some resources which will help you revise this topic.

", "rulesets": {"std": ["all", "fractionNumbers"]}, "extensions": ["jsxgraph"], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"yo2": {"name": "yo2", "group": "Ungrouped variables", "definition": "random(1 .. 39#1)", "description": "

Frequency Density

", "templateType": "randrange", "can_override": false}, "yo1": {"name": "yo1", "group": "Ungrouped variables", "definition": "random(1 .. 39#1)", "description": "

Frequency Density

", "templateType": "randrange", "can_override": false}, "yo3": {"name": "yo3", "group": "Ungrouped variables", "definition": "random(1 .. 39#1)", "description": "

Frequency Density

", "templateType": "randrange", "can_override": false}, "selector": {"name": "selector", "group": "Ungrouped variables", "definition": "'vsc'", "description": "", "templateType": "anything", "can_override": false}, "yo0": {"name": "yo0", "group": "Ungrouped variables", "definition": "random(1 .. 39#1)", "description": "

Frequency Density

", "templateType": "randrange", "can_override": false}, "total": {"name": "total", "group": "Ungrouped variables", "definition": "freq0+freq1+freq2+freq3", "description": "

Sum of frequencies

", "templateType": "anything", "can_override": false}, "freq0": {"name": "freq0", "group": "Ungrouped variables", "definition": "10*yo0", "description": "

Frequency

", "templateType": "anything", "can_override": false}, "freq1": {"name": "freq1", "group": "Ungrouped variables", "definition": "yo1*5", "description": "

Frequency

", "templateType": "anything", "can_override": false}, "freq2": {"name": "freq2", "group": "Ungrouped variables", "definition": "5*yo2", "description": "

Frequency

", "templateType": "anything", "can_override": false}, "freq3": {"name": "freq3", "group": "Ungrouped variables", "definition": "10*yo3", "description": "

Frequency

", "templateType": "anything", "can_override": false}, "m25": {"name": "m25", "group": "Ungrouped variables", "definition": "round(5*yo3)", "description": "

How many people ran more than 25km 

", "templateType": "anything", "can_override": false}, "l7": {"name": "l7", "group": "Ungrouped variables", "definition": "round(7*yo0)", "description": "

How many runners ran less than 7km

", "templateType": "anything", "can_override": false}, "Ef": {"name": "Ef", "group": "Ungrouped variables", "definition": "round(5*yo0 + 2.5*yo1)", "description": "

Number of people running between 5 & 12.5 km

", "templateType": "anything", "can_override": false}, "eh": {"name": "eh", "group": "Ungrouped variables", "definition": "round(4*yo1)", "description": "

Number of runners running between 10 & 14km

", "templateType": "anything", "can_override": false}, "ej": {"name": "ej", "group": "Ungrouped variables", "definition": "round(2*yo2 + freq3)", "description": "

Number of runners running more than 18km

", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["selector", "yo0", "yo1", "yo2", "yo3", "total", "freq0", "freq1", "freq2", "freq3", "m25", "l7", "Ef", "eh", "ej"], "variable_groups": [], "functions": {}, "preamble": {"js": "function dragpoint_board() {\n var scope = question.scope;\n\n JXG.Options.text.display = 'internal';\n \n var yo0 = scope.variables.yo0.value;\n var yo1 = scope.variables.yo1.value;\n var yo2 = scope.variables.yo2.value;\n var yo3 = scope.variables.yo3.value;\n \n var div = Numbas.extensions.jsxgraph.makeBoard('550px','550px',{boundingBox:[-5,42,35,-5], axis:false, grid:true});\n \n question.display.html.querySelector('#dragpoint').append(div);\n \n var board = div.board;\n \nboard.suspendUpdate(); \n\n var dataArr = [yo0,0,yo1,0,yo2,0,yo3]; \n \n var xaxis = board.create('axis', [[0, 0], [12, 0]], {withLabel: true, name: \"Distance, km\", label: {offset: [250,-30]}});\n \n var yaxis = board.create('axis', [[0, 0], [0, 10]], {hideTicks:true, withLabel: true, name: \"Frequency Density\", label: {rotation: 90, offset: [-60,300]}});\n// var yaxis = board.create('axis', [[0, 0], [0, 10]], {hideTicks:true, withLabel: false, name: \"Frequency Density\", label: {rotation: 90, offset: [-60,300]}});\n//var Rot board.create('transform',[Math.PI/2,0,5],{type:'rotate'});\n// var ylabel = board.create('text', [0,5,\"Frequency Density\"], {label: {rotation: 90}});\n// Rot.bindTo(ylabel);\n// board.update();\n\n \n var a = board.create('chart', [[5,10],[yo0,0]], {chartStyle:'bar',colors:['#76ba1e'],width:10,fillOpacity:0.4});\n var b = board.create('chart', [[12.5,15],[yo1,0]], {chartStyle:'bar',width:5,colors:['#89CFF0'],fillOpacity:0.4});\n var c = board.create('chart', [[17.5,20],[yo2,0]], {chartStyle:'bar',width:5,colors:['#76ba1e'],fillOpacity:0.4});\n var d = board.create('chart', [[25,30],[yo3,0]], {chartStyle:'bar',width:10,colors:['#89CFF0'],fillOpacity:0.4});\n \n}\n\nquestion.signals.on('HTMLAttached',function() {\n dragpoint_board();\n});", "css": "table#values th {\n background: none;\n text-align: center;\n}"}, "parts": [{"type": "numberentry", "useCustomName": true, "customName": "a)", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

How many people were asked about the distance they ran that day?

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

How many runners ran less than 10 km that day?

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

How many people ran between 10 and 15 km that day?

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

Estimate how many runners ran more than 25 km that day?

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

Estimate how many runners ran less than 7 km that day?

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

Estimate how many people ran between 5 km and 12.5 km.

", "minValue": "Ef", "maxValue": "Ef", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Gareth Woods", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/978/"}, {"name": "Ruth Hand", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3228/"}, {"name": "Mash Sheffield", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4679/"}, {"name": "Lauren Desoysa", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/21504/"}, {"name": "Megan Oliver", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/23526/"}], "resources": []}]}], "contributors": [{"name": "Gareth Woods", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/978/"}, {"name": "Ruth Hand", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3228/"}, {"name": "Mash Sheffield", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4679/"}, {"name": "Lauren Desoysa", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/21504/"}, {"name": "Megan Oliver", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/23526/"}]}