A free throw game

In honor of the NBA lockout ending, today’s post is related to basketball.

It’s a fun and relatively easy math problem about shooting free throws:

Alice and Bob agree to settle a dispute by shooting free throws.

The game is simple: they take turns shooting, and the first one to make a shot wins.

Alice makes a shot with probability 0.4 while Bob makes his shots with 0.6.

To compensate for the skill difference, Alice gets to shoot first.

Is this a fair game?

Bonus: if Alice makes a shot with probability p and Bob with probability q, for what values of p and q would the game be fair? Solve if q = 1 – p

Can you solve it?

The answer as usual is posted in the comments section.



Share this post:

| More

Previous post:

Next post:



  • http://www.mindyourdecisions.com/blog/ Presh Talwalkar

    Answer to the puzzle

    This problem is very similar to the dice brain teaser.

    There are many methods to solving the probabilities of winning. The one I like is a technique of backwards induction.

    The free throw game seems hard to figure out because a round could end with no one making a shot, and then the game would continue. Solving for the winning probability seems like you’d need to use an infinite series.

    But that’s not the case. The trick is seeing that each round is really an independent sub-game. The fact that the previous round ended without a winner does not affect the winner of the current round or any future round. This means we can safely ignore outcomes without winners.

    The probability of winning depends only on the features of a single round.

    This simplifies the problem to a more tractable one. So now, assume that one of the players did win in a round, and then calculate the relative winning percentages.

    We can use a little trick to visualize the problem. Because Alice makes a shot with probability 0.4, and Bob with 0.6, we can imagine the two are not shooting free throws but instead rolling a 10 sided die. Let’s say that Alice wins for rolling the numbers 1, 2, 3, and 4, and Bob wins for the other six numbers of 5, 6, 7, 8, 9, 10.

    So Alice wins if she “rolls” a winning number. If she does not, then Bob gets to roll and he wins on his numbers. All other combinations of rolls are a draw and they go again.

    Here is a diagram illustrating the outcomes of a round, illustrating the events for which Alice will win:

    To calculate the winning percentage, we can simply count out the number of ways that Alice wins. In the grid, there are 40 squares that she wins, and only 36 that Bob wins.

    Therefore, Alice wins with probability 40/76 = 53 percent and Bob only with 36/76 = 47 percent.

    Although Bob is a better shooter, Alice has a slight edge in the game because she gets to shoot first.

    Answer to bonus: generalizing the probabilities

    The numbers we used made it convenient to convert the game into rolling a 10-sided die.

    But we can generalize the process.

    Notice that Alice won on 0.4 percent of the squares, which is the same as her shooting percentage.

    The percentage of squares for when either person won the game was 0.76, which is equal to the chances Alice makes her shot (0.4) or she misses her shot (1 – 0.4) and Bob makes his (0.6). The sum of this is 0.4 + (1 – 0.4) * 0.6.

    Thus the probability Alice wins a game is: (SP for shooting percentage)

    (Alice’s SP) / (Alice’s SP + (1 – Alice’s SP) * Bob’s SP)

    If we say that Alice’s SP is p and Bob’s is q, then this becomes:

    p / (p + (1 – p) * q)

    The game is fair if this term equals 0.5. This simplifies to:

    (pq) – pq = 0

    We can plot out all values for which this equation is true, remembering that p and q are probabilities so they are between 0 and 1:

    >

    If we give the additional restriction that q = 1 – p, then we can uniquely solve that p is about 0.382, which is plotted above.

    So Alice at 0.4 shooting percentage is just a tad higher than the fair shooting percentage of 0.382.

  • joyjeet Sarkar

    Shot Taken Not Taken
    Alice 0.4 0.6
    Bob 0.6 0.4

    Probability that Alice wins in 1st Shot = 0.4
    Probability that Alice wins in 2nd Shot =
    P(Alice loses in 1st shot) x P(Bob loses in his 1st) x P(Alice wins in 2nd shot)
    = 0.6 x 0.4 x 0.4

    Total Probability of Alice wins = Probability in 1st shot + Prob. in 2nd shot + Prob. in 3rd shot. + ……. Till infinity
    = 0.4 + 0.6 x 0.4 x 0.4 + ……………

    This is infinite GP series with a=0.4 and r=0.6×0.4

    So, the Total Probability of Alice Wins 0.52631

  • joyjeet Sarkar

    For generalised Case:

    Probability that Alice wins in 1st Shot = p
    Probability that Alice wins in 2nd Shot =
    P(Alice loses in 1st shot) x P(Bob loses in his 1st) x P(Alice wins in 2nd shot)
    = (1-p) x (1-q) x p

    So, Total Probability that Alice Wins = p + (1-p)x(1-q)xp + ……..

    Total Probability that Alice wins = p/(1-(1-p)(1-q))
    = p/(p+q-pq)

    Sorry for the double post

  • john

    Small correction. It’s (q-p)-pq=0 and not (p-q)-pq=0. It can also be written as q-p=pq. As we are dealing with probabilities, the right side cannot be negative, so q is greater than p as common sense suggests. Your numerical answers show p smaller, so this is obviously just a typo.

    Solving for this type of infinite series is really quite simple. First pull off the 1st term (what joyjeet calls “a” for a “GP series”) then factor out What joyjeet calls “r” for the “GP series”, and get the original series back.
    In this case we know the infinite sum must be equal to 1/2, so we get 1/2=p+(1-p)(1-q)/2, or 1=2p+(1-p)(1-q) which simplifies to q-p=pq as above.

    This way, you don’t need to depend on ready resources to solve a problem that involves such a series. Or you could find the alternate approach like Presh did.

  • http://www.mindyourdecisions.com/blog/ Presh Talwalkar

    Thanks for the alternate derivation JoyJeet, and thanks for the correction on the algebra John.

  • Faisal

    P(Alice wins round) = P(Alice makes shot) = 0.4

    P(Bob wins round) = P(Alice misses shot n Bob makes shot) = 0.6*0.6 = 0.36

    Since they keep shooting till there’s a winner, you just normalize the above to probabilities.

    P(Alice wins game) = 0.4/(0.4+0.36) = 0.526

    P(Bob wins game) = 0.36/(0.4+0.36) = 0.474

    In the generalized case:
    P(Alice wins) = p/(p+q-qp)
    P(Bob wins) = q/(p+q-qp)

  • Faisal

    Sorry about the double post earlier. Also I forgot to add we have a fair game precisely when p = q-qp.

    So for the case when q = 1-p, to have a fair game, the value of p would have to be 0.38 and the value of q would have to be 0.62.

Previous post:

Next post: