Basketball Free-Throw Percentage
Prompt
In the sport of basketball, when a player is “fouled,” they have the opportunity to take two “free-throws,” where the player shoots the ball two times and can give his team one point for each basket made
An important statistic in basketball is a player’s free-throw success percentage over the basketball season. For example, if a player has 10 free-throw attempts made 8 baskets, their percentage is 80%.
Interestingly, the percentage is always rounded to the nearest percent (for the ease of the viewing public, which probably does not know math). For example, if a player has made 7 out of 22 free-throws, then the reported percentage is 32%.
During a game, the announcer says that a player is making 78% of their free throws at the moment that the player is fouled. The player makes two free-throw attempts and makes the first one but misses the second attempt. After the statistics are updated, the player is now making 76% of their free-throws.
For this player, what are all possible numbers of free-throws made and attempted so far this season (including the ones that were just made)? (Hint: There are a finite number of solutions)
Solution
The handwritten solution is transcribed below; the original six-page PDF preserves the working and diagrams.
Verification
In Kotlin, the solution can be verified by running the following code:
fun calculatePercentages(
percentInitial: Int,
percentFinal: Int,
successes: Int,
rounds: Int,
iterations: Int,
): MutableList<Pair<Int, Int>> {
val solutions = mutableListOf<Pair<Int, Int>>();
assert(iterations > 1) { "iterations $iterations must be greater than 1" };
for (n in 1..iterations) {
for (s in 1..n) {
val rawPercent = s.toDouble() / n.toDouble();
val percentRounded = Math.round(rawPercent * 100).toInt();
val finalSuccesses = s + successes;
val finalRounds = n + rounds;
val rawFinalPercent = finalSuccesses.toDouble() / finalRounds.toDouble();
val finalPercentRounded = Math.round(rawFinalPercent * 100).toInt();
if (percentRounded == percentInitial && finalPercentRounded == percentFinal) {
solutions.add(Pair(s, n));
}
}
}
return solutions;
}
//sampleStart
fun main() {
val iterations = 1000;
calculatePercentages(78, 76, 1, 2, iterations).forEach {
println("initial: (${it.first}, ${it.second}); final: (${it.first + 1}, ${it.second + 2})")
}
}
//sampleEnd
Handwritten solution
Terms and rounding requirements
Let be the initial successes and the initial attempts (called “rounds” in the source). The final totals are .
Solving the first pair for gives
For the updated percentage,
so
Boundary intersections
Intersecting each initial boundary with each updated boundary gives:
| Initial boundary | Updated boundary | intersection |
|---|---|---|
The graph is generated from the four stated inequalities. Solid boundaries are included; dashed boundaries are excluded. The region is very narrow in actual coordinates, unlike the exaggerated handwritten sketch. The right panel uses the vertical offset to show the same region more clearly; vertex and point labels still give the original totals.
Intuitively, the solutions are whole-number points in this quadrilateral, respecting the strict and nonstrict boundaries. The source bounds are and .
Iterating through the possibilities
The handwritten pseudocode:
FOR s IN 14...41
FOR n IN 17...53
IF (s,n) SATISFIES INEQUALITIES
ADD (s,n) TO SOLUTIONS
Personal note: “You can technically make this more efficient with flooring/ceiling the max/min values of the quadrilateral at X.”
The original written list is , followed by final totals .
Correction
The first pair was copied incorrectly in the handwritten answer list. Both plotted diagrams label it . In fact, , whereas and . Integer arithmetic verifies exactly these six possibilities:
Initial made/attempted Final made/attempted
Desmos verification
The source uses and to highlight integer pairs satisfying the inequalities. “Intersections match iterative solutions.” The four boundaries form the quadrilateral above and diverge as gets larger.
Exact integer solutions replace the Desmos interface screenshot. Each segment joins an initial pair to its final pair , including the corrected first answer described above.
Related: Derivative perspectives.
Reading the boundaries
The initial-percentage conditions are the editable inequalities above: and . The updated conditions are and . The combined figure preserves the information in the separate handwritten boundary sketches:
| Intersection shown in the original sketches | Boundary pair | Allowed side |
|---|---|---|
| Lower-left included-boundary intersection | The two boundaries | Below both lines |
| Upper-right vertex | Initial and updated boundaries | Below the solid line and above the dashed line |
| Lower vertex | Updated and initial boundaries | Below the solid line and above the dashed line |
| Right-side intersection | The two boundaries | Above both dashed lines |
The separate inequality crops repeat the equations already transcribed, and the small intersection sketches are consolidated into the exact region plot. The original handwritten versions remain in the linked PDF.