Exercise 1 If a baseball team’s OBP is 0.361 and SLG is 0.409, how
many runs do we expect the team to score? Using the linear regression
model constructed during the lecture (the one that uses OBP and SLG as
independent variables), find the number of runs we expect the team to
score:
RS = Intercept + OBP + SLG
-804.63 + (2737.77 * 0.361) + (1584.91 * 0.409)
[1] 831.9332
Exercise 2
If a baseball team’s opponents OBP (OOBP) is 0.267 and opponents SLG
(OSLG) is 0.392, how many runs do we expect the team to allow? Using the
linear regression model discussed during the lecture (the one on the
last slide of the previous video), find the number of runs we expect the
team to allow.
# RA = Intercept + Slope1*OOPB + slope2*OSLG
-837.38 + (2913.60* 0.267) + (1514.29 * 0.392)
[1] 534.1529
LS0tCnRpdGxlOiAiQWN0aXZpdHkgOCIKb3V0cHV0OiBodG1sX25vdGVib29rCi0tLQoKRXhlcmNpc2UgMQpJZiBhIGJhc2ViYWxsIHRlYW3igJlzIE9CUCBpcyAwLjM2MSBhbmQgIFNMRyBpcyAwLjQwOSwgaG93IG1hbnkgcnVucyBkbyB3ZSBleHBlY3QgdGhlIHRlYW0gdG8gc2NvcmU/ClVzaW5nIHRoZSBsaW5lYXIgcmVncmVzc2lvbiBtb2RlbCBjb25zdHJ1Y3RlZCBkdXJpbmcgdGhlIGxlY3R1cmUgKHRoZSBvbmUgdGhhdCB1c2VzIE9CUCBhbmQgIFNMRyBhcyBpbmRlcGVuZGVudCB2YXJpYWJsZXMpLCBmaW5kIHRoZSBudW1iZXIgb2YgcnVucyB3ZSBleHBlY3QgdGhlIHRlYW0gdG8gc2NvcmU6CgoKUlMgPSBJbnRlcmNlcHQgKyBPQlAgKyBTTEcKYGBge3J9Ci04MDQuNjMgKyAoMjczNy43NyAqIDAuMzYxKSArICgxNTg0LjkxICogMC40MDkpIApgYGAKCgoKCiBFeGVyY2lzZSAyCgoKSWYgYSBiYXNlYmFsbCB0ZWFt4oCZcyBvcHBvbmVudHMgT0JQIChPT0JQKSBpcyAwLjI2NyBhbmQgb3Bwb25lbnRzIFNMRyAoT1NMRykgaXM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