Books · The Fiddler: Solutions
Chapter 66
Can You Defend Your Trivia Knowledge?
You and an opponent answer the same six trivia questions, and you assign the point values to the questions (one each) at random, not knowing which your opponent will get right. “Defensive efficiency” is where “max/min allowed” are the most and fewest points the opponent could have scored given how many they got right. Your opponent gets exactly two questions right (you do not know which). What is the probability your defensive efficiency exceeds ?
The Fiddler, Zach Wissner-Gross, February 21, 2025(original post)
Solution
Because both your assignment and their two correct questions are random and independent, the points they score is the sum of a uniformly random -element subset of the multiset . With two questions the most they could be allowed is and the least is , so efficiency exceeds exactly when Of the equally likely pairs, those summing to or number , so
The computation
Enumerate the experiment: over every pair of questions the opponent might get right, compute the actual defensive efficiency from the stated formula and count the fraction above .
from fractions import Fraction as F
from itertools import combinations
vals = [0, 1, 1, 2, 2, 3]
def prob(n): # opponent gets n right
subs = list(combinations(range(6), n))
hi, lo = sum(sorted(vals)[-n:]), sum(sorted(vals)[:n])
good = sum(F(hi - sum(vals[i] for i in s), hi - lo) > F(1, 2) for s in subs)
return F(good, len(subs))
print(prob(2)) # 1/3
Extra Credit
Now the opponent is equally likely to answer or questions correctly. What is the probability your defensive efficiency exceeds ?
Solution
For a fixed count the same computation applies, with the high/low bounds taken over the largest and smallest values. The per- probabilities are for (an even count is harder to defend, since the median pair can tie at efficiency exactly , which does not count). Averaging over the five equally likely counts, (The official extra-credit value is paywalled; this is my own.)
The computation
The same prob routine, averaged over the five equally likely counts.
print(sum(F(1, 5) * prob(n) for n in (1, 2, 3, 4, 5))) # 13/30