// Numbas version: exam_results_page_options {"name": "Multiple linear regression", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"extensions": ["stats"], "metadata": {"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.

", "licence": "Creative Commons Attribution 4.0 International"}, "variables": {"p1": {"group": "Ungrouped variables", "name": "p1", "definition": "random(0.005..0.3#0.001 except p0)", "templateType": "anything", "description": ""}, "m": {"group": "Ungrouped variables", "name": "m", "definition": "max(p)", "templateType": "anything", "description": ""}, "data": {"group": "Ungrouped variables", "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]]", "templateType": "anything", "description": ""}, "p": {"group": "Ungrouped variables", "name": "p", "definition": "[p1,p2,p3,p4]", "templateType": "anything", "description": ""}, "mm": {"group": "Ungrouped variables", "name": "mm", "definition": "map(if(p[j]=m,1,0),j,0..3)", "templateType": "anything", "description": ""}, "p4": {"group": "Ungrouped variables", "name": "p4", "definition": "random(0.005..0.2#0.001 except [p0,p1,p2,p3])", "templateType": "anything", "description": ""}, "p0": {"group": "Ungrouped variables", "name": "p0", "definition": "random(0.005..0.03#0.001)", "templateType": "anything", "description": ""}, "v": {"group": "Ungrouped variables", "name": "v", "definition": "findinlist(p,m)+1", "templateType": "anything", "description": ""}, "p3": {"group": "Ungrouped variables", "name": "p3", "definition": "random(0.005..0.2#0.001 except [p0,p1,p2])", "templateType": "anything", "description": ""}, "p2": {"group": "Ungrouped variables", "name": "p2", "definition": "random(0.01..0.6#0.001 except [p0,p1])", "templateType": "anything", "description": ""}}, "name": "Multiple linear regression", "functions": {"findinlist": {"type": "number", "parameters": [["l", "list"], ["m", "number"]], "language": "javascript", "definition": "var r=0;\nfor(j=0;j < l.length;j++)\n {if(l[j]==m){r=j;}\n }\nreturn r;"}}, "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\"])}
", "variable_groups": [], "preamble": {"js": "", "css": "/* left-align variables */\n#table td:first-child, #table th:first-child {\n text-align: center;\n}"}, "ungrouped_variables": ["p2", "p3", "p0", "p1", "p4", "mm", "m", "p", "v", "data"], "parts": [{"matrix": "mm", "prompt": "

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

", "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "type": "1_n_2", "displayType": "radiogroup", "displayColumns": 0, "choices": ["

$X_1$

", "

$X_2$

", "

$X_3$

", "

$X_4$

"], "minMarks": 0, "marks": 0, "unitTests": [], "customMarkingAlgorithm": "", "scripts": {}, "variableReplacements": [], "shuffleChoices": false, "maxMarks": 0, "showFeedbackIcon": true}], "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

", "rulesets": {}, "tags": [], "variablesTest": {"condition": "", "maxRuns": 100}, "type": "question", "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/"}]}