// Numbas version: finer_feedback_settings {"name": "Scatter plot", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {"drawgraph": {"definition": " var miny = Numbas.jme.unwrapValue(scope.variables.miny);\n var maxy = Numbas.jme.unwrapValue(scope.variables.maxy);\n var minx = Numbas.jme.unwrapValue(scope.variables.minx);\n var maxx = Numbas.jme.unwrapValue(scope.variables.maxx);\n var regy1 = Numbas.jme.unwrapValue(scope.variables.regy1);\n var regy2 = Numbas.jme.unwrapValue(scope.variables.regy2);\n\n var p1x = Numbas.jme.unwrapValue(scope.variables.p1x);\n var p1y = Numbas.jme.unwrapValue(scope.variables.p1y);\n var p2x = Numbas.jme.unwrapValue(scope.variables.p2x);\n var p2y= Numbas.jme.unwrapValue(scope.variables.p2y);\n var p3x = Numbas.jme.unwrapValue(scope.variables.p3x);\n var p3y= Numbas.jme.unwrapValue(scope.variables.p3y);\n var p4x = Numbas.jme.unwrapValue(scope.variables.p4x);\n var p4y= Numbas.jme.unwrapValue(scope.variables.p4y);\n var p5x = Numbas.jme.unwrapValue(scope.variables.p5x);\n var p5y= Numbas.jme.unwrapValue(scope.variables.p5y);\n var p6x = Numbas.jme.unwrapValue(scope.variables.p6x);\n var p6y= Numbas.jme.unwrapValue(scope.variables.p6y);\n \n var div = Numbas.extensions.jsxgraph.makeBoard('400px','400px',\n {boundingBox:[minx,maxy,maxx,miny],\n axis:false,\n showNavigation:false,\n grid:true});\n var brd = div.board; \n var xaxis=brd.createElement('axis', [[minx,0],[maxx,0]]);\n var yaxis=brd.createElement('axis', [[minx+5,miny],[minx+5,maxy]]);\n var li1=brd.create('line',[[minx,regy1],[maxx,regy2]],{fixed:true,withLabel:false});\n var pt1=brd.create('point',[p1x,p1y],{visible:true,withLabel:false}); \n var pt2=brd.create('point',[p2x,p2y],{visible:true,withLabel:false}); \n var pt3=brd.create('point',[p3x,p3y],{visible:true,withLabel:false}); \n var pt4=brd.create('point',[p4x,p4y],{visible:true,withLabel:false}); \n var pt5=brd.create('point',[p5x,p5y],{visible:true,withLabel:false}); \n var pt6=brd.create('point',[p6x,p6y],{visible:true,withLabel:false}); \nreturn div;\n ", "type": "html", "language": "javascript", "parameters": []}}, "ungrouped_variables": [], "name": "Scatter plot", "tags": [], "preamble": {"css": "", "js": ""}, "advice": "", "rulesets": {}, "parts": [{"prompt": "

What is the height of the tallest person in the sample?

\n

Answer: [[0]] cm

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

What is the maximum difference in time taken to walk to work for people in the sample?

\n

Answer: [[0]] minutes

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

Mark the statement that best describes what this scatter plot shows.

", "matrix": ["0", "1", 0, "1", 0, 0], "shuffleChoices": false, "variableReplacements": [], "choices": ["

In general, there is a positive correlation between a person's height and how long it takes them to walk to work.

", "

There is a positive correlation between the variables for the sample.

", "

In general, there is a negative correlation between a person's height and how long it takes them to walk to work.

", "

There is a negative correlation between the variables for the sample.

", "

In general, there is a no correlation between a person's height and how long it takes them to walk to work.

", "

There is a no correlation between the variables for the sample.

"], "variableReplacementStrategy": "originalfirst", "maxMarks": 0, "distractors": ["", "", "", "", "", ""], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "1_n_2", "displayType": "radiogroup", "minMarks": 0}], "extensions": ["jsxgraph"], "statement": "

The scatter plot below shows the relationship between an employee’s height in centimetres and how long it takes them to walk to work in minutes.

\n\n\n\n\n\n\n\n\n\n\n\n
time (mins){drawgraph()}
height (cm)
\n

\n

\n

\n

", "variable_groups": [{"variables": ["minx", "maxx", "miny", "maxy"], "name": "Graph Limits"}, {"variables": ["p1x", "p1y", "p2x", "p2y", "p3x", "p3y", "p4x", "p4y", "p5x", "p5y", "p6x", "p6y"], "name": "Points"}, {"variables": ["tallest", "timemax", "timemin", "timediff"], "name": "Calculation variables"}, {"variables": ["sumx", "sumy", "sumxy", "sumxx", "slope", "yintercept", "regy1", "regy2", "roundedslope"], "name": "Regression variables"}], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"slope": {"definition": "(6*sumxy-sumx*sumy)/(6*sumxx-(sumx)^2)", "templateType": "anything", "group": "Regression variables", "name": "slope", "description": "

