For conformal prediction, the guarantee of marginal coverage relies strictly on the assumption that the data is exchangeable, which does not hold in real-world conditions; this is called the covariate shift problem.
Covariate Shift
Covariate shift occurs when the marginal distribution of the features changes between the training and test sets, while the conditional distribution of the response given the features remains invariant. Mathematically, this looks like:
-
Training Data: for .
-
Test Data: .
Notice that but stays the same.
Empirically, this leads to bad coverage when we use our standard methods.
Moving Past Exchangeability
In standard conformal prediction, exchangeability ensures that the test score is equally likely to take any value from the unordered set of observed scores . This uniform probability () allows us to construct prediction sets using the empirical quantile function.
Under the rank-based quantiles that give us this formula, let :
With some work we can obtain:
However, the issue is that appears on the other side of the equation within the summation, thus we obtain:
Proof.

This comes from the fact that for a discrete distribution , where we can assign all points greater than to arbitrary values larger than which gives us a new distribution , then .
This can be proven in a different way that allows for more general use.


However, when under covariate shift, the scores are no longer exchangeable, which requires the development of a new idea.
Weighted Exchangeability
While standard exchangeability is broken, the random variables under covariate shift satisfy a generalized property known as weighted exchangeability.
Because the sequence is weighted exchangeable, the probability that the test variable assumes any specific observed value is no longer uniform. Instead, we define a normalized probability weight, , for each observation .
Conceptually, data points from the training set that are more representative of the test distribution are assigned a higher weight while those that aren’t have a lower weight.

Weighted Quantile Lemma
Let be weighted exchangeable random variables with respect to weight functions . WLOG, assume that these are distinct almost surely.
Let
where is an arbitrary non-conformity score function and is symmetric in its last arguments.
Define.

Finally, for any target error level , the coverage probability is guaranteed by:
Proof.
Let denote the event that , and let , for . For each , we have
Since are weighted exchangeable,

this implies that
This is equivalent to
Then, by marginalization:
Finally, by the same arguments as before:
Weighted Full Conformal Prediction
This lemma allows us to construct a valid weighted conformal prediction set, .
Recall for full conformal prediction, we generate a hypothetical test value which is assumed to be our new data point and then calculate all non-conformity scores with this new data point. If falls below the quantile, then it is within our set.
Theorem.
Assume that , are weighted exchangeable with weight functions . Define a weighted conformal set (based on the first samples) at a point , with nominal error level . Let
for an arbitrary score function that is symmetric in its last arguments.

However, recall that before when dealing with continuous data like stock prices, it’s not really possible to test infinite hypothetical values.
Weighted Split Conformal Prediction
We divide our data into:
- Training Set (): Used to train a fixed point predictor, .
- Calibration Set: Keep samples separate to calculate how “wrong” our model typically is.
Because the model is already trained and fixed on , the score function simplifies to:
which has coverage conditional on by the previous theorem.