{"id":385,"date":"2021-05-01T12:00:34","date_gmt":"2021-05-01T12:00:34","guid":{"rendered":"https:\/\/falk.syr.edu\/sport-analytics\/?p=385"},"modified":"2021-06-04T02:31:03","modified_gmt":"2021-06-04T02:31:03","slug":"nba-leverage-index-quantifying-the-context-of-field-goal-attempts-in-basketball","status":"publish","type":"post","link":"https:\/\/falk.syr.edu\/sport-analytics\/2021\/05\/01\/nba-leverage-index-quantifying-the-context-of-field-goal-attempts-in-basketball\/","title":{"rendered":"NBA Leverage Index: Quantifying the Context of Field Goal Attempts in Basketball"},"content":{"rendered":"<h2 class=\"wp-block-heading\" id=\"s:by-jonathan-bosch-syracuse-university\">By Jonathan Bosch &#8211; Syracuse University &#8217;21<span class=\"anchor\" aria-hidden=\"true\"><a href=\"#s:by-jonathan-bosch-syracuse-university\" aria-label=\"Link to section 'By Jonathan Bosch &#8211; Syracuse University &#8217;21'\" tabindex=\"-1\"> Link<\/a><\/span><\/h2>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"s:background\">Background<span class=\"anchor\" aria-hidden=\"true\"><a href=\"#s:background\" aria-label=\"Link to section 'Background'\" tabindex=\"-1\"> Link<\/a><\/span><\/h2>\n\n\n\n<p>\u27a2 It can be very difficult to determine a player\u2019s impact on the outcome of an NBA game solely based on the player\u2019s box score stats. <\/p>\n\n\n\n<p><strong>EX: Damien Lillard<\/strong><\/p>\n\n\n\n<ul><li><strong>Regular Season (03\/07\/2019):&nbsp;51pts 5rebs 9asts&nbsp;\u2013&nbsp;POR 121&nbsp;\u2013&nbsp;OKC 129<\/strong><\/li><li><strong>Game 5 West 1st&nbsp;Round (04\/23\/2019):&nbsp;50pts 7rebs 6asts&nbsp;\u2013&nbsp;POR 118&nbsp;\u2013&nbsp;OKC 115 &amp; a game-winning 37-foot buzzer beater<\/strong><\/li><\/ul>\n\n\n\n<p>\u27a2 With the buzzer-beating shot context, we see how Lillard\u2019s performance in the&nbsp;playoff game vs OKC had a greater impact on Portland winning the game than his performance vs OKC in the regular season, but how can we quantify it?<\/p>\n\n\n\n<p>\u27a2 NBA Leverage of Field Goal Attempts: <em>The squared difference between the win probability if the shot was made and the win probability if the shot was missed.<\/em><\/p>\n\n\n\n<p>\u27a2 In order to calculate NBA Leverage of Field Goal Attempts, we must have the&nbsp;ability to calculate a team\u2019s win probability at any point during the game.&nbsp;Therefore, I will model home team win probability as a product of in-game contextual variables (such as the score, time remaining, the strength of the opposing team, and more).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"s:data\">Data<span class=\"anchor\" aria-hidden=\"true\"><a href=\"#s:data\" aria-label=\"Link to section 'Data'\" tabindex=\"-1\"> Link<\/a><\/span><\/h2>\n\n\n\n<p>\u27a2 I acquired 3 full seasons of NBA Play-by-Play data from basketball- reference.com (2016-17, 2017-18, 2018-19).<\/p>\n\n\n\n<p>\u27a2 The data includes:<\/p>\n\n\n\n<ul><li>Game information (date\/time, teams, Vegas Odds*)<\/li><li>Game context (score, time, winning team)<\/li><li>Game events (box score events, substitutions, timeouts, etc.)- Game events similar to&nbsp;ESPN\u2019s Play-by-Play:<\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"189\" src=\"https:\/\/falk.syr.edu\/sport-analytics\/wp-content\/uploads\/sites\/12\/2021\/05\/Screen-Shot-2021-05-28-at-4.12.16-PM-1024x189.png\" alt=\"\" class=\"wp-image-386\" srcset=\"https:\/\/falk.syr.edu\/sport-analytics\/wp-content\/uploads\/sites\/12\/2021\/05\/Screen-Shot-2021-05-28-at-4.12.16-PM-1024x189.png 1024w, https:\/\/falk.syr.edu\/sport-analytics\/wp-content\/uploads\/sites\/12\/2021\/05\/Screen-Shot-2021-05-28-at-4.12.16-PM-300x55.png 300w, https:\/\/falk.syr.edu\/sport-analytics\/wp-content\/uploads\/sites\/12\/2021\/05\/Screen-Shot-2021-05-28-at-4.12.16-PM-768x141.png 768w, https:\/\/falk.syr.edu\/sport-analytics\/wp-content\/uploads\/sites\/12\/2021\/05\/Screen-Shot-2021-05-28-at-4.12.16-PM.png 1434w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"s:scoring-trends\">Scoring Trends<span class=\"anchor\" aria-hidden=\"true\"><a href=\"#s:scoring-trends\" aria-label=\"Link to section 'Scoring Trends'\" tabindex=\"-1\"> Link<\/a><\/span><\/h2>\n\n\n\n<p>\u27a2 Following modeling live win probability, it will be useful to visualize the win probability trend throughout the game and compare it to the visualized scoring trend. See below, some interesting games during the 3 seasons of data.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"872\" height=\"1024\" src=\"https:\/\/falk.syr.edu\/sport-analytics\/wp-content\/uploads\/sites\/12\/2021\/05\/Screen-Shot-2021-05-28-at-4.12.36-PM-872x1024.png\" alt=\"\" class=\"wp-image-387\" srcset=\"https:\/\/falk.syr.edu\/sport-analytics\/wp-content\/uploads\/sites\/12\/2021\/05\/Screen-Shot-2021-05-28-at-4.12.36-PM-872x1024.png 872w, https:\/\/falk.syr.edu\/sport-analytics\/wp-content\/uploads\/sites\/12\/2021\/05\/Screen-Shot-2021-05-28-at-4.12.36-PM-256x300.png 256w, https:\/\/falk.syr.edu\/sport-analytics\/wp-content\/uploads\/sites\/12\/2021\/05\/Screen-Shot-2021-05-28-at-4.12.36-PM-768x902.png 768w, https:\/\/falk.syr.edu\/sport-analytics\/wp-content\/uploads\/sites\/12\/2021\/05\/Screen-Shot-2021-05-28-at-4.12.36-PM.png 1114w\" sizes=\"(max-width: 872px) 100vw, 872px\" \/><\/figure><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"s:win-probability-modeling\">Win Probability Modeling<span class=\"anchor\" aria-hidden=\"true\"><a href=\"#s:win-probability-modeling\" aria-label=\"Link to section 'Win Probability Modeling'\" tabindex=\"-1\"> Link<\/a><\/span><\/h2>\n\n\n\n<p>\u27a2 I modeled win probability with respect to the home team<br>\u27a2 The response variable was if the home team won the game or not (1 or 0)&nbsp;\u27a2Independent contextual variables I included across my models were:&nbsp;<strong>Scoring Margin, Time Remaining, Vegas Odds, Team Factors<br><\/strong>\u27a2&nbsp;Best model (Brier Score of 0.1326):<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"137\" src=\"https:\/\/falk.syr.edu\/sport-analytics\/wp-content\/uploads\/sites\/12\/2021\/05\/Screen-Shot-2021-05-28-at-4.12.46-PM-1024x137.png\" alt=\"\" class=\"wp-image-388\" srcset=\"https:\/\/falk.syr.edu\/sport-analytics\/wp-content\/uploads\/sites\/12\/2021\/05\/Screen-Shot-2021-05-28-at-4.12.46-PM-1024x137.png 1024w, https:\/\/falk.syr.edu\/sport-analytics\/wp-content\/uploads\/sites\/12\/2021\/05\/Screen-Shot-2021-05-28-at-4.12.46-PM-300x40.png 300w, https:\/\/falk.syr.edu\/sport-analytics\/wp-content\/uploads\/sites\/12\/2021\/05\/Screen-Shot-2021-05-28-at-4.12.46-PM-768x103.png 768w, https:\/\/falk.syr.edu\/sport-analytics\/wp-content\/uploads\/sites\/12\/2021\/05\/Screen-Shot-2021-05-28-at-4.12.46-PM.png 1136w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n\n<figure class=\"wp-block-table aligncenter\"><table><tbody><tr><td>Variable<\/td><td>Coefficient<\/td><\/tr><tr><td>Intercept<\/td><td>-1.493<\/td><\/tr><tr><td>HomeTeamMargin<\/td><td>0.3091<\/td><\/tr><tr><td>TimeRemaining<\/td><td>0.00006721<\/td><\/tr><tr><td>TimeRemaining*HomeTeamMargin<\/td><td>-0.0001041<\/td><\/tr><tr><td>HomeTeamVegasWinPct<\/td><td>2.336<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u27a2 Win probability trends for some of the games previously discussed:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"800\" src=\"https:\/\/falk.syr.edu\/sport-analytics\/wp-content\/uploads\/sites\/12\/2021\/05\/Screen-Shot-2021-05-28-at-4.13.05-PM-1024x800.png\" alt=\"\" class=\"wp-image-389\" srcset=\"https:\/\/falk.syr.edu\/sport-analytics\/wp-content\/uploads\/sites\/12\/2021\/05\/Screen-Shot-2021-05-28-at-4.13.05-PM-1024x800.png 1024w, https:\/\/falk.syr.edu\/sport-analytics\/wp-content\/uploads\/sites\/12\/2021\/05\/Screen-Shot-2021-05-28-at-4.13.05-PM-300x234.png 300w, https:\/\/falk.syr.edu\/sport-analytics\/wp-content\/uploads\/sites\/12\/2021\/05\/Screen-Shot-2021-05-28-at-4.13.05-PM-768x600.png 768w, https:\/\/falk.syr.edu\/sport-analytics\/wp-content\/uploads\/sites\/12\/2021\/05\/Screen-Shot-2021-05-28-at-4.13.05-PM.png 1062w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"s:leverage-index\">Leverage Index<span class=\"anchor\" aria-hidden=\"true\"><a href=\"#s:leverage-index\" aria-label=\"Link to section 'Leverage Index'\" tabindex=\"-1\"> Link<\/a><\/span><\/h2>\n\n\n\n<p>\u27a2 You are probably wondering, what was Lillard\u2019s leverage on his buzzer beater?&nbsp;It was&nbsp;<strong>0.0235<\/strong>, which is pretty high, but only the 9th&nbsp;highest leverage shot of the game. Why? Because if he had missed the shot, the game would be going to overtime, and my model would still slightly favor Portland to win the game in overtime due to their Vegas Odds to win the contest.<\/p>\n\n\n\n<p>\u27a2 The shot with the highest leverage in my data was 0.0519. Richaun Holmes of the Philadelphia 76ers missed a three-point shot at the last second that had it gone in, would have sent the game to overtime and allowed the 76ers more time to defeat the Los Angeles Lakers.<\/p>\n\n\n\n<p>\u27a2 I was very satisfied with my top 200 leverages, all occurring with less than 1 minute remaining in the 4th&nbsp;quarter.<\/p>\n\n\n\n<p>\u27a2 As assumed, the highest leverage shots occur late in close games, where stakes are highest. Now, we have the ability to&nbsp;determine which shots \u201cmean\u201d&nbsp;the most in an NBA basketball contest.<\/p>","protected":false},"excerpt":{"rendered":"<p>By Jonathan Bosch &#8211; Syracuse University &#8217;21 Link Background Link \u27a2 It can be very difficult to determine a player\u2019s impact on the outcome of an NBA game solely based on the player\u2019s box score stats. EX: Damien Lillard Regular Season (03\/07\/2019):&nbsp;51pts 5rebs 9asts&nbsp;\u2013&nbsp;POR 121&nbsp;\u2013&nbsp;OKC 129 Game 5 West 1st&nbsp;Round (04\/23\/2019):&nbsp;50pts 7rebs 6asts&nbsp;\u2013&nbsp;POR 118&nbsp;\u2013&nbsp;OKC 115&hellip;<\/p>\n","protected":false},"author":52,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"_links":{"self":[{"href":"https:\/\/falk.syr.edu\/sport-analytics\/wp-json\/wp\/v2\/posts\/385"}],"collection":[{"href":"https:\/\/falk.syr.edu\/sport-analytics\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/falk.syr.edu\/sport-analytics\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/falk.syr.edu\/sport-analytics\/wp-json\/wp\/v2\/users\/52"}],"replies":[{"embeddable":true,"href":"https:\/\/falk.syr.edu\/sport-analytics\/wp-json\/wp\/v2\/comments?post=385"}],"version-history":[{"count":2,"href":"https:\/\/falk.syr.edu\/sport-analytics\/wp-json\/wp\/v2\/posts\/385\/revisions"}],"predecessor-version":[{"id":391,"href":"https:\/\/falk.syr.edu\/sport-analytics\/wp-json\/wp\/v2\/posts\/385\/revisions\/391"}],"wp:attachment":[{"href":"https:\/\/falk.syr.edu\/sport-analytics\/wp-json\/wp\/v2\/media?parent=385"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/falk.syr.edu\/sport-analytics\/wp-json\/wp\/v2\/categories?post=385"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/falk.syr.edu\/sport-analytics\/wp-json\/wp\/v2\/tags?post=385"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}