NBA Analytics With Python: A Tutorial

by Gene Li

 

Students just getting into the world of sports analytics have a lot of questions, and this guide will serve as a starting point for understanding the big picture overview of the data science process for getting data, processing it, visualizing it, and applying interesting learning models to it. Continue reading “NBA Analytics With Python: A Tutorial”

Theory of the Big 3: Predicting NBA Team Win % from Individual Performance (Full Paper)

by Gene Li   Nowhere is the concept of the “Big 3” more relevant than basketball. As a relatively star-dominated game compared to football, soccer, etc., NBA games are determined by the performance of a few players who can deliver offensive firepower. NBA fans often view their team’s success as driven by the top three players on each team. Just last season, we saw the … Continue reading Theory of the Big 3: Predicting NBA Team Win % from Individual Performance (Full Paper)

There is No Place Like Home

By Jeffrey Gleason

Nine weeks into the NFL season, no teams remain unbeaten. This could’ve actually been said after eight weeks, after seven weeks, and after six weeks as well. Week 5 was the last time an unbeaten team remained, when both the Cardinals and Bengals were sitting at 3-0.

However, after these same nine weeks, five teams remain unbeaten at home. The Patriots, Broncos, Eagles, Packers, and Cardinals have yet to lose on their own turf.

Home field advantage is a phenomenon that gets a lot of traction in sports. Experts often use it to justify their predictions and betting lines usually reflect the perceived advantage of the home side. However, people often generalize home field advantage with a “one size fits all” approach, acknowledging its presence, but assuming it displays a constant impact across different situations.

With five unbeaten NFL home teams and the recent impetus of a road team finally winning Game 7 of the World Series (the Giants topped the Royals on October 29th to capture their third championship in five years), I was interested in how home field advantage was quantitatively different in different situations. How does it vary across sports? Do both good teams and bad teams experience the same advantage? Is it magnified in the postseason? What about differences in earlier eras? These are the questions I set out to resolve.

Continue reading “There is No Place Like Home”

Assessing NBA Scoring Champions Relative to League Average

A Historical Study

by Aqeel Phillips

http://i2.cdn.turner.com/nba/nba/dam/assets/130415230043-041513-kevin-durant-vs-kings.main-video-player.jpg

With just a few weeks left in the regular season, some of us are left without much to root for anymore. HEAT fans remain optimistic in the surprisingly competitive battle for the first seed, and Suns, Mavs, and Grizzlies fans are biting their nails short in hopes that their teams can grab a playoff spot. However, a good percentage of us basketball fans now realize we have little to root for anymore (or if you’re a Sixers fan like me, you realized in about August), and are just waiting to see the final playoff seedings and end-of-season awards before the playoffs get underway. Besides the MVP, one of the most notable awards each year is the Scoring Title. Last season, we were treated with a thrilling ending as the battle for the Scoring Title came down to the wire between Kevin Durant and Carmelo Anthony.

This season, Kevin Durant aka the Slim Reaper has made things less interesting, currently scoring 32.2 points per game (PPG) over 2nd place Melo’s 28.0 PPG. Durant is the only player to average 30 points since he did in the 2009-10 season. The NBA has had a notable drop in scoring lately, a trend first starting when hand checking was instituted in the early 2000’s and extended as many teams have embraced sharing the ball throughout the team in order to better find open looks, namely threes, rather than relying on singular scorers. Durant’s current season widens eyes at first glance — averaging 4 points more than his next closest competitor will do that. But I find that PPG by itself doesn’t tell the full picture. Elgin Baylor averaged over 38 points in 1961-62, but that was over 50 years ago in a completely different league. So who had the most impressive season: 2014 Durant? 1962 Baylor? 2006 Kobe? We’ve witnessed plenty of monstrous seasons, and this study examines them in relation to the rest of the league at the time to contextualize the simple PPG marks.

League Scoring Average (Season)

To get a better comparison between scoring performances, we can divide a player’s PPG by their minutes per game (MPG) marks to see how they’re scoring with regard to the opportunities they’re being given. This is especially useful in calculating a league average scoring mark. We don’t want end bench players that average 0.6 PPG to drag down the entire league scoring average, most importantly because they outnumber the talented, 20+ PPG scorers in the league. Dividing PPG by MPG for each player across the league levels the playing field, and also accounts for the possibility that in any given season the league as a whole significantly played more or less bench/low-scoring players for whatever reason (for example, in the ‘60s there were much fewer players in the league and more minutes and points to go around).

For reference, here are the Points Per Minute values for the current league leaders in scoring:

League Leaders

(For those wondering about a full list of the league leaders in PPM, see the appendix)

In terms of points scored per time played, you can see that Durant is not just scoring at an average rate while playing more minutes, he is scoring more efficiently than the players below him on the list (shown by a higher PPM value than his competitors). It’s interesting to note that Melo averages more minutes than Durant, but Durant makes much better use of his time, scoring-wise, than Melo (Durant is also more efficient with his shot attempts – averaging 20.7 field goal attempts per game to Melo’s 21.5). This gives more evidence to Durant’s case for “best scorer in the league” – not only does he have the sheer output, but he also has the efficiency.

Next, we’ll calculate the average PPM value for the entire league, and compare each individual player to that average, to see how much better they score than the average replacement.

Unlike other studies I’ve done, I haven’t artificially subtracted out all of the players that aren’t contributing much (<20 MPG, <30 GP in previous articles), as using PPM should even out all contributions.

Continue reading “Assessing NBA Scoring Champions Relative to League Average”

