Using the Villanova_basketball_2 data, run a linear regression with y variable a
ID: 3055454 • Letter: U
Question
Using the Villanova_basketball_2 data, run a linear regression with y variable as "Points Differential", and x variables as Assists, Rebounds, Turnovers, Personal Fouls, and Location (with Location coded as 0 for Away and 1 for Home).
Using the estimated regression line, find Points Differential when Assists = 20, Rebounds = 30, Turnovers = 10, Personal Fouls = 20, played at home.
Game Points For Points Against Points Differential Assists Rebounds Turnovers Personal Fouls Location Location 1 68 52 16 14 38 12 10 1 Home 2 84 47 37 19 42 9 14 1 Home 3 82 66 16 21 29 7 13 1 Home 4 86 41 45 22 46 11 11 1 Home 5 82 70 12 11 40 7 22 0 Away 6 68 78 -10 10 31 13 26 0 Away 7 71 60 11 19 45 11 7 1 Home 8 65 53 12 16 32 16 14 0 Away 9 84 81 3 16 27 18 15 0 Away 10 78 59 19 9 34 17 17 1 Home 11 76 36 40 16 41 9 17 0 Away 12 78 34 44 12 29 9 22 1 Home 13 81 65 16 17 36 13 20 1 Home 14 83 71 12 21 21 9 22 0 Away 15 72 61 11 14 34 19 23 1 Home 16 88 74 14 20 36 18 12 1 Home 17 74 66 8 12 42 14 17 1 Home 18 59 61 -2 8 31 8 18 0 Away 19 83 72 11 15 26 10 10 0 Away 20 68 83 -15 10 48 11 26 0 Away 21 66 69 -3 12 20 9 17 1 Home 22 75 70 5 13 28 12 18 1 Home 23 66 50 16 12 26 8 18 1 Home 24 76 77 -1 16 27 12 19 0 Away 25 54 57 -3 6 33 12 23 1 Home 26 60 57 3 13 36 20 17 0 Away 27 77 75 2 7 44 13 13 0 Away 28 64 69 -5 14 30 12 15 1 Home 29 68 81 -13 17 23 12 21 1 Home 30 72 93 -21 18 19 9 18 0 Away 31 50 60 -10 4 22 8 21 0 Away 32 69 70 -1 6 21 9 22 0 Away 33 57 61 -4 10 33 8 19 0 Away 34 84 61 23 16 39 8 22 1 Home 35 103 65 38 19 43 15 22 1 Home 36 69 68 1 9 42 16 26 0 Away 37 71 65 6 12 38 13 17 1 Home 38 79 67 12 8 45 22 19 0 Away 39 81 63 18 17 27 13 26 1 Home 40 77 58 19 14 39 13 15 1 Home 41 95 86 9 19 42 14 24 0 Away 42 97 89 8 16 39 16 25 0 Away 43 65 75 -10 12 24 9 19 0 Away 44 96 58 38 19 44 10 19 0 Away 45 97 63 34 15 39 12 17 1 Home 46 74 72 2 13 31 7 17 0 Away 47 99 72 27 19 38 14 19 1 Home 48 78 76 2 17 24 12 20 1 Home 49 92 84 8 10 34 21 33 0 Away 50 82 77 5 16 36 11 27 1 Home 51 94 68 26 14 49 12 20 0 Away 52 81 71 10 10 34 20 20 0 Away 53 90 72 18 20 30 11 23 1 Home 54 81 71 10 15 43 13 16 1 Home 55 90 103 -13 11 26 17 38 0 Away 56 82 75 7 11 37 18 24 0 Away 57 92 81 11 18 41 15 23 1 Home 58 75 84 -9 9 26 9 30 1 Home 59 65 70 -5 8 30 13 26 0 Away 60 74 49 25 9 33 10 17 1 Home 61 77 95 -18 15 36 16 25 0 Away 62 77 73 4 14 28 12 22 0 Away 63 66 68 -2 16 32 15 24 1 Home 64 76 80 -4 13 27 14 17 0 Away 65 73 70 3 9 26 16 19 0 Away 66 68 75 -7 9 31 7 18 0 AwayExplanation / Answer
> read.excel <- function(header=TRUE,...) {
+ read.table("clipboard",sep=" ",header=header,...)
+ }
> data=read.excel()
> View(data)
> names(data)
[1] "Game" "Points.For" "Points.Against" "Points.Differential" "Assists"
[6] "Rebounds" "Turnovers" "Personal.Fouls" "Location" "Location.1"
> model=lm(Points.Differential~Assists+Rebounds+Turnovers+Personal.Fouls,data=data)
> model
Call:
lm(formula = Points.Differential ~ Assists + Rebounds + Turnovers +
Personal.Fouls, data = data)
Coefficients:
(Intercept) Assists Rebounds Turnovers Personal.Fouls
-23.1391 1.1690 0.8630 -0.4041 -0.4209
> summary(model)
Call:
lm(formula = Points.Differential ~ Assists + Rebounds + Turnovers +
Personal.Fouls, data = data)
Residuals:
Min 1Q Median 3Q Max
-29.586 -6.545 -0.864 6.202 40.981
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -23.1391 11.3180 -2.044 0.045231 *
Assists 1.1690 0.3745 3.121 0.002750 **
Rebounds 0.8630 0.2126 4.059 0.000143 ***
Turnovers -0.4041 0.4315 -0.937 0.352701
Personal.Fouls -0.4209 0.3022 -1.393 0.168708
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 12.16 on 61 degrees of freedom
Multiple R-squared: 0.3969, Adjusted R-squared: 0.3573
F-statistic: 10.04 on 4 and 61 DF, p-value: 2.628e-06
So the final model is
Points.Differential =-23.1391+1.1690*Assists + 0.8630*Rebounds -0.4041*Turnovers - 0.4209 *Personal.Fouls
Using the estimated regression line, find Points Differential when Assists = 20, Rebounds = 30, Turnovers = 10, Personal Fouls = 20, played at home.
Points.Differential =-23.1391+1.1690*Assists + 0.8630*Rebounds -0.4041*Turnovers - 0.4209 *Personal.Fouls
=-23.1391+1.1690*20 + 0.8630*30 -0.4041*10 - 0.4209 *20
Points.Differential = 13.6719
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.