// Numbas version: exam_results_page_options {"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": [{"variable_groups": [], "variables": {"p2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(0.01..0.6#0.001 except [p0,p1])", "description": "", "name": "p2"}, "p4": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(0.005..0.2#0.001 except [p0,p1,p2,p3])", "description": "", "name": "p4"}, "data": {"templateType": "anything", "group": "Ungrouped variables", "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": "", "name": "data"}, "p0": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(0.005..0.03#0.001)", "description": "", "name": "p0"}, "p1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(0.005..0.3#0.001 except p0)", "description": "", "name": "p1"}, "m": {"templateType": "anything", "group": "Ungrouped variables", "definition": "max(p)", "description": "", "name": "m"}, "p3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(0.005..0.2#0.001 except [p0,p1,p2])", "description": "", "name": "p3"}, "mm": {"templateType": "anything", "group": "Ungrouped variables", "definition": "map(if(p[j]=m,1,0),j,0..3)", "description": "", "name": "mm"}, "v": {"templateType": "anything", "group": "Ungrouped variables", "definition": "findinlist(p,m)+1", "description": "", "name": "v"}, "p": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[p1,p2,p3,p4]", "description": "", "name": "p"}}, "ungrouped_variables": ["p2", "p3", "p0", "p1", "p4", "mm", "m", "p", "v", "data"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "name": "Multiple linear regression - decide which variable to exclude", "functions": {"findinlist": {"type": "number", "language": "javascript", "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, "parts": [{"displayType": "radiogroup", "choices": ["

$X_1$

", "

$X_2$

", "

$X_3$

", "

$X_4$

"], "displayColumns": 0, "prompt": "

Which predictor variable would you exclude from the model before re-fitting in Minitab?

", "distractors": ["", "", "", ""], "shuffleChoices": false, "scripts": {}, "minMarks": 0, "type": "1_n_2", "maxMarks": 0, "showCorrectAnswer": true, "matrix": "mm", "marks": 0}], "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 \\]

\n

is fitted to some data in Minitab. The following table shows estimates of the parameters with associated $p$-values.

\n
{table(data,[\"Parameter\",\"Estimate\",\"p-Value\"])}
", "tags": ["ACE2013", "checked2015"], "rulesets": {}, "preamble": {"css": "/* left-align variables */\n#table td:first-child, #table th:first-child {\n text-align: center;\n}", "js": ""}, "type": "question", "metadata": {"notes": "

09/02/2014:

\n

First 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 \\]

\n

is 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.

"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "

You would choose to exclude the predictor variable which had the largest p-value.

\n

In 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

", "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}]}], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}