// Numbas version: finer_feedback_settings {"name": "Morten's copy of 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": {"type": "html", "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 ", "language": "javascript", "parameters": []}}, "variablesTest": {"maxRuns": 100, "condition": ""}, "extensions": ["jsxgraph"], "metadata": {"description": "
Tests understanding of scatter plots and related concepts.
", "licence": "Creative Commons Attribution 4.0 International"}, "rulesets": {}, "ungrouped_variables": [], "advice": "", "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.
\ntime (mins) | \n{drawgraph()} | \n
\n | height (cm) | \n
What is the height of the tallest person in the sample?
\nAnswer: [[0]] cm
", "variableReplacements": [], "type": "gapfill", "gaps": [{"minValue": "tallest", "type": "numberentry", "integerPartialCredit": 0, "allowFractions": false, "maxValue": "tallest", "showCorrectAnswer": true, "integerAnswer": true, "scripts": {}, "variableReplacements": [], "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacementStrategy": "originalfirst", "correctAnswerStyle": "plain", "marks": 1}], "variableReplacementStrategy": "originalfirst", "scripts": {}, "marks": 0}, {"showCorrectAnswer": true, "prompt": "What is the maximum difference in time taken to walk to work for people in the sample?
\nAnswer: [[0]] minutes
", "variableReplacements": [], "type": "gapfill", "gaps": [{"minValue": "timediff-1", "type": "numberentry", "allowFractions": false, "maxValue": "timediff+1", "showCorrectAnswer": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain", "variableReplacements": [], "correctAnswerFraction": false, "variableReplacementStrategy": "originalfirst", "scripts": {}, "marks": 1}], "variableReplacementStrategy": "originalfirst", "scripts": {}, "marks": 0}, {"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.
"], "minMarks": 0, "distractors": ["", "", "", "", "", ""], "shuffleChoices": false, "type": "1_n_2", "displayColumns": 0, "prompt": "Mark the statement that best describes what this scatter plot shows.
", "maxMarks": 0, "matrix": ["0", "1", 0, "1", 0, 0], "displayType": "radiogroup", "variableReplacements": [], "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "scripts": {}, "marks": 0}], "variables": {"p6x": {"description": "", "definition": "random(176..185 except p4x)", "group": "Points", "templateType": "anything", "name": "p6x"}, "roundedslope": {"description": "", "definition": "precround(slope,2)", "group": "Regression variables", "templateType": "anything", "name": "roundedslope"}, "regy2": {"description": "", "definition": "slope*maxx+yintercept", "group": "Regression variables", "templateType": "anything", "name": "regy2"}, "slope": {"description": "s
", "definition": "(6*sumxy-sumx*sumy)/(6*sumxx-(sumx)^2)", "group": "Regression variables", "templateType": "anything", "name": "slope"}, "yintercept": {"description": "", "definition": "(sumy-slope*sumx)/6", "group": "Regression variables", "templateType": "anything", "name": "yintercept"}, "p5x": {"description": "", "definition": "random(146..155 except p1x)", "group": "Points", "templateType": "anything", "name": "p5x"}, "timemin": {"description": "", "definition": "min([p1y,p2y,p3y,p4y,p5y,p6y])", "group": "Calculation variables", "templateType": "anything", "name": "timemin"}, "sumxy": {"description": "", "definition": "p1x*p1y+p2x*p2y+p3x*p3y+p4x*p4y+p5x*p5y+p6x*p6y", "group": "Regression variables", "templateType": "anything", "name": "sumxy"}, "timediff": {"description": "", "definition": "timemax-timemin", "group": "Calculation variables", "templateType": "anything", "name": "timediff"}, "p1x": {"description": "", "definition": "random(146..155)", "group": "Points", "templateType": "anything", "name": "p1x"}, "sumx": {"description": "", "definition": "p1x+p2x+p3x+p4x+p5x+p6x", "group": "Regression variables", "templateType": "anything", "name": "sumx"}, "p2x": {"description": "", "definition": "random(156..165)", "group": "Points", "templateType": "anything", "name": "p2x"}, "sumxx": {"description": "", "definition": "p1x^2+p2x^2+p3x^2+p4x^2+p5x^2+p6x^2", "group": "Regression variables", "templateType": "anything", "name": "sumxx"}, "maxy": {"description": "", "definition": "63", "group": "Graph Limits", "templateType": "anything", "name": "maxy"}, "p4y": {"description": "", "definition": "random(36..45)", "group": "Points", "templateType": "anything", "name": "p4y"}, "p3y": {"description": "", "definition": "random(26..35)", "group": "Points", "templateType": "anything", "name": "p3y"}, "regy1": {"description": "", "definition": "slope*minx+yintercept", "group": "Regression variables", "templateType": "anything", "name": "regy1"}, "p1y": {"description": "", "definition": "random(6..15)", "group": "Points", "templateType": "anything", "name": "p1y"}, "p2y": {"description": "", "definition": "random(16..25)", "group": "Points", "templateType": "anything", "name": "p2y"}, "sumy": {"description": "", "definition": "p1y+p2y+p3y+p4y+p5y+p6y", "group": "Regression variables", "templateType": "anything", "name": "sumy"}, "maxx": {"description": "", "definition": "188", "group": "Graph Limits", "templateType": "anything", "name": "maxx"}, "p6y": {"description": "p6y
", "definition": "random(46..55)", "group": "Points", "templateType": "anything", "name": "p6y"}, "p4x": {"description": "", "definition": "random(176..185)", "group": "Points", "templateType": "anything", "name": "p4x"}, "miny": {"description": "", "definition": "-10", "group": "Graph Limits", "templateType": "anything", "name": "miny"}, "timemax": {"description": "", "definition": "max([p1y,p2y,p3y,p4y,p5y,p6y])", "group": "Calculation variables", "templateType": "anything", "name": "timemax"}, "p5y": {"description": "", "definition": "random(6..15)", "group": "Points", "templateType": "anything", "name": "p5y"}, "minx": {"description": "", "definition": "140", "group": "Graph Limits", "templateType": "anything", "name": "minx"}, "tallest": {"description": "", "definition": "max([p1x,p2x,p3x,p4x,p5x,p6x])", "group": "Calculation variables", "templateType": "anything", "name": "tallest"}, "p3x": {"description": "", "definition": "random(166..175)", "group": "Points", "templateType": "anything", "name": "p3x"}}, "tags": [], "name": "Morten's copy of Scatter plot", "type": "question", "contributors": [{"name": "Morten Brekke", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/478/"}]}]}], "contributors": [{"name": "Morten Brekke", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/478/"}]}