// Numbas version: exam_results_page_options {"name": "Percentages: In Context - Revenue of phone providers in Europe", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Percentages: In Context - Revenue of phone providers in Europe", "tags": [], "metadata": {"description": "

Calculating the revenue distribution of two phone providers for different countries in Europe

", "licence": "None specified"}, "statement": "

\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\n\n\n\n\n\n
\n

X-Mobile

\n
\n

Y-Mobile

\n
\n

France

\n
\n

{Fxp} %

\n
\n

{Fyp} %

\n
\n

Spain

\n
\n

{Sxp} %

\n
\n

{Syp} %

\n
Italy\n

{Ixp}  %

\n
\n

{Iyp} %

\n
Germany\n

{Gxp} %

\n
\n

{Gyp} %

\n
Total (Euros)\n

{totalX}

\n
\n

{totalY}

\n
\n

The table above gives the revenue distribution for two companies, X-mobile and Y-mobile. 

", "advice": "

The first thing to check is if there are any obvious answers, without calculating.

Since the total for X-mobile is lower than that for Y-mobile ({totalX} is less than {totalY}), any country in which the X-mobile % is lower than the Y-mobile %, will result in a lower value for X-mobile.  

So we can see that:

\n

In France {France}.
In Spain {Spain}.
In Italy {Italy}.
In Germany {Germany}.

We can select 'false' for countries we know to have lower X-mobile values.

Now just calculate excact values for the countries that require it.  The quickest way to do this is using the formula for percentage, you can type it all into your calculator in one line.

\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\n\n\n\n\n\n\n
\n

X-Mobile

\n
\n

Y-Mobile

\n
\n

France

\n
\n

{Fxp} * 0.01 * {totalX} = {Fxp*0.01*totalX}

\n
\n

{Fyp} * 0.01 * {totalY} = {Fyp*0.01*totaly}

\n
\n

Spain

\n
\n

{Sxp} * 0.01 * {totalX} = {Sxp*0.01*totalX}

\n
\n

{Syp} * 0.01 * {totaly} = {Syp*0.01*totaly}

\n
Italy\n

{Ixp} * 0.01 * {totalX} = {Ixp*0.01*totalX}

\n
\n

{Iyp} * 0.01 * {totaly} = {Iyp*0.01*totaly}

\n
Germany\n

{Gxp} * 0.01 * {totalX} = {Gxp*0.01*totalX}

\n
\n

{Gyp} * 0.01 * {totaly} = {Gyp*0.01*totaly}

\n
Total (Euros)\n

{totalX}

\n
\n

{totalY}

\n
\n


We can now compare the values.

", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"Fx": {"name": "Fx", "group": "Ungrouped variables", "definition": "random(1000..11000 #1000)\n", "description": "", "templateType": "anything", "can_override": false}, "Fy": {"name": "Fy", "group": "Ungrouped variables", "definition": "random(1000..11000 #1000)\n", "description": "", "templateType": "anything", "can_override": false}, "Sx": {"name": "Sx", "group": "Ungrouped variables", "definition": "random(1000..11000 #1000)\n", "description": "", "templateType": "anything", "can_override": false}, "Sy": {"name": "Sy", "group": "Ungrouped variables", "definition": "random(1000..11000 #1000)\n", "description": "

Sy

", "templateType": "anything", "can_override": false}, "Ix": {"name": "Ix", "group": "Ungrouped variables", "definition": "random(1000..11000 #1000)\n", "description": "", "templateType": "anything", "can_override": false}, "Iy": {"name": "Iy", "group": "Ungrouped variables", "definition": "random(1000..11000 #1000)\n", "description": "", "templateType": "anything", "can_override": false}, "Gx": {"name": "Gx", "group": "Ungrouped variables", "definition": "random(1000..11000 #1000)\n", "description": "", "templateType": "anything", "can_override": false}, "Gy": {"name": "Gy", "group": "Ungrouped variables", "definition": "random(1000..11000 #1000)\n", "description": "", "templateType": "anything", "can_override": false}, "total": {"name": "total", "group": "Ungrouped variables", "definition": "totalX + totaly\n", "description": "", "templateType": "anything", "can_override": false}, "totalX": {"name": "totalX", "group": "Ungrouped variables", "definition": "Fx+Sx+Ix+Gx\n", "description": "", "templateType": "anything", "can_override": false}, "Totaly": {"name": "Totaly", "group": "Ungrouped variables", "definition": "Fy+Sy+Iy+Gy", "description": "", "templateType": "anything", "can_override": false}, "Fxp": {"name": "Fxp", "group": "percent", "definition": "precround(fx*100/totalx,1)", "description": "", "templateType": "anything", "can_override": false}, "sxp": {"name": "sxp", "group": "percent", "definition": "precround(sx*100/totalx,1)\n", "description": "", "templateType": "anything", "can_override": false}, "Ixp": {"name": "Ixp", "group": "percent", "definition": "precround(iy*100/totalY,1)", "description": "", "templateType": "anything", "can_override": false}, "gxp": {"name": "gxp", "group": "percent", "definition": "precround(gx*100/totalx,1)\n \n ", "description": "", "templateType": "anything", "can_override": false}, "iyp": {"name": "iyp", "group": "percent", "definition": "precround(iy*100/totalY,1)", "description": "", "templateType": "anything", "can_override": false}, "syp": {"name": "syp", "group": "percent", "definition": "precround(sy*100/totaly,1)", "description": "", "templateType": "anything", "can_override": false}, "gyp": {"name": "gyp", "group": "percent", "definition": "precround(gy*100/totaly,1)", "description": "", "templateType": "anything", "can_override": false}, "fyp": {"name": "fyp", "group": "percent", "definition": "precround(fy*100/totaly,1)", "description": "", "templateType": "anything", "can_override": false}, "France": {"name": "France", "group": "percent", "definition": "if(fxptotalx", "maxRuns": "35"}, "ungrouped_variables": ["Fx", "Fy", "Sx", "Sy", "Ix", "Iy", "Gx", "Gy", "total", "totalX", "Totaly"], "variable_groups": [{"name": "percent", "variables": ["Ixp", "sxp", "Fxp", "gxp", "iyp", "syp", "gyp", "fyp", "France", "Italy", "Spain", "Germany"]}, {"name": "comparisons", "variables": []}], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "m_n_x", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

In which countries does X-Mobile generate more revenue than Y-Mobile?

", "minMarks": 0, "maxMarks": "4", "minAnswers": "4", "maxAnswers": "4", "shuffleChoices": true, "shuffleAnswers": false, "displayType": "radiogroup", "warningType": "none", "showCellAnswerState": true, "markingMethod": "sum ticked cells", "choices": ["France", "Italy", "Spain", "Germany"], "matrix": [["if(fx>fy,1,0)", "if(fx>fy,0,1)"], ["if(ix>iy,1,0)", "if(ix>iy,0,1)"], ["if(sx>sy,1,0)", "if(sxgy,1,0)", "if(gx