s

"}, "timemax": {"definition": "max([p1y,p2y,p3y,p4y,p5y,p6y])", "templateType": "anything", "group": "Calculation variables", "name": "timemax", "description": ""}, "minx": {"definition": "140", "templateType": "anything", "group": "Graph Limits", "name": "minx", "description": ""}, "miny": {"definition": "-10", "templateType": "anything", "group": "Graph Limits", "name": "miny", "description": ""}, "p3x": {"definition": "random(166..175)", "templateType": "anything", "group": "Points", "name": "p3x", "description": ""}, "p3y": {"definition": "random(26..35)", "templateType": "anything", "group": "Points", "name": "p3y", "description": ""}, "p5x": {"definition": "random(146..155 except p1x)", "templateType": "anything", "group": "Points", "name": "p5x", "description": ""}, "p5y": {"definition": "random(6..15)", "templateType": "anything", "group": "Points", "name": "p5y", "description": ""}, "p1x": {"definition": "random(146..155)", "templateType": "anything", "group": "Points", "name": "p1x", "description": ""}, "p1y": {"definition": "random(6..15)", "templateType": "anything", "group": "Points", "name": "p1y", "description": ""}, "timediff": {"definition": "timemax-timemin", "templateType": "anything", "group": "Calculation variables", "name": "timediff", "description": ""}, "maxx": {"definition": "188", "templateType": "anything", "group": "Graph Limits", "name": "maxx", "description": ""}, "maxy": {"definition": "63", "templateType": "anything", "group": "Graph Limits", "name": "maxy", "description": ""}, "roundedslope": {"definition": "precround(slope,2)", "templateType": "anything", "group": "Regression variables", "name": "roundedslope", "description": ""}, "yintercept": {"definition": "(sumy-slope*sumx)/6", "templateType": "anything", "group": "Regression variables", "name": "yintercept", "description": ""}, "timemin": {"definition": "min([p1y,p2y,p3y,p4y,p5y,p6y])", "templateType": "anything", "group": "Calculation variables", "name": "timemin", "description": ""}, "tallest": {"definition": "max([p1x,p2x,p3x,p4x,p5x,p6x])", "templateType": "anything", "group": "Calculation variables", "name": "tallest", "description": ""}, "regy1": {"definition": "slope*minx+yintercept", "templateType": "anything", "group": "Regression variables", "name": "regy1", "description": ""}, "regy2": {"definition": "slope*maxx+yintercept", "templateType": "anything", "group": "Regression variables", "name": "regy2", "description": ""}, "sumy": {"definition": "p1y+p2y+p3y+p4y+p5y+p6y", "templateType": "anything", "group": "Regression variables", "name": "sumy", "description": ""}, "sumx": {"definition": "p1x+p2x+p3x+p4x+p5x+p6x", "templateType": "anything", "group": "Regression variables", "name": "sumx", "description": ""}, "p6y": {"definition": "random(46..55)", "templateType": "anything", "group": "Points", "name": "p6y", "description": "

p6y

"}, "p6x": {"definition": "random(176..185 except p4x)", "templateType": "anything", "group": "Points", "name": "p6x", "description": ""}, "p4y": {"definition": "random(36..45)", "templateType": "anything", "group": "Points", "name": "p4y", "description": ""}, "p4x": {"definition": "random(176..185)", "templateType": "anything", "group": "Points", "name": "p4x", "description": ""}, "p2y": {"definition": "random(16..25)", "templateType": "anything", "group": "Points", "name": "p2y", "description": ""}, "p2x": {"definition": "random(156..165)", "templateType": "anything", "group": "Points", "name": "p2x", "description": ""}, "sumxx": {"definition": "p1x^2+p2x^2+p3x^2+p4x^2+p5x^2+p6x^2", "templateType": "anything", "group": "Regression variables", "name": "sumxx", "description": ""}, "sumxy": {"definition": "p1x*p1y+p2x*p2y+p3x*p3y+p4x*p4y+p5x*p5y+p6x*p6y", "templateType": "anything", "group": "Regression variables", "name": "sumxy", "description": ""}}, "metadata": {"description": "

Tests understanding of scatter plots and related concepts.

", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "contributors": [{"name": "Richard Miles", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/882/"}]}]}], "contributors": [{"name": "Richard Miles", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/882/"}]}