// Numbas version: exam_results_page_options {"name": "Numerical reasoning - data table", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {"pretendinput": {"definition": "return $('').attr('value',val);", "type": "html", "parameters": [["val", "number"]], "language": "javascript"}}, "ungrouped_variables": ["alphas", "biggest3to4", "biggestpercent4to5", "deltas", "deltatranspose", "diffs1to5", "incomes", "names", "originalnames", "percents1to4", "percents4to5", "smallest1to5", "smallestpercent1to4", "q"], "name": "Numerical reasoning - data table", "tags": ["data table", "maths-aid", "numerical reasoning", "percentage"], "type": "question", "advice": "", "rulesets": {}, "parts": [{"stepsPenalty": 0, "displayColumns": 0, "prompt": "

Which industry had the largest increase in the euro amount of income from Year 3 to Year 4?

", "matrix": ["if(deltas[2][0]=biggest3to4,1,0)", "if(deltas[2][1]=biggest3to4,1,0)", "if(deltas[2][2]=biggest3to4,1,0)", "if(deltas[2][3]=biggest3to4,1,0)", "if(deltas[2][4]=biggest3to4,1,0)", "if(deltas[2][5]=biggest3to4,1,0)"], "shuffleChoices": false, "scripts": {}, "choices": ["{names[0]}", "{names[1]}", "{names[2]}", "{names[3]}", "{names[4]}", "{names[5]}"], "marks": 0, "displayType": "radiogroup", "maxMarks": 0, "distractors": ["", "", "", "", "", ""], "steps": [{"type": "information", "showCorrectAnswer": true, "marks": 0, "prompt": "

For example, {names[0]} had an increase of $\\simplify[]{{incomes[0][3]} - {incomes[0][2]} = {deltas[2][0]}}$ billion euros from year 3 to year 4.

\n

Write the increase for each industry (in billions of euros) and find the largest:

\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
{names[0]}increase = {pretendinput(deltas[2][0])} billion euros
{names[1]}increase = [[0]] billion euros
{names[2]}increase = [[1]] billion euros
{names[3]}increase = [[2]] billion euros
{names[4]}increase = [[3]] billion euros
{names[5]}increase = [[4]] billion euros
", "scripts": {}}], "showCorrectAnswer": true, "type": "1_n_2", "minMarks": 0}, {"stepsPenalty": 0, "displayColumns": 0, "prompt": "

{table(map([names[j]]+incomes[j],j,0..5),['Industry','Year 1','Year 2','Year 3','Year 4','Year 5'])}

\n

Which country had the smallest increase in the euro amount of income from Year 1 to Year 5?

", "matrix": ["if(diffs1to5[0]=smallest1to5,1,0)", "if(diffs1to5[1]=smallest1to5,1,0)", "if(diffs1to5[2]=smallest1to5,1,0)", "if(diffs1to5[3]=smallest1to5,1,0)", "if(diffs1to5[4]=smallest1to5,1,0)", "if(diffs1to5[5]=smallest1to5,1,0)"], "shuffleChoices": false, "scripts": {}, "choices": ["{names[0]}", "{names[1]}", "{names[2]}", "{names[3]}", "{names[4]}", "{names[5]}"], "marks": 0, "displayType": "radiogroup", "maxMarks": 0, "distractors": ["", "", "", "", "", ""], "steps": [{"type": "information", "showCorrectAnswer": true, "marks": 0, "prompt": "

For example, {names[0]} had an increase of $\\simplify[]{{incomes[0][4]}-{incomes[0][0]} = {diffs1to5[0]}}$ billion euros from year 1 to year 5.

\n

Write the increase for each industry (in billions of euros) and find the smallest:

\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
{names[0]}increase = {pretendinput(diffs1to5[0])} billion euros
{names[1]}increase = [[0]] billion euros
{names[2]}increase = [[1]] billion euros
{names[3]}increase = [[2]] billion euros
{names[4]}increase = [[3]] billion euros
{names[5]}increase = [[4]] billion euros
", "scripts": {}}], "showCorrectAnswer": true, "type": "1_n_2", "minMarks": 0}, {"stepsPenalty": 0, "displayColumns": 0, "prompt": "

