// Numbas version: exam_results_page_options {"name": "Jinhua's copy of Geometric series - practical application", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "ungrouped_variables": ["dur", "n", "m2", "m1", "m", "dayn"], "name": "Jinhua's copy of Geometric series - practical application", "tags": [], "preamble": {"css": "", "js": ""}, "advice": "

a) Substitute in $i=\\var{dayn}$

\n

b) Substitute in $i=\\var{dur}$

\n

c) Using the following formulae for the sum of a geometric series: $S_n=\\displaystyle\\sum\\limits_{i=1}^na(r)^{i-1}=a\\left(\\frac{1-r^n}{1-r}\\right)$

\n

We can substitute the known values of the first term $a$, the common ratio $r$ and the total number of terms (or in this case days of treatment) $n$:

\n

$\\displaystyle\\sum\\limits_{i=1}^\\var{dur}\\var{n}\\left(\\simplify[all,fractionnumbers]{{m}}\\right)^{i-1}=\\var{n}\\left(\\frac{1-(\\simplify[all,fractionnumbers]{{m}})^{\\var{dur}}}{1-(\\simplify[all,fractionnumbers]{{m}})}\\right)$

\n

", "rulesets": {}, "parts": [{"integerPartialCredit": 0, "prompt": "

How long will Catherine's treatment be on day $\\var{dayn}$?

", "integerAnswer": true, "allowFractions": false, "variableReplacements": [], "maxValue": "precround({n}*{m}^{{dayn}-1},0)", "minValue": "precround({n}*{m}^{{dayn}-1},0)", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"integerPartialCredit": 0, "prompt": "

How long will Catherine's treatment be on day $\\var{dur}$?

", "integerAnswer": true, "allowFractions": false, "variableReplacements": [], "maxValue": "precround({n}*{m}^{{dur}-1},0)", "minValue": "precround({n}*{m}^{{dur}-1},0)", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"integerPartialCredit": 0, "prompt": "

How much time will she spend in total having this treatment for her eczema?

", "integerAnswer": true, "allowFractions": false, "variableReplacements": [], "maxValue": "precround(({n}*(1-{m}^{dur}))/(1-{m}),0)", "minValue": "precround(({n}*(1-{m}^{dur}))/(1-{m}),0)", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}], "extensions": [], "statement": "

A hospital offers Catherine a $\\var{dur}$-day course of ultraviolet light therapy for her eczema.

\n

On day $i$ of the course, she is to have $t_i$ seconds of treatment, where:

\n

$t_i = \\var{n}\\times (\\simplify[all,fractionnumbers]{{m}})$$^{i-1}$

\n

Give your answers to the following questions correct to the nearest second.

", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": "{dayn}<{dur}"}, "variables": {"m": {"definition": "1+1/m1", "templateType": "anything", "group": "Ungrouped variables", "name": "m", "description": ""}, "n": {"definition": "random(120..150)", "templateType": "anything", "group": "Ungrouped variables", "name": "n", "description": ""}, "dayn": {"definition": "random(5..30)", "templateType": "anything", "group": "Ungrouped variables", "name": "dayn", "description": ""}, "m1": {"definition": "random(8..15)", "templateType": "anything", "group": "Ungrouped variables", "name": "m1", "description": ""}, "m2": {"definition": "random(4..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "m2", "description": ""}, "dur": {"definition": "random(30..50)", "templateType": "anything", "group": "Ungrouped variables", "name": "dur", "description": ""}}, "metadata": {"description": "", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "contributors": [{"name": "Jinhua Mathias", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/514/"}]}]}], "contributors": [{"name": "Jinhua Mathias", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/514/"}]}