Simulating a million Kobe Bryant games

Can we beat 81 with the magic of statistical inference?

Every data course will warn you to check for outliers, but for sports fans, these results make up all of the fun, the moments where a player or a team dramatically outperforms expectations and does something extraordinary.

We’re able to investigate exactly how rare these events are with simulations. With a data set that has a normal distribution of values, you can take the distribution of some value, like the delays in a subway commute, and recreate that exact scenario endless times to figure out the likelihood of a certain result.

So, when I tell everyone that my commute always ends up as a hour-plus, Mad Max hellscape, tools like this NYT visualization simulate my claims for me. 

I wish the C train only on my worst enemies, and any visiting Patriots fans.

For our simulation series, this technique can help visualize some of these indelible moments in sports. Let’s take a look at one of the most brilliant moments of individual glory in the history of the NBA, a perfect candidate for simulation.

Kobe’s 81 points

The moment defines a legendary career, inspired endless memes and roasts, and serves as the most cataclysmic individual scoring performance of recent memory. Take a minute or three and relive the insanity.

Kobe ended his twenty-year career averaging 25 points per game, winning five championships, and inspiring a generation of NBA athletes and fans to fade away before shooting any object. Not here to discuss his legacy, or incredibly complicated personal life, but this career-high night perfectly showcases the fun in simulating data.

I pulled Kobe’s entire career game logs from Basketball Reference, all 1,346 data points, and looked to see the distribution of points scored. Our target game sits as the one little blue blip at the right end of this histogram.

Kobe scored around his career average most frequently, but you’ll see the insane production around the 40 mark: the man scored 40 or more 122 times in his career, and 50 or more 25 times.

While definitely not the perfect distribution, the robust dataset lets us play around with some fun simulations. I built three cases to test: one looks at Kobe’s actual career, one imagines a more deferential Kobe that took six less shots a game, and the last imagines a somehow more ruthless version that took six more shots. I split the fake shots between twos and threes and assumed the same rate of makes each game.

With that, we can take these values and simulate one million Kobe games based on the means and standard deviations of each dataset.

Our simulation based on Kobe’s actual stats ended with a 24.996 career points per game–almost exactly the IRL version–while reduced Kobe scored 19.66 and supernova ball hog Bryant put up 30.34 per game.

Here’s how those fake million games turned out for each version of the Mamba.

Each peak represents that Kobe’s average points per game. You’ll notice the longer right tail on our hyper-powered Kobe, where he ended up producing more sixty-plus games.

In these million games, the simulated real life Kobe never hit the 81 point mark, topping at 79.6 for his fictional career high. Reduced Kobe maxed out at a pedestrian 66.4, like a run of the mill Hall of Famer.

Our inflated version did manage to reach a new high of 90.7, but out of those million games, Selfish Kobe only beat 81 points nine times. In a world where he’s taking six more shots every single game, Kobe still had a 0.0009% chance of beating his career high in a game.

Even with intentionally increasing his already historic output, Kobe still barely replicates his most impressive individual feat. Next time, I’ll figure out how to simulate a million games against poor Jalen Rose, the guy most famous for guarding Kobe in his 81 point eruption, and see what that gets us.