JayKrauss / BeatTheOdds

0 stars 2 forks source link

use historical play by play data to create general win probability chart #4

Closed salinasleo closed 6 years ago

salinasleo commented 6 years ago

say we have 500 games. Write a loop to calculate the score difference of team A minus team B at each minute end. Group similar items and calculate odds of winning. For example, 10 games had Team A up by 7 with 5 minutes left, and in 8 of those instances team A won. Odds of winning when up by 7 with 5 minutes left is thus 80%. Do that for every minute and for every range of score differences, then smooth out the odds to be monotonically increasing/decreasing with score gap (to me all this work is much easier in excel or an analytics tool but might be doable in java script)

possible embellishments is to consider who has possession of the ball. We may not have enough data for this.