// Numbas version: exam_results_page_options {"name": "Patricia's copy of cash flow amount - annuity due", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Patricia's copy of cash flow amount - annuity due", "tags": [], "metadata": {"description": "Financial maths. Repayments on a home loan.", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "

Suppose you borrow $\\$\\var{P}$ to buy a house. The term of the loan is $\\var{years}$ years, and you will need to make {period[0]} repayments on the loan at the beginning of each {period[2]}. Interest is $\\var{ipa}\\%$ per annum compounding {period[0]}.

", "advice": "

You are asked to find the repayment amount of an annuity due (since the payments are at the beginning of each period) and we are given the present value of the annuity. Therefore we will use the present value of an annuity due formula 

\n

$\\displaystyle P=R(1+i)[ \\frac{1-(1+i)^{-n}}{i} ]$

\n

where $P$ is the present value, $R$ is the repayment per period, $i$ is the interest rate per period, and $n$ is the number of periods.

\n

In our situation we have,

\n

$P=\\var{P}$,

\n

$i=\\frac{\\var{ipa}\\%}{\\var{period[1]}}=\\frac{\\var{ipadec}}{\\var{period[1]}}$, 

\n

$n=\\var{years}\\times \\var{period[1]}=\\var{n}$, 

\n

and therefore we have

\n

$\\displaystyle \\var{P}=R (1+\\frac{\\var{ipadec}}{\\var{period[1]}})[\\frac{1-(1+\\frac{\\var{ipadec}}{\\var{period[1]}})^{-\\var{n}}}{\\frac{\\var{ipadec}}{\\var{period[1]}}}]$

\n

which we need to rearrange to solve for $R$.

\n

\n

Calculating this we find 

\n

$\\begin{align}R&\\approx \\var{C}\\\\&=\\$\\var{Crounded}\\quad \\text{(to the nearest cent)}\\end{align}$

", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"P": {"name": "P", "group": "Ungrouped variables", "definition": "random(100000..1000000#1000)", "description": "", "templateType": "anything", "can_override": false}, "period": {"name": "period", "group": "Ungrouped variables", "definition": "['monthly',12,'month']", "description": "", "templateType": "anything", "can_override": false}, "ipadec": {"name": "ipadec", "group": "Ungrouped variables", "definition": "random(0.01..0.06#0.0001)", "description": "", "templateType": "anything", "can_override": false}, "ipa": {"name": "ipa", "group": "Ungrouped variables", "definition": "ipadec*100", "description": "", "templateType": "anything", "can_override": false}, "Crounded": {"name": "Crounded", "group": "Ungrouped variables", "definition": "precround(C,2)", "description": "", "templateType": "anything", "can_override": false}, "n": {"name": "n", "group": "Ungrouped variables", "definition": "years*period[1]", "description": "", "templateType": "anything", "can_override": false}, "years": {"name": "years", "group": "Ungrouped variables", "definition": "random(15,20,25,30,35)", "description": "", "templateType": "anything", "can_override": false}, "C": {"name": "C", "group": "Ungrouped variables", "definition": "(P*(ipadec/period[1])/(1-1/(1+ipadec/period[1])^n))/(1+ipadec/period[1])", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["years", "period", "ipadec", "ipa", "n", "P", "C", "Crounded"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "1_n_2", "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": "

Which formula should you use to calculate the size of your monthly repayment?

", "minMarks": 0, "maxMarks": 0, "shuffleChoices": true, "displayType": "radiogroup", "displayColumns": 0, "showCellAnswerState": true, "choices": ["$\\displaystyle A=R \\left[\\frac{(1+i)^n-1}{i}\\right]$", "$\\displaystyle P=R \\left[\\frac{1-(1+i)^{-n}}{i}\\right] $", "$\\displaystyle P=R(1+i)\\left[ \\frac{1-(1+i)^{-n}}{i} \\right]$", "$\\displaystyle A=R(1+i)\\left[\\frac{(1+i)^n-1}{i}\\right]$"], "matrix": [0, "0.5", "1", 0], "distractors": ["This answer is incorrect because the question tells us the present value of the annuity (P).", "This answer is incorrect because the periodic payments are repaid at the beginning of each compounding period.", "", "This answer is incorrect because the question tells us the present value of the annuity (P)."]}, {"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": "

 Calculate the size of your monthly repayment.

\n

\n

$\\$$ [[0]] (to the nearest cent)

", "stepsPenalty": "1", "steps": [{"type": "information", "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": "

The formula for calculating the present value ($P$) of an annuity due is:

\n

$P=R(1+i)\\left[\\frac{1-(1+i)^{-n}}{i}\\right]$

\n

where $R$ represents the value of each repayment, $i$ represents the interest rate per compounding period and $n$ represents the number of repayments.

"}], "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "3", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "C-1", "maxValue": "C+1", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "precisionType": "dp", "precision": "2", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the nearest cent.", "strictPrecision": false, "showPrecisionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Catherine Palmer", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/423/"}, {"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}, {"name": "Patricia Cogan", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3359/"}]}]}], "contributors": [{"name": "Catherine Palmer", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/423/"}, {"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}, {"name": "Patricia Cogan", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3359/"}]}