2026-10-19

Question

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

Data

  • Source: Lahman Baseball Database
  • Each row is an individual team’s performance in any season between 2016 and 2025
  • Comparing HR/G (How many HRs a team hits per game) to win percentage (W-L%)

Linear Regression Model

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\]

  • \(y\) = W-L%, \(x\) = HR/G
  • \(\beta_1\) is the slope: the change in win % per extra HR per game

Finding the Equation

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\]

Code

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)

HR/G vs. W-L%

  • Correlation: r = 0.54
  • Each extra HR per game (for all 162 games) goes with about 19.5 percentage point increase in win %
  • HR/G explains about 29% of the variation in win %

Residuals

  • Each dot is how far a team’s actual W-L% landed from the predicted line’s W-L%
  • Utilizing this graph, it can be concluded that the predicted line fits alright, but shows clear natural randomness.

Interactive Plot

  • This slide is for an interactive view, hover over any dot and you’ll find what team and what year each data point is

Conclusion

  • Teams that hit more home runs tend to win more: r = 0.54
  • The fitted line shows an increase of 2 percentage points for W-L% for every +0.1 HR/G
  • Of course, since the line is not a great fit, it goes to show how important other aspects of baseball are, such as defense, pitching, baserunning, and other traits.