// Numbas version: finer_feedback_settings {"name": "Interactive 2-step ahead", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Interactive 2-step ahead", "tags": [], "metadata": {"description": "", "licence": "None specified"}, "statement": "
Consider the transition probability matrix below, with states $1, 2, 3$.
\n{c} | \n{d} | \n{e} | \n
{f} | \n{g} | \n{h} | \n
{i} | \n{j} | \n{k} | \n
What is the 2-step ahead probability of being in state {b} given you started in state {a}?
\n(round to 3 decimal places)
", "advice": "To find the 2-step ahead probability of being in state $j$ having started in state $i$ you take the dot product of the $i$th row with the $j$th column.
", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"a": {"name": "a", "group": "Ungrouped variables", "definition": "random(1 .. 3#1)", "description": "", "templateType": "randrange", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(1 .. 3#1)", "description": "", "templateType": "randrange", "can_override": false}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "1/random(1..4)", "description": "", "templateType": "anything", "can_override": false}, "d": {"name": "d", "group": "Ungrouped variables", "definition": "if(c=1, 0, 1/random(2..4))", "description": "", "templateType": "anything", "can_override": false}, "e": {"name": "e", "group": "Ungrouped variables", "definition": "if((c+d)=1,0, 1-(c+d))", "description": "", "templateType": "anything", "can_override": false}, "g": {"name": "g", "group": "Ungrouped variables", "definition": "1/random(1..4)", "description": "", "templateType": "anything", "can_override": false}, "h": {"name": "h", "group": "Ungrouped variables", "definition": "if((f+g)=1,0, 1-(f+g))", "description": "", "templateType": "anything", "can_override": false}, "k": {"name": "k", "group": "Ungrouped variables", "definition": "1/random(1..4)", "description": "", "templateType": "anything", "can_override": false}, "f": {"name": "f", "group": "Ungrouped variables", "definition": "if(g=1, 0, 1/random(2..4))", "description": "", "templateType": "anything", "can_override": false}, "i": {"name": "i", "group": "Ungrouped variables", "definition": "if(k=1,0,1/random(2..4))", "description": "", "templateType": "anything", "can_override": false}, "j": {"name": "j", "group": "Ungrouped variables", "definition": "if((i+k)=1,0, 1-(i+k))", "description": "", "templateType": "anything", "can_override": false}, "res": {"name": "res", "group": "Ungrouped variables", "definition": "switch(\n a=1, switch(\n b=1, (c*c)+(d*f)+(e*i),\n b=2, (c*d)+(d*g)+(e*j),\n b=3, (c*e)+(d*h)+(e*k)),\n a=2, switch(\n b=1, (f*c)+(g*f)+(h*i),\n b=2, (f*d)+(g*g)+(h*j),\n b=3, (f*e)+(g*h)+(h*k)),\n a=3, switch(\n b=1, (i*c)+(j*f)+(k*i),\n b=2, (i*d)+(j*g)+(k*j),\n b=3, (i*e)+(j*h)+(k*k)))", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "b", "c", "d", "e", "f", "g", "h", "i", "k", "j", "res"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {"mark": {"script": "// Reveal answers, score and advice\nthis.display.revealAnswer();\nthis.display.showScore();\nNumbas.controls.getAdvice();", "order": "before"}}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{res}", "showPreview": true, "checkingType": "dp", "checkingAccuracy": 3, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question", "contributors": [{"name": "Chris Drovandi", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/9840/"}, {"name": "adam bretherton", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/18177/"}]}]}], "contributors": [{"name": "Chris Drovandi", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/9840/"}, {"name": "adam bretherton", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/18177/"}]}