// Numbas version: finer_feedback_settings {"name": "Multiple linear regression - decide which variable to exclude", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"type": "question", "rulesets": {}, "metadata": {"notes": "
09/02/2014:
\nFirst draft finished.
", "licence": "Creative Commons Attribution 4.0 International", "description": "A multiple linear regression model of the form:
\n\\[Y=\\beta_0+\\beta_1X_1+ \\beta_2X_2+\\beta_3X_3+\\beta_4X_4+\\epsilon \\]
\nis fitted to some data in Minitab which generates a table showing estimates of the parameters with associated $p$-values. Determine which variable to exclude first.
"}, "statement": "A multiple linear regression model of the form:
\n\\[Y=\\beta_0+\\beta_1X_1+ \\beta_2X_2+\\beta_3X_3+\\beta_4X_4+\\epsilon \\]
\nis fitted to some data in Minitab. The following table shows estimates of the parameters with associated $p$-values.
\nYou would choose to exclude the predictor variable which had the largest p-value.
\nIn this example we see that $X_{\\var{v}}$ has the largest $p$-value $\\var{m}$ and and we would exclude it as $\\var{m}>0.05$.
\n", "functions": {"findinlist": {"language": "javascript", "type": "number", "definition": "var r=0;\nfor(j=0;j < l.length;j++)\n {if(l[j]==m){r=j;}\n }\nreturn r;", "parameters": [["l", "list"], ["m", "number"]]}}, "showQuestionGroupNames": false, "variable_groups": [], "preamble": {"css": "/* left-align variables */\n#table td:first-child, #table th:first-child {\n text-align: center;\n}", "js": ""}, "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"p4": {"templateType": "anything", "name": "p4", "definition": "random(0.005..0.2#0.001 except [p0,p1,p2,p3])", "description": "", "group": "Ungrouped variables"}, "data": {"templateType": "anything", "name": "data", "definition": "[[\"$\\\\beta_0$\",random(8..20#0.001),p0],[\"$\\\\beta_1$\",random(-8..-1#0.001),p1],\n [\"$\\\\beta_2$\",random(4..9#0.001),p2],[\"$\\\\beta_3$\",random(2..10#0.001),p3],\n [\"$\\\\beta_4$\",random(1..15#0.001),p4]]", "description": "", "group": "Ungrouped variables"}, "p3": {"templateType": "anything", "name": "p3", "definition": "random(0.005..0.2#0.001 except [p0,p1,p2])", "description": "", "group": "Ungrouped variables"}, "m": {"templateType": "anything", "name": "m", "definition": "max(p)", "description": "", "group": "Ungrouped variables"}, "v": {"templateType": "anything", "name": "v", "definition": "findinlist(p,m)+1", "description": "", "group": "Ungrouped variables"}, "p2": {"templateType": "anything", "name": "p2", "definition": "random(0.01..0.6#0.001 except [p0,p1])", "description": "", "group": "Ungrouped variables"}, "mm": {"templateType": "anything", "name": "mm", "definition": "map(if(p[j]=m,1,0),j,0..3)", "description": "", "group": "Ungrouped variables"}, "p1": {"templateType": "anything", "name": "p1", "definition": "random(0.005..0.3#0.001 except p0)", "description": "", "group": "Ungrouped variables"}, "p0": {"templateType": "anything", "name": "p0", "definition": "random(0.005..0.03#0.001)", "description": "", "group": "Ungrouped variables"}, "p": {"templateType": "anything", "name": "p", "definition": "[p1,p2,p3,p4]", "description": "", "group": "Ungrouped variables"}}, "ungrouped_variables": ["p2", "p3", "p0", "p1", "p4", "mm", "m", "p", "v", "data"], "tags": ["ACE2013", "checked2015"], "parts": [{"showCorrectAnswer": true, "type": "1_n_2", "maxMarks": 0, "displayColumns": 0, "displayType": "radiogroup", "scripts": {}, "matrix": "mm", "prompt": "Which predictor variable would you exclude from the model before re-fitting in Minitab?
", "distractors": ["", "", "", ""], "marks": 0, "minMarks": 0, "shuffleChoices": false, "choices": ["$X_1$
", "$X_2$
", "$X_3$
", "$X_4$
"]}], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Lauren Frances Desoysa", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2490/"}]}]}], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Lauren Frances Desoysa", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2490/"}]}