I never intended for Gravity and Levity to have so much talk about basketball.  But it’s becoming increasingly clear that my hobby (nerdy problems in basketball) is much more popular than my real job (nerdy problems in “real” life).  Sadly, my real research has never been written up in Science News.

As it turns out, though, there really are a surprising number of interesting theoretical problems that come up when thinking about basketball.  The answer to the question “what is the best strategy for my team?”, for example, includes elements of network theory and game theory, in addition to good old-fashioned probability theory.  And if you’re a nerd like me as well as a basketball fan, those are pretty exciting things to dabble in.  So basketball continues to be a source of fun for me even though I was never good enough to play it beyond the high school level.  Probably not as fun as actually being a basketball player, but I suppose that in life we each work with what we’re given.

$\hspace{1mm}$

A month or so ago I was on an airplane and feeling restless, so I started thinking ambitious thoughts about constructing a great optimization theory for basketball.  As I thought more, though, I realized that there were some very basic questions to which I didn’t know the answer that would have to be addressed first.  This process of slowly realizing the depths of my own ineptitude continued, and after multiple rounds of mental simplifying I finally ended up with a comically over-simplified model of decision-making in basketball that I still couldn’t immediately write down the answer to.  Specifically, I came up with the following question:

Suppose that your team runs an offense with exactly one play.  Every time your team has the ball, you run the play, and at the end of the play you arrive at a shot opportunity.  The quality of that opportunity varies: sometimes you end up with an easy layup that is almost certain to go in, and other times you end up with a contested jump shot that has essentially no chance.  At the moment of the shot opportunity, your team has to make a decision: should you take the shot or should you reset the offense and run the play again in hopes of arriving at a higher-percentage opportunity?

Now suppose that the quality of the shot opportunity, as characterized by the probability p for the shot to go in, is randomly distributed between 0 and 1.  How good must be the probability p for the shot to go in before you should take it?

It sounds like a pretty simple question, right?  It’s tempting to say right away that you should shoot whenever $p > 0.5$, which is somehow equivalent to saying “take only above-average shots”.

But the right answer is actually a bit more complicated.  For one thing, the answer depends very much on how much time you have (say, before the shot clock expires).  If you have a lot of time, for example, you can just keep resetting the play whenever it doesn’t give you an easy layup.  Having more time gives you a greater capacity to be selective.

So, generally speaking, suppose that you have enough time to run the play $n$ times.  What is the lower cutoff $f(n)$ for the shot quality such that your team should shoot whenever the shot opportunity has $p > f(n)$?  This function, $f(n)$, is what I call “the shooter’s sequence”.  Posing the problem of $f(n)$ seemed so simple when I first wrote it down on the airplane; I was surprised that I couldn’t immediately say what the answer was.

$\hspace{1mm}$

n = 1

Actually, if you start at the beginning, it’s not hard to write down some answers right away.  For example, if your team has only enough time to run the play once, then you should take any shot that presents itself.  This means that when $n = 1$, you should shoot whenever $p > 0$.  So the first term in the sequence $f(n)$ is

$f(1) = 0$.

As a consequence, your average shooting percentage will be equal to the average shot quality $1/2$, so that you score half the time.

$\hspace{1mm}$

n = 2

Now suppose that you have time to run the play twice.  If you don’t like the first shot opportunity that comes up, you can reset and run again.  If you choose to reset, you can expect to score half the time (as explained above).  So, it’s not hard to see that the first shot opportunity should have $p > 1/2$ in order to be worth taking.  This means

$f(2) = 1/2$.

If the team shoots only when $p > 1/2$, then on the first attempt its shooting percentage will be $3/4$ [the average of the interval (1/2, 1)].  Thus, the team’s combined shooting percentage for whole possession is:
(Probability that the team will shoot the first time around) $\times$ (Team’s shooting percentage on the first attempt) $+$ (Probability that the team will hold and wait for the second play)$\times$ (Team’s shooting percentage on the second attempt)  $= 1/2 \times 3/4 + 1/2 \times 1/2 = 5/8$.

$\hspace{1mm}$

n = 3

Now it should be fairly easy to see that if you have enough time to run the play three times, on the first attempt you should only take shots with $p>5/8$.  Because if the shot attempt on your first time through is worse than that, you can hold and with enough time for two plays you will on average get a shot whose chance of going in is $5/8 = 0.625$.  This means

