// Numbas version: finer_feedback_settings {"name": "Construct stem and leaf plot", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variable_groups": [], "variables": {"r": {"templateType": "anything", "group": "Ungrouped variables", "definition": "//number of integers in categories\n shuffle([random(1..4),random(4..5),random(3..5),random(3..5),random(2..4)])", "description": "", "name": "r"}, "v": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(0..4)", "description": "", "name": "v"}, "arr1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "//strips away the leading digit of each number\n map(map(arr[y][p]-10*(y+v),p,0..r[y]-1),y,0..4)", "description": "", "name": "arr1"}, "s": {"templateType": "anything", "group": "Ungrouped variables", "definition": "//one array of numbers which gets shuffled using ss\n flattenint(arr)", "description": "", "name": "s"}, "arr": {"templateType": "anything", "group": "Ungrouped variables", "definition": "//gives the numbers in each category in increasing order\n map(sort(repeat(10*y+random(0..9),r[y-v])),y,v..v+4)", "description": "", "name": "arr"}, "u": {"templateType": "anything", "group": "Ungrouped variables", "definition": "map(map(if(p\n \n STEMLEAF\n $\\var{v}$\n [[0]]\n [[1]]\n [[2]]\n [[3]]\n [[4]]\n \n $\\var{v+1}$\n [[5]]\n [[6]]\n [[7]]\n [[8]]\n [[9]]\n \n $\\var{v+2}$\n [[10]]\n [[11]]\n [[12]]\n [[13]]\n [[14]]\n \n $\\var{v+3}$\n [[15]]\n [[16]]\n [[17]]\n [[18]]\n [[19]]\n \n $\\var{v+4}$\n [[20]]\n [[21]]\n [[22]]\n [[23]]\n [[24]]\n \n \n ", "showCorrectAnswer": true, "marks": 0}], "variablesTest": {"condition": "", "maxRuns": 100}, "statement": "

Construct a stem-and-leaf plot for the following data. Input all numbers into the fields below.

\n

{table([ss],[])}

\n

 NOTE: All 25 fields have to be filled in. Input -1 if there is no number in a field.

\n

 

\n

 

", "tags": ["checked2015", "MAS1403"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "", "licence": "Creative Commons Attribution 4.0 International", "description": "

Given random set of data (between 13 and 23 numbers all less than 100), find their stem-and-leaf plot.

"}, "advice": "

Ordering the data gives:

\n

{table([s],[])}

\n

Splitting into the groups of 10s gives

\n

{table(arr,[])}

\n

Then putting this into stem-and-leaf plot gives

\n

{table(darr1,['STEM'])}

", "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}]}], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}