{table(map([names[j]]+incomes[j],j,0..5),['Industry','Year 1','Year 2','Year 3','Year 4','Year 5'])}

\n

Which industry experienced the largest percentage increase from Year 4 to Year 5?

", "matrix": ["if(percents4to5[0]=biggestpercent4to5,1,0)", "if(percents4to5[1]=biggestpercent4to5,1,0)", "if(percents4to5[2]=biggestpercent4to5,1,0)", "if(percents4to5[3]=biggestpercent4to5,1,0)", "if(percents4to5[4]=biggestpercent4to5,1,0)", "if(percents4to5[5]=biggestpercent4to5,1,0)"], "shuffleChoices": false, "scripts": {}, "choices": ["{names[0]}", "{names[1]}", "{names[2]}", "{names[3]}", "{names[4]}", "{names[5]}"], "marks": 0, "displayType": "radiogroup", "maxMarks": 0, "distractors": ["", "", "", "", "", ""], "steps": [{"type": "information", "showCorrectAnswer": true, "marks": 0, "prompt": "

This means that you have to work out the increase from year 4 to year 5 as a percentage of the income in year 4 for each industry and find the biggest percentage increase.

\n

For example, {names[1]} had an increase of {deltas[3][1]} billion euros from {incomes[1][3]} in year 4 to year 5. The percentage increase was therefore

\n

\\[ \\frac{\\var{deltas[3][1]}}{\\var{incomes[1][3]}} \\times 100\\% = \\var{precround(percents4to5[1],2)}\\% \\]

\n

to two decimal places.

\n

