Photo by Simon Rae on Unsplash

Inspired by The Zen of Python


How to use Uber’s probabilistic programming library Pyro to model the NBA Draft order

Many of us who follow the NBA Draft closely have a keen desire to know the precise ordering of the Draft, eg where each player will be taken (“where” having a dual meaning here, both the team and draft slot). To this end, it is common behavior to ingest the information we get from the dozen or more “prominent” mock drafts available leading up to the Draft. There are different ways analysts and media try to aggregate this information into what I like to call “Meta Mocks”. Typically this just involves very simple operations like averaging ranks or looking at…


Photo by Franki Chamaki on Unsplash

Win probability (WP) is the probability of winning (duh) — given a certain context (or prior knowledge in the parlance of statistics). That context is everything. For example, bettors typically have some idea about the win probabilities for an upcoming game based on their prior knowledge of the strengths and weaknesses of the two teams in general and the context of the specific game at hand. Is it a home game? Are the players coming off a day of rest or a bye week? Is a star player injured?

In-game win probability — as the name implies — additionally models…


Here I’m going to show you in explicit detail how to perform stochastic gradient descent (SGD) for a Bernoulli simulation (eg coin flips). This is arguably the simplest non-trivial problem which fully demonstrates SGD. The likelihood function for a single Bernoulli trial is defined as follows:

The likelihood function for a single Bernoulli trial

The first thing we’re going to do is simulate a coin-flipping experiment. Let’s do it in Python. Here’s the code to generate 1000 random coin flips:

import numpy as np
import matplotib.pyplot as plt
theta = 0.5 # a "fair" coin
num_flips = 1000 #simulate 1000 coin flips
#Python list comprehension
flips = [np.random.random() <…

Photo by TJ Dragotta on Unsplash

This last of 3 posts on the 2019 Draft is just going to be a list (with some brief thoughts sprinkled in) of players I like that I would target in the second round or as UDFA’s. Full disclosure: I have decided to leave out all the Europeans not named Goga because I simply didn’t have enough time this year to watch actual game footage — and I don’t want to make decisions simply based on highlights. If you’re wondering, I actually did watch Goga in some full game footage, so I felt like…


Photo by rawpixel.com from Pexels

(Draft Board Tiers 1–3 here)

This is not a mock draft. It’s my big board — a ranking of draft-eligible players roughly in the order I estimate their talent level/usefulness to NBA teams. As a point of emphasis, tiers are more important than rankings within tiers. The tier labels correspond primarily to perceived upside value — as opposed to a player’s floor. Of course, some players will invariably play above or below the tiers as I’ve constructed them. Hopefully, I am within +/- 1 tier when it’s all said and done! I wish I had time to write up more…


Photo by DiAnte Squire on Unsplash

This is not a mock draft. It’s my big board — a ranking of draft-eligible players roughly in the order I estimate their talent level/usefulness to NBA teams. As a point of emphasis, tiers are more important than rankings within tiers. The tier labels correspond primarily to perceived upside value — as opposed to a player’s floor. Of course, some players will invariably play above or below the tiers as I’ve constructed them. Hopefully, I am within +/- 1 tier when it’s all said and done! I wish I had time to write up more than these little blurbs, but…


If you’ve followed me on Twitter for a while, you’ll probably know me best as an avid Warriors fan, a Draymond Green stan — or perhaps, Harrison Barnes hater — a “stats” guy, or maybe even as the creator of nbawowy.com. In recent years — honestly, as regular season Warriors games have become somewhat less compelling in terms of information content — I’ve turned more and more to the NBA Draft as a perpetual source of basketball entertainment and puzzle solving. Basically, it’s a hugely fun challenge to identify which NCAA/Euro players could actually become NBA players, what their roles…


Photo by jesse orrico on Unsplash

Read Tiers 1–3 here.

Read Tiers 4–5 here.

One big point of emphasis here. This is not a mock draft. It’s a “big board” which means this is a list or players roughly in the order I estimate their talent level/usefulness to NBA teams *in general*. To be honest, I don’t have much interest in predicting what teams will actually do. Well, except maybe for the Warriors. Second point of emphasis, tiers are more important than rankings within tiers. The tier labels are what I could envision being ultimate upside. Of course, some players will invariably play above or below…


Read “NBA Draft Big Board (Tiers 1–3)” here.

One big point of emphasis here. This is not a mock draft. It’s a “big board” which means this is a list or players roughly in the order I estimate their talent level/usefulness to NBA teams *in general*. To be honest, I don’t have much interest in predicting what teams will actually do. Well, except maybe for the Warriors. Second point of emphasis, tiers are more important than rankings within tiers. The tier labels are what I could envision being ultimate upside. Of course, some players will invariably play above or below…

Evan Zamir

Data Scientist. San Francisco.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store