If a baseball team scores 763 runs and allows 614 runs, how many games do we expect the team to win? Using the linear regression model constructed during the lecture, enter the number of games we expect the team to win:
Runs_Scored <- 763
Runs_Allowed <- 614
games_played <- 162
# Calculate win percentage using the Pythagorean expectation formula
win_percentage <- (Runs_Scored^2) / (Runs_Scored^2 + Runs_Allowed^2)
# Calculate the expected number of wins
expected_wins <- win_percentage * games_played
# Print the expected number of wins
print(expected_wins)
## [1] 98.32654