// Numbas version: exam_results_page_options {"name": "Calculate CPA", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Calculate CPA", "tags": [], "metadata": {"description": "
Given potential audience, the percentage that view, and the percentage of these that click, calculate the CPA by dividing potential audience by clickers.
\nAll numbers randomised.
", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "A digital advertising campaign has a budget of \\${separateThousands(budget,\",\")}.
\nThe potential audience size is {separateThousands(pa,\",\")}.
\nThe campaign is expected to reach {percent}% of the potential audience.
\nIt is expected that {buypercent}% of viewers will click on the ad to go to the advertiser's website.
", "advice": "Number of viewers = {percent}% $\\times$ {separateThousands(pa,\",\")} = {separateThousands(viewers,\",\")}
\nNumber of clickers = {buypercent}% $\\times$ {separateThousands(viewers,\",\")} = {separateThousands(clickers,\",\")}
\nCost per acquisition = $\\frac{\\var{separateThousands(budget,\",\")}}{\\var{separateThousands(clickers,\",\")}} = \\$\\var{precround(CPA,2)}$
", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"budget": {"name": "budget", "group": "Ungrouped variables", "definition": "random(1,20)*100000", "description": "", "templateType": "anything", "can_override": false}, "pa": {"name": "pa", "group": "Ungrouped variables", "definition": "random(5..50)*100000", "description": "", "templateType": "anything", "can_override": false}, "percent": {"name": "percent", "group": "Ungrouped variables", "definition": "random(3..6)*10", "description": "", "templateType": "anything", "can_override": false}, "buypercent": {"name": "buypercent", "group": "Ungrouped variables", "definition": "random(0.5,1,1.5,2)", "description": "", "templateType": "anything", "can_override": false}, "viewers": {"name": "viewers", "group": "Ungrouped variables", "definition": "pa*percent/100", "description": "", "templateType": "anything", "can_override": false}, "clickers": {"name": "clickers", "group": "Ungrouped variables", "definition": "viewers*buypercent/100", "description": "", "templateType": "anything", "can_override": false}, "CPA": {"name": "CPA", "group": "Ungrouped variables", "definition": "budget/clickers", "description": "", "templateType": "anything", "can_override": false}, "CPAfloor": {"name": "CPAfloor", "group": "Ungrouped variables", "definition": "precround(CPA,2)-0.01", "description": "", "templateType": "anything", "can_override": false}, "CPAceil": {"name": "CPAceil", "group": "Ungrouped variables", "definition": "precround(CPA,2)+0.01", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["budget", "pa", "percent", "buypercent", "viewers", "clickers", "CPA", "CPAfloor", "CPAceil"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "How many targeted people are expected to view the ad?
", "minValue": "viewers", "maxValue": "viewers", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "How many people are expected to click on the ad?
", "minValue": "clickers", "maxValue": "clickers", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "gapfill", "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": "What was the average cost to acquire each one of these viewers (to get them to visit the advertiser's website)?
\nRound your answer to the nearest cent.
\n$[[0]]
", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "CPAfloor", "maxValue": "CPAceil", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Susan McGlynn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2148/"}, {"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}]}]}], "contributors": [{"name": "Susan McGlynn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2148/"}, {"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}]}