Do teams that hit more home runs win more games?
- Home runs (HR) are the best outcome of any At-Bat (AB), and many teams believe in the philosophy that they must hit more home runs to win more games.
- Methodology: Linear Regression
2026-10-19
Do teams that hit more home runs win more games?
We fit a straight line to see the correlation between HR/G and W-L%
\[y_i = \beta_0 + \beta_1 x_i + \varepsilon_i\]
Least Squares picks the \(\beta\) values that minimize the total squared miss:
\[\hat\beta_1 = \frac{\sum (x_i - \bar{x})(y_i - \bar{y})}{\sum (x_i - \bar{x})^2}, \qquad \hat\beta_0 = \bar{y} - \hat\beta_1 \bar{x}\]
The correlation \(r\) measures how closely the data fits the line
\[r = \frac{\sum (x_i - \bar{x})(y_i - \bar{y})}{\sqrt{\sum (x_i - \bar{x})^2 \sum (y_i - \bar{y})^2}}, \qquad R^2 = r^2\]
df <- Teams %>% filter(yearID >= 2016) %>% mutate(HR_per_game = HR / G, win_pct = W / (W + L)) lin_model <- lm(win_pct ~ HR_per_game, data = df)