Saturday, June 18, 2016

Who Would Win a 1-on-1 Tournament of Today's Best NBA Players?

Awhile back, NBA Memes (Facebook, Twitter) posted the following question:


So I thought I'd try to answer this question. I wrote a pickup basketball simulator to simulate games using NBA stats (from Basketball Reference). It follows the following aspects of a standard pickup game (stats used in parentheses):
  1. If the defensive player steals the ball, the possession ends (Steal %)
  2. Else, what type of a shot is taken (3PA/FGA)
  3. If a 2-pointer, if the defensive player blocks the shot, the possession ends (Block %)
  4. If not blocked or a 3-pointer, if the shot is made (2PM %, 3PM %)
  5. If miss, which player rebounded the miss (OReb %, DReb %)
  6. If the offensive player rebounds the miss, the possession starts over
The following rules are enforced:
  1. Standard pickup scoring is applied: 2's and 1's (3-pointers count as 2, 2-pointers count as 1)
  2. No free throws. You don't shoot free throws in pickup
  3. The games are to 21, win by 2
Right off the bat, it's fairly obvious Curry (and the other 3-point shooters) have a big advantage due to the 2's and 1's rule (Grantland wrote about this scoring advantage). 

After simulating each possible 1-on-1 combination 10,000 times each, another wrinkle jumped out at me: one of these things is not like the othersI used this past NBA season's statistics, and Carmelo is past his prime at this point. He loses to every other player in this hypothetical tournament (and in most cases it's not even close), so for simplicity, I've dropped him to make an 8-team bracket. Here is the win probability matrix for every single possible matchup, including Carmelo:

Win ProbCurryLeBronLeonardDurantHardenDavisWestbrookGeorgeCarmelo
Curry0.00%57.36%58.86%64.82%69.33%66.30%71.07%74.60%82.80%
LeBron42.64%0.00%58.06%60.23%60.09%68.45%73.83%74.30%85.20%
Leonard41.14%41.94%0.00%55.67%57.34%56.93%65.05%69.02%78.56%
Durant35.18%39.77%44.33%0.00%51.96%52.83%60.53%64.91%73.34%
Harden30.67%39.91%42.66%48.04%0.00%53.63%57.66%59.46%72.35%
Davis33.70%31.55%43.07%47.17%46.37%0.00%61.86%63.25%74.58%
Westbrook28.93%26.17%34.95%39.47%42.34%38.14%0.00%55.34%64.04%
George25.40%25.70%30.98%35.09%40.54%36.75%44.66%0.00%58.61%
Carmelo17.20%14.80%21.44%26.66%27.65%25.42%35.96%41.39%0.00%

I seeded each player based on their predicted overall win totals, which created the following bracket:

SeedPlayerRound 1Round 2Round 3
1Curry74.60%49.97%30.28%
8George25.40%9.58%2.95%
4Durant51.96%22.20%10.04%
5Harden48.04%18.25%8.15%
3Leonard56.93%27.32%13.66%
6Davis43.07%17.00%7.11%
2LeBron73.83%46.17%24.36%
7Westbrook26.17%9.51%3.45%

Curry wins the tournament most often, but LeBron isn't far behind. The two of them combine to win 54.64% of the time, which favors the pair over the other six players in the field.

Per the win % matrix, the top 5 least competitive matchups (discounting Carmelo):

RankWinnerLoserWin %
1CurryGeorge74.60%
2LeBronGeorge74.30%
3LeBronWestbrook73.83%
4CurryWestbrook71.07%
5CurryHarden69.33%

And the top 5 most competitive matchups:

RankWinnerLoserWin %
1DurantHarden51.96%
2DurantDavis52.83%
3HardenDavis53.63%
4WestbrookGeorge55.34%
5LeonardDurant55.67%

Some interesting things that jumped out at me:
  • Per the simulations, advantages are not transitive. For example, Curry is favored over LeBron, but he beats Davis (66.30%) less often than LeBron beats Davis (68.45%). 
  • Including defensive performance is huge. Without it, Curry beats LeBron almost 70% of the time, as opposed to 57.36% in the final simulation.
  • The length of game matters. If the games are to 11, then the spread of competitive balance is much smaller (games are much closer to 50/50).
Finally, here are the associated predicted margins of victory for each matchup:

MOVCurryLeBronLeonardDurantHardenDavisWestbrookGeorgeCarmelo
Curry0.001.131.432.373.292.393.394.255.64
LeBron-1.130.001.241.331.682.783.794.075.99
Leonard-1.43-1.240.000.881.230.952.343.144.63
Durant-2.37-1.33-0.880.000.320.351.652.463.81
Harden-3.29-1.68-1.23-0.320.000.571.211.613.77
Davis-2.39-2.78-0.95-0.35-0.570.001.782.143.91
Westbrook-3.39-3.79-2.34-1.65-1.21-1.780.000.922.17
George-4.25-4.07-3.14-2.46-1.61-2.14-0.920.001.42
Carmelo-5.64-5.99-4.63-3.81-3.77-3.91-2.17-1.420.00

Sunday, June 12, 2016

Proportion of the Time the First Team to Score 88 Wins the Game in NBA

Note: This post is designed to be a bit more tongue-in-cheek than some of my more rigorous analysis.

I've had an affinity for looking at phenomena related to the number 8. In light of the NBA Finals, my most recent task has been to identify what proportion of teams that hit a score of 88 first go on to win the game.

So I sampled 88 games from this past regular season (because of course I did), and in all 88 (100%), at least one team got to 88 or more points. In 80 games (90.9%), both teams scored at least 88 points.

In 65 games (73.9%), one or both teams scored exactly 88 points at some point in the game. This actually lines up in line with expectations, as we would expect 75% of all games to hit exactly 88 points (given that at least one team reaches that threshold, which they all did in this sample).

Here's why: there's a 50/50 chance that a team will hit either an even or odd number of points. There's a slim chance that the two teams' scores wouldn't be independent around 88 (such as in an end-of-game situation where the two teams may tie at 88), but since most scores reach the high 90's or 100+, this is a fairly rare occurrence and I'll assume the two teams' scores are independent around this mark. With this in mind, Team A has a 50% chance of not hitting 88, and Team B also has a 50% chance of not hitting 88. 50% * 50% = 25% (odds that neither team hits 88), so 1 - 25% = 75% that at least one team hits exactly 88.

Of those 65 games that hit 88, 43 (66.2%) of those teams to hit 88 first went on to win the game. And when the first team to hit 88 did so while leading, 81.1% of the time they went on to hold that lead and win the game (meaning 18.8% they coughed up the lead and lost). In fact, those 43 teams to hit 88 and win the game ALL did so when they had the lead. No team was behind and hit 88 and then came back to win (in the sample).

Now what does this mean in any sort of context? I have no idea. Does scoring exactly 88 points give you a boost? Maybe, but only if you're already in the lead (and having a 4th quarter lead is going to help a lot more than hitting some "magic number").