How this calculation works
Conformal prediction sets compare candidate nonconformity scores with held-out calibration scores. The finite-sample rank correction makes the score resolution explicit and handles tied scores conservatively. The resulting coverage interpretation requires an appropriate separate calibration construction and exchangeability; it is not a probability assigned to each candidate label.
p(candidate)=(1+#{calibration scores≥candidate score})/(n+1); include candidate when p>alpha.A worked example
For calibration scores1 through20, candidates15 and21 have p-values7/21=1/3 and1/21. At alpha0.1, score15 is retained and21 is excluded; the finite-sample cutoff is the nineteenth ordered calibration score.
Good to know
20–5000 finite calibration nonconformity scores, 1–200 labeled candidate scores and alpha in[0.001,0.5]. Use the finite-sample plus-one rank convention with explicit treatment of ties; a separate calibration sample and exchangeability are assumptions. No model training, full/transductive refitting, conditional-on-covariates guarantee or automatic distribution-shift correction.
Reference: Shafer and Vovk, A Tutorial on Conformal Prediction (opens in a new tab) ↗
Prediction sets rather than confidence in a mean
A prediction set contains possible labels or outcomes for a new case. That target differs from estimating a fixed population mean with a confidence interval. The model supplying the scores may be complicated, but the final conformal comparison is a rank calculation. This page begins with those already-computed scores and does not fit the underlying model.
Nonconformity increases as a candidate looks less compatible with the fitted prediction rule. A larger score should therefore be harder to retain. The same direction must be used for calibration examples and candidate labels. Negating only one group reverses the intended comparison and invalidates the result even when every supplied number is finite.
Compare this with the Student t prediction interval for one observation calculator. Construct finite-label split-conformal prediction sets and conservative conformal p-values from a held-out calibration score sample, rather than a normal-theory interval for one future scalar observation. Regression residual examples belong on this same page, not a second conformal page.
Construct the calibration input honestly
Calibration examples must be held out in the way required by the chosen split-conformal construction. Reusing training residuals as if they were fresh calibration errors can make the scores artificially small. Supplying a list to this calculator does not establish that separation; the sampling and fitting procedure must already justify the calibration interpretation.
Each candidate score corresponds to a proposed label or outcome for the same new case. The calculator accepts the score list without attaching scientific meaning to labels. Keep a separate mapping from score position to label name. Finite label sets may be empty or contain every label, depending on alpha and the observed score ordering.
Use the extra rank position
For a candidate score s, count calibration scores at least as large as s. Add one to that count and divide by n plus one. The extra observation position is essential: a candidate exceeding every calibration score still receives p equal to one divided by n plus one, rather than an impossible simulated p-value of zero.
Ties enter the upper count conservatively. A candidate exactly equal to a calibration score includes that calibration observation among scores at least as extreme. Randomized tie-breaking defines another valid convention, but it would require an explicit randomization rule. This page uses deterministic conservative counting so the same input has the same output.
Work through the twenty-score example
The example calibration sample contains the integers one through twenty. For candidate fifteen, six calibration scores are at least fifteen: fifteen through twenty. Including the candidate position gives seven divided by twenty-one, approximately0.333333. For candidate twenty-one there are no such calibration scores, so its conformal p-value is one divided by twenty-one.
At alpha0.1, retain candidates whose conformal p-values are strictly greater than0.1. Fifteen is retained and twenty-one is excluded. The equivalent conservative score cutoff is the nineteenth calibration order statistic. This example checks the direction, the extra rank correction and the strict acceptance rule without relying on a fitted regression model.
Understand coverage and score resolution
Exchangeability supports a marginal coverage statement across the random calibration and test examples. It does not promise the selected coverage separately for every age, region, covariate value or candidate label. A model can satisfy marginal coverage while producing uneven subgroup performance. Such conditional questions require additional methodology and should not be read from this rank table.
With twenty calibration observations, the smallest conservative p-value is one twenty-first. Choosing alpha smaller than that value cannot reject any finite candidate score. This is a resolution limit of the available calibration sample, not evidence that all candidates are equally plausible. Increasing the number of candidate labels does not improve calibration resolution.
Useful invariance and consistency checks
Adding the same constant to every calibration and candidate score preserves all comparisons. Multiplying all scores by the same positive factor does too. These transformations should leave every p-value and inclusion decision unchanged. A negative multiplier reverses the ordering and is not an invariance unless the nonconformity convention is deliberately redefined.
Independently count the number of retained labels from the displayed candidate rows. For small illustrative examples, enumerate score orderings rather than relying only on the cutoff formula. Compare p-values first and set membership second; rounded displayed values near alpha can otherwise obscure whether an exact rank fraction lies above the decision boundary.
Keep unsupported guarantees separate
This interface performs split-style calibration comparisons, not full conformal refitting for every candidate label. It also does not estimate a distribution-shift correction or verify that calibration cases represent the deployment population. A collection of in-sample scores cannot be repaired merely by increasing the requested confidence level.
For scalar regression, a nonconformity score such as absolute residual may be converted into an interval around an external prediction. That is an application of the same calibration calculation, not a second independent uncertainty guarantee. Report how the scores were formed, which data were held out, the tie convention and the selected alpha alongside any resulting set.
A few questions, answered
Are these probabilities that each label is correct?
No. They are conformal rank p-values. Their role is to define a prediction set under the calibration assumptions, not a posterior distribution over labels.
Why can every label be included?
Small alpha, limited calibration resolution or broadly unexceptional candidate scores can produce an all-label prediction set. That outcome is allowed.
What happens to tied scores?
This page counts calibration scores greater than or equal to the candidate, giving deterministic conservative treatment of ties.
Does95%coverage hold in every subgroup?
Marginal conformal coverage does not automatically imply conditional or subgroup-specific coverage. That distinction remains important even for a large calibration sample.