If a baseball team scores 763 runs and allows 614 runs, how many games do we expect the team to win?
We will use the linear regression model:
Wins = 0.000683 * Runs Scored - 0.000519 * Runs Allowed + 91.1
# Runs scored and allowed
runs_scored <- 763
runs_allowed <- 614
# Predicted wins based on the model
predicted_wins <- 0.000683 * runs_scored - 0.000519 * runs_allowed + 91.1
predicted_wins
## [1] 91.30246