Skip to content
Vamshi Jandhyala

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 0,1,1,2,2,30,1,1,2,2,3 to the questions (one each) at random, not knowing which your opponent will get right. “Defensive efficiency” is (max allowed)(actual)(max allowed)(min allowed),\frac{(\text{max allowed})-(\text{actual})}{(\text{max allowed})-(\text{min allowed})}, 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 50%50\%?

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 22-element subset of the multiset {0,1,1,2,2,3}\{0,1,1,2,2,3\}. With two questions the most they could be allowed is 2+3=52+3=5 and the least is 0+1=10+1=1, so efficiency exceeds 12\tfrac12 exactly when 5allowed51>12    allowed<3.\frac{5-\text{allowed}}{5-1}>\frac12 \iff \text{allowed}<3. Of the (62)=15\binom{6}{2}=15 equally likely pairs, those summing to 11 or 22 number 2+3=52+3=5, so P=515=13.P=\frac{5}{15}=\boxed{\frac13}.

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 12\tfrac12.

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 1,2,3,4,1,2,3,4, or 55 questions correctly. What is the probability your defensive efficiency exceeds 50%50\%?

Solution

For a fixed count nn the same computation applies, with the high/low bounds taken over the nn largest and nn smallest values. The per-nn probabilities are 12,13,12,13,12\tfrac12,\tfrac13,\tfrac12,\tfrac13,\tfrac12 for n=1,,5n=1,\dots,5 (an even count is harder to defend, since the median pair can tie at efficiency exactly 12\tfrac12, which does not count). Averaging over the five equally likely counts, 15 ⁣(12+13+12+13+12)=133043.3%.\frac15\!\left(\frac12+\frac13+\frac12+\frac13+\frac12\right)=\boxed{\frac{13}{30}}\approx43.3\%. (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