Brown et al. (2024) asked Llama-3-8B-Instruct each of 127 grade-school math problems from GSM8K 10,000 times, at temperature 0.6. A single sample was right 76.85% of the time on average. Yet every one of the 127 problems was solved by at least one of its 10,000 samples. A vote among the samples, by contrast, settles at about 88% once many samples vote. On 128 harder problems from MATH the same model was right 26.84% of the time per sample, and 98.4% of the problems were solved at least once. What does a model achieve when it may try a problem $k$ times, and how should that be estimated from a finite number of samples? And why do "solved by some sample" and "solved by the vote" diverge as samples grow?
Pass@k is the probability that at least one of $k$ independent samples from a model solves a problem, averaged over the problems of a benchmark. It assumes a checker that recognizes a correct sample, such as unit tests for code or a reference answer for arithmetic. Brown et al. call the same quantity coverage, the fraction of problems solved by any of the samples drawn. Pass@1 is ordinary accuracy. System cards and coding and security evaluations report pass@k for $k$ up to 30 or more; the cyber evaluations of Claude 4 are scored as pass@30. Reasoning evaluations report majority votes over many samples (Claude's Extended Thinking). This article derives the statistics of both.
Here is the route. First we define the target and the data. Then we derive the unbiased estimator of Chen et al. (2021) and prove that it is the only unbiased function of the count of correct samples and the one of least variance. We show why the obvious plug-in estimate is biased downward. Next come its variance, an unbiased estimate of that variance, its stable computation, and what pass@1 does and does not say about pass@k. Finally we derive the limit of majority voting and the shape of coverage as $k$ grows, and check each on the data. The article assumes the standard error of a benchmark score from Standard Errors for Benchmark Scores. It also uses the laws of total expectation and variance from Conditional Expectation and the Laws of Total Expectation and Variance, and Hoeffding's inequality from Concentration Inequalities: Hoeffding and Bernstein.
The data and what is estimated
The model of repeated sampling. A benchmark has problems $j = 1, \ldots, P$. On problem $j$ the model, with a fixed prompt and sampling settings, produces samples that are independent and each correct with probability $p_j$, the problem's single-sample success probability. The probability that at least one of $k$ samples is correct is $1 - (1 - p_j)^k$, and the benchmark's pass@k is
$$\text{pass@}k = \frac{1}{P}\sum_{j=1}^{P}\Big[1 - (1 - p_j)^k\Big].$$
Independence is part of the definition: pass@k describes $k$ fresh draws from the same sampling distribution. It holds by construction when the same prompt is sampled $k$ times at a positive temperature. It may fail for agents whose attempts share an environment, a question the open questions return to. The problems are treated as fixed, as in most reports. Standard Errors for Benchmark Scores treats them as a sample from a larger population, and the section on variance does both.
The data. Brown et al. (2024) published their samples as the "Monkey Business" dataset. The script monkeydata.py pins it by revision and file hashes and reduces it to counts. Three sets are used, each with $n = 10{,}000$ samples per problem:
- GSM8K, Llama-3-8B-Instruct and Llama-3-70B-Instruct: 127 grade-school word problems each (the dataset card says 128 were drawn at random and one with a wrong reference answer omitted), five worked examples in the prompt drawn per problem, temperature 0.6. A sample's final answer follows
####, and the published flag marks it correct when it matches the reference. The script also groups the incorrect answers by their numeric value, for voting. - MATH, Llama-3-8B-Instruct: 128 competition problems drawn at random from the MATH test set, with a fixed five-example prompt and temperature 0.6; only the correctness flags are used.
Pass@1 is 76.85% for the 8B model on GSM8K, 93.04% for the 70B model, and 26.84% for the 8B model on MATH. The hardest GSM8K problem for the 8B model was solved by only 65 of its 10,000 samples, a pass@1 of 0.65%. Two MATH problems were never solved.
With the estimator derived below, applied to all 10,000 samples, the pass@k values are (percent):
| $k$ | 1 | 2 | 5 | 10 | 100 | 1,000 | 10,000 |
|---|---|---|---|---|---|---|---|
| GSM8K, 8B | 76.8 | 86.2 | 93.5 | 96.6 | 99.6 | 100.0 | 100.0 |
| GSM8K, 70B | 93.0 | 96.9 | 98.7 | 99.1 | 99.3 | 99.8 | 100.0 |
| MATH, 8B | 26.8 | 37.0 | 50.9 | 60.9 | 82.9 | 93.4 | 98.4 |
Brown et al. report MATH coverage for this model of 82.9% at 100 samples and 98.44% at 10,000, which the data reproduce exactly. From one sample to a hundred, the 8B model's MATH pass@k triples.
The unbiased estimator
Suppose $n \ge k$ samples have been drawn on a problem and $c$ of them are correct. How should $1 - (1 - p)^k$ be estimated? Here is the idea. Any $k$ of the $n$ samples are themselves $k$ independent samples. So the share of the $\binom{n}{k}$ subsets of size $k$ that contain no correct sample is an average of unbiased estimates of $(1 - p)^k$.
Theorem 1 (Chen et al., 2021). Let $c$ be the number of correct samples among $n \ge k$ independent samples, each correct with probability $p$. Then
$$\hat q_k = \frac{\binom{n - c}{k}}{\binom{n}{k}} \quad\text{satisfies}\quad E[\hat q_k] = (1 - p)^k,$$
so $1 - \hat q_k$ is unbiased for the problem's pass@k, and its average over problems is unbiased for the benchmark's. (The binomial coefficient $\binom{n - c}{k}$ is 0 when $n - c < k$.)
Proof. Number the samples $1, \ldots, n$ and let $S$ range over the $\binom{n}{k}$ subsets of $k$ of them. Let $F_S$ be 1 if no sample in $S$ is correct and 0 otherwise. The samples in $S$ are $k$ independent draws, so $E[F_S] = (1 - p)^k$. A subset has no correct sample exactly when it is drawn from the $n - c$ incorrect ones, and there are $\binom{n - c}{k}$ such subsets. Hence
$$\hat q_k = \frac{1}{\binom{n}{k}}\sum_S F_S,$$
and by linearity $E[\hat q_k] = (1 - p)^k$. $\square$
Chen et al. (2021, Appendix A) prove the same identity by summing over the binomial distribution of $c$. They introduce the estimator for HumanEval with $n = 200$ samples and $k \le 100$ (their Section 2.1, equation 1). The subset form shows what the estimator does: it uses every way of choosing $k$ of the $n$ samples. The older practice of drawing exactly $k$ samples and recording whether any was correct uses one. That older estimate is the case $n = k$, where $\hat q_k$ is 1 if all $k$ samples failed and 0 otherwise. It is also unbiased, but the variance section shows how much it wastes.
The script checks $E[\hat q_k] = (1 - p)^k$ in exact rational arithmetic for 36 combinations of $n$, $k$ and $p$.
Is there a better unbiased estimator? None that uses only the samples' correctness. Two facts settle it.
Theorem 2 (uniqueness and least variance). (a) $\hat q_k$ is the only function of $c$ that is unbiased for $(1 - p)^k$ for every $p$ in $(0, 1)$. (b) Let an estimator computed from the $n$ correctness indicators be unbiased for $(1 - p)^k$. Its variance is at least $\operatorname{Var}(\hat q_k)$. (c) If $k > n$, no function of the $n$ indicators is unbiased for $(1 - p)^k$.
Proof. (a) Suppose $h(c)$ and $\hat q_k$ are both unbiased, and put $u(c) = h(c) - \hat q_k(c)$. Then for every $p$ in $(0, 1)$,
$$0 = \sum_{c=0}^{n} u(c)\binom{n}{c}p^c(1 - p)^{n - c} = (1 - p)^n\sum_{c=0}^{n} u(c)\binom{n}{c}r^c, \qquad r = \frac{p}{1 - p}.$$
As $p$ ranges over $(0, 1)$, $r$ ranges over $(0, \infty)$, so the polynomial $\sum_c u(c)\binom{n}{c}r^c$ has infinitely many roots and all its coefficients are zero. Hence $u \equiv 0$.
(b) Let $W$ be any unbiased estimator computed from the indicators $B_1, \ldots, B_n$. Given $c = \sum_i B_i$, every arrangement of $c$ ones among $n$ places has probability $p^c(1 - p)^{n - c}/\big(\binom{n}{c}p^c(1 - p)^{n - c}\big) = 1/\binom{n}{c}$, which does not involve $p$. So $E[W \mid c]$ is a function of $c$ alone, the same for every $p$. By the law of total expectation it is unbiased, so by (a) it equals $\hat q_k$. By the law of total variance,
$$\operatorname{Var}(W) = \operatorname{Var}\big(E[W \mid c]\big) + E\big[\operatorname{Var}(W \mid c)\big] \ge \operatorname{Var}(\hat q_k).$$
(c) The expectation of any function of the indicators is a sum, over the $2^n$ outcomes, of its values times $p^{c}(1 - p)^{n - c}$, a polynomial in $p$ of degree at most $n$. Suppose it equaled $(1 - p)^k$, a polynomial of degree $k > n$, on all of $(0, 1)$. Then the two polynomials would agree at infinitely many points and so be identical, which is impossible since their degrees differ. $\square$
Part (b) is the Rao–Blackwell argument with $c$ as the sufficient statistic, and (a) is the completeness that makes the improved estimator unique. Part (c) is a practical rule: pass@k needs at least $k$ samples per problem. No correction can turn fewer samples into an unbiased estimate.
The plug-in estimate is biased
The tempting alternative is to estimate $p$ by $\hat p = c/n$ and report $1 - (1 - \hat p)^k$. Chen et al. warn that this is biased and show it in their Figure 13. Here is why, in one sentence: $(1 - x)^k$ is convex, so the average of $(1 - \hat p)^k$ over the sampling noise exceeds $(1 - p)^k$, and the plug-in pass@k comes out too low.
Theorem 3 (the plug-in estimate underestimates). For $k \ge 2$, $0 < p < 1$ and $n \ge 1$,
$$E\big[1 - (1 - \hat p)^k\big] < 1 - (1 - p)^k.$$
Proof. The function $x \mapsto (1 - x)^k$ has second derivative $k(k - 1)(1 - x)^{k - 2} \ge 0$ on $[0, 1]$, positive except at $x = 1$, so it is strictly convex there. $\hat p$ is not constant when $0 < p < 1$, and $E[\hat p] = p$. Jensen's inequality (Probability Inequalities) gives $E[(1 - \hat p)^k] > (1 - p)^k$. $\square$
The plug-in estimate is consistent, since $\hat p \to p$, but at the sample sizes evaluations use the bias is visible. Treating each problem's 10,000-sample share $c_j/10{,}000$ as its true $p_j$, the script computes the exact expectation of the plug-in estimate by summing over the binomial distribution:
| Samples $n$, attempts $k$ | 20, 5 | 20, 10 | 20, 20 | 200, 10 | 200, 100 |
|---|---|---|---|---|---|
| MATH 8B, true pass@k (%) | 50.9 | 60.9 | 69.4 | 60.9 | 82.9 |
| MATH 8B, expected plug-in (%) | 49.2 | 57.7 | 64.1 | 60.6 | 81.3 |
| GSM8K 8B, bias (points) | 0.7 | 0.9 | 1.0 | 0.1 | 0.1 |
On MATH, with 20 samples and $k = 20$, the plug-in estimate is low by more than five points on average. With Chen et al.'s own design ($n = 200$, $k = 100$) it is low by 1.6 points. The bias is largest for benchmarks with many hard problems, where $\hat p$ is often zero although $p$ is not.
Example (one evaluation, thirty times). For 30 seeds (default_rng([41000000, s])), the script draws 20 samples per MATH problem from the problems' true probabilities and estimates pass@10 both ways. The unbiased estimate had median 60.9% over the seeds (interquartile range 59.6% to 62.1%), centered on the truth of 60.9%. The plug-in estimate had median 57.8% (56.6% to 58.8%) and fell below the truth in 29 of the 30 evaluations. A comparison of two models evaluated with different numbers of samples would inherit the difference in bias.
The variance of the estimate
How precise is an estimated pass@k? With the problems fixed, the benchmark estimate is an average of $P$ independent per-problem estimates, so its variance is $\frac{1}{P^2}\sum_j \operatorname{Var}(\hat q_{k,j})$. The per-problem variance has no simple closed form, but it can be computed exactly for a given $p$ as $E[\hat q_k^2] - (1 - p)^{2k}$, and estimated without bias from the data.
Theorem 4 (an unbiased, nonnegative variance estimate). If $2k \le n$, then
$$\widehat{V}_k = \hat q_k^2 - \hat q_{2k}$$
is unbiased for $\operatorname{Var}(\hat q_k)$, and $\widehat V_k \ge 0$ for every $c$.
Proof. By Theorem 1 with $2k$ in place of $k$, $E[\hat q_{2k}] = (1 - p)^{2k} = \big((1 - p)^k\big)^2$. So $E[\widehat V_k] = E[\hat q_k^2] - \big(E[\hat q_k]\big)^2 = \operatorname{Var}(\hat q_k)$. For nonnegativity, use the product form derived in the next section, $\hat q_k = \prod_{i=0}^{k-1} a_i$ with $a_i = (n - c - i)/(n - i)$ when $n - c \ge k$. Then $\hat q_{2k} = \prod_{i=0}^{2k-1} a_i$ when $n - c \ge 2k$ (and 0 otherwise). Each $a_i$ lies in $[0, 1]$, and $a_i$ decreases in $i$, because $\frac{n - c - i}{n - i} = 1 - \frac{c}{n - i}$. So $\prod_{i=k}^{2k-1} a_i \le \prod_{i=0}^{k-1} a_i$, and $\hat q_{2k} = \hat q_k\prod_{i=k}^{2k-1} a_i \le \hat q_k^2$. $\square$
The exact checks of the script confirm both statements in the 36 small cases. A 95% interval for the benchmark's pass@k with the problems fixed is then
$$\widehat{\text{pass@}k} \pm 1.96\,\frac{1}{P}\sqrt{\textstyle\sum_j \widehat V_{k,j}}.$$
Example (what more samples buy). On MATH with $k = 5$, the exact standard error of the estimated pass@5 (true value 50.9%), with the problems fixed, falls as the samples per problem grow:
| Samples per problem $n$ | 5 | 10 | 20 | 50 | 200 |
|---|---|---|---|---|---|
| Standard error (points) | 2.80 | 1.80 | 1.23 | 0.76 | 0.38 |
At $n = 5$ the estimator is the older one, a single set of five attempts per problem. Twenty samples per problem cut the standard error by more than half with the same $k$. The script checks the interval's coverage by simulation, 1,000 evaluations for each of 30 seeds (default_rng([42000000, n, s])). The median coverage was 0.947 at $n = 10$ (interquartile range 0.942 to 0.953), 0.944 at $n = 20$ (0.941 to 0.952) and 0.948 at $n = 50$ (0.943 to 0.950).
When the problems are themselves a sample. A benchmark of 128 problems stands for the larger population of problems it was drawn from. Then the per-problem estimates $\hat\theta_j = 1 - \hat q_{k,j}$ are independent and identically distributed, each with variance $\operatorname{Var}(\theta_j) + E[\operatorname{Var}(\hat\theta_j \mid j)]$ by the law of total variance, where $\theta_j = 1 - (1 - p_j)^k$ is the problem's true pass@k. This is the decomposition of Standard Errors for Benchmark Scores (its Theorem 4), with the estimate of pass@k in place of a mean of answers. The sample variance of the $\hat\theta_j$, divided by $P$, estimates the whole without bias. For MATH at $k = 5$ and $n = 20$, the standard error is 3.65 points with the problems sampled, of which the spread between problems alone contributes 3.43. The choice of problems, not the sampling of answers, dominates the uncertainty of a benchmark of this size. Power Analysis for Evaluations splits the variance of a comparison in the same two parts.
Computing the estimate
The binomial coefficients in Theorem 1 overflow floating-point arithmetic quickly: $\binom{10{,}000}{1{,}000}$ has 1,410 digits, far beyond the largest double-precision number, about $1.8 \times 10^{308}$. Chen et al. (2021, Figure 3) give a product form. Writing out the factorials,
$$\frac{\binom{n - c}{k}}{\binom{n}{k}} = \frac{(n - c)!\,(n - k)!}{n!\,(n - c - k)!} = \prod_{i = n - c + 1}^{n}\frac{i - k}{i} = \prod_{i = n - c + 1}^{n}\left(1 - \frac{k}{i}\right),$$
because $(n - k)!/(n - c - k)!$ is the product of the $c$ numbers $i - k$ for $i = n - c + 1, \ldots, n$, and $n!/(n - c)!$ is the product of the same $c$ values of $i$. When $n - c \ge k$ each factor lies in $[0, 1)$, so the product cannot overflow. When $n - c < k$ the estimate is 0 (some factors are then negative, and the factor with $i = k$ is zero); implementations test this case first, as Chen et al.'s code does. Equivalently, $\hat q_k = \prod_{i=0}^{k-1}(n - c - i)/(n - i)$, the form used in Theorem 4, with $k$ factors instead of $c$; the two products are equal, and a program can use whichever has fewer factors. The script checks the product against exact rational arithmetic, including $n = 10{,}000$ and $k = 1{,}000$, to a relative error below $10^{-10}$.
For the hardest GSM8K problem ($c = 65$), the estimate of pass@100 is 0.4808 and of pass@1000 is 0.9990, from a pass@1 of 0.65%.
What pass@1 says about pass@k
Reports often give pass@1 for one model and pass@k for another, or pass@k alone. How much does one constrain the other?
Theorem 5 (bounds from pass@1). For any problems,
$$\text{pass@}1 \;\le\; \text{pass@}k \;\le\; 1 - (1 - \text{pass@}1)^k \;\le\; \min(1,\ k \cdot \text{pass@}1).$$
The upper bound is reached when every problem has the same $p_j$; the lower bound when every $p_j$ is 0 or 1.
Proof. For each problem, $1 - (1 - p_j)^k \ge p_j$ because $(1 - p_j)^k \le 1 - p_j$; averaging gives the lower bound, with equality exactly when each $p_j$ is 0 or 1. The function $\phi(p) = 1 - (1 - p)^k$ is concave: its second derivative is $-k(k - 1)(1 - p)^{k - 2} \le 0$. So the average of $\phi(p_j)$ is at most $\phi$ of the average of the $p_j$, which is the middle bound, with equality when the $p_j$ are all equal. The last inequality is the union bound $1 - (1 - p)^k \le kp$, which follows from $(1 - p)^k \ge 1 - kp$ (Bernoulli's inequality, by induction on $k$: $(1 - p)^{k+1} \ge (1 - kp)(1 - p) = 1 - (k + 1)p + kp^2$). $\square$
On MATH the 8B model's pass@5 is 50.9%, while the bound from its pass@1 is 79.0%; its pass@30 is 73.5% against a bound of 100.0%. Real problems differ in difficulty, so pass@k grows more slowly than the independent-trials formula suggests, and the gap measures how unequal the problems are. Read the other way, a reported pass@k confines pass@1 between $1 - (1 - \text{pass@}k)^{1/k}$ and pass@k. A pass@30 of 99% allows any pass@1 from 14% to 99%, and Worked problem 2 computes the lower bound for other values.
Majority voting
Pass@k needs a checker. Without one, a common way to use many samples is to let them vote: take the final answer that occurs most often. Wang et al. (2023) proposed this for chain-of-thought reasoning as self-consistency, sampling diverse reasoning paths and selecting the most consistent answer. Brown et al. (2024, Section 4.1) report that majority voting and reward-model selection rise with the number of samples and then plateau, while coverage keeps rising. Why do they part company?
The setting. On one problem each sample yields a final answer, or none. Let $\pi_c$ be the probability that a sample gives the correct answer and $\pi_a$ the probability of a particular wrong answer $a$. A vote among $k$ samples is won by the answer with the largest count; samples without an answer abstain, and a tie at the top is broken uniformly at random.
Theorem 6 (the limit of a vote). Suppose the answers of the $k$ samples are independent and identically distributed. If $\pi_c > \pi_a$ for every wrong answer $a$, the probability that the vote is correct tends to 1 as $k \to \infty$. If some wrong answer has $\pi_a > \pi_c$, it tends to 0. If the set of possible answers is finite with $\Delta = \pi_c - \max_a \pi_a > 0$, then
$$P(\text{the vote is not won outright by the correct answer}) \le \sum_{a:\,\pi_a > 0} \exp\!\big(-k(\pi_c - \pi_a)^2/2\big) \le M e^{-k\Delta^2/2},$$
where $M$ is the number of wrong answers with positive probability.
Here is the idea. The vote compares counts, and each count divided by $k$ converges to its probability, so the answer with the largest probability eventually has the largest count.
Proof. Finite case first. For a wrong answer $a$, let $D_a = \sum_{i=1}^{k}\big(\mathbf 1\{\text{sample } i \text{ is correct}\} - \mathbf 1\{\text{sample } i \text{ gives } a\}\big)$. Its terms are independent, take values in $[-1, 1]$ and have mean $\pi_c - \pi_a > 0$. The correct answer fails to win outright only if $D_a \le 0$ for some $a$. By Hoeffding's inequality (Concentration Inequalities: Hoeffding and Bernstein, Theorem 2) with ranges of length 2,
$$P(D_a \le 0) = P\big(D_a/k - (\pi_c - \pi_a) \le -(\pi_c - \pi_a)\big) \le \exp\!\left(-\frac{2k^2(\pi_c - \pi_a)^2}{4k}\right) = \exp\!\big(-k(\pi_c - \pi_a)^2/2\big),$$
and the union bound over $a$ gives the inequality. Each term is at most $e^{-k\Delta^2/2}$.
General case (possibly infinitely many answers). Let $\hat\pi_a$ be the share of the $k$ samples giving answer $a$, and $\pi^* = \sup_{a\ \text{wrong}}\pi_a < \pi_c$ (the supremum is attained, since only finitely many answers can have probability above any fixed positive level). Choose $\eta > 0$ with $\eta < (\pi_c - \pi^*)/2$ and $\eta < \pi_c/3$, and a finite set $G$ of answers that contains the correct one and has total probability at least $1 - \eta$. Write $G^c$ for the answers outside $G$, and $\hat\pi(G^c)$ for the share of samples giving one of them. By the strong law of large numbers (The Laws of Large Numbers) applied to finitely many indicators, almost surely $\hat\pi_a \to \pi_a$ for every $a \in G$ and $\hat\pi(G^c) \to \pi(G^c) \le \eta$. So, almost surely, for all large $k$: $\hat\pi_c > \pi_c - \eta$; every wrong $a \in G$ has $\hat\pi_a < \pi_a + \eta \le \pi_c - \eta$; and every $a \in G^c$ has $\hat\pi_a \le \hat\pi(G^c) < 2\eta < \pi_c - \eta$. The correct answer then wins outright, and the probability of a correct vote tends to 1 by dominated convergence. If instead a wrong answer $b$ has $\pi_b > \pi_c$, take $\eta < (\pi_b - \pi_c)/2$: almost surely, for all large $k$, $\hat\pi_b > \pi_b - \eta > \pi_c + \eta > \hat\pi_c$, so the correct answer is not even tied for the lead and the probability of a correct vote tends to 0. $\square$
The case of a tie at the top ($\pi_c$ equal to the largest $\pi_a$) is not settled by the theorem. So, under independence, the majority-vote accuracy of a benchmark tends to the share of problems on which the correct answer is the single most probable one. Problems on which it is tied for most probable add a fraction of themselves that the theorem does not determine (one half for a two-way tie broken at random, by the central limit theorem applied to $D_a$; not proved here). The data below have no exact ties at the top. Coverage, by contrast, tends to the share of problems with $p_j > 0$. The two limits differ exactly by the problems that the model solves sometimes but on which some wrong answer is more popular.
Back to the data. Treat each problem's 10,000 answers as its answer distribution. The correct answer is the most frequent one on 112 of the 127 GSM8K problems for the 8B model and on 123 of the 127 for the 70B model. So the limits are 88.2% and 96.9%. On 15 problems the 8B model gives some wrong answer more often than the correct one. On the hardest problem a single wrong answer occurs 6,577 times against 65 correct ones. The script estimates the vote's accuracy by drawing $k$ of the 10,000 samples without replacement, 100 draws per problem for each of 30 seeds (default_rng([43000000, s])). Ties at the top get the expected credit of a random tie-break. Medians over the seeds, in percent (the interquartile ranges are all within 0.4 points of the median):
| Samples $k$ | 1 | 5 | 10 | 100 | 1,000 |
|---|---|---|---|---|---|
| Majority vote, 8B | 76.8 | 83.8 | 85.4 | 87.2 | 88.1 |
| Coverage (pass@k), 8B | 76.8 | 93.5 | 96.6 | 99.6 | 100.0 |
| Majority vote, 70B | 93.1 | 96.0 | 96.6 | 96.9 | 96.9 |
The vote closes most of its gap to the limit within ten samples. For the 70B model it reaches the limit by a hundred, which is the plateau Brown et al. describe. Coverage keeps rising to 100%. A selection method that could recognize a correct answer, such as a reliable verifier, could in principle capture the difference. A vote cannot, because on 15 problems it converges to the wrong answer.
Coverage as the number of samples grows
How fast does coverage approach its limit? On one problem the failure probability $(1 - p_j)^k$ falls exponentially in $k$. Brown et al. (2024, Section 3.1) find instead that coverage across a benchmark is well described by an exponentiated power law, $c(k) \approx \exp(a k^b)$, with $b < 0$. As $c \to 1$, $-\ln c \approx 1 - c$, so the failure rate $1 - c(k)$ falls roughly like $k^b$, a power of $k$. Schaeffer et al. (2025) argue that such aggregate power laws arise when the per-problem success probabilities are heavy-tailed near zero, so that a few very hard problems set the trend. Here is a proof of that mechanism under a stated condition.
Theorem 7 (a power-law tail from hard problems). Let the per-problem probability $p$ have a density $f$ on $(0, 1)$ with $f(p) \le M p^{\alpha - 1}$ on $(0, 1/2]$ for some $M$ and $\alpha > 0$, and $f(p)/p^{\alpha - 1} \to C$ as $p \to 0$. Then
$$k^{\alpha}\,E\big[(1 - p)^k\big] \to C\,\Gamma(\alpha) \qquad (k \to \infty),$$
so the expected failure rate is asymptotically $C\Gamma(\alpha)k^{-\alpha}$. If, in addition, a share $\pi_0$ of problems has $p = 0$ exactly, the failure rate tends to $\pi_0$ instead.
Here is the idea. Only problems with $p$ of order $1/k$ or smaller are still failing after $k$ attempts, and the density near zero says how many there are.
Proof. Split the expectation at $p = 1/2$. On $(1/2, 1)$, $(1 - p)^k \le 2^{-k}$, so that part is at most $2^{-k}$, and $k^\alpha 2^{-k} \to 0$. On $(0, 1/2]$ substitute $p = t/k$:
$$k^\alpha\int_0^{1/2}(1 - p)^k f(p)\,dp = \int_0^{k/2}\Big(1 - \frac{t}{k}\Big)^k\,\frac{f(t/k)}{(t/k)^{\alpha - 1}}\,t^{\alpha - 1}\,dt.$$
For each fixed $t$, $(1 - t/k)^k \to e^{-t}$ and $f(t/k)/(t/k)^{\alpha - 1} \to C$. The integrand is bounded by $M e^{-t}t^{\alpha - 1}$, because $1 - x \le e^{-x}$ gives $(1 - t/k)^k \le e^{-t}$, and that bound is integrable on $(0, \infty)$ when $\alpha > 0$. By dominated convergence the integral tends to $C\int_0^\infty e^{-t}t^{\alpha - 1}\,dt = C\Gamma(\alpha)$. For the last statement, the problems with $p = 0$ contribute $\pi_0$ to the failure rate at every $k$, and the others contribute $(1 - \pi_0)$ times a quantity that tends to 0. $\square$
For a beta distribution with parameters $\alpha$ and $\beta$, the density near 0 is $p^{\alpha - 1}/B(\alpha, \beta)$, and the bound holds on $(0, 1/2]$ for any $\beta > 0$. The exact failure rate is $E[(1 - p)^k] = B(\alpha, \beta + k)/B(\alpha, \beta)$, so the limit is $\Gamma(\alpha)/B(\alpha, \beta) = \Gamma(\alpha + \beta)/\Gamma(\beta)$. Schaeffer et al. (2025, Section 3) give the same exponent, $k^{-\alpha}$, for beta distributions of $p$.
On the MATH data. Following Brown et al. (2024, Appendix C.1), the script evaluates coverage at 40 values of $k$ spaced evenly on a log scale from 1 to 10,000. Rounded to integers they leave 37 distinct points. The script fits $c(k) = \exp(a k^b)$ to them by least squares (SciPy's curve_fit). The fit gives $a = -1.343$ and $b = -0.432$, within 1 point of the observed coverage at every point (the largest error is 0.94 points). A beta-binomial model fitted to the 128 counts by maximum likelihood gives $\alpha = 0.352$ and $\beta = 0.90$, so Theorem 7 predicts a tail exponent of $-0.352$. The failure rates, in percent:
| $k$ | 10 | 100 | 1,000 | 10,000 |
|---|---|---|---|---|
| Observed $1 - $ coverage | 39.1 | 17.1 | 6.6 | 1.6 |
| Beta model | 37.1 | 16.8 | 7.5 | 3.3 |
The local slope of the observed log failure rate against $\log k$ is $-0.36$ between 10 and 100 samples, $-0.41$ between 100 and 1,000, and $-0.62$ between 1,000 and 10,000. Over the first two decades the beta model's exponent describes the decline. In the last decade the data fall faster than the model, because the beta density keeps assigning probability to values of $p$ near $10^{-4}$. In these data such values are represented by a handful of problems. Ten of the 128 problems were solved at most 10 times in 10,000, and at $k = 1{,}000$ the five hardest problems account for 53% of the failure rate expected when each problem's share of correct samples is taken as its probability. The tail of a coverage curve is a statement about a few problems. At $k = 10{,}000$ the observed failure rate is the two never-solved problems, $2/128$; Theorem 7's last statement says that if they are unsolvable, that is the floor.
What is proved, what is cited, what the experiment shows
Proved here. The unbiasedness of the pass@k estimator by averaging over subsets (Theorem 1); that it is the only unbiased function of the count and has the least variance of any unbiased estimator from the indicators, and that none exists for $k > n$ (Theorem 2); the downward bias of the plug-in estimate (Theorem 3); an unbiased, nonnegative estimate of the estimator's variance (Theorem 4); the product form; the bounds that pass@1 places on pass@k (Theorem 5); the limit of majority voting under independence and Hoeffding's rate for finite answer sets (Theorem 6); the power-law tail of the failure rate from the density of hard problems near zero, and the floor set by unsolvable problems (Theorem 7).
Cited or linked. The estimator, its product form and the bias of the plug-in estimate as introduced by Chen et al. (2021); the dataset, the exponentiated power law and the plateau of majority voting from Brown et al. (2024); the heavy-tail account of aggregate power laws and the beta-distribution exponent from Schaeffer et al. (2025); self-consistency from Wang et al. (2023); Hoeffding's inequality, the strong law of large numbers, the laws of total expectation and variance, and the decomposition of a benchmark's variance from the linked articles.
What the experiments show. All numbers treat each problem's 10,000 samples as its true answer distribution. Within that setting:
- the plug-in estimate fell below the truth in 29 of 30 simulated evaluations;
- the interval of Theorem 4 covered within about half a point of 95%;
- by 1,000 samples the 8B model's majority vote was within 0.1 point of the limit of Theorem 6, and the 70B model's reached it by 100;
- the exponentiated power law fitted the MATH coverage curve closely, while the beta model's exponent described only its first two decades.
These are observations on three model-benchmark pairs at one temperature.
Worked problems
These problems were written for this article and extend it, on the article's data or on small exact cases; the script tools/experiments/statistics/pass-at-k.py recomputes every number.
Problem 1 (how fast does a vote become reliable?). On a problem the correct answer has probability 0.45 per sample and the most popular wrong answer 0.30, with the rest scattered. How likely is a vote of 51 samples, and of 501, to put the correct answer strictly ahead of that rival, and how does Hoeffding's bound of Theorem 6 compare?
Solution. The three-way counts (correct, the rival, other) are multinomial. Summing the multinomial probabilities of all outcomes in which the correct count exceeds the rival's gives 0.879 at $k = 51$ and 1.000 (to three decimals) at $k = 501$. Hoeffding's bound on the probability of the opposite event is $\exp(-k \times 0.15^2/2)$: 0.563 at $k = 51$ and 0.004 at $k = 501$. The bound is valid but loose. It guarantees a failure rate below 5% only from $k = 2\ln(20)/0.15^2$, that is 267 samples, while the exact failure rate at 51 samples is already 0.121. The looseness comes from Hoeffding's use of the range alone. The variance of each term of $D_a$ is $\pi_c + \pi_a - (\pi_c - \pi_a)^2 = 0.7275$, below the worst case of 1, and a variance-aware bound such as Bernstein's in Concentration Inequalities: Hoeffding and Bernstein would tighten it. With several rival answers, the union bound adds one term per rival.
Problem 2 (reading a pass@30 backwards). A report gives only pass@30 for a set of challenges. What can be said about pass@1?
Solution. By Theorem 5, $\text{pass@}30 \le 1 - (1 - \text{pass@}1)^{30}$, so
$$\text{pass@}1 \ge 1 - (1 - \text{pass@}30)^{1/30}.$$
A pass@30 of 50% implies a pass@1 of at least 2.3%; 90% implies at least 7.4%; 99% implies at least 14.2%. No upper bound follows except pass@1 ≤ pass@30. The MATH data show that the truth can lie far from either end: there pass@30 is 73.5% and pass@1 26.8%. The note on the cyber evaluations of Claude 4 asks how much of a pass@30 score depends on many attempts. This is the arithmetic behind that question: without per-challenge counts the answer is any value in a wide range. Reporting pass@1 and pass@k together, with the number of samples $n$ and the number of problems, pins it down.
Problem 3 (problems never solved). Two MATH problems had no correct sample among 10,000. How large could their single-sample success probability be, and what does that allow at a thousand samples?
Solution. If $p$ is the true probability, the chance of no success in 10,000 independent samples is $(1 - p)^{10{,}000}$. The values of $p$ for which this is at least 0.05 are those up to $1 - 0.05^{1/10{,}000} = 3.00 \times 10^{-4}$. That is the one-sided 95% upper confidence bound, the "rule of three" of Estimating Rare Event Rates ($3/n$) in exact form. At that bound, the problem's pass@1000 would be $1 - (1 - 3.00 \times 10^{-4})^{1000} = 0.259$, and its pass@10000 would be 0.95 by construction. So the data cannot distinguish "unsolvable" from "solved about once in 3,300 tries". Theorem 7's floor $\pi_0$ is therefore not identified by any finite number of samples. An extrapolation of coverage beyond the samples drawn depends on an assumption about the problems never solved. The fitted curve of Brown et al., which tends to 1, and a model with a floor, which does not, agree on all the data.
Open questions
- Can the tail of a coverage curve be forecast from a few samples? Schaeffer et al. (2025) report that fitting the distribution of per-problem success improves forecasts of the power-law exponent. Fitting the beta-binomial model to the first 100 samples per problem in
monkeydata.py, and comparing its forecast at 10,000 with the exponentiated power law fitted on the same 100, for each of the dataset's model-benchmark pairs (the CodeContests and other MATH files of the same release), would settle which extrapolates better here. - Where does the MATH majority vote level off? For this model on MATH, Brown et al. (2024, Introduction) report that majority voting and reward-model selection rise only from 40.50% to 41.41% between 100 and 10,000 samples. Grouping MATH answers needs symbolic equivalence; adding SymPy-based grouping to
monkeydata.pyand comparing the measured plateau with Theorem 6's limit would test the theorem on a benchmark where the correct answer is often not the mode. - How much of a problem's $p_j$ comes from its prompt? The GSM8K samples share one prompt per problem, with few-shot examples drawn once per problem. Regenerating a subset with several prompt draws (a small open model run locally, as in Calibration and Proper Scoring Rules) would split the per-problem variance into prompt and sampling parts, as Power Analysis for Evaluations does for the order of examples.
- Are an agent's attempts independent? Pass@k for agents (such as capture-the-flag challenges scored as pass@30) assumes independent attempts. Per-attempt logs would allow a test: under independence the number of successes per challenge is binomial, and overdispersion relative to the binomial, as in Overdispersion in Count Data, would measure the dependence.
Summary
| Quantity | Formula |
|---|---|
| Pass@k of a benchmark | $\frac1P\sum_j[1 - (1 - p_j)^k]$ |
| Unbiased estimate from $n \ge k$ samples, $c$ correct | $1 - \binom{n - c}{k}/\binom{n}{k}$ |
| Stable computation | $\binom{n - c}{k}/\binom{n}{k} = \prod_{i = n - c + 1}^{n}(1 - k/i)$ |
| Plug-in estimate | $1 - (1 - c/n)^k$, biased downward |
| Unbiased variance estimate ($2k \le n$) | $\hat q_k^2 - \hat q_{2k}$, never negative |
| Bounds from pass@1 | $\text{pass@}1 \le \text{pass@}k \le 1 - (1 - \text{pass@}1)^k$ |
| Limit of majority voting | share of problems whose most probable answer is correct |
| Tail of coverage | $1 - c(k) \sim C\Gamma(\alpha)k^{-\alpha}$ if the density of $p$ near 0 is $\sim Cp^{\alpha - 1}$; floor $\pi_0$ for unsolvable problems |
What we have learned
Pass@k is an average of $1 - (1 - p_j)^k$ over problems. Chen et al.'s estimator, the share of $k$-subsets of the samples with a correct one, is its only unbiased estimate from the count of correct samples and the one of least variance. The plug-in estimate is biased downward by convexity, by more than five points in a realistic MATH evaluation. Its variance can be estimated without bias, and on a benchmark of a hundred problems the choice of problems dominates the error. Pass@1 bounds pass@k from above through concavity, and real benchmarks fall well below that bound because problems differ. Under independent sampling a majority vote converges to the share of problems on which the correct answer is the most frequent one: 88.2% for Llama-3-8B-Instruct on GSM8K. Coverage converges to the share of problems ever solved, 100%. The slow, power-law approach of coverage to its limit reflects how many problems have success probabilities near zero.
Coverage assumes a checker that is always right. When the checker is itself a model, its errors bias the score in ways that Language Models as Judges derives.
References
- Brown, B., Juravsky, J., Ehrlich, R., Clark, R., Le, Q. V., Ré, C., and Mirhoseini, A. (2024). Large language monkeys: Scaling inference compute with repeated sampling. arXiv:2407.21787. Samples: Hugging Face dataset
ScalingIntelligence/monkey_business(MIT licence), revision a9f8f73bcd6948a57ed922cba4e48062ef95f553. record - Chen, M., Tworek, J., Jun, H., Yuan, Q., Pinto, H. P. de O., Kaplan, J., et al. (2021). Evaluating large language models trained on code. arXiv:2107.03374. record
- Schaeffer, R., Kazdan, J., Hughes, J., Juravsky, J., Price, S., Lynch, A., Jones, E., Kirk, R., Mirhoseini, A., and Koyejo, S. (2025). How do large language monkeys get their power (laws)? In Proceedings of the 42nd International Conference on Machine Learning (PMLR 267, pp. 53132–53176). arXiv:2502.17578. record
- Wang, X., Wei, J., Schuurmans, D., Le, Q., Chi, E., Narang, S., Chowdhery, A., and Zhou, D. (2023). Self-consistency improves chain of thought reasoning in language models. In International Conference on Learning Representations (ICLR). arXiv:2203.11171. record