for provided plays. Returns the data with probabilities of winning the game. The following columns must be present: receive_h2_ko (1 if game is in 1st half and possession team will receive 2nd half kickoff, 0 otherwise), ep (expected points), home_team, posteam, half_seconds_remaining, game_seconds_remaining, spread_line (how many points home team was favored by), down, ydstogo, posteam_timeouts_remaining, defteam_timeouts_remaining
calculate_win_probability(pbp_data)
pbp_data | Play-by-play dataset to estimate win probability for. |
---|
The original pbp_data with the following columns appended to it:
win probability.
win probability taking into account pre-game spread.
Computes win probability for provided plays. Returns the data with probabilities of each scoring event and EP added. The following columns must be present:
receive_2h_ko (1 if game is in 1st half and possession team will receive 2nd half kickoff, 0 otherwise)
ep (expected points)
score_differential
home_team
posteam
half_seconds_remaining
game_seconds_remaining
spread_line (how many points home team was favored by)
down
ydstogo
posteam_timeouts_remaining
defteam_timeouts_remaining