// Numbas version: finer_feedback_settings {"name": "present value - ordinary perpetuity", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "variables": {"P": {"description": "", "group": "Ungrouped variables", "definition": "C*period[1]/ipadec", "templateType": "anything", "name": "P"}, "C": {"description": "", "group": "Ungrouped variables", "definition": "if(period[1]=365,random(1..10),random(20..300#10))", "templateType": "anything", "name": "C"}, "ipadec": {"description": "", "group": "Ungrouped variables", "definition": "random(0.02..0.10#0.001)", "templateType": "anything", "name": "ipadec"}, "Prounded": {"description": "", "group": "Ungrouped variables", "definition": "precround(P,2)", "templateType": "anything", "name": "Prounded"}, "period": {"description": "", "group": "Ungrouped variables", "definition": "random([random('yearly','annually'),1,'year'],[random('half-yearly','semiannually'),2,'half-year'],['quarterly', 4, 'quarter'],['monthly',12,'month'],['daily', 365,'day'])", "templateType": "anything", "name": "period"}, "ipa": {"description": "", "group": "Ungrouped variables", "definition": "ipadec*100", "templateType": "anything", "name": "ipa"}}, "name": "present value - ordinary perpetuity", "variablesTest": {"condition": "", "maxRuns": 100}, "parts": [{"extendBaseMarkingAlgorithm": true, "gaps": [{"precisionType": "dp", "unitTests": [], "useCustomName": false, "variableReplacements": [], "showFeedbackIcon": true, "correctAnswerStyle": "plain", "minValue": "P", "strictPrecision": true, "customName": "", "precisionMessage": "You have not given your answer to the nearest cent.", "allowFractions": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacementStrategy": "originalfirst", "precisionPartialCredit": 0, "mustBeReduced": false, "extendBaseMarkingAlgorithm": true, "customMarkingAlgorithm": "", "precision": "2", "mustBeReducedPC": 0, "marks": 1, "maxValue": "P", "type": "numberentry", "showPrecisionHint": false, "showCorrectAnswer": true, "scripts": {}, "correctAnswerFraction": false}], "useCustomName": false, "variableReplacements": [], "showFeedbackIcon": true, "sortAnswers": false, "unitTests": [], "customName": "", "marks": 0, "type": "gapfill", "prompt": "
Suppose you want to set up a scholarship or a donation that gives $\\$\\var{C}$ at the end of every {period[2]} forever. If you could invest at $\\var{ipa}\\%$ p.a. compounded {period[0]}, what amount would you need to invest at the start to ensure the cash flow lasts forever.
\n\n$\\$$ [[0]] (to the nearest cent)
", "showCorrectAnswer": true, "scripts": {}, "customMarkingAlgorithm": "", "variableReplacementStrategy": "originalfirst"}], "advice": "You are asked to find the present value of an ordinary perpetuity (since the payments are at the end of each period and last forever). Therefore we will use the ordinary perpetuity formula
\n$\\displaystyle P=\\frac{C}{i}$
\nwhere $P$ is the present value, $C$ is the cash flow per period and $i$ is the interest rate per period.
\nIn our situation we have,
\n$C=\\var{C}$,
\n$i=\\frac{\\var{ipa}\\%}{\\var{period[1]}}=\\frac{\\var{ipadec}}{\\var{period[1]}}$, $i=\\var{ipa}\\%=\\var{ipadec}$,
\nand therefore we have
\n$\\displaystyle P=\\frac{\\var{C}}{\\left(\\simplify[unitDenominator]{{ipadec}/{period[1]}}\\right)}$
\nCalculating this we find
\n$\\begin{align}P&\\approx \\var{P}\\\\&=\\$\\var{Prounded}\\quad \\text{(to the nearest cent)}\\end{align}$
", "variable_groups": [], "metadata": {"description": "Financial maths. Present value of an ordinary perpetuity.", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "extensions": [], "preamble": {"js": "", "css": ""}, "ungrouped_variables": ["period", "ipadec", "ipa", "C", "P", "Prounded"], "rulesets": {}, "tags": [], "statement": "If you are unsure of how to do a question, click on Reveal answers to see the full working. Then, once you understand how to do the question, click on Try another question like this one to start again. Do each question repeatedly to ensure you have mastered it.
", "type": "question", "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}]}]}], "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}]}