Skip to content
Vamshi Jandhyala

Books · The Riddler

Chapter 6

Will The Neurotic Basketball Player Make His Next Free Throw?

A basketball player is in the gym practicing free throws. He makes his first shot, then misses his second. This player tends to get inside his own head a little bit, so this isn’t good news. Specifically, the probability he hits any subsequent shot is equal to the overall percentage of shots that he’s made thus far. (His neuroses are very exacting.) His coach, who knows his psychological tendency and saw the first two shots, leaves the gym and doesn’t see the next 96 shots. The coach returns, and sees the player make shot No. 99. What is the probability, from the coach’s point of view, that he makes shot No. 100?

The Riddler, FiveThirtyEight(original post)

Solution

After the opening make and miss the player holds a tally of 11 made and 11 missed shot, and each new shot is a make with probability equal to the current fraction of makes, after which the tally of that outcome grows by one. This is precisely Pólya’s urn: an urn holding one “make” token and one “miss” token, from which we draw at random, note the colour, and return that token together with a fresh one of the same colour.

Two facts about this urn settle the problem.

The shots are exchangeable. Take any particular sequence of the shots from the third onward with jj makes among its first kk entries. Multiplying the draw probabilities along the sequence, the makes contribute the rising factors 1,2,,j1,2,\dots,j to the numerators and the misses contribute 1,2,,kj1,2,\dots,k-j, while the denominators run 2,3,,k+12,3,\dots,k+1 regardless of order. So Pr(a given sequence with j makes in k shots)=j!(kj)!(k+1)!,\Pr(\text{a given sequence with } j \text{ makes in } k \text{ shots}) = \frac{j!\,(k-j)!}{(k+1)!}, which depends only on the count jj, not on the order. The shots can be reshuffled freely without changing any probability.

Each shot is an even-money make. The same expression equals 01θj(1θ)kjdθ\int_0^1 \theta^{\,j}(1-\theta)^{\,k-j}\,d\theta, so the shots behave exactly as if a hidden make-rate θ\theta were drawn uniformly on [0,1][0,1] and every shot were then an independent make with probability θ\theta. In particular each individual shot is a make with probability E[θ]=12\mathbb{E}[\theta]=\tfrac12.

The coach saw shot 9999 land and asks for shot 100100. By exchangeability the 9696 unwatched shots carry no information, and Pr(100 make99 make)=Pr(99 and 100 both makes)Pr(99 make)=E[θ2]E[θ]=1/31/2=23.\begin{aligned} \Pr(100 \text{ make} \mid 99 \text{ make}) &= \frac{\Pr(99 \text{ and } 100 \text{ both makes})}{\Pr(99 \text{ make})}\\[2pt] &= \frac{\mathbb{E}[\theta^2]}{\mathbb{E}[\theta]} = \frac{1/3}{1/2} = \boxed{\tfrac{2}{3}}. \end{aligned}

The computation

Simulate the neurotic shooter as described: start from one make and one miss, take shots 33 through 100100 with each make probability equal to the running fraction of makes, keep only the runs in which shot 9999 is a make, and among those measure how often shot 100100 is also a make.

import numpy as np
rng = np.random.default_rng(0)
runs = 2_000_000
seen99 = made100 = 0
for _ in range(runs):
    hits, throws = 1, 2                  # one make, one miss to start
    for shot in range(3, 101):
        make = rng.random() < hits / throws    # P(make) = make fraction
        hits += make; throws += 1
        if shot == 99 and not make:      # coach saw 99 land; drop misses
            break
        if shot == 99:
            seen99 += 1
        if shot == 100:
            made100 += make
print(made100 / seen99)                  # ~0.6667