// Numbas version: finer_feedback_settings {"name": "Multiple regression - interpretation of software analysis", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Multiple regression - interpretation of software analysis", "tags": [], "metadata": {"description": "
To assess interpretation of a statistical software output and use corresponding equation to make prediction.
", "licence": "Creative Commons Attribution-ShareAlike 4.0 International"}, "statement": "The management at {thisrest} adopts the following model to predict monthly profit $y$ (in 1000s of £) at their {place} branch.
\n\\[\\hat{y} = \\beta_0+ \\beta_1 x_1 + \\beta_2 x_2 + \\beta_3 x_3\\]
\nwhere
\n$x_1=\\;$number of competitors within one km.
\n$x_2=\\;$population within one km (in 1000s).
\n$x_3=\\;$ 1 if {cond}, 0 otherwise.
", "advice": "a) $x_3$ is the indicator variable.
\n\nb)
\n(i) The values of A, B, C and D are given by:
\nA = 3.887 x SE Coef (A) = 3.887 x {sea} = {ansa}.
\nB = Coef (B)/-2.64 = {cb}/-2.64 = {ansb}.
\nC = 3.82 x SE Coef (C) = 3.82 x {se} = {ansc}.
\nD = 2.53 x SE Coef (D) = 2.53 x {sed} = {ansd}.
\nii) The fitted regression equation is:
\n\\[\\hat{y}=\\var{ansa}-\\var{abs(cb)}x_1+\\var{ansc}x_2+\\var{ansd}x_3+\\epsilon\\]
\n\nc)
\nUsing the above fitted model where $x_1=\\var{thatmany}$ and $x_2= \\frac{\\var{thismany}}{1000}=\\var{thismany/1000}$ and since $x_3=\\var{q}$ as the restaurant {hascond} we find :
\n\\[\\hat{y}=\\var{ansa}-\\var{abs(cb)}\\times \\var{thatmany}+\\var{ansc}\\times \\var{thismany/1000}+\\var{ansd}\\times \\var{q}=\\var{pred}\\]
\n", "rulesets": {}, "extensions": [], "variables": {"tol": {"name": "tol", "group": "Ungrouped variables", "definition": "0.05", "description": "", "templateType": "anything"}, "pred": {"name": "pred", "group": "Ungrouped variables", "definition": "precround(ansa +cb*thatmany+ansc*thismany/1000+ansd*q,1)", "description": "", "templateType": "anything"}, "thismany": {"name": "thismany", "group": "Ungrouped variables", "definition": "random(5000..12000#1000)", "description": "", "templateType": "anything"}, "thatmany": {"name": "thatmany", "group": "Ungrouped variables", "definition": "random(2..8)", "description": "", "templateType": "anything"}, "thisrest": {"name": "thisrest", "group": "Ungrouped variables", "definition": "random(\"McDonald's\",\"Pizza Hut\",\"Kentucky Fried Chicken\",\"The Log Fire Pizza Co.\",\"The China Cook\",\"Aneesa's Indian Buffet\",\"Pacino's Italian Restaurant\")", "description": "", "templateType": "anything"}, "hascond": {"name": "hascond", "group": "Ungrouped variables", "definition": "switch(q=1,cond,\n p=0,\"has not got a drive-thru window\",\n p=1,\"is not open late (after 11pm)\",\n p=2,\"is not located on a public transport route\",\n \"is not located in a town centre\")", "description": "", "templateType": "anything"}, "se": {"name": "se", "group": "Ungrouped variables", "definition": "siground(random(0.03..0.15#0.0001),3)", "description": "", "templateType": "anything"}, "si": {"name": "si", "group": "Ungrouped variables", "definition": "precround(sval^2,3)", "description": "", "templateType": "anything"}, "place": {"name": "place", "group": "Ungrouped variables", "definition": "random(\"South Shields\", \"North Shields\",\"Newcastle\",\"Sunderland\",\"Alnwick\",\"Durham\",\"Metro Centre\")", "description": "", "templateType": "anything"}, "p": {"name": "p", "group": "Ungrouped variables", "definition": "random(0,1,2,3)", "description": "", "templateType": "anything"}, "ansd": {"name": "ansd", "group": "Ungrouped variables", "definition": "siground(2.53*sed,3)", "description": "", "templateType": "anything"}, "q": {"name": "q", "group": "Ungrouped variables", "definition": "random(0,1)", "description": "", "templateType": "anything"}, "sea": {"name": "sea", "group": "Ungrouped variables", "definition": "siground(random(3..5.5#0.001),3)", "description": "", "templateType": "anything"}, "ansa": {"name": "ansa", "group": "Ungrouped variables", "definition": "siground(3.89*sea,3)", "description": "", "templateType": "anything"}, "sed": {"name": "sed", "group": "Ungrouped variables", "definition": "siground(random(1..2.20#0.001),3)", "description": "", "templateType": "anything"}, "cb": {"name": "cb", "group": "Ungrouped variables", "definition": "siground(random(-0.5..-0.1#0.0001),3)", "description": "", "templateType": "anything"}, "cond": {"name": "cond", "group": "Ungrouped variables", "definition": "if(p=0,\"has got a drive-thru window\" ,if(p=1,\"is open late (after 11pm)\",if(p=2,\"is located on a public transport route\",\"is located in a town centre\")))", "description": "", "templateType": "anything"}, "ansc": {"name": "ansc", "group": "Ungrouped variables", "definition": "siground(3.82*se,3)", "description": "", "templateType": "anything"}, "ansb": {"name": "ansb", "group": "Ungrouped variables", "definition": "siground(abs(cb)/2.64,3)", "description": "", "templateType": "anything"}, "ind": {"name": "ind", "group": "Ungrouped variables", "definition": "random(3,4,5,6)", "description": "", "templateType": "anything"}, "sval": {"name": "sval", "group": "Ungrouped variables", "definition": "random(0.2..0.9#0.000001)", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["cb", "sed", "cond", "sea", "ind", "pred", "sval", "tol", "thisrest", "thismany", "ansa", "ansb", "ansc", "ansd", "thatmany", "hascond", "q", "p", "si", "place", "se"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ".minitab {\nfont-family: 'Courier', monospace;\n}"}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Which of these variables is an indicator variable?
\n[[0]]
", "gaps": [{"type": "1_n_2", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": true, "displayType": "radiogroup", "displayColumns": 0, "showCellAnswerState": true, "choices": ["$x_1$
", "$x_2$
", "$x_3$
"], "matrix": [0, 0, 1], "distractors": ["", "", ""]}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Based on a recent survey of some of the restaurants in the North-East, the following (edited) software output was obtained:
\nRegression Analysis: $y$ versus $x_1,\\;x_2,\\;x_3$
\nThe regression equation is: y = ********
\n\n\n Predictor \n | \n\n Coef \n | \n\n SE Coef \n | \n\n T \n | \n\n P \n | \n
---|---|---|---|---|
\n Constant \n | \n\n $A$ \n | \n\n {sea} \n | \n\n 3.89 \n | \n\n 0.002 \n | \n
\n $x_1$ \n | \n\n {cb} \n | \n\n $B$ \n | \n\n -2.64 \n | \n\n 0.021 \n | \n
\n $x_2$ \n | \n\n $C$ \n | \n\n {se} \n | \n\n 3.82 \n | \n\n 0.002 \n | \n
\n $x_3$ \n | \n\n $D$ \n | \n\n {sed} \n | \n\n 2.53 \n | \n\n 0.024 \n | \n
s={sval} R-sq= 92.1% R-Sq(adj)=93.9%
\n(i) Find the values of $A,\\;B,\\;C$ and $D$:
\n$A=\\;$[[0]], $B=\\;$[[1]]
\n$C=\\;$[[2]], $D=\\;$[[3]]
\n(ii) Considering the table above and the general model ($\\hat{y} = \\beta_0+ \\beta_1 x_1 + \\beta_2 x_2 + \\beta_3 x_3$), fill in the gaps below to complete the regression equation:
\n$\\hat{y}=\\;$[[4]]-$\\var{abs(cb)}x_1$+[[5]]$x_2$+[[6]]$x_3$
", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "ansa-tol", "maxValue": "ansa+tol", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "ansb-tol", "maxValue": "ansb+tol", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "ansc-tol", "maxValue": "ansc+tol", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "ansd-tol", "maxValue": "ansd+tol", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "ansa-tol", "maxValue": "ansa+tol", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "ansc-tol", "maxValue": "ansc+tol", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "ansd-tol", "maxValue": "ansd+tol", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [{"variable": "ansa", "part": "p1g0", "must_go_first": false}], "variableReplacementStrategy": "alwaysreplace", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": "0", "exploreObjective": null, "prompt": "Predict the profit for a restaurant with {thatmany} competitors, a population of {thismany/1000} thousands within 1 km and that {hascond}:
\n$\\hat{y}=\\;$[[0]]k£
", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "pred*(1-tol)", "maxValue": "pred*(1+tol)", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question", "contributors": [{"name": "Mario Orsi", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/427/"}, {"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}]}], "contributors": [{"name": "Mario Orsi", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/427/"}, {"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}