Estimating Uncertainty in Classifier Performance with Applications to Large Language Models and Nested Data
Summary
This paper evaluates confidence interval methods for classifier performance metrics under conditions typical of social science text classification, providing guidance on accurate interval estimation for metrics like recall and precision when using large language models.
View Cached Full Text
Cached at: 06/26/26, 05:12 AM
# Estimating Uncertainty in Classifier Performance with Applications to Large Language Models and Nested Data
Source: [https://arxiv.org/html/2606.26422](https://arxiv.org/html/2606.26422)
Kylie AnglinPhDKylie Anglin is the corresponding author and can be reached at: Email: Kylie\.Anglin@uconn\.edu; Phone: 860\-486\-0181\.Department of Educational Psychology, Neag School of Education, University of Connecticut
###### Abstract
Researchers increasingly use text classification—supervised models or large language models—to measure constructs from natural language, providing metrics such as recall and precision as evidence of their validity\. Yet, though these metrics are point estimates subject to sampling variation, measures of uncertainty are inconsistently reported alongside them\. Further, when they are reported, they are often estimated with methods that are not appropriate when relevant labelled datasets are small or performance is high\. To increase and improve confidence interval reporting in the field, this paper evaluates confidence interval methods for performance metrics under conditions typical of social science text classification: small to moderate sample sizes, infrequent constructs, and texts nested within individuals\. Across simulations, default methods such as the Wald interval and the basic percentile bootstrap are the least accurate, with coverage sometimes far below the nominal 95% level\. Accuracy is improved with the use of Agresti\-Coull, Wilson, Clopper\-Pearson, and a novel pseudo\-count regularized bootstrap \(which is particularly relevant to the calculation of F1\)\. When texts are nested within individuals, we demonstrate that adjustment for both effective N and the appropriate degrees of freedom is necessary for producing accurate analytic intervals\. Among bootstrap intervals, the hierarchical bootstrap is more accurate than the cluster bootstrap when individuals produce a moderate number of texts but overly conservative when individuals produce only a few\. By providing guidance to the field on appropriate interval estimation, we aim to improve the transparency of machine learning applications, and to encourage greater attention to the validation sample size at the design stage\.
## Introduction
Text classification—the automated sorting of text into categories, whether through the training of supervised machine learning models or through the employment of pre\-trained large language models \(LLMs\)—allows researchers to extract measures from natural language data, in large amounts, and at a relatively limited expense\. However, the resulting classifications are nearly inevitably accompanied by error; a subset of texts will likely be classified into categories for which a human expert would disagree\. To assess the extent of this error, researchers commonly report evaluation metrics \(like precision and recall\) that have been estimated within a sample of hand\-classified texts\[[undefaw](https://arxiv.org/html/2606.26422#biba.bibx13),[undefaad](https://arxiv.org/html/2606.26422#biba.bibx20)\]\. These metrics give the reader, and potentially downstream users, information on the degree of alignment between the machine classifications and expert classifications\[[undefal](https://arxiv.org/html/2606.26422#biba.bibx2)\], and on frequency and types of error\[[undefaam](https://arxiv.org/html/2606.26422#biba.bibx29)\]\. Thus, the magnitude of a given performance metric is essential for assessing the degree of trust which should be placed in the resulting inferences; while we may trust conclusions resulting from a classifier with a recall of 0\.90 \(identifying 90% of instances of a concept of interest\), we will have less confidence in a classifier that only identifies 75% of instances\. Further, while a reported recall of 0\.90 \(or 0\.80, 0\.70, etc\., depending on the application\) might be deemed good enough to employ the classifier, some lower value would not\. The magnitude of the metric matters\.
Yet, reported performance metrics are nothing more than point estimates—an*approximation*of some true population parameter which we would obtain if we had access to an infinite sample of machine\-human classification pairs\. By chance, our hypothetical classifier might have an estimated recall of 0\.90 in the random sample of hand\-labelled texts but a true recall much lower \(or higher\) if we were to evaluate the population of texts\. This kind of statistical uncertainty is the reason that researchers report treatment effect estimates, and other key results, alongside estimates of standard errors and/or confidence intervals\. This is also the reason that researchers engage in prospective power analyses when planning randomized experiments\[[undefao](https://arxiv.org/html/2606.26422#biba.bibx5),[undefaab](https://arxiv.org/html/2606.26422#biba.bibx18)\]; they want to ensure their sample size is large enough to reliably identify effects\.
Yet, consideration of statistical uncertainty surrounding performance metrics is limited in the social sciences, including in psychology\. In an informal PsycINFO search of peer reviewed articles using large language models \(LLMs\) and reporting performance metrics—identified using searches “AB \(large language model\) AND \(precision AND recall\)” and “AB \(large language model\) AND \(F1\)”—fewer than half of the identified articles reported any measure of uncertainty surrounding those metrics \(either confidence intervals or standard errors\)\. Further, where confidence intervals for metrics are reported, they are often calculated using methods which are often inaccurate for high proportions \(as is likely when reporting metrics resulting from an LLM\-based classifier\) and/or for nested data \(e\.g\., when the same author produces multiple texts\)\.
This article assesses best\-practice in the estimation and reporting of performance metric uncertainty\. In doing so, we address three challenges that often arise with text classification: small effective sample sizes \(due to rare constructs or challenges in recruiting\), performance metrics that are near 1 \(due to the capabilities of LLMs\), and non\-independence \(due to clustering of texts within authors, participants, or documents\)\. We assess interval coverage and width through simulations under conditions typical to text classification, providing practical recommendations for confidence interval reporting\.
## 1Classifier Performance and Validity
Text classification may be thought of as a measurement problem: there is some true—but latent—construct which is revealed within the text and which we hope our classifier can identify\[[undefap](https://arxiv.org/html/2606.26422#biba.bibx6),[undefaas](https://arxiv.org/html/2606.26422#biba.bibx35)\]\. The validity of the classifier, then, depends on the extent to which the classifications reflect the construct of interest\. Most commonly, this is assessed by comparing expert, human classifications to the machine classifications, under the assumption that the human classifications are closely aligned with the construct\[[undefaw](https://arxiv.org/html/2606.26422#biba.bibx13)\]\. Performance metrics provide an estimation of this alignment\.
### 1\.1Performance Metrics
#### 1\.1\.1Categoriesk=2k=2
Texts are often classified into one of two categories, positive or negative, where the positive label usually denotes a deviation from baseline\[[undefaao](https://arxiv.org/html/2606.26422#biba.bibx31)\]\. The goal in the evaluation of binary classifiers is to assess patterns of error in both positive and negative classifications\. Thus, metrics are commonly a function of the number of true positives \(TP\), false positives \(FP\), true negatives \(TN\), and false negatives \(FN\)\. A confusion matrix, as in Table[1](https://arxiv.org/html/2606.26422#S1.T1), reports counts or proportions for each of these\.
Table 1:Confusion Matrix SetupNote\.TP = True Positive, FN = False Negative, FP = False Positive, TN = True Negative\.
The relationship between the quantities in a confusion matrix is summarized using one or more of several metrics: accuracy \(the proportion of correctly classified texts\), recall \(the proportion of positive cases identified by the model\), precision \(the probability that a given case is positive if identified as positive by the model\), and specificity \(the proportion of negative cases identified by the model\), formally defined:
Accuracy=TP\+TNTP\+FP\+FN\+TN\\mathrm\{Accuracy\}=\\frac\{TP\+TN\}\{TP\+FP\+FN\+TN\}Recall=TPTP\+FN\\mathrm\{Recall\}=\\frac\{TP\}\{TP\+FN\}Precision=TPTP\+FP\\mathrm\{Precision\}=\\frac\{TP\}\{TP\+FP\}Specificity=TNTN\+FP\\mathrm\{Specificity\}=\\frac\{TN\}\{TN\+FP\}
When presented alone, each of these has shortcomings\[[undefaaf](https://arxiv.org/html/2606.26422#biba.bibx22)\]\. Accuracy is inappropriate in the case of category imbalance, where a high value could be obtained despite never or rarely identifying the category of interest\. Reporting recall and precision in tandem addresses this problem by providing information on the proportion of positive cases identified, and the proportion of model\-identified positive cases that are indeed positive\. Still, precision and recall do not provide any information on proportion of true negatives identified, an issue addressed by specificity\.
As defined, each of the above assumes a true classification, likely provided by a human\. However, acknowledging reasonable disagreements between even experts\[[undefaar](https://arxiv.org/html/2606.26422#biba.bibx34)\], the possibility of human error, and the impressive capabilities of LLMs\[[undefau](https://arxiv.org/html/2606.26422#biba.bibx11)\], researchers evaluating LLM classifications may prefer to refrain from categorizing the human classification as the decisive truth when there are disagreements\. \(This is less the case with supervised learning where the model aims to directly replicate human classifications, thus requiring that the human classifications are treated as gold standard\.\) Even if analysts are agnostic on which classification is correct in the case of disagreements, measuring disagreements remains an important aspect of validation, analogous to measuring agreement between humans\[[undefax](https://arxiv.org/html/2606.26422#biba.bibx14)\]\. Analysts in this case may report percent agreement \(which is subject to the same shortcomings as accuracy\), or corollaries to recall and specificity: percent positive agreement \(PPA\) and percent negative agreement \(PNA;\[[undefaz](https://arxiv.org/html/2606.26422#biba.bibx16)\]\), defined using the disagreement matrix below \(Table[2](https://arxiv.org/html/2606.26422#S1.T2)\) as:
PPA=2a2a\+b\+candPNA=2d2d\+b\+c\.\\text\{PPA\}=\\frac\{2a\}\{2a\+b\+c\}\\quad\\text\{and\}\\quad PNA=\\frac\{2d\}\{2d\+b\+c\}\.
Table 2:Disagreement Matrix
#### 1\.1\.2Categoriesk≥3k\\geq 3
When text classification is used to categorize a text into greater than two possible categories, each category*k*is associated with its own confusion/disagreement matrix\. The metrics above, then, remain unchanged in definition, and can be calculated for each category\. To aggregate across categories, however, we can take an average, either giving equal weight to each category \(macro\-averaging, e\.g\., generating macro\-recall\) or weighting by the number of texts in a category \(micro\-averaging, e\.g\., generating micro\-recall\)\. The latter is more representative of the sample \(as each text counts equally\) but can easily become dominated by large categories\[[undefaao](https://arxiv.org/html/2606.26422#biba.bibx31)\]\.
#### 1\.1\.3Summary Metrics
Comprehensive evaluation of a text classifier requires obtaining an understanding of the multiple types of error or disagreement, among positives or negatives \(and, when relevant, within multiple categories\)\. However, a single summary metric simplifies the selection between classifiers \(or among hyper\-parameters, text representations, prompts, etc\.\)\. Metrics like F1, the area under the Receiver Operating Characteristic curve and Cohen’s Kappa \(κ\\kappa\) serve this function well\.
F1 is defined as the harmonic mean of precision and recall, formally:
F1=2×Precision×RecallPrecision\+Recall,F1=\\frac\{2\\times Precision\\times Recall\}\{Precision\+Recall\},allowing an analyst to compare multiple classifiers, some with higher precision than recall and vice versa\. ROC is relevant when using a classifier that outputs probabilities and provides the probability that, if given a randomly selected positive and negative example, the model will rank the positive case higher than the negative case\[[undefaak](https://arxiv.org/html/2606.26422#biba.bibx27)\]\. Cohen’s Kappa\(κ\)=Agreement−pe1−pe\(\\kappa\)=\\frac\{Agreement\-p\_\{e\}\}\{1\-p\_\{e\}\}givenpe=\(a\+b\)\(a\+c\)\+\(c\+d\)\(b\+d\)\(a\+b\+c\+d\)2p\_\{e\}=\\frac\{\(a\+b\)\(a\+c\)\+\(c\+d\)\(b\+d\)\}\{\(a\+b\+c\+d\)^\{2\}\}, provides a measure of agreement, beyond that which can be attributed to random chance,pep\_\{e\}\. Like PPA and PNA,κ\\kappais agnostic to “truth”; either the machine or the human could be considered the “truth”, and the metrics would be the same\.
While summary metrics are particularly well\-suited to the automated empirical selection of hyper\-parameters, as they provide a single metric to optimize for, they are less directly informative about the error behavior of the model when employed\[[undefav](https://arxiv.org/html/2606.26422#biba.bibx12),[undefaam](https://arxiv.org/html/2606.26422#biba.bibx29)\]\. For example, reporting only an F1 score may hide the fact that a model has high precision but low recall \(or vice versa\), a characteristic which would impact the degree to which it is useful, and which impacts the appropriate interpretation of its classifications\.
## 2Confidence Intervals for Independent Data
Reported performance metrics are a best estimate, given a sample, of an unknown true performance rate among the population of texts to which the classifier may be applied\. Because of sampling variability, estimated performance is subject to random error and will vary from sample to sample\. Confidence intervals provide a range of values within which the true performance rate is likely to fall\.
Unfortunately, in many social science journals, performance metrics are, at best, inconsistently accompanied by measures of uncertainty\[[undefal](https://arxiv.org/html/2606.26422#biba.bibx2)\]\. The failure to report standard errors or confidence intervals around a metric treats model performance as if it is known, e\.g\., as if we are certain that the classifier will identify 85% of instances of a construct\. However, performance is always assessed on a sample of texts, with accompanying confidence interval widths depending on the number of texts, classifier performance, and category prevalence\.
Unfortunately, confidence interval width also depends on the method of estimation, with some estimation approaches resulting in tighter, but inaccurate, intervals, and others resulting in wider but reliable intervals\. The aim, of course, is to obtain intervals that accurately reflect uncertainty—e\.g\., so that a 95% confidence interval contains the true metric in approximately 95% of repeated samples—while remaining as narrow as possible\. We define several methods of interval calculation below\.
### 2\.1Analytic Intervals
We begin with the textbook definition of a confidence interval for a binomial proportion, the Wald confidence interval, sometimes called the normal approximation\[[undefaap](https://arxiv.org/html/2606.26422#biba.bibx32)\]\. LetXXdenote the number of instances \(“successes” in binomial terms\) for a sample sizenn\(trials; e\.g\., total number of texts\)\. Then letp^=Xn\\widehat\{p\}=\\frac\{X\}\{n\}represent the sample proportion\. Using the asymptotic normality of the sample proportion, the100\(1−α\)%100\(1\-\\alpha\)\\%confidence interval forppis:
p^±zα/2p^\(1−p^\)n\\widehat\{p\}\\pm z\_\{\\alpha/2\}\\sqrt\{\\frac\{\\widehat\{p\}\(1\-\\widehat\{p\}\)\}\{n\}\}
Consider the following example\. If there were a total of 2000 texts and 300 cases of the construct of interest, the 95% Wald confidence interval surrounding the proportion would be\[0\.134,0\.166\]\[0\.134,0\.166\]\. Of course, however, the aim here is not to estimate a confidence interval surrounding the proportion of positive instances of a construct, but rather the model’s identification of such instances\. This requires modifying the definitions ofnnandpp\.
In the calculation of recall for the example above,nnbecomes 300, the number of positive human classifications;p^\\widehat\{p\}becomes the estimated proportion of those texts which the model also identifies\. Assume an estimated recall of 0\.88 \(the model identifies 264 of the 300 human\-identified instances\), the Wald confidence interval surrounding that metric would be\[0\.843,0\.917\]\[0\.843,0\.917\]\. However, the textbook Wald estimator is known to provide poor and erratic interval estimates whenp^\\widehat\{p\}is either high or low, particularly with small sample sizes\[[undefak](https://arxiv.org/html/2606.26422#biba.bibx1)\]\.
A commonly accepted alternative which addresses this shortcoming, is the Wilson interval, derived by inverting the score test forpp\[[undefak](https://arxiv.org/html/2606.26422#biba.bibx1)\]\. Letz=zα/2z=z\_\{\\alpha/2\}, then, the Wilson confidence interval for p is defined as:
np^\+12z2n\+z2±znp^\(1−p^\)\+14z2\(n\+z2\)2\\frac\{n\\widehat\{p\}\+\\frac\{1\}\{2\}z^\{2\}\}\{n\+z^\{2\}\}\\pm z\\sqrt\{\\frac\{n\\widehat\{p\}\(1\-\\widehat\{p\}\)\+\\frac\{1\}\{4\}z^\{2\}\}\{\(n\+z^\{2\}\)^\{2\}\}\}
Notably, the midpoint of the interval is no longerp^\\widehat\{p\}but can instead be understood as a weighted average ofp^\\widehat\{p\}and12\\tfrac\{1\}\{2\}with added proxy observations \(zzof1\.961\.96,z2≈4z^\{2\}\\approx 4\), half successes, half failures\[[undefaag](https://arxiv.org/html/2606.26422#biba.bibx23)\], seen with some reformulation,p^\(nn\+z2\)\+12\(z2n\+z2\)\\widehat\{p\}\\left\(\\frac\{n\}\{n\+z^\{2\}\}\\right\)\+\\frac\{1\}\{2\}\\left\(\\frac\{z^\{2\}\}\{n\+z^\{2\}\}\\right\)\[[undefak](https://arxiv.org/html/2606.26422#biba.bibx1)\]\. The lower and upper bounds similarly incorporate proxy observations, with the number depending on the specified confidence level\. In the above example, the Wilson confidence interval is both a little wider, and a little lower than the Wald interval, now\[0\.838,0\.912\]\[0\.838,0\.912\]\. If the sample size were much lower, the difference would be larger\. For example, at 30 positive observations and a recall of 0\.88, the Wald interval is\[0\.763,0\.996\]\[0\.763,0\.996\]while the Wilson interval is\[0\.719,0\.955\]\[0\.719,0\.955\]\.
Two additional analytic intervals for proportions may be useful\. First, Agresti and Coull create a simplified version of the Wilson interval, generated by simply adding a count of two successes and two failures to the Wald interval\[[undefak](https://arxiv.org/html/2606.26422#biba.bibx1)\]:
p~±zp~\(1−p~\)n~\\widetilde\{p\}\\pm z\\sqrt\{\\frac\{\\widetilde\{p\}\(1\-\\widetilde\{p\}\)\}\{\\widetilde\{n\}\}\}This small change substantially improves the behavior of the interval at proportions near 0 and 1\. Second, the Clopper\-Pearson interval\[[undefan](https://arxiv.org/html/2606.26422#biba.bibx4)\]is an exact interval guaranteed to cover the true p in100\(1−α\)%100\(1\-\\alpha\)\\%of binomial samples, albeit conservatively\[[undefak](https://arxiv.org/html/2606.26422#biba.bibx1)\]\.
### 2\.2Bootstrapped Intervals
Bootstrapping provides a non\-analytic alternative to the calculation of standard errors\. The approach is particularly compelling when there is no readily available formula for the standard error of a statistic\. Most notably, this is the case for the F1 metric, which is not a binomial proportion \(and thus, none of the above specifications of the Wald, the Wilson, Agresti\-Coull, or Clopper\-Pearson is applicable\), but the harmonic mean of precision and recall\.
When bootstrapping, we simulate statistical inference\. Given an i\.i\.d\. sample ofnnindividuals, we: 1\) draw a random sample ofnnindividuals with replacement, creating𝐱∗=\{x1∗,x2∗,x3∗,…,xn∗\}\\mathbf\{x\}^\{\*\}=\\\{x\_\{1\}^\{\*\},x\_\{2\}^\{\*\},x\_\{3\}^\{\*\},\\ldots,x\_\{n\}^\{\*\}\\\}; 2\) calculate the metric of interestm^∗\\widehat\{m\}^\{\*\}\(e\.g\.,F1^∗\\widehat\{F1\}^\{\*\}\); 3\) Repeat this process a large number of times, sayB=1000B=1000, generating 1000 bootstrap replicates ofm^∗\\widehat\{m\}^\{\*\}\[[undefaat](https://arxiv.org/html/2606.26422#biba.bibx36)\]\. With this basic setup, several options for confidence intervals exist\.
##### Percentile Interval\.
One of the most straightforward bootstrapped confidence intervals is simply the range in the middle1−α1\-\\alphaof a bootstrap distribution; e\.g\., for a 95% confidence interval with 1000 bootstraps, the 25thand 975thlargest of the bootstrap replicates serve as an estimate of the 95% confidence interval\[[undefas](https://arxiv.org/html/2606.26422#biba.bibx9)\]\. Unfortunately, this approach is often inaccurate and erratic at small to moderate sample sizes when proportions near 0 or 1\[[undefaan](https://arxiv.org/html/2606.26422#biba.bibx30)\]\.
##### BCa Interval\.
The bias\-corrected and accelerated interval \(BCa;\[[undefaat](https://arxiv.org/html/2606.26422#biba.bibx36)\]\) uses percentiles adjusted by a bias parameter and an acceleration parameter\. The bias parameter depends on the proportion of bootstrap statistics falling below the observed statistic observed from the original sample while the acceleration parameter depends on the skewness of empirical influence function, estimated using jackknife leave\-one\-out estimates\[[undefaac](https://arxiv.org/html/2606.26422#biba.bibx19),[undefaat](https://arxiv.org/html/2606.26422#biba.bibx36)\]\.
##### Pseudo\-Count Regularized Interval\.
Finally, we propose a simple adjustment to the bootstrap to address the erratic nature of bootstrapped intervals when the sample size is small andppis either high or low\. The intuition and implementation of the interval is very similar to the analytic Agresti\-Coull interval: the original sample is augmented with an equal number of pseudo\-successes and pseudo\-failures\. Then, the bootstrapped percentile interval is calculated as usual, with some bootstrapped samples including one or more of the pseudo\-observations\. More formally, we augment the i\.i\.d\. sample𝐱\\mathbf\{x\}ofnnobservations,𝐱=\{x1,x2,x3,…,xn\}\\mathbf\{x\}=\\\{x\_\{1\},x\_\{2\},x\_\{3\},\\ldots,x\_\{n\}\\\}withλ\\lambdapseudo\-successes and pseudo\-failures, generating:
𝐱aug=\{x1,…,xn,1,…,1⏟λpseudo\-successes,0,…,0⏟λpseudo\-failures\}\.\\mathbf\{x\}\_\{\\text\{aug\}\}=\\Big\\\{x\_\{1\},\\ldots,x\_\{n\},\\underbrace\{1,\\ldots,1\}\_\{\\lambda\\text\{ pseudo\-successes\}\},\\underbrace\{0,\\ldots,0\}\_\{\\lambda\\text\{ pseudo\-failures\}\}\\Big\\\}\.E\.g\., ifλ=1\\lambda=1, then𝐱aug=\{x1,x2,x3,…,xn,1,0\}\\mathbf\{x\}\_\{\\text\{aug\}\}=\\\{x\_\{1\},x\_\{2\},x\_\{3\},\\ldots,x\_\{n\},1,0\\\}\. Then we: 1\) draw a random sample ofn\+2λn\+2\\lambdaobservations with replacement from𝐱aug\\mathbf\{x\}\_\{\\text\{aug\}\}, creating𝐱aug∗=\{x1∗,x2∗,x3∗,…,xn\+2λ∗\}\\mathbf\{x\}\_\{\\text\{aug\}\}^\{\*\}=\\\{x\_\{1\}^\{\*\},x\_\{2\}^\{\*\},x\_\{3\}^\{\*\},\\ldots,x\_\{n\+2\\lambda\}^\{\*\}\\\}; 2\) calculate the metric of interestm^∗\\widehat\{m\}^\{\*\}\(e\.g\.,F1^∗\\widehat\{F1\}^\{\*\}\); 3\) Repeat this processβ\\betatimes, generatingβ\\betabootstrap replicates ofm^∗\\widehat\{m\}^\{\*\}\. 4\) Identify the appropriate percentiles to generate the interval\.
Like in the Wilson and Agresti\-Coull intervals, the pseudo\-count regularized bootstrap interval for a proportion is centered aroundp~\\widetilde\{p\}weighted towards 0\.5 and the magnitude of the weight depends onnn\. Whennnis large,λ\\lambdawill be comparatively small and the bootstrap samples will be dominated by true observations\. On the other hand, whennnis small, the center will be pulled more strongly towards 0\.5\. When applied to performance metrics, this reduces the lower bound of an interval with a high estimated performance\. To generate an interval aroundF1F1, which is not a single proportion but the harmonic mean of two, we augment the sample withλ\\lambdapseudo\-observations in each quadrant of the confusion matrix before applying the bootstrap procedure\. Thus, both precision and recall are regularized as above\.
## 3Coverage Under Independence
This section demonstrates the coverage of 95% confidence intervals resulting from the Wald, Wilson, Agresti\-Coull, and Clopper\-Pearson confidence intervals \(the analytic methods\), as well as percentile, BCa, and pseudo\-count regularized bootstraps\. We define coverage as the proportion of samples—drawn from a Bernoulli distribution with a true population proportionpp—where the 95% confidence interval containspp, i\.e\.,Pr\{p∈CI\}\\Pr\\\{p\\in CI\\\}\. In other words, take a population recall of 0\.8 \(i\.e\., where, if we could assess our classifier on the full population of human\-coded positive texts, a proportion of 0\.8 of these positive cases would be identified by the model\)\. Then, we want to know, for each of the interval methods assessed, what proportion of random samples of sizenn, would result in a 95% confidence interval which contains 0\.8\. A 95% confidence interval method should reach approximately 0\.95 coverage\.
We test coverage varying n from 10 to 250 and varyingppto include 0\.5, 0\.6, 0\.7, 0\.8, 0\.9, and 0\.95\. When calculating bootstrapped confidence intervals, we generate 2000 bootstrapped samples\. If any bootstrapped sample does not contain a positive case, that sample is excluded from the calculation of the confidence intervals\. For the pseudo\-count bootstrap, we assess coverage withλ=1\\lambda=1and22\(the number of successes and failures added; e\.g\.,λ=1\\lambda=1, indicates one pseudo\-success and one pseudo\-failure\)\. This coverage study replicates the work of\[[undefak](https://arxiv.org/html/2606.26422#biba.bibx1)\],\[[undefaan](https://arxiv.org/html/2606.26422#biba.bibx30)\],\[[undefaag](https://arxiv.org/html/2606.26422#biba.bibx23)\], among others, in its comparison of confidence interval coverage, but with a focus on values ofpplikely obtained with performance metrics\. It is more novel in its inclusion of a simple and intuitive approach to addressing low coverage for bootstrapped intervals calculated on small samples with high proportions \(via pseudo counts\)\.
### 3\.1Coverage for Proportion\-Based Metrics
A comprehensive set of our coverage results for analytic intervals may be found in Appendix[A](https://arxiv.org/html/2606.26422#A1), and bootstrapped intervals in Appendix[B](https://arxiv.org/html/2606.26422#A2)\. Our key conclusions are summarized in Figure[1](https://arxiv.org/html/2606.26422#S3.F1)which show coverage results for the two interval methods that demonstrate the worst behavior \(despite being the most commonly employed in practice; the Wald intervals and the basic percentile bootstrap\) alongside two strong alternatives \(the Agresti\-Coull interval and a pseudo\-count regularized bootstrap withλ=1\\lambda=1\)\.
Figure 1:Coverage Rates for Interval Calculation MethodsAs expected, the Wald interval demonstrates undesirable properties\. At higher proportions and sample sizes below 50, coverage is often below 0\.9 with some coverage rates reaching 0\.6 and below\. Further, coverage is erratic with some sample sizes producing dramatic drops in coverage \(see Figure[1](https://arxiv.org/html/2606.26422#S3.F1)\)\. Even at proportions of 0\.5, 0\.6, and 0\.7, when sample sizes are below 50 coverage is often lower than the nominal level; around 0\.925 for a 95% confidence interval\. On the other hand, the Clopper\-Pearson, Wilson, and Agresti\-Coull intervals all offer substantial improvements\. For example, Agresti\-Coull intervals consistently hover around or above 0\.95 coverage, even at small sample sizes and extreme values ofpp\. Coverage rates for Clopper\-Pearson and Wilson intervals are similar \(see Appendix[A](https://arxiv.org/html/2606.26422#A1)\), though, rates for Clopper\-Pearson are always at least 0\.95 \(as expected\)\. Overall, each of these three intervals \(Agresti\-Coull, Wilson, or Clopper\-Pearson\) is a reasonable option\. The Wilson and Agresti\-Coull intervals have a slight advantage in terms of interval width \(see Figure[A5](https://arxiv.org/html/2606.26422#A1.F5)for a comparison of interval half\-widths\) and a slight disadvantage in terms of coverage\.
Similar to the Wald interval, the basic percentile bootstrap also demonstrates insufficient and erratic coverage, particularly at high proportions\. Whenp=0\.95p=0\.95, confidence interval coverage rarely reaches 0\.95\. Further, like the Wald interval, there are values ofnnthat result in dramatic drops in coverage, and coverage is more often slightly below 0\.95 than above\. The BCa addresses this last problem, pushing coverage higher but problems remain when the sample size is low while the proportion is high \(see Appendix[B](https://arxiv.org/html/2606.26422#A2)\)\. The pseudo\-count regularized bootstrap interval withλ=1\\lambda=1\(augmenting one success and one failure to the sample before bootstrapping; see Appendix[B](https://arxiv.org/html/2606.26422#A2)for an exploration of the effectiveness of the regularizing withλ=1\\lambda=1versus 2\) addresses all three problems\. Coverage is consistently at or above 0\.95 for all presented proportions and sample sizes and interval width is no wider than the BCa intervals \(see Appendix[B](https://arxiv.org/html/2606.26422#A2)\)\.
Overall, the Wilson, Agresti\-Coull, Clopper\-Pearson, and pseudo\-count regularized interval all provide appropriate coverage\. We prefer the Agresti\-Coull for its simplicity and limited computational cost \(compared to bootstrapping\)\. However, the pseudo\-count bootstrap offers an alternative for metrics like F1 where no analytic interval is readily available\. We explore coverage in this scenario below\.
### 3\.2Coverage for F1
We evaluate the empirical coverage of bootstrap confidence intervals for F1 under population conditions that vary true precision and true recall at values of 0\.50, 0\.60, 0\.70, 0\.80, 0\.90, and 0\.95\. Prevalence is set to 0\.10 \(indicating 10% of the population observations are in the positive class\), allowing us to assess coverage in the case of imbalanced classes\. For each condition, we convert target precision and recall values into population probabilities in each quadrant of the confusion matrix\. Then, the true F1 score for each population is calculated from the population precision and recall\. For each population condition, coverage is assessed across sample sizes ranging from 30 to 500, increasing by one from 30 to 50, and then by 10 from 60 to 500\. For each sample size and population condition, 1,000 independent samples were generated, each with an associated confusion matrix with counts of true positives, false positives, true negatives, and false negatives\.
For each simulated sample, we construct a pseudo\-count regularized bootstrapped interval withλ=1\\lambda=1by adding one count to each quadrant of the matrix\. Then, to generate a bootstrapped sample,n\+4λn\+4\\lambdaobservations \(categorized as TP, FP, TN, or FN\) are randomly selected with replacement\. Precision, recall, and F1 are calculated for each of 2000 bootstrapped samples and we take the 2\.5th and 97\.5th percentiles to generate the 95% confidence interval\. Coverage is estimated as the proportion of simulated sample intervals containing the known population F1 score\.
##### F1 Coverage Results\.
Figure[2](https://arxiv.org/html/2606.26422#S3.F2)displays the empirical coverage of 95% bootstrap confidence intervals for F1 across the simulated populations where construct prevalence = 0\.10\. Each row corresponds to a sample size range and each heatmap cell corresponds to one combination of true precision and true recall, averaged across the relevant sample sizes\. The left\-hand panel shows coverage with the percentile bootstrap and the right\-hand shows coverage with the pseudo\-count regularized bootstrap whereλ=1\\lambda=1\. Shading represents the estimated coverage probability, with darker values indicating coverage closer to or above the desired 0\.95 level\. Higher coverage is observed with the pseudo\-regularized bootstrap than the percentile bootstrap\. For example, whenn=30–100n=30\\text\{\-\-\}100the non\-regularized bootstrap rarely reaches even 0\.90 coverage\. Note here that 30 is a very small sample size, given we simulate 10% construct prevalence\. However, even when sample sizes are between 100–300, coverage is often still below 0\.95\. On the other hand, coverage for the regularized bootstrap is almost always at the desired 0\.95 level and is consistently better than that of basic percentile bootstrap\.
Figure 2:Coverage Rates for the Percentile Bootstrap and Pseudo\-Count Regularized Bootstrap \(𝝀=𝟏\\bm\{\\lambda=1\}\) at a Prevalence of 0\.10
### 3\.3Sample Size Considerations
Figure 3:Relationship between Confidence Interval Half\-Width and Sample SizeFigure[3](https://arxiv.org/html/2606.26422#S3.F3)displays the relationship between the number of cases used to estimate performance and the half width of a 95% confidence interval, with varying performance rates represented\. The figure reinforces two key behaviors relevant to sample size planning\. First, higher performance rates result in tighter confidence intervals, and this relationship grows stronger as performance gets higher \(e\.g\., the difference in half\-widths betweenp=0\.90p=0\.90andp=0\.95p=0\.95is greater than the difference in half\-widths betweenp=0\.70p=0\.70andp=0\.75p=0\.75\)\. Therefore, the needed validation sample size depends heavily on the expected performance of the model\. Second, interval half\-width decreases with sample size in an inverse square relationship\. This relationship means it is much more costly to move from a half\-width of 0\.05 to 0\.025 than from 0\.20 to 0\.15\.
Table 3:Necessary Sample Size for Desired Interval Half\-Width, and True Proportion\-Based PerformanceTable[3](https://arxiv.org/html/2606.26422#S3.T3)provides similar information in table form, alongside a 90% interval, for ease of reference\. Note that here, and in the figure above, in the context of validating binary text classifiers, the analytic sample size is the number of observations used to estimate the metric, not the total number of labelled observations\. For recall, this would be the number of positive human classifications, for precision, the number of positive model classifications\. In the table, if we want to be able to estimate a regularized bootstrapped 90% confidence interval no wider than 0\.05 on either side and aim to generate a classifier capable of identifying 90% of positive cases \(i\.e\., recall 0\.90\), we would need 99 positive cases\. If only a quarter of the texts are labelled by humans as positive, then the validation data would need to be 396 texts for a confidence interval half\-width of 0\.05\. Again, analytic sample size requirements increase if we expect a classifier to reach a lower level of performance\. At an assumed performance of 0\.80, for example, 170 positive cases would be needed\.
## 4Confidence Intervals for Nested Data
Studies of text data are often hierarchical in nature, with multiple texts collected from the same individual\. For example, we may have utterances \(which may or may not reflect our construct of interest\), nested within therapists\. Such texts are not independent\. For example, utterances produced by the same therapist likely share many characteristics as the therapist has their own style of speech used when interacting with clients\. Such nested datasets produce two potential limitations in text classification\. First, the confidence interval estimation procedures described above assume independent binomial trials\[[undefaq](https://arxiv.org/html/2606.26422#biba.bibx7),[undefar](https://arxiv.org/html/2606.26422#biba.bibx8)\]\. This assumption can result in an underestimation of uncertainty, resulting in confidence intervals that are inappropriately narrow\[[undefaaq](https://arxiv.org/html/2606.26422#biba.bibx33)\]\. Second, if data are split into training and testing sets at the text level, the model may benefit from learning the “ungeneralizable idiosyncrasies” of individuals\[[undefal](https://arxiv.org/html/2606.26422#biba.bibx2), p\. 13\]\. Thus, performance is likely to be lower when applied to new, unseen individuals\. In such a scenario, it is considered best practice to conduct a train:test split at the highest level of the hierarchical data, such that no single speaker’s utterances are in both the training and testing data\[[undefal](https://arxiv.org/html/2606.26422#biba.bibx2)\]\.
On the other hand, if the model will never be applied to unseen individuals, such a split may not be necessary\. The key question is: Does the available corpus represent a sample of texts to which the classifier may be applied, or does it represent the full population? In other words, will the classifier be applied to texts outside those from which the labelled data were sampled? If not, it is not necessarily overfit for a classifier to learn person\-specific idiosyncrasies within the dataset; these idiosyncrasies are relevant\. On the other hand, if a classifier will be applied beyond the current available sample, the analyst will want to know that it can generalize to entirely unseen individuals\. In this case, splitting should occur at the individual level, with confidence intervals that reflect this sampling scheme\.
### 4\.1The Design Effect
When texts are produced by the same individual, there is reason to believe that there exists some homogeneity of performance within that individual: i\.e\., the model may be better suited at identifying the concept within one individual’s way of writing or speaking compared to another\. To the extent that there is homogeneity in performance, this violates the assumption of independent and identically distributed \(i\.i\.d\.\) observations\. The degree to which this matters in estimates of variance is known as a design effect, first proposed to understand survey variance under cluster designs\[[undefaai](https://arxiv.org/html/2606.26422#biba.bibx25)\]:DEFF=VaractualVarsrsDEFF=\\frac\{Var\_\{\\text\{actual\}\}\}\{Var\_\{\\text\{srs\}\}\}\. The numerator is the variance under the actual, hierarchical design \(e\.g\., in the original framework, individuals sampled within neighborhoods for surveys; here, texts sampled within individuals for text classification\) and the denominator is the variance under simple random sampling\[[undefaai](https://arxiv.org/html/2606.26422#biba.bibx25)\]\. A design effect greater than one indicates the increase in variance \(and the loss of statistical precision\) due to clustering\. Expressed in terms of standard errors relevant for confidence interval width:s\.e\.act=s\.e\.srs×DEFFs\.e\.\_\{\\text\{act\}\}=s\.e\.\_\{\\text\{srs\}\}\\times\\sqrt\{\\text\{DEFF\}\}such that the confidence interval width is multiplied byDEFF\\sqrt\{\\text\{DEFF\}\}\. With a 95% confidence interval and a design effect of 1\.5,1\.5≈1\.225\\sqrt\{1\.5\}\\approx 1\.225, for example, the confidence interval will be approximately 22\.5% wider than under simple random sampling\.
The magnitude of the design effect is dependent on the degree of homogeneity within clusters \(or here, the homogeneity of performance within texts produced by the same individual\), measured via the intra\-class correlation,ρ=VarbetweenVarbetween\+Varwithin\\rho=\\frac\{Var\_\{\\text\{between\}\}\}\{Var\_\{\\text\{between\}\}\+Var\_\{\\text\{within\}\}\}, the proportion of total variance due to variance between clusters\. \(See\[[undefaau](https://arxiv.org/html/2606.26422#biba.bibx37)\]for a comparison of several approaches to estimating ICC\.\) In the case of text classification, a higher proportion would indicate a higher degree of within\-individual performance homogeneity\. If cluster sizes are equal, the design effect can be approximated by1\+ρ\(B−1\)1\+\\rho\(B\-1\), i\.e\., the ICC orρ\\rho, multiplied by the number of observations within a cluster,BB, less one\[[undefaai](https://arxiv.org/html/2606.26422#biba.bibx25), p\. 162\]\. If cluster sizes are unequal, substituting the average cluster size forBBalso provides a reasonable approximation\[[undefaai](https://arxiv.org/html/2606.26422#biba.bibx25)\]\.
### 4\.2Adjusted Analytic Intervals
When data are not i\.i\.d\., analytic confidence intervals may be adjusted by using effective sample size,neffn\_\{\\text\{eff\}\}, instead of n\. Effective sample size,neffn\_\{\\text\{eff\}\}may be calculated\[[undefaaj](https://arxiv.org/html/2606.26422#biba.bibx26)\]:
neff=p^\(1−p^\)var^\(p^\),n\_\{\\text\{eff\}\}=\\frac\{\\widehat\{p\}\(1\-\\widehat\{p\}\)\}\{\\widehat\{\\text\{var\}\}\(\\widehat\{p\}\)\},wherevar^\(p^\)\\widehat\{\\text\{var\}\}\(\\widehat\{p\}\)may be estimated asvar^\(p^\)=\{p^\(1−p^\)n\}×\{1\+ρ\(B−1\)\}\\widehat\{\\text\{var\}\}\(\\widehat\{p\}\)=\\left\\\{\\frac\{\\widehat\{p\}\(1\-\\widehat\{p\}\)\}\{n\}\\right\\\}\\times\\left\\\{1\+\\rho\(B\-1\)\\right\\\}\.
Effective sample size can also be adjusted for the so called design degrees of freedom,dfdesign=m−1df\_\{\\text\{design\}\}=m\-1, understood as the number of primary sampling units \(here, individuals\) minus the number of strata \(here, 1 as the participants are not stratified\)\[[undefaaj](https://arxiv.org/html/2606.26422#biba.bibx26)\]such that the design degrees of freedom adjusted sample size is:
neff∗=p^\(1−p^\)var^\(p^\)×\{z\(1−α2\)tdfdesign\(1−α2\)\}2,n\_\{\\text\{eff\}\}^\{\*\}=\\frac\{\\widehat\{p\}\(1\-\\widehat\{p\}\)\}\{\\widehat\{\\text\{var\}\}\(\\widehat\{p\}\)\}\\times\\left\\\{\\frac\{z\\left\(1\-\\frac\{\\alpha\}\{2\}\\right\)\}\{t\_\{df\_\{\\text\{design\}\}\}\\left\(1\-\\frac\{\\alpha\}\{2\}\\right\)\}\\right\\\}^\{2\},wheretdfdesign\(1−α2\)t\_\{df\_\{\\text\{design\}\}\}\\left\(1\-\\frac\{\\alpha\}\{2\}\\right\)indicates the appropriate quantile withdfdesigndf\_\{\\text\{design\}\}degrees of freedom\[[undefaq](https://arxiv.org/html/2606.26422#biba.bibx7)\]\. \(Note that Korn and Graubard, 1998, introduce a degrees of freedom adjusted sample usingttquantiles in both the numerator and denominator\. We follow the suggestion of\[[undefaq](https://arxiv.org/html/2606.26422#biba.bibx7)\]in substituting thezzquantile in the numerator\)\.
Given these values, analytic confidence intervals may be calculated using the effective sample size,neffn\_\{\\text\{eff\}\}, or degrees of freedom adjusted effective sample size,neff∗n\_\{\\text\{eff\}\}^\{\*\}, in lieu ofnn\.
For example, a degrees of freedom adjusted Wilson interval would be calculated:
neff∗p^\+12z2neff∗\+z2±zneff∗p^\(1−p^\)\+14z2\(neff∗\+z2\)2\.\\frac\{n\_\{\\text\{eff\}\}^\{\*\}\\widehat\{p\}\+\\frac\{1\}\{2\}z^\{2\}\}\{n\_\{\\text\{eff\}\}^\{\*\}\+z^\{2\}\}\\pm z\\sqrt\{\\frac\{n\_\{\\text\{eff\}\}^\{\*\}\\widehat\{p\}\(1\-\\widehat\{p\}\)\+\\frac\{1\}\{4\}z^\{2\}\}\{\(n\_\{\\text\{eff\}\}^\{\*\}\+z^\{2\}\)^\{2\}\}\}\.
### 4\.3Clustered and Hierarchical Bootstrap
Bootstrapping may be designed to reflect the nested nature of data, where individuals produce multiple texts\. Two common approaches exist: the hierarchical bootstrap and the clustered bootstrap\. Under the cluster bootstrap, individuals are sampled with replacement and all of the \(re\-\)sampled individuals’ texts are retained in the bootstrap sample\[[undefat](https://arxiv.org/html/2606.26422#biba.bibx10),[undefaal](https://arxiv.org/html/2606.26422#biba.bibx28)\]\. Under the hierarchical bootstrap, first, individuals are sampled with replacement\. Then, for each individual, the analyst samples with replacement from texts produced by that individual, generating the bootstrap sample\[[undefat](https://arxiv.org/html/2606.26422#biba.bibx10),[undefaaq](https://arxiv.org/html/2606.26422#biba.bibx33)\]\. In either cluster bootstrapping or hierarchical bootstrapping, the metric of interest is calculated within each bootstrap sample and the process is repeated up to the preferred number of bootstraps\. From there, confidence interval calculation continues in the same manner as for the simple random sample bootstrap\. In the case of the percentile interval, this means simply identifying the range in the middle1−α1\-\\alphaof a bootstrap distribution\. Compared to the clustered bootstrap, the hierarchical bootstrap is more conservative\[[undefaaq](https://arxiv.org/html/2606.26422#biba.bibx33)\], reflecting random variation in both the sample of individuals and in the texts that they produce\. In the simulations below, we test both versions\.
##### Pseudo\-Count Regularized Clustered/Hierarchical Bootstrap Interval\.
In addition, we also propose and test a straightforward, pseudo\-count regularized version of the clustered/hierarchical bootstrap interval\. As with the simple random sample version described and tested above, this is designed to address the erratic nature of bootstrapped intervals when sample sizes are small andppis either high or low\. Now, instead of augmenting the sample with two independent pseudo\-observations, one success and one failure, we augment the sample with a pseudo\-*individual*comprising two pseudo\-observations, one success and one failure\. Or, in the case of an interval surrounding F1, we augment the sample with a pseudo\-individual comprising one TP, TN, FP, and FN\. Then, the hierarchical or clustered bootstrapped intervals are calculated as usual, with some bootstrapped samples including the pseudo\-individual one or more times\.
## 5Coverage Under Nesting
### 5\.1Simulation Design
We assess coverage for the nested interval approaches above in a setting where the researcher splits their data at the participant level, estimating performance metrics on texts produced by a random sample of participants \(representing those randomly assigned to the testing dataset\)\. We simulate a finite population of 2000 participants with 60 texts each, for a total of 120,000 text\-level observations\. For each individual,ii, we first generate a latent person\-level probabilitypip\_\{i\}representing that participant’s probability of a correct classification on any text\. This number is conceptualized as person\-level accuracy, precision or recall\. Metric probabilities are drawn from a beta distribution,pi∼Beta\(α,β\)p\_\{i\}\\sim Beta\(\\alpha,\\beta\), parameterized to have a target meanμpop=0\.9\\mu\_\{\\text\{pop\}\}=0\.9and between\-person standard deviationσpop=0\.1\\sigma\_\{\\text\{pop\}\}=0\.1, resulting in an approximate ICC of 0\.1, simulating a high\-performance classifier with moderate ICC\. Conditional onpip\_\{i\}, text\-level outcomes were generated fromYij∼Bernoulli\(pi\)Y\_\{ij\}\\sim\\text\{Bernoulli\}\(p\_\{i\}\), for textsj=1,…,60j=1,\\ldots,60\.
We simulate two sampling schemes, one small\-corpus condition where there is an average of three texts per individual \(target SD = 1, minimum = 1\) and one moderate\-corpus with an average of 30 texts \(target SD = 5\)\. We allow the number of sampled texts to vary in order to align with common data structures when estimating precision and recall; even if there are an equal number of texts produced by each participant, their numbers of human positive classifications and/or machine positive classifications will likely vary, thus varying the number of texts they contribute to recall and precision estimation\. From the population, we draw samples, varying the number of participants from 5 to 50 with 1000 samples of each population size\.
The study compares unadjusted, ICC\-adjusted, and bootstrap confidence intervals\. The unadjusted analytic intervals treat all sampled texts as independent and include Wald, Agresti\-Coull, and Wilson intervals\. The ICC adjusted intervals estimate ICC using ANOVA and include two forms of adjustment—adjusting forneffn\_\{\\text\{eff\}\}in one form andneffn\_\{\\text\{eff\}\}&dfdesign\\text\{df\}\_\{\\text\{design\}\}in another, both applied to Wald, Agresti\-Coull, and Wilson intervals\. The bootstrap intervals include an ordinary simple random sample percentile bootstrap, a clustered bootstrap, and a hierarchical bootstrap, with pseudo\-observation regularized versions of each, again settingλ=1\\lambda=1\(one pseudo\-success; one pseudo\-failure\) either at the text level \(for the simple random sample bootstrap\) or as a pseudo\-participant \(for cluster and hierarchical bootstraps\)\. Bootstrap intervals are based on 1000 bootstrap resamples\.
### 5\.2Coverage Results
Figure[4](https://arxiv.org/html/2606.26422#S5.F4)plots the coverage under the∼\\sim3 texts per person sampling scheme\. As expected, the Wald interval displays insufficient coverage, even with ICC adjustments\. However, for both Wilson intervals and Agresti\-Coull intervals, ICC adjustment accounting for bothneffn\_\{\\text\{eff\}\}&dfdesign\\text\{df\}\_\{\\text\{design\}\}produces coverage around 0\.95 across the sample sizes\. \(The difference between adjustment forneffn\_\{\\text\{eff\}\}andneffn\_\{\\text\{eff\}\}&dfdesign\\text\{df\}\_\{\\text\{design\}\}is minimal for the Agresti\-Coull intervals but more pronounced at small sample sizes for the Wilson interval\.\) Across the bootstrap interval methods, pseudo\-count regularization increases coverage particularly at very small sample sizes\. Importantly, the simple random sample bootstrap consistently shows under\-coverage, averaging approximately 0\.92 across the sample sizes, even after regularization\. On the other hand, both the regularized cluster bootstrap and the regularized hierarchical bootstrap fluctuate around 0\.95, with the regularized hierarchical bootstrap consistently above\.
Results are similar but more pronounced in Figure[5](https://arxiv.org/html/2606.26422#S5.F5), which displays coverage for the∼\\sim30\-text sampling scheme\. Here, the difference betweenneffn\_\{\\text\{eff\}\}andneffn\_\{\\text\{eff\}\}&dfdesign\\text\{df\}\_\{\\text\{design\}\}adjustment is somewhat larger, again in favor ofneffn\_\{\\text\{eff\}\}&dfdesign\\text\{df\}\_\{\\text\{design\}\}\. For example, at 20 participants,neffn\_\{\\text\{eff\}\}adjusted Agresti\-Coull interval reaches 0\.930 while theneffn\_\{\\text\{eff\}\}&dfdesign\\text\{df\}\_\{\\text\{design\}\}reaches 0\.947\. The difference in coverage between the cluster and hierarchical bootstrap is more pronounced as well\. Again at 20 participants, the pseudo\-count regularized clustered bootstrap has an estimated coverage of 0\.917 while the pseudo\-count regularized hierarchical bootstrap reaches 0\.947\. Across all conditions, the pseudo\-count regularized hierarchical bootstrap and theneffn\_\{\\text\{eff\}\}&dfdesign\\text\{df\}\_\{\\text\{design\}\}adjusted Agresti\-Coull and Wilson intervals provide approximately accurate coverage\.
Figure 4:Small Corpus Coverage \(∼\\sim3 Texts Per Individual\)Figure 5:Moderate Corpus Coverage \(∼\\sim30 Texts Per Individual\)Figure 6:Half\-Width and Coverage Comparison for the Small\-Corpus Design \(∼\\sim3 Texts Per Person\)Figure[6](https://arxiv.org/html/2606.26422#S5.F6)places interval half\-widths next to coverage, allowing for the assessment of trade\-offs between interval precision and accuracy\. In the 3\-text sampling scheme, the cluster bootstrap results in the smallest interval but provides insufficient coverage\. The regularized cluster bootstrap is the next most precise with coverage that is close to 0\.95 across the sample sizes\. In the 30\-text case, however, the cluster bootstrap is inappropriate, never reaching 0\.95 coverage and under 0\.90 when the number of participants is<20<20\. Instead, the Agresti\-Coull interval withneffn\_\{\\text\{eff\}\}&dfdesign\\text\{df\}\_\{\\text\{design\}\}adjustments provides the best coverage, though with intervals that are wider than the other methods when the number of individuals is fewer than 10\.
### 5\.3Sample Size Considerations
Figure[7](https://arxiv.org/html/2606.26422#S5.F7)displays the relationship between the number of texts used to estimate performance and the half width of an adjusted 95% Agresti\-Coull confidence interval, holding the performance rate at 0\.90\. As expected, confidence interval width increases with ICC values, and the importance of ICC increases with the number of texts per cluster\. Holding the number of texts constant, fewer texts per cluster can dramatically reduce confidence interval width\. Consider an ICC ofρ=0\.1\\rho=0\.1and a situation where the analyst has the resources to hand\-label 400 texts for the calculation of a metric\. \(Again, in the context of validating binary text classifiers, the analytic sample size is the number of observations used to estimate the metric\. For recall, this would be the number of positive human classifications\.\) Holding the number of texts constant, at an average cluster size of 10, the half width of 95% Agresti\-Coull confidence interval would be 0\.043\. At an average cluster size of 50, it would be 0\.093, illustrating that, whenever possible, increasing the number of individuals is preferable from the standpoint of statistical precision to increasing the number of texts within individuals\.
Figure 7:Resulting 95% Confidence Interval Half\-Width by Sample Size at Metric = 0\.90, Varying Cluster Size and ICCNote\.No ICC adjustment incorporated withμtext=1\\mu\_\{\\text\{text\}\}=1\.
## 6Discussion
Performance metrics are the dominant form of evidence researchers provide when demonstrating that their classifier is good enough to be of use\[[undefaad](https://arxiv.org/html/2606.26422#biba.bibx20)\]\. Yet, unlike other forms of statistical evidence in psychology and the social sciences, these metrics are only inconsistently reported alongside estimates of uncertainty\[[undefal](https://arxiv.org/html/2606.26422#biba.bibx2)\]\. A failure to report confidence intervals reduces the transparency of the field, making it unclear how much confidence can be placed in estimated performance\. This is particularly concerning when the relevant sample size—the number of individuals and texts used in the estimation of the metric—also goes unreported\. Thus, a primary aim of this article is to encourage the accurate reporting of confidence intervals surrounding performance metrics and to increase attention to sample size requirements earlier in the design process\.
This article makes five key contributions to that end\. First, we build on prior related simulation studies\[[undefak](https://arxiv.org/html/2606.26422#biba.bibx1),[undefaag](https://arxiv.org/html/2606.26422#biba.bibx23), e\.g\.,\]by providing a systematic comparison of confidence interval coverage under the conditions that commonly characterize text classification in the social sciences: high performance levels \(increasingly expected with LLMs;\[[undefau](https://arxiv.org/html/2606.26422#biba.bibx11)\]\), small to moderate sample sizes, infrequent constructs, and texts nested within individuals\. Second, we bring attention to the limitations of the percentile bootstrap for intervals surrounding proportions, building on related literature not tailored to conditions of text classification\[[undefaan](https://arxiv.org/html/2606.26422#biba.bibx30), e\.g\.,\]\. Third, we propose a simple pseudo\-count regularization of the bootstrap that improves coverage at small sample sizes and high performance values\. Fourth, we provide straightforward recommendations for nested data, illustrating the requirements for achieving accurate coverage\. Finally, the results here highlight the importance of obtaining a sufficient*relevant*sample size: a sufficient number of observations used to calculate the metric \(for recall, the number of positive human classifications; for precision the number of positive machine classifications\) and, when texts are nested, the number of individuals rather than the number of texts\. By illustrating confidence interval width under varying conditions, we aim to direct researchers’ attention to sample size earlier in the study design\.
Our simulations offer two key warnings\. First, even in an unnested setting, Wald intervals and percentile bootstrap intervals can dramatically underestimate uncertainty\. For example, at true recall or precision of 0\.95 and a relevant sample size of 20, Wald interval and percentile bootstrap coverage were both estimated to be 0\.66\. When the relevant sample size is 10, Wald interval coverage was 0\.401 and the basic percentile bootstrap coverage was 0\.381\. On the other hand, Agresti\-Coull, Wilson, Clopper\-Pearson, and pseudo\-count regularized intervals all provide accurate coverage even when the relevant sample size is as small as 10\. Though these very small sample sizes may appear to be a strawman, irrelevant in practice, we argue that they are not rare enough to be discounted\. Because constructs are often rare, and the relevant sample size for recall/precision is the number of positive machine/human classifications, it is possible to have very few texts included in the metric calculation\. Indeed, this is one reason why it is important for confidence intervals to become standard reporting criteria: to make transparent where sample sizes are limited\. Further, in the best case scenario, performance metrics are not only reported for the average interval, but also for relevant subgroups—for example, distinguished by race and gender\[[undefam](https://arxiv.org/html/2606.26422#biba.bibx3)\]\. Doing so allows for assessments of fairness and disparate impact but also requires planning for sample sizes to be large enough to support sufficiently precise inference—something that accurate confidence intervals make clear\.
Second, when the texts are nested within individuals—as is common given a single person may contribute many utterances\[[undefay](https://arxiv.org/html/2606.26422#biba.bibx15), e\.g\.,\]or writing samples\[[undefaae](https://arxiv.org/html/2606.26422#biba.bibx21), e\.g\.,\]—methods that ignore clustering, can substantially overstate confidence\. For example, when there are between 5 and 50 individuals producing about 30 texts each, the true metric is 0\.90, and ICC is approximately 0\.11, the unadjusted Agresti\-Coull interval \(appropriate when texts are not nested\), covered the true metric only about 65% of the time\. Adjusted analytic intervals incorporating adjustments forneffn\_\{\\text\{eff\}\}&dfdesign\\text\{df\}\_\{\\text\{design\}\}address this issue, as does the pseudo\-regularized hierarchical bootstrap\.
Based on our simulations, we offer the following recommendations about which interval to use, and when\. For independent \(unnested\) data, we recommend the Agresti\-Coull interval as a default as it is simple to calculate and provides coverage at or near the nominal level across the performance levels and sample sizes\. Wilson and Clopper\-Pearson intervals are perfectly reasonable alternatives\. Analysts who prefer non\-analytic intervals \(or who require them for non\-proportion based metrics\) should use a pseudo\-count–regularized bootstrap rather than the basic percentile bootstrap\. When texts are nested within individuals but the number of texts produced by individuals is small \(∼\\sim3\), the pseudo\-regularized cluster bootstrap is preferable, reaching sufficient coverage while also minimizing interval width\. However, when the number of texts is larger, analysts should employneffn\_\{\\text\{eff\}\}&dfdesign\\text\{df\}\_\{\\text\{design\}\}adjusted intervals where possible, and pseudo\-count regularized hierarchical intervals when non\-analytic intervals are useful \(as in the calculation of F1\)\.
These recommendations come with the following limitations\. First, while the non\-nested simulations span conditions typical to text classification in psychology, they are not exhaustive\. More pointedly, our nested simulations assume a single ICC structure and performance; real corpora will reflect more variable conditions\. Second, this article does not offer any information on commonly*observed*ICC values in psychology\. For analysts to pro\-actively plan for necessary sample sizes, benchmarks like those provided for nested classroom settings and test outcomes\[[undefaaa](https://arxiv.org/html/2606.26422#biba.bibx17)\], will be useful\. Similarly, we only anecdotally speak to common performance metric ranges; empirical evidence on commonly achieved performance values will be similarly useful for planning\. Finally, our recommendations address the estimation of uncertainty surrounding the performance metrics, but only briefly touch on the unbiased estimation of performance metrics themselves, which bring issues of their own\[[undefaah](https://arxiv.org/html/2606.26422#biba.bibx24), e\.g\., see\]\.
## 7Conclusion
If the magnitude of a performance metric matters, so too does its precision\. Performance metrics are subject to the same sampling variation as any other quantity researchers report\. Confidence intervals make this sampling variation transparent, and their absence threatens to produce overconfidence in model\-based inferences\. Yet, as we have shown, default approaches to confidence interval estimation are often inappropriate under conditions common to text classification in the social sciences, particularly with large language models \(small labelled datasets, rare constructs, high performance, and nested data\)\. This article provides evidence\-based recommendations for accurate confidence interval reporting: Agresti\-Coull or appropriate analytic alternatives for independent texts, effective sample size and degrees of freedom adjusted intervals for nested texts, and pseudo\-count regularized \(hierarchical\) bootstrap intervals when analytic intervals are infeasible\.
## References
- \[undef\]Alan Agresti and Brent A\. Coull“Approximate is better than “exact” for interval estimation of binomial proportions” ISBN: 0003\-1305In*The American Statistician*52\.2Taylor & Francis, 1998, pp\. 119–126
- \[undefa\]Kylie L\. Anglin“Addressing threats to validity in supervised machine learning: A framework and best practices for education researchers”In*AERA Open*10SAGE Publications Inc, 2024, pp\. 1–21DOI:[10\.1177/23328584241303495](https://dx.doi.org/10.1177/23328584241303495)
- \[undefb\]Joy Buolamwini and Timnit Gebru“Gender shades: Intersectional accuracy disparities in commercial gender classification”In*Conference on fairness, accountability and transparency*PMLR, 2018, pp\. 77–91URL:[https://proceedings\.mlr\.press/v81/buolamwini18a\.html](https://proceedings.mlr.press/v81/buolamwini18a.html)
- \[undefc\]Charles J\. Clopper and Egon S\. Pearson“The use of confidence or fiducial limits illustrated in the case of the binomial” ISBN: 0006\-3444In*Biometrika*26\.4JSTOR, 1934, pp\. 404–413
- \[undefd\]Jacob Cohen“Statistical power analysis for the behavioral sciences”Routledge, 1988
- \[undefe\]Lee J\. Cronbach and Paul E\. Meehl“Construct validity in psychological tests\.” Publisher: US: American Psychological AssociationIn*Psychological Bulletin*52\.4, 1955, pp\. 281DOI:[10\.1037/h0040957](https://dx.doi.org/10.1037/h0040957)
- \[undeff\]Natalie Dean and Marcello Pagano“Evaluating confidence interval methods for binomial proportions in clustered surveys” ISBN: 2325\-0992In*Journal of Survey Statistics and Methodology*3\.4Oxford University Press, 2015, pp\. 484–503
- \[undefg\]Thomas J\. Diciccio and Joseph P\. Romano“A Review of Bootstrap Confidence Intervals” ISBN: 0035\-9246 Type: 10\.1111/j\.2517\-6161\.1988\.tb01732\.xIn*Journal of the Royal Statistical Society: Series B \(Methodological\)*50\.3, 1988, pp\. 338–354URL:[https://doi\.org/10\.1111/j\.2517\-6161\.1988\.tb01732\.x](https://doi.org/10.1111/j.2517-6161.1988.tb01732.x)
- \[undefh\]Bradley Efron“Nonparametric standard errors and confidence intervals” ISBN: 0319\-5724In*canadian Journal of Statistics*9\.2Wiley Online Library, 1981, pp\. 139–158
- \[undefi\]Christopher A\. Field and Alan H\. Welsh“Bootstrapping clustered data” ISBN: 1369\-7412In*Journal of the Royal Statistical Society Series B: Statistical Methodology*69\.3Oxford University Press, 2007, pp\. 369–390
- \[undefj\]Fabrizio Gilardi, Meysam Alizadeh and Maël Kubli“ChatGPT outperforms crowd workers for text\-annotation tasks” ISBN: 0027\-8424In*Proceedings of the National Academy of Sciences*120\.30National Acad Sciences, 2023, pp\. e2305016120DOI:[https://doi\.org/10\.1073/pnas\.230501612](https://dx.doi.org/https://doi.org/10.1073/pnas.230501612)
- \[undefk\]Ben Green and Salomé Viljoen“Algorithmic realism: expanding the boundaries of algorithmic thought”In*Proceedings of the 2020 conference on fairness, accountability, and transparency*, 2020, pp\. 19–31URL:[https://doi\.org/10\.1145/3351095\.3372840](https://doi.org/10.1145/3351095.3372840)
- \[undefl\]Justin Grimmer, Margaret E\. Roberts and Brandon M\. Stewart“Text as data: A new framework for machine learning and the social sciences”Princeton University Press, 2022
- \[undefm\]Kilem L\. Gwet“Handbook of inter\-rater reliability: The definitive guide to measuring the extent of agreement among raters”Advanced Analytics, LLC, 2014
- \[undefn\]Karin Hammerfald et al\.“Leveraging large language models to identify microcounseling skills in psychotherapy transcripts” ISBN: 1050\-3307In*Psychotherapy Research*Taylor & Francis, 2025, pp\. 1–19DOI:[https://doi\.org/10\.1080/10503307\.2025\.2539405](https://dx.doi.org/https://doi.org/10.1080/10503307.2025.2539405)
- \[undefo\]Gang Han et al\.“Determination of the number of observers needed to evaluate a subjective test and its application in two PD‐L1 studies” ISBN: 0277\-6715In*Statistics in medicine*41\.8Wiley Online Library, 2022, pp\. 1361–1375
- \[undefp\]Larry V Hedges and E\.\. Hedberg“Intraclass correlation values for planning group\-randomized trials in education”In*Educational Evaluation and Policy Analysis*29\.1, 2007, pp\. 60–87DOI:[https://doi\.org/10\.3102/0162373707299](https://dx.doi.org/https://doi.org/10.3102/0162373707299)
- \[undefq\]Larry V Hedges and C Rhoads“Statistical power analysis in education research \(NCSER 2010\-3006\)”In*National Center for Special Education Research*1, 2000, pp\. 88–88DOI:[10\.1037/e599842011\-001](https://dx.doi.org/10.1037/e599842011-001)
- \[undefr\]Tim Hesterberg“Bootstrap” Pages: 497\-526 Publication Title: WIREs Computational Statistics Type: https://doi\.org/10\.1002/wics\.182In*WIREs Comp Stat*3\.6, 2011, pp\. 497–526URL:[https://wires\.onlinelibrary\.wiley\.com/doi/abs/10\.1002/wics\.182](https://wires.onlinelibrary.wiley.com/doi/abs/10.1002/wics.182)
- \[undefs\]Gareth James, Daniela Witten, Trevor Hastie and Robert Tibshirani“An Introduction to Statistical Learning”Springer, 2013URL:[https://link\.springer\.com/book/10\.1007/978\-1\-0716\-1418\-1](https://link.springer.com/book/10.1007/978-1-0716-1418-1)
- \[undeft\]Zunaira Jamil, Diana Inkpen, Prasadith Buddhitha and Kenton White“Monitoring tweets for depression to detect at\-risk users”In*Proceedings of the fourth workshop on computational linguistics and clinical psychology—from linguistic signal to clinical reality*, 2017, pp\. 32–40URL:[https://aclanthology\.org/W17\-3104/](https://aclanthology.org/W17-3104/)
- \[undefu\]Nathalie Japkowicz“Why question machine learning evaluation methods”In*AAAI workshop on evaluation methods for machine learning*6\.11University of Ottawa, 2006
- \[undefv\]Nabil Kahouadji“A Comprehensive Comparison of the Wald, Wilson, and adjusted Wilson Confidence Intervals for Proportions”In*arXiv preprint arXiv:2508\.10223*, 2025
- \[undefw\]Sayash Kapoor and Arvind Narayanan“Leakage and the reproducibility crisis in machine\-learning\-based science” ISBN: 2666\-3899In*Patterns*4\.9Elsevier, 2023DOI:[https://doi\.org/10\.1016/j\.patter\.2023\.100804](https://dx.doi.org/https://doi.org/10.1016/j.patter.2023.100804)
- \[undefx\]Leslie Kish“Survey sampling”Wiley, 1965
- \[undefy\]Edward L\. Korn and Barry I\. Graubard“Confidence intervals for proportions with small expected number of positive counts estimated from survey data” ISBN: 0714\-0045In*Survey Methodology*24STATISTICS CANADA, 1998, pp\. 193–201
- \[undefz\]Charles X\. Ling, Jin Huang and Harry Zhang“AUC: a better measure than accuracy in comparing learning algorithms”In*Conference of the canadian society for computational studies of intelligence*Springer, 2003, pp\. 329–341
- \[undefaa\]Peter McCullagh“Resampling and exchangeable arrays”In*Bernoulli*6\.2, 2000
- \[undefab\]Margaret Mitchell et al\.“Model cards for model reporting”In*Proceedings of the Conference on Fairness, Accountability, and Transparency*ACM, 2019DOI:[10\.1145/3287560\.3287596](https://dx.doi.org/10.1145/3287560.3287596)
- \[undefac\]Ana M\. Pires and Conceiçao Amado“Interval estimators for a binomial proportion: Comparison of twenty methods” ISBN: 2183\-0371In*REVSTAT\-Statistical Journal*6\.2, 2008, pp\. 165–197
- \[undefad\]Oona Rainio, Jarmo Teuho and Riku Klén“Evaluation metrics and statistical tests for machine learning” ISBN: 2045\-2322In*Scientific Reports*14\.1Nature Publishing Group UK London, 2024, pp\. 6086
- \[undefae\]Sebastian Raschka“Model evaluation, model selection, and algorithm selection in machine learning”In*arXiv preprint arXiv:1811\.12808*, 2018
- \[undefaf\]Varun Saravanan, Gordon J\. Berman and Samuel J\. Sober“Application of the hierarchical bootstrap to multi\-level data in neuroscience”In*Neurons, behavior, data analysis and theory*3\.5, 2020, pp\. https://nbdt\. scholasticahq\. com/article/13927–application–of–the–hierarchical–bootstrap–to–multi–level–data–in–neuroscience
- \[undefag\]David Williamson Shaffer and Andrew R\. Ruis“How We Code”In*ICQE 2020*Malibu, CA: Springer, 2021
- \[undefah\]Alexander Stavropoulos, Damien L\. Crone and Igor Grossmann“Shadows of wisdom: Classifying meta\-cognitive and morally grounded narrative content via large language models” ISBN: 1554\-3528In*Behavior Research Methods*Springer, 2024, pp\. 1–15DOI:[https://doi\.org/10\.3758/s13428\-024\-02441\-0](https://dx.doi.org/https://doi.org/10.3758/s13428-024-02441-0)
- \[undefai\]Robert J\. Tibshirani and Bradley Efron“An introduction to the bootstrap”In*Monographs on statistics and applied probability*57\.1, 1993, pp\. 1–436
- \[undefaj\]Sheng Wu, Catherine M\. Crespi and Weng Kee Wong“Comparison of methods for estimating the intraclass correlation coefficient for binary responses in cancer prevention cluster randomized trials”In*Contemporary Clinical Trials*33\.5, 2012, pp\. 869–880DOI:[10\.1016/j\.cct\.2012\.05\.004](https://dx.doi.org/10.1016/j.cct.2012.05.004)
## References
- \[undefak\]Alan Agresti and Brent A\. Coull“Approximate is better than “exact” for interval estimation of binomial proportions” ISBN: 0003\-1305In*The American Statistician*52\.2Taylor & Francis, 1998, pp\. 119–126
- \[undefal\]Kylie L\. Anglin“Addressing threats to validity in supervised machine learning: A framework and best practices for education researchers”In*AERA Open*10SAGE Publications Inc, 2024, pp\. 1–21DOI:[10\.1177/23328584241303495](https://dx.doi.org/10.1177/23328584241303495)
- \[undefam\]Joy Buolamwini and Timnit Gebru“Gender shades: Intersectional accuracy disparities in commercial gender classification”In*Conference on fairness, accountability and transparency*PMLR, 2018, pp\. 77–91URL:[https://proceedings\.mlr\.press/v81/buolamwini18a\.html](https://proceedings.mlr.press/v81/buolamwini18a.html)
- \[undefan\]Charles J\. Clopper and Egon S\. Pearson“The use of confidence or fiducial limits illustrated in the case of the binomial” ISBN: 0006\-3444In*Biometrika*26\.4JSTOR, 1934, pp\. 404–413
- \[undefao\]Jacob Cohen“Statistical power analysis for the behavioral sciences”Routledge, 1988
- \[undefap\]Lee J\. Cronbach and Paul E\. Meehl“Construct validity in psychological tests\.” Publisher: US: American Psychological AssociationIn*Psychological Bulletin*52\.4, 1955, pp\. 281DOI:[10\.1037/h0040957](https://dx.doi.org/10.1037/h0040957)
- \[undefaq\]Natalie Dean and Marcello Pagano“Evaluating confidence interval methods for binomial proportions in clustered surveys” ISBN: 2325\-0992In*Journal of Survey Statistics and Methodology*3\.4Oxford University Press, 2015, pp\. 484–503
- \[undefar\]Thomas J\. Diciccio and Joseph P\. Romano“A Review of Bootstrap Confidence Intervals” ISBN: 0035\-9246 Type: 10\.1111/j\.2517\-6161\.1988\.tb01732\.xIn*Journal of the Royal Statistical Society: Series B \(Methodological\)*50\.3, 1988, pp\. 338–354URL:[https://doi\.org/10\.1111/j\.2517\-6161\.1988\.tb01732\.x](https://doi.org/10.1111/j.2517-6161.1988.tb01732.x)
- \[undefas\]Bradley Efron“Nonparametric standard errors and confidence intervals” ISBN: 0319\-5724In*canadian Journal of Statistics*9\.2Wiley Online Library, 1981, pp\. 139–158
- \[undefat\]Christopher A\. Field and Alan H\. Welsh“Bootstrapping clustered data” ISBN: 1369\-7412In*Journal of the Royal Statistical Society Series B: Statistical Methodology*69\.3Oxford University Press, 2007, pp\. 369–390
- \[undefau\]Fabrizio Gilardi, Meysam Alizadeh and Maël Kubli“ChatGPT outperforms crowd workers for text\-annotation tasks” ISBN: 0027\-8424In*Proceedings of the National Academy of Sciences*120\.30National Acad Sciences, 2023, pp\. e2305016120DOI:[https://doi\.org/10\.1073/pnas\.230501612](https://dx.doi.org/https://doi.org/10.1073/pnas.230501612)
- \[undefav\]Ben Green and Salomé Viljoen“Algorithmic realism: expanding the boundaries of algorithmic thought”In*Proceedings of the 2020 conference on fairness, accountability, and transparency*, 2020, pp\. 19–31URL:[https://doi\.org/10\.1145/3351095\.3372840](https://doi.org/10.1145/3351095.3372840)
- \[undefaw\]Justin Grimmer, Margaret E\. Roberts and Brandon M\. Stewart“Text as data: A new framework for machine learning and the social sciences”Princeton University Press, 2022
- \[undefax\]Kilem L\. Gwet“Handbook of inter\-rater reliability: The definitive guide to measuring the extent of agreement among raters”Advanced Analytics, LLC, 2014
- \[undefay\]Karin Hammerfald et al\.“Leveraging large language models to identify microcounseling skills in psychotherapy transcripts” ISBN: 1050\-3307In*Psychotherapy Research*Taylor & Francis, 2025, pp\. 1–19DOI:[https://doi\.org/10\.1080/10503307\.2025\.2539405](https://dx.doi.org/https://doi.org/10.1080/10503307.2025.2539405)
- \[undefaz\]Gang Han et al\.“Determination of the number of observers needed to evaluate a subjective test and its application in two PD‐L1 studies” ISBN: 0277\-6715In*Statistics in medicine*41\.8Wiley Online Library, 2022, pp\. 1361–1375
- \[undefaaa\]Larry V Hedges and E\.\. Hedberg“Intraclass correlation values for planning group\-randomized trials in education”In*Educational Evaluation and Policy Analysis*29\.1, 2007, pp\. 60–87DOI:[https://doi\.org/10\.3102/0162373707299](https://dx.doi.org/https://doi.org/10.3102/0162373707299)
- \[undefaab\]Larry V Hedges and C Rhoads“Statistical power analysis in education research \(NCSER 2010\-3006\)”In*National Center for Special Education Research*1, 2000, pp\. 88–88DOI:[10\.1037/e599842011\-001](https://dx.doi.org/10.1037/e599842011-001)
- \[undefaac\]Tim Hesterberg“Bootstrap” Pages: 497\-526 Publication Title: WIREs Computational Statistics Type: https://doi\.org/10\.1002/wics\.182In*WIREs Comp Stat*3\.6, 2011, pp\. 497–526URL:[https://wires\.onlinelibrary\.wiley\.com/doi/abs/10\.1002/wics\.182](https://wires.onlinelibrary.wiley.com/doi/abs/10.1002/wics.182)
- \[undefaad\]Gareth James, Daniela Witten, Trevor Hastie and Robert Tibshirani“An Introduction to Statistical Learning”Springer, 2013URL:[https://link\.springer\.com/book/10\.1007/978\-1\-0716\-1418\-1](https://link.springer.com/book/10.1007/978-1-0716-1418-1)
- \[undefaae\]Zunaira Jamil, Diana Inkpen, Prasadith Buddhitha and Kenton White“Monitoring tweets for depression to detect at\-risk users”In*Proceedings of the fourth workshop on computational linguistics and clinical psychology—from linguistic signal to clinical reality*, 2017, pp\. 32–40URL:[https://aclanthology\.org/W17\-3104/](https://aclanthology.org/W17-3104/)
- \[undefaaf\]Nathalie Japkowicz“Why question machine learning evaluation methods”In*AAAI workshop on evaluation methods for machine learning*6\.11University of Ottawa, 2006
- \[undefaag\]Nabil Kahouadji“A Comprehensive Comparison of the Wald, Wilson, and adjusted Wilson Confidence Intervals for Proportions”In*arXiv preprint arXiv:2508\.10223*, 2025
- \[undefaah\]Sayash Kapoor and Arvind Narayanan“Leakage and the reproducibility crisis in machine\-learning\-based science” ISBN: 2666\-3899In*Patterns*4\.9Elsevier, 2023DOI:[https://doi\.org/10\.1016/j\.patter\.2023\.100804](https://dx.doi.org/https://doi.org/10.1016/j.patter.2023.100804)
- \[undefaai\]Leslie Kish“Survey sampling”Wiley, 1965
- \[undefaaj\]Edward L\. Korn and Barry I\. Graubard“Confidence intervals for proportions with small expected number of positive counts estimated from survey data” ISBN: 0714\-0045In*Survey Methodology*24STATISTICS CANADA, 1998, pp\. 193–201
- \[undefaak\]Charles X\. Ling, Jin Huang and Harry Zhang“AUC: a better measure than accuracy in comparing learning algorithms”In*Conference of the canadian society for computational studies of intelligence*Springer, 2003, pp\. 329–341
- \[undefaal\]Peter McCullagh“Resampling and exchangeable arrays”In*Bernoulli*6\.2, 2000
- \[undefaam\]Margaret Mitchell et al\.“Model cards for model reporting”In*Proceedings of the Conference on Fairness, Accountability, and Transparency*ACM, 2019DOI:[10\.1145/3287560\.3287596](https://dx.doi.org/10.1145/3287560.3287596)
- \[undefaan\]Ana M\. Pires and Conceiçao Amado“Interval estimators for a binomial proportion: Comparison of twenty methods” ISBN: 2183\-0371In*REVSTAT\-Statistical Journal*6\.2, 2008, pp\. 165–197
- \[undefaao\]Oona Rainio, Jarmo Teuho and Riku Klén“Evaluation metrics and statistical tests for machine learning” ISBN: 2045\-2322In*Scientific Reports*14\.1Nature Publishing Group UK London, 2024, pp\. 6086
- \[undefaap\]Sebastian Raschka“Model evaluation, model selection, and algorithm selection in machine learning”In*arXiv preprint arXiv:1811\.12808*, 2018
- \[undefaaq\]Varun Saravanan, Gordon J\. Berman and Samuel J\. Sober“Application of the hierarchical bootstrap to multi\-level data in neuroscience”In*Neurons, behavior, data analysis and theory*3\.5, 2020, pp\. https://nbdt\. scholasticahq\. com/article/13927–application–of–the–hierarchical–bootstrap–to–multi–level–data–in–neuroscience
- \[undefaar\]David Williamson Shaffer and Andrew R\. Ruis“How We Code”In*ICQE 2020*Malibu, CA: Springer, 2021
- \[undefaas\]Alexander Stavropoulos, Damien L\. Crone and Igor Grossmann“Shadows of wisdom: Classifying meta\-cognitive and morally grounded narrative content via large language models” ISBN: 1554\-3528In*Behavior Research Methods*Springer, 2024, pp\. 1–15DOI:[https://doi\.org/10\.3758/s13428\-024\-02441\-0](https://dx.doi.org/https://doi.org/10.3758/s13428-024-02441-0)
- \[undefaat\]Robert J\. Tibshirani and Bradley Efron“An introduction to the bootstrap”In*Monographs on statistics and applied probability*57\.1, 1993, pp\. 1–436
- \[undefaau\]Sheng Wu, Catherine M\. Crespi and Weng Kee Wong“Comparison of methods for estimating the intraclass correlation coefficient for binary responses in cancer prevention cluster randomized trials”In*Contemporary Clinical Trials*33\.5, 2012, pp\. 869–880DOI:[10\.1016/j\.cct\.2012\.05\.004](https://dx.doi.org/10.1016/j.cct.2012.05.004)
## Appendix AThe Behavior of Analytic Confidence Intervals
Figure A1:Estimated Coverage of the Wald 95% Confidence IntervalFigure A2:Estimated Coverage of the Clopper\-Pearson 95% Confidence IntervalFigure A3:Estimated Coverage of the Wilson 95% Confidence IntervalFigure A4:Estimated Coverage of the Agresti\-Coull 95% Confidence IntervalFigure[A1](https://arxiv.org/html/2606.26422#A1.F1)confirms the findings of previous work, demonstrating the volatility and inaccuracy of the Wald interval\. Across values ofpp, coverage is consistently below 0\.95, with particularly low coverage rates and high volatility at lownnand highpp\. Unsurprisingly, Figure[A2](https://arxiv.org/html/2606.26422#A1.F2)confirms the high coverage rates of the Clopper\-Pearson standard error, which \(almost\) always exceeds 0\.95, no matterppornn\. Comparatively, the Wilson interval \(Figure[A3](https://arxiv.org/html/2606.26422#A1.F3)\), is less conservative than the Clopper\-Pearson interval but still substantially more accurate and less volatile than the Wald Interval\. At their lowest, Wilson coverage rates reach only 0\.89, at a sample size of 11 and appof 0\.95, an extreme combination\. Most commonly Wilson interval coverage rates are within 0\.025 of the 0\.95 we expect\. The Agresti\-Coull performs similarly, albeit more conservatively, with coverage never reaching below 0\.925 and routinely above 0\.95\. Figure[A5](https://arxiv.org/html/2606.26422#A1.F5)plots the confidence interval half\-width for the Wilson, Agresti\-Coull and Clopper\-Pearson methods\. These demonstrate the modest cost of using Clopper\-Pearson intervals\. Taking these figures together, excluding the Wald interval, the remaining analytic options are all reasonable and can perhaps be left to the user’s preference\. Here, we prefer the Agresti\-Coull for its high rates of coverage and its intuitiveness\.
Figure A5:Confidence Interval Half\-Width by Analytic Method, atn<100n<100
## Appendix BThe Behavior of Bootstrapped Confidence Intervals
Figure B1:Estimated Coverage of the Percentile Bootstrap 95% Confidence IntervalFigure B2:Estimated Coverage of the BCa Bootstrap 95% Confidence IntervalFigure B3:Estimated Coverage of the Percentile Bootstrap with Pseudo Counts,λ=1\\lambda=1Figure[B1](https://arxiv.org/html/2606.26422#A2.F1)shows substantial problems with the basic bootstrapped confidence interval\. Whenp≥0\.8p\\geq 0\.8andn<50n<50, coverage is routinely below 0\.95 and is quite erratic\. Atp=0\.9p=0\.9andp=0\.95p=0\.95, the figures show behavior that is as erratic and inaccurate as the Wald interval\. The BCa interval improves upon the basic percentile interval\. So long asp<0\.9p<0\.9andn\>50n\>50, coverage becomes reliably above or at 0\.95\. However, coverage remains problematic atn<50n<50whenp=0\.9p=0\.9andn<75n<75atp=0\.95p=0\.95\. Figure[B3](https://arxiv.org/html/2606.26422#A2.F3)displays coverage for a pseudo\-count regularized bootstraps withλ=1\\lambda=1andλ=2\\lambda=2\(i\.e\., with one success/one failure and with two successes/two failures augmented to the sample before bootstrapping\)\. For either pseudo\-count approach, coverage is consistently above 0\.95 untilp=0\.9p=0\.9andp=0\.95p=0\.95, at which point coverage withλ=2\\lambda=2sometimes dips as low as 0\.25 whenn<50n<50\. Whenλ=1\\lambda=1, coverage is acceptable at any sample size and anypp\.
Given these results, the pseudo\-count regularized bootstrap withλ=1\\lambda=1\(one pseudo\-success, one pseudo\-failure\) is our preferred non\-parametric interval estimator\. Figure[B4](https://arxiv.org/html/2606.26422#A2.F4)demonstrates that compared to the basic percentile bootstrap it is associated with appropriately wider interval widths at highppand lownn, but produces tighter intervals than BCa\.
Figure B4:Confidence Interval Half\-Width by Bootstrapping Method, atn<100n<100### B\.1Variation in Bootstrap Behavior According to the Number of Pseudo\-Observations
Figure[B5](https://arxiv.org/html/2606.26422#A2.F5)explores the direction of error in cases where a bootstrapped interval does not contain the trueppfor a given sample\. Where the basic percentile bootstrap does not contain the truepp, this is most often because the lower bound of the interval is above the true proportion \(when considering proportions greater than or equal to 0\.5, as is common in the case of performance metrics\)\. This indicates that the basic percentile bootstrap is overly optimistic, particularly when the relevant sample size is less than 50 or the metric is higher than 0\.8\.
On the other hand, whenλ=2\\lambda=2, errors often occur because the*upper*bound of the interval does not contain the true proportion, over\-correcting for the problems with the basic bootstrap\. Whenλ=1\\lambda=1, errors are roughly equally distributed in either direction, except at small sample sizes andp=0\.95p=0\.95, where errors tend to be in the pessimistic direction but still occur less than 5% of the time\.
Figure B5:Assessing Direction of Interval Error by Number of Pseudo\-Observations, True Proportion, and Sample Size
## Appendix CCoverage and Confidence Interval Widths under Nested Data
### C\.1Stratified Sampling
Figure[C1](https://arxiv.org/html/2606.26422#A3.F1)provides the average confidence interval width under each of six simulated populations \(described in the main manuscript\) with the validation data produced by a stratified sample of texts within individuals\. Here, we see that when ICC is low \(below 0\.09\), the adjusted analytic confidence intervals have a very small advantage in terms of precision compared to the hierarchical bootstrapped intervals, such that the half\-width of the hierarchical bootstrapped intervals is approximately 0\.02 wider\.
Figure C1:Average Confidence Interval Width Under a Stratified Sample and Six Simulated Populations
### C\.2Simple Random Sample
Figure[C2](https://arxiv.org/html/2606.26422#A3.F2)presents coverage estimates for samples of 1200 texts directly from the population, producing a sample with approximately 2\.6 texts per individual\. Under this scenario, in a range of ICCs, the coverage of the unadjusted confidence intervals is sufficient: approximately 0\.95 across all families\.
Figure C2:Average 95% Confidence Interval Coverage within a Simple Random Sample, Under Six Simulated Populations
## Appendix DIntra\-Class Correlation Simulations
Figure D1:Histogram of Simulated Finite Population,μ=0\.90,σ=0\.10\\mu=0\.90,\\sigma=0\.10Similar Articles
A Systematic Evaluation of Black-Box Uncertainty Estimation Methods for Large Language Models
This paper presents a systematic review and benchmark of 24 black-box uncertainty estimation methods for large language models across 4 models and 4 dataset settings, finding that no single method dominates but hybrid methods that combine multiple uncertainty signals perform well.
ConfidenceBench: Evaluating Confidence Calibration in Large Language Models
ConfidenceBench is a new benchmark that evaluates verbalized confidence estimates in large language models using Brier scores, revealing that accuracy and calibration diverge and that even highly accurate models can be severely miscalibrated.
Estimating Uncertainty from Reasoning: A Large-Scale Study of Multi- and Crosslingual MCQA Performance in LLMs
This paper presents a large-scale evaluation of nine uncertainty estimation methods for LLMs across 22 languages, finding that prompting models to reason in English improves uncertainty estimation for low-resource languages and that the choice of method depends on model scale.
Human-Alignment, Calibration, and Activation Patterns in Large Language Model Uncertainty
This paper investigates how similar large language model uncertainty is to human uncertainty, exploring alignment, calibration, and activation patterns in LLMs across multiple datasets and the impact of instruction fine-tuning.
A better method for identifying overconfident large language models
MIT researchers developed a new method for identifying overconfident LLMs by measuring cross-model disagreement across similar models, rather than relying solely on self-consistency metrics. This approach better captures epistemic uncertainty and more accurately identifies unreliable predictions in high-stakes applications.