$f(3) = 5/8$.

$\hspace{1mm}$

large n

In this way you can building a recursive sequence for finding out when your team should shoot given that there is enough time for $n$ plays.  The general recursion rule looks like this:

$\textrm{(lower cutoff for shot }n\textrm{)} = \textrm{(average scoring rate for }n-1\textrm{ shots)}$

$f(n) = \{1 + [f(n-1)]^2\}/2$.

Along with the condition $f(1) = 0$, this equation defines the “shooter’s sequence”.  Writing down the first few terms is actually kind of surprising:

$f(1) = 0$

$f(2) = 1/2$

$f(3) = 5/8$

$f(4) = 89/128$

$f(5) = 24305/32768$

$f(6) = 1664474849/2147483648$

$...$

$f(\infty) = 1$

It’s a pretty strange sequence of numbers to come out of such a simple problem, right?  And, in fact, there is no analytical expression for the sequence.  It can only be defined recursively, or evaluated approximately for large $n$.

$\hspace{1mm}$

And, of course, you can expand on the problem by making the problem statement a little less specific.  I ended up calculating some more variations, including the effects of turnovers and different ranges of shot quality, and eventually it became a short paper (although I’m still not sure what kind of journal, if any, would publish it).

$\hspace{1mm}$

$\hspace{1mm}$

It’s still far from clear how much (if any) practical knowledge can be gained from this “shooter’s sequence”.  But I know that at moments like this I’m glad that I grew up to love nerdy problems in math and physics.  Because if you like this sort of thing, then fun problems are everywhere.

Just look around you:

11 Comments leave one →
1. August 4, 2011 10:17 pm

I follow your reasoning for n > 1, but why do you say that a team shooting at n=1 will score half the time? The average shot quality is certainly not 1/2; there are many more poor shots than there are good ones, to my way of thinking. How do you justify calling the average shot probability 1/2? It seems to me both theoretically and empirically incorrect.

(It seems to me that even the best shots are not of probability 1! http://www.youtube.com/watch?v=La4PpYnKrNc)

August 5, 2011 12:00 am

You’re definitely right that my assumption about the average shot quality isn’t very realistic. I only set it to 1/2 to make the numbers nicer. Like I said: this is the comically oversimplified version of the problem! In the paper I linked to I solved the problem for arbitrary values of shot quality mean and variance.

August 5, 2011 9:51 am

(That video was nice, by the way. Vince Carter can really miss a dunk.)

• August 5, 2011 1:19 pm

If only I could jump like him just for a day!

Anyway, the paper is indeed much clearer on what you mean. Neat work, it gives me some thoughts I want to explore.

August 6, 2011 1:24 pm

There’s a good reason why nerds have blogs and pro basketball players have money, women and fame :-D

3. August 6, 2011 6:45 pm

One thing to add: you need to consider the likelihood of a turnover – sometimes deciding not to take a shot means you’ll subsequently lose the ball and get no shot at all.

August 6, 2011 8:11 pm

Hi Ed.
You’re definitely right. When considering whether to take a shot, you have to weight its quality against the quality of future shots and the probability that you will lose the ball and never get a chance at all. In the paper I linked to at the end I did take turnovers into account. They have a surprisingly large effect.

August 7, 2011 4:36 am

So does the probability to draw a foul. Mind the opportunity costs.

5. August 19, 2011 2:30 pm

Since the shooter used an offensive possession with his two free throw attempts it should count as an offensive possession i.e. a shot attempt for the player..Lets have an example Player 3 takes 15 shots he makes five misses five and is fouled and does not make the shot on the remaining five. Differences in three-point shooting percentage free throw shooting percentage and the frequency with which each player takes various different types of shots can all affect their shooting percentage and whether that shooting percentage should be considered efficient..To accurately compare the offensive shooting efficiency of two players one should look at True Shooting Percentage TS rather than Field Goal Percentage FG as it accounts for three-pointers and free throws..To bring this full circle to our early example Kobe Bryants position requires him to shoot more three-point shots than LeBron James. After all assists are not recorded on passes that lead to shots that should be made but are not.