(Calculating to one decimal place would probably have been enough - but it's possible that there are two industries with the same percentage increase to one decimal place.)

\n

Find the percentage increase (in billions of euros) and find the largest

\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
{names[0]}% increase = [[0]]%
{names[1]}% increase = {pretendinput(precround(percents4to5[1],2))}%
{names[2]}% increase = [[1]]%
{names[3]}% increase = [[2]]%
{names[4]}% increase = [[3]]%
{names[5]}% increase = [[4]]%
", "scripts": {}}], "showCorrectAnswer": true, "type": "1_n_2", "minMarks": 0}, {"stepsPenalty": 0, "displayColumns": 0, "prompt": "

{table(map([names[j]]+incomes[j],j,0..5),['Industry','Year 1','Year 2','Year 3','Year 4','Year 5'])}

\n

Which industry had the least percentage change from Year 1 to Year 4?

", "matrix": ["if(percents1to4[0]=smallestpercent1to4,1,0)", "if(percents1to4[1]=smallestpercent1to4,1,0)", "if(percents1to4[2]=smallestpercent1to4,1,0)", "if(percents1to4[3]=smallestpercent1to4,1,0)", "if(percents1to4[4]=smallestpercent1to4,1,0)", "if(percents1to4[5]=smallestpercent1to4,1,0)"], "shuffleChoices": false, "scripts": {}, "choices": ["{names[0]}", "{names[1]}", "{names[2]}", "{names[3]}", "{names[4]}", "{names[5]}"], "marks": 0, "displayType": "radiogroup", "maxMarks": 0, "distractors": ["", "", "", "", "", ""], "steps": [{"type": "information", "showCorrectAnswer": true, "marks": 0, "prompt": "

This means that you have to work out the increase from year 1 to year 4 as a percentage of the income in year 1 for each industry and find the smallest percentage increase.

\n

For example, {names[4]} had an increase of $\\simplify[]{{incomes[4][3]}-{incomes[4][0]} = {incomes[4][3]-incomes[4][0]}}$ billion euros from {incomes[4][0]} billion euros in year 1 to {incomes[4][3]} billion euros in year 4. The percentage increase was therefore

\n

\\[ \\frac{\\var{incomes[4][3]-incomes[4][0]}}{\\var{incomes[4][0]}} \\times 100\\% = \\var{precround(percents1to4[4],2)}\\% \\]

\n

to two decimal places.

\n

(Once again taking the percentage to two decimal places to be on the safe side.)

\n

Find the percentage change for each industry and find the least

\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
{names[0]}% increase = [[0]]%
{names[1]}% increase = [[1]]%
{names[2]}% increase = [[2]]%
{names[3]}% increase = [[3]]%
{names[4]}% increase = {pretendinput(precround(percents1to4[4],2))}%
{names[5]}% increase = [[4]]%
", "scripts": {}}], "showCorrectAnswer": true, "type": "1_n_2", "minMarks": 0}], "statement": "

The following table describes the income of various industries over a five year period. 

\n

Income of industries (in billions of euros)

\n

{table(map([names[j]]+incomes[j],j,0..5),['Industry','Year 1','Year 2','Year 3','Year 4','Year 5'])}

\n

There are four parts to this question; click on the Show steps button if you need help with any part.

", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "preamble": {"css": "", "js": ""}, "variables": {"biggest3to4": {"definition": "max(deltas[2])", "templateType": "anything", "group": "Ungrouped variables", "name": "biggest3to4", "description": ""}, "alphas": {"definition": "repeat(random(10..200),6)", "templateType": "anything", "group": "Ungrouped variables", "name": "alphas", "description": ""}, "originalnames": {"definition": "['Financial Services','Telecommunications','Engineering','Agriculture','Manufacturing','Transportation','Computing','Utilities','Retail']", "templateType": "anything", "group": "Ungrouped variables", "name": "originalnames", "description": ""}, "deltas": {"definition": "//differences in income for each year. \n //[i,j] is industry j's delta for year i\n repeat(deal(20)[0..6],4)", "templateType": "anything", "group": "Ungrouped variables", "name": "deltas", "description": ""}, "incomes": {"definition": "map(map(alphas[j]+sum(deltatranspose[j][0..k]),k,0..4),j,0..5)", "templateType": "anything", "group": "Ungrouped variables", "name": "incomes", "description": ""}, "smallestpercent1to4": {"definition": "min(percents1to4)", "templateType": "anything", "group": "Ungrouped variables", "name": "smallestpercent1to4", "description": ""}, "diffs1to5": {"definition": "map(sum(deltatranspose[j]),j,0..5)", "templateType": "anything", "group": "Ungrouped variables", "name": "diffs1to5", "description": ""}, "q": {"definition": "join(percents1to4,',')", "templateType": "anything", "group": "Ungrouped variables", "name": "q", "description": ""}, "percents4to5": {"definition": "map(100*(income[4]/income[3]-1),income,incomes)", "templateType": "anything", "group": "Ungrouped variables", "name": "percents4to5", "description": ""}, "names": {"definition": "shuffle(originalnames)[0..6]", "templateType": "anything", "group": "Ungrouped variables", "name": "names", "description": ""}, "deltatranspose": {"definition": "//rows are each industry's deltas, so they can be summed more easily\n list(transpose(matrix(deltas)))", "templateType": "anything", "group": "Ungrouped variables", "name": "deltatranspose", "description": ""}, "percents1to4": {"definition": "map(100*(income[3]/income[0]-1),income,incomes)", "templateType": "anything", "group": "Ungrouped variables", "name": "percents1to4", "description": ""}, "biggestpercent4to5": {"definition": "max(percents4to5)", "templateType": "anything", "group": "Ungrouped variables", "name": "biggestpercent4to5", "description": ""}, "smallest1to5": {"definition": "min(diffs1to5)", "templateType": "anything", "group": "Ungrouped variables", "name": "smallest1to5", "description": ""}}, "metadata": {"notes": "

Incomes are generated as follows:

\n ", "description": "

Following part 2, \"Questions on Data Tables\", from the Maths Aid workbook \"Numerical reasoning tests\".

\n

Only doing the first 4 questions because the others involve trends that need lots more thinking about how to randomise.

\n

Not finished!

", "licence": "Creative Commons Attribution 4.0 International"}, "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}]}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}]}