question archive This assessment has 6 multi-part questions that will all use the setup below
Subject:StatisticsPrice:2.87 Bought15
This assessment has 6 multi-part questions that will all use the setup below.
1) Game attendance in baseball varies partly as a function of how well a team is playing. Load the Lahman library. The Teams data frame contains an attendance column. This is the total attendance for the season. To calculate average attendance, divide by the number of games played, as follows:
library(tidyverse) library(broom) library(Lahman) Teams_small <- Teams %>% filter(yearID %in% 1961:2001) %>% mutate(avg_attendance = attendance/G)
Use linear models to answer the following 3-part question about Teams_small.
Use runs (R) per game to predict average attendance.
For every 1 run scored per game, average attendance increases by how much?
Use home runs (HR) per game to predict average attendance.
For every 1 home run hit per game, average attendance increases by how much?
Question:2
Game wins, runs per game and home runs per game are positively correlated with attendance. We saw in the course material that runs per game and home runs per game are correlated with each other. Are wins and runs per game or wins and home runs per game correlated?
What is the correlation coefficient for wins and runs per game?
What is the correlation coefficient for wins and home runs per game?
Purchased 15 times