Using Weighted Player Efficiency Rating to Predict the NBA Playoffs

By Neil Rangwani

This time of year means a few things in the world of sports: March Madness highlights take over ESPN, baseball stadiums start to fill up, and Knicks fans await their inevitable disappointment.

This NBA season looks remarkably competitive: the top of the league is crowded with legitimate contenders. The defending champion Heat and the Pacers, although sliding a bit recently, look to be the favorites in a weak East, while the Thunder, Clippers, and an extremely hot Spurs team each look like they could win the West.

In order to take a closer look at the playoff picture, we wanted to rank teams according to a metric that took into account various facets of a player’s game, so we decided to calculate a team equivalent of Player Efficiency Rating (PER). We took a relatively simple approach, since PER encompasses a number of basic statistics.

Introducing Weighted Player Efficiency Rating (WPER)

Using data for each player over the past four NBA seasons, we weighted each player’s PER by their playing time as a fraction of their team’s total playing time in order to account for a player’s actual usage. Then, we found each team’s Weighted Player Efficiency Rating (WPER) by summing the values for each player on each team.

Continue reading “Using Weighted Player Efficiency Rating to Predict the NBA Playoffs”

Dishes and Dimes Part II – Passing Efficiency

by Aqeel Phillips

Halfway through the current NBA season, fans have celebrated and lamented the position of their teams as the contenders and lottery teams separate themselves from the pack. On the flip side, NBA stat geeks have begun universally celebrating as the SportVU player tracking system has filled up with an ample pool of data and now possesses a respectable sample size. More than 41 games into the season, we can not only start to project playoff seeding and start pondering matchups, but we can also begin to accept players’ performances so far as an expectation of how they will finish the season as well (barring injury or possible team-afflicting swaps at the trade deadline). SportVU allows us to take a deeper look at these performances, past the simple statlines of points, rebounds, and assists, and really get our hands dirty in finding out what might makes each team and player special.

A Revisit

To start, I’d like to revisit my previous article with a few revisions. A reader pointed out that the passing player’s free throws were not being subtracted from the team free throws, so players like LeBron James and Russell Westbrook benefitted from taking many free throws. In addition, it appears that Assist Percentage is a more helpful stat to use than Assist Rate for calculating free throws. The former is simply a percentage created by the amount of field goals assisted by a player out of the total team field goals made, while Assist Rate is a more involved metric that counts assists versus possessions in a game. Lastly, player minutes need to be factored in as well. Team points from free throws are tallied over the entire game, but a player is only on the court for a fraction of the game to assist on those free throws. As a result, we need to multiply the team free throws per game by the fraction of the game that a player is on the court.

Here is a comparison of my formula (specified in previous article) compared to the concrete data that SportVU provides this season, using this season’s data rather than the 2012-13 data I used previously.

Screenshot 2014-03-27 15.56.09

The formula has its flaws, specifically it has a tendency to overestimate the number of free throws catalyzed by a player’s passing. For example, the formula assumes that Chris Paul’s ridiculous 53.8% assist percentage also applies to the amount of free throws shots while he is on the floor. The formula projects him to catalyze 5.8 FTs per game, while NBA.com reports that he only catalyzes 0.9 per game (almost the full difference between his projected points and his contributed points). Overall I believe it still gives a fairly good projection of how many points a player is contributing total. I think that it can still be a valuable tool for getting a picture of players’ contributions before SportVU was available.

(Note: AST+ is not available for this season, so I was forced to calculate it myself. A full explanation can be found after the conclusion of the article).

Introducing Passing Efficiency

SportVU has been tracking two pieces of player data never readily available before: Passes per Game and Points Created by Assist per Game (as mentioned previously). The points are a combination of passes leading to two-pointers, threes, free throws, and passes leading to assists (“Hockey assists”). To get a picture, here are the current top five in Passes per Game and Points Created by Assist per Game (which is desperately in need of a fancy acronym).

Screenshot 2014-03-27 16.12.02

Dishes and Dimes – A Close Look at Assists

by Aqeel Phillips

With the introduction of the new SportVu advanced statistics that the NBA has officially introduced at the beginning of November, I’ve been most intrigued by the new passing statistics now at the disposal of the fans. It’s been well known around stat-heads for a while that Assists are a flawed metric for measuring a player’s contribution to their team. They simply serve as a tally with no weight to them, a cross court pass to an open player in the corner yields the same number of Assists as a pass inside to a big man who does most of the heavy lifting by skillfully posting up. Though some public websites track the number of assists that lead to three-pointers as opposed to deuces, there is still no stat that accounts for passes that lead to free throws, and passers are robbed of rightful assists that they should receive when a play ends in a shooting foul. SportVu will be tracking these statistics, but I’m too impatient to wait for the season to progress and the sample size of SportVu to increase sufficiently, so I set out enumerate the contributions of passers from last year’s NBA season.

The Three-Pointers: Creating Valuable Shots

Let’s start by reminding ourselves of the Assist leaders from last year:

Assists

As stated previously, these assists merely serve as a tally of passes a player completed that led to field goals. We can gain a better picture of each passer’s contributions by taking a peek at a lesser-known statistic called Weighted Assists (shorthand AST+, courtesy of Hoop Data), which weights three-pointers as 1.5 as valuable as regular field goals. From AST+, we can easily calculate the amount of points from field goals that a player produced per game, by multiplying their AST+ value by two.

Table2

Continue reading “Dishes and Dimes – A Close Look at Assists”