                                                Sources of Uncertainty in Machine Learning - A Statisticians’ View
                                           Cornelia Gruber∗, Patrick Oliver Schenk, Malte Schierholz, Frauke Kreuter, and Göran Kauermann
                                            Department of Statistics, Ludwig-Maximilians-University Munich, Ludwigstr. 33, 80539 Munich,
                                                                                      Germany



                                                                                                       Abstract
                                                          Machine Learning and Deep Learning have achieved an impressive standard today, enabling us to
                                                          answer questions that were inconceivable a few years ago. Besides these successes, it becomes clear,
                                                          that beyond pure prediction, which is the primary strength of most supervised machine learning
                                                          algorithms, the quantification of uncertainty is relevant and necessary as well. While first concepts
arXiv:2305.16703v1 [stat.ML] 26 May 2023




                                                          and ideas in this direction have emerged in recent years, this paper adopts a conceptual perspective
                                                          and examines possible sources of uncertainty. By adopting the viewpoint of a statistician, we
                                                          discuss the concepts of aleatoric and epistemic uncertainty, which are more commonly associated
                                                          with machine learning. The paper aims to formalize the two types of uncertainty and demonstrates
                                                          that sources of uncertainty are miscellaneous and can not always be decomposed into aleatoric and
                                                          epistemic. Drawing parallels between statistical concepts and uncertainty in machine learning, we
                                                          also demonstrate the role of data and their influence on uncertainty.

                                                          Keywords: uncertainty; supervised machine learning; aleatoric uncertainty; epistemic un-
                                                          certainty; label noise; measurement error; omitted variables; non i.i.d. data; distribution shift;
                                                          missing data



                                           1      Introduction                                                 ous, see Hüllermeier and Waegeman (2021). In fact, the
                                                                                                               majority of work on uncertainty in machine learning has
                                           In recent years, the predictions of machine learning algo-          focused on uncertainty quantification while little atten-
                                           rithms, especially in the field of supervised learning, have        tion has been paid to other sources of uncertainty, nor to
                                           become increasingly successful and can now achieve an im-           the impact of data quality on the uncertainty of a predic-
                                           pressive degree of accuracy. Especially in areas where not          tion. The latter is the focus of this paper. We discuss the
                                           only accuracy but also reliability of algorithms is crucial,        different types of uncertainty and their sources from a sta-
                                           the analysis and quantification of uncertainties is moving          tistical perspective. We also argue that a “simple” decom-
                                           more into focus. For example, a physician would want to             position into aleatoric and epistemic uncertainty does not
                                           know whether a given patient is likely to have a critical           do justice to the overarching problem of multiple sources
                                           condition, say sepsis, and wouldn’t just want to know the           of uncertainty.
                                           overall predictive accuracy. Furthermore, an uncertainty-              In this respect, it is commonly assumed that the data
                                           aware model could abstain from predictions if a certain             generating process is fixed and does neither change dur-
                                           level of uncertainty is exceeded (Kompa et al., 2021). In           ing data collection or training nor during the deployment
                                           addition to medical diagnosis and treatment (Ching et al.,          of the model. In practice, this is often not the case.
                                           2018; De Fauw et al., 2018; Kompa et al., 2021; Leibig              Generally, it is of great importance to consider possible
                                           et al., 2017; Qayyum et al., 2021; Valen et al., 2022), the         sources of uncertainty that arise beyond idealized bench-
                                           application of uncertainty-aware models extends to many             mark datasets. In this paper, we put the data as possible
                                           more fields where machine learning is applied today, in-            sources of uncertainty in the foreground. Generally, we
                                           cluding weather forecasting (Scher and Messori, 2018),              look at numerous sources of uncertainty and we aim to
                                           engineering or industrial processes (Pan et al., 2021), au-         present these from the viewpoint of a statistician.
                                           tonomous driving (Schwarting et al., 2018) or remote sens-
                                                                                                                  The paper is structured as follows. Section 2 discusses
                                           ing based on satellite images (Zhu et al., 2017).
                                                                                                               aleatoric and epistemic uncertainties and relates the usage
                                              While the usefulness of considering uncertainty for su-
                                                                                                               of these concepts to practical applications of uncertainty
                                           pervised machine learning algorithms may be apparent,
                                                                                                               quantification in machine learning. In Section 3 we aim to
                                           the development of underlying theory has not yet come to
                                                                                                               give a statistical definition of aleatoric uncertainty and
                                           a commonly accepted standard. Often, neither the defini-
                                                                                                               epistemic uncertainty, including estimation uncertainty,
                                           tion of uncertainty nor the possible causes of uncertainty
                                                                                                               and model uncertainty. We also draw parallels between un-
                                           in machine learning applications are consistent and clearly
                                                                                                               certainty and classical statistics, such as the bias-variance
                                           defined. In machine learning, uncertainty is often de-
                                                                                                               decomposition with a special focus on overparameterized
                                           composed into aleatoric uncertainty and epistemic uncer-
                                                                                                               models. Section 4 extends the statistical approach towards
                                           tainty, though these definitions are to some extent ambigu-
                                                                                                               including latent quantities, which allows us to discuss un-
                                               ∗ cornelia.gruber@stat.uni-muenchen.de                          certainties due to omitted variables or error-prone vari-

                                                                                                           1
ables. In Section 5, we take the data generating process            2.2    Why Considering Uncertainties Helps
into account and relate uncertainties to the total survey
error, a well-established framework tracing the different           Uncertainty quantification is particularly useful if humans
sources of uncertainty. Furthermore, uncertainties occur-           are part of the decision-making process, who could use the
ring due to unknown changes in the real world after a               uncertainty estimates to better assess the extent to which
model has been trained, the deployment phase, are looked            certain predictions can be trusted. In classification with
at. Section 6 concludes the paper.                                  a reject option, for example, the algorithm refrains from
                                                                    a prediction when an observation is hard to classify, e.g.,
                                                                    because some confidence level is below a threshold, and
2     Related Work and Applications                                 instead reports a warning (Bartlett and Wegkamp, 2008).
                                                                    This method is also known as selective classification (El-
2.1    Aleatoric and Epistemic Uncertainty                          Yaniv and Wiener, 2010).
       in Supervised Machine Learning                                  Quantifying aleatoric and epistemic uncertainty sepa-
                                                                    rately showed to add value compared to a joint treatment
Hüllermeier and Waegeman (2021) provide an exhaustive               in many specific tasks. For instance, knowledge of epis-
survey of algorithms beyond classical supervised machine            temic uncertainty is useful in active learning. In situations
learning that handle aleatoric and epistemic uncertainty.           where a huge amount of unlabelled data exists, but la-
The authors assume a correctly specified hypothesis space           belling is expensive, active learning is a promising strategy
and make assumptions about the data generating process.             to iteratively build an accurate and cost-efficient model.
According to the authors, in addition to aleatoric uncer-           The instances to be labelled next should be the ones that
tainty, there is uncertainty in the choice of the model type        improve the model the most after retraining (Aggarwal
(model uncertainty) and uncertainty in how well the fitted          et al., 2014). Nguyen et al. (2022) show that labelling
model can approximate the optimal model (approximation              instances with high epistemic uncertainty is superior to
uncertainty). They, however, do not cover sources of un-            random sampling as well as sampling based on entropy.
certainty that occur while collecting data or when deploy-
                                                                       Thus, distinguishing types of uncertainty leads to a
ing the model to new data. Not accounting for possible
                                                                    greater improvement of the algorithm than considering
distribution shifts or discrepancies between training and
                                                                    a general uncertainty measure. As expected, adding in-
test data can lead to even greater uncertainty and needs
                                                                    stances with high aleatoric uncertainty to the pool of la-
to be considered when applying or deploying predictive
                                                                    belled data showed not to be helpful. This aligns with the
models in practice.
                                                                    understanding that epistemic uncertainty relates to a lack
   Abdar et al. (2021) extensively review uncertainty quan-
                                                                    of knowledge, which can be reduced with informative sam-
tification methods for deep learning, mainly focusing on
                                                                    ples. The advantages of reducing epistemic uncertainty for
Bayesian approximations and ensemble techniques, and
                                                                    active learning are also presented in Gal et al. (2017).
list advantages and disadvantages of the most commonly
used uncertainty quantification methods. Additionally, a               Another promising application for uncertainty-aware
list of papers applying uncertainty quantification methods          models is detecting adversarial examples, i.e., crafted sam-
is presented.                                                       ples where the model gives a highly confident, but incor-
   Gawlikowski et al. (2022) extend previous definitions of         rect, prediction. Often those samples are designed in a way
aleatoric and epistemic uncertainty and propose aleatoric           to be unremarkable to the human eye while still misleading
uncertainty to arise from errors and noise in measurement,          the model by, e.g., adding specific noise to the example.
and epistemic uncertainty to arise from variability in real-        Models that do not integrate uncertainty would simply
world situations, unknown data, errors during training, or          output high predicted scores for one particular, but wrong,
errors in the model structure. Later, they present methods          label. Smith and Gal (2018) examined models that quan-
for quantifying aleatoric or epistemic uncertainty in deep          tify uncertainty and showed that they are able to identify
learning models. However, the presented methods do not              such adversarial inputs and are therefore more robust and
distinguish between the different sources of uncertainty.           harder to fool.
   We also refer to Psaros et al. (2023); Valdenegro-Toro              As suggested by Kendall and Gal (2017), model robust-
and Saromo (2022); Zhou et al. (2022) for further aspects           ness to noisy data can also be achieved by explicitly for-
of aleatoric and epistemic uncertainty in machine learning.         mulating uncertainty in the loss function. This ensures
   A quite general perspective on uncertainty quantifica-           that inputs for which the model has learned to predict a
tion for deep learning in medical decision-making is pro-           high degree of uncertainty will have a lower impact on the
vided by Begoli et al. (2019). They suggest that to quan-           loss.
tify a model’s uncertainty, uncertainty in all steps of the            Additionally, there were multiple successful applications
decision model must be considered. The components that              of out-of-distribution (OOD) detection with models that
play a role in the uncertainty of such a model are the data         distinguish aleatoric and epistemic uncertainty (Malinin
quality, i.e., how well the collected data represent real-          and Gales, 2018; Mukhoti et al., 2022; Ren et al., 2022). As
world phenomena, the quality of the labelling process, the          predictive models often deteriorate when confronted with
suitability of the model itself, as well as the performance         OOD inputs, detecting such improper inputs is of high in-
on operational data. Begoli et al. (2019) also point to the         terest. Ideally, a model should return high uncertainty es-
need for a principled and formal discipline of uncertainty          timates for such inputs and be able to distinguish between
quantification, which we will address below.                        uncertainty due to noise or class overlap, i.e., aleatoric un-
   We add to the literature by being more formal and                certainty, and uncertainty due to unknown inputs (Malinin
pointing to shortcomings in existing definitions of aleatoric       and Gales, 2018).
and epistemic uncertainty.                                             The rest of the paper considers the problem of uncer-


                                                                2
tainty through a statistical lens and aims to broaden the             We, therefore, utilize classical probability theory to dis-
view by formalizing the distinction between aleatoric and          entangle aleatoric and epistemic uncertainty. We pursue
epistemic uncertainty and listing further potential sources        this in the framework of supervised machine learning and
where uncertainty may occur in the context of machine              consider the setting where we have input variables (fea-
learning.                                                          tures) denoted as X ∈ X and output variables (responses)
                                                                   Y ∈ Y. Adding to Hüllermeier and Waegeman (2021),
                                                                   aleatoric uncertainty is then the uncertainty originating
3     Sources of Uncertainty                                       from a stochastic or non-deterministic relationship be-
                                                                   tween the input variables X taking value x and the output
3.1    Aleatoric and Epistemic Uncertainty                         Y , and can be described by a probability model, condi-
                                                                   tional on the value of X:
As the terms “aleatory”/“aleatoric” and “epistemol-
ogy”/“epistemic” have no precise definition (i.e., what is         (1)                   Y |x ∼ fY |X (·|x).
knowledge, what is reducible), we will first look at their
etymology and historical development. Then we will pro-            The probability model in equation (1) serves as a definition
vide a clear definition in statistical terms, which allows         for aleatoric uncertainty. As long as the conditional
us to point to the shortcomings of existing definitions.           distribution (1) is not degenerated, we cannot predict Y
Those terms were already used to describe different his-           given x without error. Non-degeneracy means here that
torical perspectives on the concept of probability, span-          the distribution is not concentrated to a single value y0 .
ning the time between Blaise Pascal (*1623, †1654) and             Simply speaking and assuming that the variance exists,
Pierre-Simon Laplace (*1749, †1827). These terms then              aleatoric uncertainty refers to a strictly positive variance
developed into the nowadays common terms “aleatoric”               V ar(Y |x). If Y is discrete-valued, this corresponds to a
and “epistemic”. An aleatoric notion considers probability         positive entropy of the discrete probability function (1).
as the stable frequency of an event, while the epistemic           With this definition of aleatoric uncertainty, we can then
notion of probability relates to the degree of belief (Hack-       also define epistemic uncertainty as all remaining un-
ing, 1975). This differentiation can be understood as an           certainty that arises in predictive modelling that is not
early debate between frequentist and Bayesian views, re-           aleatoric. Sometimes epistemic uncertainty is further di-
spectively. Later on, the terms were used to describe un-          vided into model uncertainty, which relates to the correct
certainty in modelling and it was proposed that the total          specification of the structure of a model class, and para-
uncertainty decomposes into aleatoric and epistemic un-            metric uncertainty or estimation uncertainty, which re-
certainty (Hora, 1996; Kiureghian and Ditlevsen, 2009).            lates to the correct estimation of model parameters (Sulli-
Aleatoric uncertainty is thereby defined as uncertainty            van, 2015). In the literature, the terms are not used con-
arising from the inherent randomness of an event, while            sistently, as some authors use the term “approximation un-
epistemic uncertainty expresses uncertainty due to a lack          certainty” to describe estimation uncertainty (Hüllermeier
of knowledge.                                                      and Waegeman, 2021). However, since the “approximation
   Those terms then found their way into machine learning          error” in statistics and machine learning is commonly un-
terminology (Gal, 2016; Kendall and Gal, 2017; Hüller-             derstood as the difference between the best model in the
meier and Waegeman, 2021). The discussion about                    hypothesis space and the optimal model, it rather relates
whether aleatoric uncertainty is irreducible and epistemic         to model uncertainty (Mohri et al., 2018). To avoid further
reducible resembles the dissent between frequentist and            confusion, we stick to the term “estimation uncertainty”.
Bayesian views as well, since reducibility depends heav-           We conclude with the following definition of aleatoric and
ily on what is defined as knowledge. At first, knowl-              epistemic uncertainty: Aleatoric uncertainty is defined as
edge related in general to the “behaviour of the system”           V ar(Y |x). All remaining uncertainty is defined as epis-
(Hora, 1996) and could include expert knowledge, addi-             temic uncertainty.
tional data and variables, as well as knowledge about the             With this definitional framework, we can look at the un-
correct model class and data generating process. However,          certainties in the dice example from earlier again. If no ad-
with the rise of deep neural networks and their flexibil-          ditional variables are gathered, it is not possible to further
ity, it is implicitly assumed that the hypothesis space (or        reduce the uncertainty concerning the fair dice roll and all
model class) is large enough to capture the ground truth.          uncertainty is of aleatoric nature. If however, all relevant
As a result, it is assumed that epistemic uncertainty re-          physical quantities are measured (assuming they would be
lates only to finding the correct parameters and can be            quantifiable), the process of rolling a dice becomes deter-
reduced with more training data (Kendall and Gal, 2017;            ministic and no aleatoric uncertainty is present. Uncer-
Hüllermeier and Waegeman, 2021).                                   tainties can therefore only be distinguished on a model
   Hora (1996) argued already that a clear and unique              and data basis and not universally. This context depen-
separation between the two types of uncertainty is often           dency of classifying uncertainties is an important takeaway
not possible. A simple example might demonstrate this.             and recurring theme throughout this paper.
Although rolling a fair dice is commonly used as an ex-               The success of describing the relationship between Y
ample of pure randomness and thus aleatoric uncertainty,           and X as stochastic as in (1) does not come from showing
it can also be seen as a purely physical process. Knowing          that a deterministic view of the world might be incorrect.
the initial position, each rotation and movement of the            Rather, it stems from determinists and non-determinists
dice, it is possible to predict exactly which number will be       agreeing that in the vast majority of practical applica-
rolled. Since extending this thought might lead to philo-          tions, the data are such that Y cannot be explained or
sophical debates about determinism, it is important to set         predicted from X without error and treating the relation-
an appropriate framework.                                          ship as stochastic is very useful: i.e., data analysis operates


                                                               3
between the two extremes of the dice rolling example: no
(useful) features or complete determinism.

3.2      Aleatoric and Epistemic Uncertainty
         in Classical Statistics
3.2.1     Statistical Model
We further discuss the distinction between aleatoric and
epistemic uncertainty using linear regression which allows
illustrating the complexity even in a simple setting. Note
that in general, we do not know the aleatoric framework
(1) but aim to estimate or learn a (prediction) model for
output Y given input X. In other words, for learning we
replace (1) by                                                     Figure 1: Linear model example. The solid line shows
                                                                   the true relationship between x and y. The estimated re-
(2)                       Y |x ∼ pY |X (·|x)
                                                                   gression line is dashed. 90% prediction interval in grey.
                                                                   Even though the true model class or hypothesis space is
where pY |X (·) serves as an approximation for fY |X (·). Set-
                                                                   known, i.e., simple linear model (no model uncertainty),
ting (2) can thereby be considered a statistical model,
                                                                   it is not possible to predict y precisely (aleatoric uncer-
e.g., a regression model (Fahrmeir et al., 2022), or any
                                                                   tainty). Since the regression line is estimated with finite
kind of machine learning related model such as a deep
                                                                   data, there is a discrepancy between the true parameters
neural network (Goodfellow et al., 2016). In the termi-
                                                                   θ and the estimate θ̂ (estimation uncertainty).
nology of machine learning (2) is usually called hypothesis
space (Russell et al., 2010, p. 696), and one usually as-
sumes some parametric model space P = {pY |X (y|x; θ) :
θ ∈ Θ}. The parameters need to be set in some optimal (Fahrmeir et al., 2022), consisting of both aleatoric and
way which we assume to be done based on training data estimation uncertainty. We visualize this in Figure 1. It is
D = {(x(i) , y (i) ), i = 1, . . . , n}. For now, we assume a sim- important to note that even in this very simple model one
ple i.i.d. setting, i.e., we assume independence and that cannot additively decompose the total uncertainty into
for given x the response is generated from the true rela- aleatoric and estimation uncertainty. This means, while
tionship (1). Based on the data D we obtain the trained conceptually uncertainty consists of aleatoric and epis-
model p̂Y |X (·|x), which in case of a parametric hypothesis temic uncertainty, this is not mirrored mathematically in
                                                                   the form of added noise.
space equals p̂Y |X (·|x) = pY |X (·|x, θ̂) with θ̂ as fitted or
                                                                      Furthermore, in many applications, we will have a mis-
learned parameter.
                                                                   specified model, i.e., fY |X ̸∈ P. Besides the already men-
   A simple, though unrealistic setting is to assume
                                                                   tioned uncertainties, model uncertainty or model bias ex-
fY |X (y|x) in (1) is an element of P, that is we know
                                                                   ists in this case as well. This is caused by the discrepancy
fY |X (y|x) = pY |X (y|x, θ0 ) for some parameter θ0 which
                                                                   between fY |X and pY |X , i.e., since in general (2) is only ap-
is then usually called the true parameter. This means
                                                                   proximating (1). In other words, the complexity increases
the model is well-specified (and not misspecified) and no
                                                                   readily, if the model class is only an approximation of the
model uncertainty is present. We consider this setup in a
                                                                   true underlying data generating process (1), which is in
simple linear model where X and Y are related through a
                                                                   real-world data more or less always the case.
linear relationship with residual noise, i.e., Y = β0 +xβ1 +ϵ
with ϵ ∼ N (0, σ 2 ). In other words, we assume
                                                                            3.2.2     Aleatoric and Epistemic Uncertainty in the
(3)                  Y |x ∼ N (β0 + xβx , σ 2 )
                                                                                      Bias-Variance Decomposition
The general aim is to estimate parameters θ = (β0 , β1 , σ 2 )              The parallels in the linear model of residual variance to
based on some data (x(1) , y (1) ), . . . , (x(n) , y (n) ). As model       aleatoric uncertainty on the one hand, and model bias and
(3) is learned from a finite amount of data, it is in gen-                  estimation variance to epistemic uncertainty on the other
eral not possible to recover the true parameters θ. Letting                 hand, can also be mirrored in the classical bias-variance
θ̂ denote the parameter estimate based on the data, we                      decomposition. The bias-variance decomposition shows
can quantify the discrepancy between θ̂ and θ, which in                     that the expected prediction error can be decomposed into
statistics is also commonly called estimation uncertainty,                  the model’s bias, variance, and an irreducible error (Hastie
expressed in estimation variance, which reduces with in-                    et al., 2009, p. 223). Let ŷ = y p̂Y |X (y|x)dy be the
                                                                                                               R
creasing the amount of data. Still, aleatoric uncertainty                   mean prediction, given x, based on the fitted model. Then
remains due to the variance of the residuals ϵ, which be-                   the well-known bias-variance decomposition of the mean
comes apparent when calculating prediction intervals. The                   squared prediction error results:
prediction interval for a future observation y0 at location
x0 with level 1 − α, i.e., a measure of the total uncertainty,
is given by                                                                 (5)
                                 
                                                  −1
                                                            1/2            EY |X {ED {(Y − ŷ)2 }|x} =
(4)     x′0 β̂ ± t(n−p),(1−α/2) σ̂ 1 + x′0 (X ′ X)     x0
                                                                                    EY |X {ED {(Y − EY |X (Y |x) + EY |X (Y |x) − ŷ)2 }|x}

                                                                        4
      =V arY |X (Y |x)+                                              Note that the Akaike Information Criterion (AIC)
       ED {(ŷ − ED (ŷ|x) + ED (ŷ|x) − EY |X (Y |x)) }    2        (Akaike, 1998)
                                                                                                   n
      =V arY |X (Y |x) + V arD (ŷ|x) + bias(ŷ|x)2                                                X
                                                                            AIC(p(·|x; θ̂)) = −2         log p(y (i) |x(i) ; θ̂) + 2p
where bias(ŷ|x) = ED (ŷ|x) − EY |X (Y |x) is the bias in the                                     i=1
conditional mean prediction. With ED () we thereby refer
                                                                     can serve as an estimate of two times the (expected)
to the expectation over the data D. Here the direct link be-
                                                                     Kullback-Leibler divergence shifted by the inestimable en-
tween aleatoric and epistemic uncertainty and the classical
                                                                     tropy
bias-variance trade-off becomes clear. V arY |X (Y |x) corre-
sponds to aleatoric uncertainty and cannot be reduced and
                                                                              Z    Z
                                                                                         log(f (y|x))f (y|x)f (x)dy dx.
the model p̂Y |X does not figure into this term at all. The                     x∈X   y∈Y
variance of the estimator ŷ corresponds to estimation un-
certainty, while the bias of the estimator relates to model          See for instance Wood (2017, p. 110), Davison (2003,
uncertainty. Both V arD (ŷ|x) and bias(ŷ|x)2 depend on             p. 150), or Kauermann et al. (2021, p. 236).
the model’s complexity, as a more flexible model typically              Typically, statistical setups assume p < n with n as the
induces a lower bias but higher variance. This framework             sample size. Recent literature focuses on model perfor-
is well known for models where the number of parameters              mance if in contrast p > n, see for instance Efron (2020),
is less than n, which in particular in deep neural networks          Fan et al. (2021), Bartlett et al. (2021) or Hastie et al.
does not usually hold (see Belkin et al., 2019; Clarté et al.,       (2022), to name but a few. In fact, the success of deep
2022). This is focused on in the next section.                       learning is based on heavily overparameterized models
                                                                     which utilize the fact that a second bias-variance trade-off
                                                                     optimum, can occur in constellations with more parame-
3.3      Kullback-Leibler Divergence, Overpa-                        ters than observations. This phenomenon is also known
         rameterized Models, and Deep Learn-                         as double descent (Belkin et al., 2019; Neal et al., 2018;
         ing                                                         Neyshabur et al., 2018; Yang et al., 2020; Zhang et al.,
                                                                     2021). In the overparameterized model it is however re-
We want to get a little deeper into the classical bias-
                                                                     quired to regularize the estimation. In statistical termi-
variance tradeoff but focus on overparameterized models,
                                                                     nology this is known as penalization or ridging, which in
as they are typical in deep learning. This means that the
                                                                     fact corresponds to imposing a prior distribution on the
dimension of the parameter set exceeds the number of ob-
                                                                     parameter in a Bayesian style, see e.g. Fortuin (2022) or
servations n. We also extend the single view on prediction
                                                                     Wang and Yeung (2020). We want to look at the case
error, as given in (5), towards measuring the distance be-
                                                                     p > n in more depth now. Apparently, θ0 as defined in
tween the assumed aleatoric uncertainty (1) and its model
                                                                     (6) remains the optimal parameter, regardless of the di-
(2) using the Kullback-Leibler divergence.
                                                                     mension of θ. The only thing that is required, so that θ0
   To start with, let again P = {pY |X (y|x; θ) : θ ∈ Θ} be
                                                                     is unique, is that the expected Fisher information
the hypothesis space, that is the set of possible prediction
models. We assume Θ ⊂ Rp , i.e., we consider a p dimen-
                                                                                        2                       
                                                                                            ∂ log p(Y |X; θ0 )
sional parameter space where for the moment we assume                (9) EX EY |X −                                   =
                                                                                                   ∂θ ∂θT
the classical statistics framework p < n. We make use of
                                                                                           ∂ 2 log p(y|x; θ0 )
                                                                              Z      Z
p(y|x; θ) ∈ P as a prediction model for f (y|x) and measure                 −                                  f (y|x)f (x)dy dx
the “distance” between f (·) and p(·) through the Kullback-                     x∈X y∈Y          ∂θ ∂θT
Leibler divergence. The optimal parameter θ0 can then is positive definite, which we assume in the following. In
be defined by minimizing the (expected) Kullback-Leibler principle, this means that the model p(y|x; θ) is uniquely
loss, that is                                                    estimatable with an infinite amount of data. For finite
(6)                                                              data, however, the maximization of the log likelihood pro-
                                                                 vides a non-convex optimization problem since the second-
 θ0 = arg min EX {KL(f (.|X), p(.|X; θ))}                        order derivative
         θ∈Θ
                                                                                     n
                                                                                         ∂ 2 log p(y (i) |x(i) ; θ)
               Z      Z                     
                                    f (y|x)                                        X
    = arg min               log                f (y|x)f (x)dy dx
         θ∈Θ     x∈X y∈Y          p(y|x; θ)                                         i=1
                                                                                                 ∂θ ∂θT
                Z     Z
    = arg max                log p(y|x; θ)f (y|x)f (x)dy dx      has maximum rank n and hence is neither invertible nor
         θ∈Θ     x∈X y∈Y                                         negative definite. For estimation and training of the
where we assume for simplicity of notation that both, y model, we therefore require some regularization. We for-
and x are continuous. Differentiation defines θ0 implicitly mulate this as prior distribution on θ denoted as p(θ). This
through                                                          in turn leads to the regularized/penalized log likelihood
                                                                 (10)
             Z     Z
                         ∂ log p(y|x; θ0 )                                         lpen (θ) = l(θ) + log p(θ)
(7)     0=                                 f (y|x)f (x)dy dx
                                 ∂θ
              x∈X y∈Y
                                                                 with l(θ) as defined in (8). The prior p(θ) may be proper
and it can be shown that the maximum likelihood estimate or improper, but p(θ) needs to be chosen such that the
θ̂ converges to θ0 , where θ̂ maximizes the log likelihood       second order derivative
                           n                                                               n
                           X                                                ∂ 2 lpen (θ) X ∂ 2 log p(y (i) |x(i) ; θ) ∂ 2 log p(θ)
(8)               l(θ) =         log p(y (i) |x(i) ; θ) .            (11)               =                            +
                           i=1
                                                                             ∂θ ∂θT       i=1
                                                                                                   ∂θ ∂θT               ∂θ ∂θT


                                                                 5
is of full rank and negative definite at the maximum of invertible. Instead, we can take the generalized inverse,
lpen (θ). This leads to an unique maximizer θ̂pen of the leading to
regularized log likelihood implicitly defined through
                                                                    (16)                β̂pen = (XT X)− XT y
                           ∂lpen (θ̂pen )
                      0=                     .                      with the superscript “−” denoting the generalized inverse.
                                  ∂θ
                                                                    We show in Appendix A.1.1 that this corresponds to im-
Looking at the (expected) Kullback-Leibler divergence be- posing a prior on β. Note that for p > n we have
tween the true and the fitted model we get                          ŷ = X(X T X)− X T y ≡ y so that for p > n we interpolate
           n                                o                       the data. However, our focus is not on the in sample but
(12) EX KL(f (·|X), p(·|X; θ̂pen ))                                 on the out of sample performance corresponding to the
       Z      Z                           !                         Kullback-Leibler divergence (12). We calculate the latter
                           f (y|x)                                  for two simulation settings. We assume X ∈ R100×200 with
     =            log                        f (y|x)f (x)dy dx
         x∈X y∈Y         p(y|x;  θ̂ pen )                           Xij ∼ N (0, 1) i.i.d., for i = 1, . . . , 100 and j = 1, . . . , 200
(13)                                                                and simulate Y = Xβ + ϵ with ϵ ∼ N (0, σ = 0.1). For
       Z      Z       
                          f (y|x)
                                                                   vector β we use two simulation settings:
     =            log                     f (y|x)f (x)dy dx
                        p(y|x; θ0 )                                            (
         x∈X y∈Y                                                                1 − j/150, for 1 ≤ j ≤ 150
       |                      {z                           }         (a) βj =                                      (decreasing)
                               1
                                             !                                  0,             otherwise
          Z     Z
                             p(y|x; θ0 )
(14) +               log                        f (y|x)f (x)dy dx .            (
                           p(y|x; θ̂pen )                                       1, for 1 ≤ j ≤ 150
            x∈X y∈Y                                                  (b) βj =                            (constant coefficients).
          |                          {z
                                      2
                                                                }               0, otherwise

Compared with equation (5), just like bias(ŷ|x)2 , the first  Hence, in both settings, the first 150 covariates contribute,
component describes discrepancies between the true model       while the remaining 50 are spurious. We include the co-
and the optimal estimate (model uncertainty). The second       variates successively starting from the first, that is hypoth-
component mirrors V ar(ŷ|x) in that it measures how much      esis space Pp is the set of linear models with covariates
the fitted models will, on average, deviate from the optimal   x1 , . . . , xp included. We thereby increase p up to its max-
one (estimation uncertainty). With increasing dimension        imum of 200. The resulting Kullback-Leibler divergences
of θ, the first component gets smaller, since the differ-      (calculated through simulations) are shown in Figure 2.
ence, and hence the Kullback-Leibler divergence between        The left-hand side shows the values for decreasing coeffi-
the true distribution f (y|x) and the optimal p(y|x; θ0 ),     cients (a), the right-hand side is for constant coefficients
gets smaller. The second component in contrast can get         (b). The top row shows the Kullback-Leibler divergence
larger since the regularization increases the bias of the      (12) while the middle row shows contribution 1 in (13) and
estimate θ̂pen . We provide more explanations in Ap-           the bottom row shows contribution 2 in (14). We see that
pendix A.1. This, in turn, mirrors the classical behaviour     the approximation error 1 (middle row) decreases to zero
of the Kullback-Leibler divergence, utilized for instance in   once all covariates are included. Component 2 (bottom
the AIC. However, we are here in the setup where p > n,        row), expressing the distance between the fitted and the
which the AIC does not cover. This property can lead           optimal model, increases up to sample size n = 100. Be-
to the fact, that for p > n we find a second (local) min-      yond this point regularization is required, that is instead of
imum in the Kullback-Leibler divergence, namely one for        the inverse of X T X we take the generalized inverse. This
p < n and another one for p > n, where the latter heav-        leads to a small decrease followed by a general increase if
ily depends on the regularization/prior used to obtain a       the model complexity is further increased. Similar results
maximum of (10).                                               hold if one induces ridge penalty instead of the generalized
   We demonstrate this property in a simple linear regres-     inverse, which is shown in Appendix A.1.2.
sion model. Let                                                   We can conclude that model selection based on mini-
                                                               mizing the Kullback-Leibler divergence between the “true”
                         y (i) = x(i) β + ϵ(i)                 model and the model class P extends towards overparame-
                                                               terized models, where regularization needs to be taken into
be the data generating process, where x(i)                  = account for estimation. This can lead to selected models
   (i)         (i)
(x1 , . . . , xp ), x(i) ∼ f (x). For fitting we use the de- with more parameters than observations, a finding which
sign matrix X with rows x(i) , for i = 1, . . . , n and obtain is not yet completely established and understood in statis-
the model                                                      tics.

                          y = Xβ + ϵ

where y = (y (1) , . . . , y (n) ) and assumed linearly indepen-
dent columns in X. Assuming normality for the residuals,
the least squares estimate

(15)                  β̂ = (XT X)−1 XT y

equals the maximum likelihood estimate. Note that (15)
does not exist if p > n since in this case XT X is not


                                                                   6
                                EX{KL(f( ⋅ |x), p( ⋅ |x, θ^pen))}, Eq. (12)                    EX{KL(f( ⋅ |x), p( ⋅ |x, θ^pen))}, Eq. (12)




                            0          50          100         150            200          0          50          100         150            200


                                                Eq. (13)                                                       Eq. (13)




                            0          50          100         150            200          0          50          100         150            200


                                                Eq. (14)                                                       Eq. (14)




                            0          50          100         150            200          0          50          100         150            200
                                                    p                                                              p

                                (a) decreasing coefficients                                    (b) constant coefficients

Figure 2: KL divergence depending on number of parameters using generalized inverse. Left setting a) decreasing
coefficients, right setting b) constant coefficients


4       The Role of Data - Model Uncer- variables. We additionally introduce unrecorded or unob-
                                        served variables Z ∈ Z. These variables may relate to
        tainty Revisited                X, to Y , or to both. The unobserved variables Z can also
                                                                                        relate to how the data are collected. Moreover, Z can con-
4.1      General Comments
                                                                                        tain parts that were not measured in the given data but are
Our focus in this section is the model space or hypothesis                              quantifiable in principle, as well as parts that are always
space P, from which p̂Y |X (·|x) is trained. The choice of                              unobservable or are infeasible to observe with acceptable
an appropriate model space P is important: only if the                                  efforts. The key point is that there may be unmeasured
true probability model fY |X (·|x) given in (1) is an ele-                              context information Z that influences the value of Y or X
ment of P can we hope to approximate the true model                                     or both. We will motivate the role of Z with a number of
during training. Unfortunately, the true model is rarely                                examples throughout the rest of the section.
known. As mentioned above, model uncertainty refers to                                     We assume that the triple (X, Y, Z) is drawn from some
the unknown discrepancies between the true model and                                    super population according to
the optimal model in P, discrepancies that should be re-
                                                                                        (17)               (X, Y, Z) ∼ fX,Y,Z (x, y, z)
duced as much as possible. The high capacity of machine
learning models to learn very flexible functions are one way                                               = fY |X,Z (y|x, z) fX|Z (x|z) fZ (z)
of doing this. Often, aleatoric uncertainty is neglected or                             where the factorization follows from the chain rule (or gen-
simplified. Besides, data for training models are often defi-                           eral product rule) of probability theory and thus always
cient, leading analysts to end up with suboptimal models,                               holds. However, the separate components in the joint dis-
often even without considering potentially superior alter-                              tribution fX,Y,Z are typically not known in real-world ap-
natives. We, therefore, want to illuminate the role of data.                            plications.
In this section, we provide examples of misspecified models                                Available training data do not include the unobserved
in machine learning, in which the (arguably) true model                                 variables Z. We only have access to the observed vari-
is not part of the model space P. The respective misspec-                               ables X and Y in the database. By applying the law of
ifications are caused by shortcomings of the training data,                             total probability to (17), we obtain the joint distribution
particularly the absence of some variables. While this sit-                             of (Y, X) as
uation cannot always be avoided, our discussion serves as
a reminder of the consequences: predictions can be biased                               (18)        (Y, X) ∼ fY,X (y, x)
and variances may increase or even be underestimated,
                                                                                                       Z
                                                                                                     =      fY |X,Z (y|x, z)fX|Z (x|z)fZ (z)dz.
contingent on the choice of P. This is evidence that a per-                                                z∈Z
fect separation between model uncertainty and aleatoric                                 We may also generally condition equation (18) on x and
uncertainty is not possible.                                                            obtain

4.2      Uncertainty Due to Unobserved Vari- (19)                                                       (Y |x) ∼ fY |X (y|x)
                                                                                                            Z
         ables                                                                                           =       fY |X,Z (y|x, z) fZ|X (z|x)dz.
                                                                                                                z∈Z
4.2.1     General Framework
                                                                                        The above integrals assume a suitable measure for inte-
We consider three groups of quantities: X, Y , and Z. As                                gration, i.e., if Z is discrete-valued, the integral refers to
above X ∈ X are input variables and Y ∈ Y are output                                    summation, otherwise appropriate integration is assumed.

                                                                                    7
   In supervised machine learning we wish to learn the con-               We start by noting that the more predictive the omitted
ditional distribution fY |X (·|x). We may consider this re-               variable Z, the larger the expected squared bias can be.
lationship fY |X (·|x) as the best any model can achieve.                 From the second term on the right-hand side of (22) we
It is thus the natural reference point for our subsequent                 find that, ceteris paribus, the larger the expected squared
analyses in which data deficiencies are the cause of why                  bias, the larger the conditional variance of Y is in the
this optimum may not be reached and consequently any                      omitted variable model relative to that in the full model.
data-driven model can be biased and/or carries additional                 This reflects common notions of aleatoric uncertainty and
uncertainty.                                                              omitted variables: if one had additional features Z, one
   Often, but not always, we are interested in a prediction               could predict Y with less uncertainty.
of Y given x. In this case the conditional mean value                        However, this average or marginal view hides impor-
                                 Z                                        tant aspects when V arY |X,Z (Y |x, z) or bias(x, z) are not
(20)     µ(x) := EY |X (Y |x) =       yfY |X (y|x)dy                      constant for all z. Therefore, to contrast the uncer-
                                       y∈Y                                tainty between the full and the omitted variable model, we
                                                                          compare the conditional variances V arY |X,Z (Y |x, z) and
serves as best prediction, based on minimizing the squared
                                                                          V arY |X (Y |x). As we show in Appendix B, there always
prediction error.
                                                                          exist z ∈ Z for which V arY |X,Z (Y |x, z) ≤ V arY |X (Y |x)
                                                                          and, unless Z affects neither variance nor expected value,
4.2.2    Omitted Variables                                                we even have V arY |X,Z (Y |x, z) < V arY |X (Y |x). This
Even though omitted variables or missing features did                     is still in line with the aforementioned common notions.
not get much attention in machine learning so far, they                   However, what may be less obvious is that there can also
are a relevant source of a model’s uncertainty (see Cher-                 exist z for which V arY |X,Z (Y |x, z) > V arY |X (Y |x): that
nozhukov et al., 2021). Not only in structured, tabular                   is, the measure of aleatoric uncertainty employed in the
data, but also in unstructured data, problems can arise if                omitted variable model can also be underestimated for
important features are ignored or not collected. Examples                 some data points. Therefore, even when there is no bias,
include missing colour information in black and white im-                 prediction intervals can suffer at the same time from both,
ages or missing wavelengths or sensors such as radar or                   overcoverage and undercoverage, depending on z. We also
lidar which could be relevant in autonomous driving or                    note that the quantification of epistemic uncertainty is af-
remote sensing (Li and Ibanez-Guzman, 2020; Zhu et al.,                   fected when it is defined as the difference between total
2017). In the example of rolling a dice (see 3.1), any un-                and aleatoric uncertainty (and total uncertainty is mea-
certainty was due to our ignorance of physical processes.                 sured correctly).
Similarly, the data recorded by mobile health devices de-                    Consider a scenario in which Z is not predictive of Y
pend on the physical state of a person, which is not logged.              in any way. Then, in (22) the expected squared bias is
Formalized in this framework, omitted variables are fea-                  zero but V arY |X,Z (Y |x, z) can still depend on z, with the
tures Z that affect outcome Y and possibly X, but that                    consequences discussed in the previous paragraph. Even
are not included in X as they have not been observed.                     if such a feature Z was available in the data, it would
   The comparison is between Y |x, z, the true relationship               not get selected into the prediction model during training
which we will also call the “full model”, and Y |x, the “omit-            using typical loss functions. It is not common in the typi-
ted variable model”. We assume that we want to predict                    cal machine learning workflow to consider a non-predictive
the conditional mean value of Y . From (19) it follows that               Z, even though it may be relevant for uncertainty quan-
                                                                          tification. The role of Z might however be checked for
(21)                                                                      heteroscedasticity. One possible cause is that differently
                                                                          reliable annotators might have labelled the data. This is
                  Z       Z
EY |X (Y |x) =                   y fY |X,Z (y|x, z)fZ|X (z|x) dz dy
                  y∈Y      z∈Z                                            an example of connections between seemingly unrelated
                  Z                                                       sources of uncertainty: here, omitted variables (e.g., the
              =           EY |X,Z (Y |x, z)fZ|X (z|x) dz,                 identity Z of the annotators) and errors in data (see 4.2.3
                  z∈Z
                                                                          and 4.2.4).
implying that predictions EY |X,Z (Y |x, z) based on x and                   Finally, the comparison of V arY |X,Z (Y |x, z) and
z would typically be more precise than their (weighted)                   V arY |X (Y |x) evidences what we mentioned in the dice
average EY |X (Y |x). For given x and z, the difference                   rolling example (see 3.1): what one considers to be
EY |X,Z (Y |x, z) − EY |X (Y |x) =: bias(x, z) is the bias in             aleatoric uncertainty depends on the specific context –
the conditional prediction of Y due to the omission of Z.                 here, which features are considered, i.e., X, and which
In order to assess (aleatoric) uncertainty, we calculate the              are not, i.e., Z. In particular, from the viewpoint
conditional variance in the omitted variable model using                  of the full model replacing the aleatoric uncertainty
the law of total variance, conditional on X = x,                          V arY |X,Z (Y |x, z) with its expected value in (22) should
                                                                          still only describe aleatoric uncertainty. However, the ex-
(22)                Z                                                     pected squared bias would be regarded as epistemic, not
  V arY |X (Y |x) =       V arY |X,Z (Y |x, z)fZ|X (z|x) dz               aleatoric. Therefore, a clear decomposition of uncertainty
                     z∈Z                                                  is again questionable.
                                                                             In general, either of the two terms on the right-hand
          Z
                                                 2
      +          EY |X,Z (Y |x, z) − EY |X (Y |x)
            z∈Z                                                           side of (22) independently of the other can affect the con-
         · fZ|X (z|x)dz                                                   ditional variance of the omitted variable model. How-
                                                                          ever, for binary Y there is only one “parameter”, the
       =EZ|X V arY |X,Z (Y |x, Z) + EZ|X bias(x, Z)2 .
                                                   
                                                                          conditional probability given x and z, determining both,


                                                                      8
V arY |X,Z (Y |x, z) and EY |X,Z (Y |x, z). Hence, the two
terms in (22) are connected: generally, the omitted vari-                                          𝜇 𝑥
able model suffers either from both, neglected variance
heterogeneity and bias for some z, or from neither (see
Supplementary Material Gruber et al.). This, in turn,
casts more doubt on the clear distinction between and                                  X                           Y
separability of aleatoric uncertainty and epistemic uncer-
tainty.
   (Fahrmeir et al., 2022, Ch. 3.4.1). The focus of this                         𝑓𝑋|𝑍 ∙ 𝑧 )                     𝑓𝑌|𝑍 ∙ 𝑧)
paper is on prediction and uncertainty and not on (the
bias of parametric estimates of) marginal effects. Hence,                                               Z
the aforementioned existence of bias in the conditional
predictions suffices for us. As this bias can occur even
when X and Z are independent, we conclude this section                              Figure 3: Errors in X setting
by highlighting that omitted variables can be an impor-
tant, non-ignorable source of uncertainty. In statistics and
related disciplines such as econometrics, there is a much            are measured with error. Several bias correction meth-
larger body of literature about omitted variable bias and            ods have been proposed, including simulation-based ap-
Simpson’s paradox (e.g., Wagner 1982) than in machine                proaches (Lederer and Küchenhoff, 2006) and methods
learning (but see, e.g., Sharma et al. 2022). This sta-              using calibration data or repeated measurements. In our
tistical literature typically focuses on specific, traditional       general framework (17) - (19), the error mechanism is cap-
model classes such as linear regression. Most of its results         tured by fX|Z (·|z) which links the observed, error-prone
can also be shown for more general relationships fY |X,Z             features X to the unobserved, error-free values Z. Fol-
with our framework (see Supplementary Material Gruber                lowing the example with high-resolution image Z and its
et al.): e.g., that the trained model attributes the marginal        low-resolution version X, it is plausible to assume that Y
effects of the missing variable Z to the included X to the           is independent of X given Z, as sketched in Figure 3 and
extent the two depend on each other                                  discussed in Appendix C. We notate this as
                                                                     (23)                      Y ⊥⊥ X|Z.
4.2.3   Errors in X
                                                                     In this case, we may use
Imperfect measurement instruments, usage of proxy vari-                                     Z
ables, and subjectivity in labelling decisions are among the         (24) V arY |Z (Y |z) =             (y − E(Y |z))2 fY |Z (y|z)dy
sources of errors in data. The main intuition about the                                           y∈Y

consequences of such errors is that the effects of features          as a measure for the “error-free” aleatoric uncertainty given
with measurement error are partly attributed to features             z. Note that Z remains unobservable and instead we ob-
with no or with lower measurement error. Let Z be the                serve the error-prone version X. This leads to the “error-
error-free version of features X. Consider the following             prone” aleatoric uncertainty
example in which Z is a scenery of which an image X is
taken. While Z is clear and without error, an image X                (25)       V arY |X (Y |x)
is taken with resolution error. We may also think of Z                                 =EZ|X {V arY |X,Z (Y |x, Z)}
as a high-resolution image of which a noisy version X is                                   + V arZ|X {EY |X,Z (Y |x, Z)}
taken. A further example is text data Z that are quanti-
                                                                                       =EZ|X {V arY |Z (Y |Z)|x}
fied through word-embeddings leading to X.
   We consider the sources of uncertainty which come into                                  + V arZ|X {EY |Z (Y |Z)|x},
play when X is used instead of Z to predict Y , as outlined          which results by the law of total variation after condition-
in Figure 3. The exact effect on uncertainty depends on              ing on X = x and utilizing (23). The first term is the
the relationships among the features Z and of the features           average of component (24) after observing x. If this de-
to the outcome Y , as well as on relationships concerning            pends only weakly on x, the first component in (25) is
the errors (the errors among themselves, to the features,            approximately equal to (24). The second term in (25)
and to the outcome). This mirrors the previous subsec-               leads to an increase in aleatoric uncertainty.
tion where the effects of omitted variables were partly at-             Traditional statistical analysis tries to recover fY |Z de-
tributed to the other features. In fact, the omitted vari-           spite only observing (Y, X). In predictive modelling, this is
ables situation is a limiting case: as the amount of mea-            mainly of interest when X is available in the training data
surement error in a mismeasured feature grows, the signal-           but Z in deployment. However, then the aleatoric and
to-noise ratio of this feature to the outcome decreases, and         epistemic uncertainties of the correction model need to be
the effect of the feature is increasingly picked up by other         considered, too. Interestingly enough, the bias-variance
features to the extent that they are related. In the limit,          trade-off for how much correction is optimal for prediction
i.e., as the signal-to-noise ratio approaches zero, the af-          has hardly been explored (Carroll et al., 2006, Ch. 3.5).
fected feature may as well be omitted or is automatically
omitted during model training.
                                                                     4.2.4   Errors in Y
   The traditional errors-in-variables literature has fo-
cused on regression models (e.g, Carroll et al., 2006) and           Errors may occur not only in the features but also in the
shows how parameter estimates are biased if covariates X             outcome. We focus here on a binary outcome, the typical


                                                                 9
                                                                   As we show in Appendix D.1
                              𝜇 𝑥
                                                                 (27)      PY |X (Y = 1|X = x) =
                                                                                 PZ|X (Z = 1|X = x)
                   X                        Y                                    + PY,Z|X (Y = 1, Z = 0 |X = x)
                                                                                           |   {z     }
                                                                                              false Y = 1
                                                                                 − PY,Z|X (Y = 0, Z = 1 |X = x).
           𝑓𝑍|𝑋 ∙ 𝑥 )
                                                                                           |   {z     }
                                                                                              false Y = 0


                                 Z                               That is, a model trained with data (Y, X) instead of (Z, X)
                                                                 learns not just the desired PZ|X , but also two additional
                                                                 terms: the probability of false 1’s (conditional on x), which
                                                                 on their own produce a positive bias, and the probability
               Figure 4: Errors in Y setting                     of false 0’s (conditional on x), which produce a negative
                                                                 bias. The difference between these two error probabilities
                                                                 is the bias incurred by training with Y instead of Z. Thus,
Table 1: Relation of true values Z and observed values Y         training with Y is only unbiased for predicting Z when the
in binary classification.                                        two errors are exactly equally likely – for every value x –
                                                                 which translates into a very strong set of assumptions.
                    Y (Observed)                                 (27) generalizes to multi-class prediction (Appendix D.1),
                      1      0                                   but then the number of assumptions required for unbi-
               1   true 1 false 0                                asedness even multiplies.
 Z (Truth)
               0   false 1 true 0                                   Note that the two error probabilities in (27) are joint
                                                                 probabilities of Y and Z, PY,Z|X , and not probabilities
                                                                 that are conditional on Z, which would be denoted PY |X,Z .
                                                                 Joint and conditional error probability are however linked:
framework in classification. (See Supplementary Material         PY,Z|X = PY |X,Z · PZ|X . This shows (see Appendix D.2)
Gruber et al. on why regression, i.e., quantitative outcome      that even if we assume that the conditional error proba-
variables, can also be affected, but potentially less so.)       bilities are identical, as in, e.g., human-generated random
An example of such “noisy labels” is human annotation,           typos or labelling errors, i.e.,
with imperfect intra- and inter-annotator reliability (Fré-
nay and Verleysen, 2014). Numerous applications want to          (28)      PY |X,Z (Y = 1|X = x, Z = 0) =
predict the true value of the variable of interest instead of
                                                                                    |       {z       }
                                                                                         false Y = 1
an error-prone version of it. We show subsequently that                    PY |X,Z (Y = 0|X = x, Z = 1) =: c(x),
model predictions are biased if we do not measure the                               |       {z       }
                                                                                         false Y = 0
outcome variable without error, except when the different
error components happen to cancel each other out exactly         the bias does not vanish unless the marginal conditional
for all values. This condition is very unlikely to hold for      probabilities PZ|X (Z = 0|X = x) and PZ|X (Z = 1|X = x)
categorical outcomes as even random, unsystematic errors         are also identical. With equal and positive conditional
in measurement, labelling, or processing produce this bias.      error probability c(x) > 0, unbiasedness is therefore only
                                                                 possible in binary classification iff
   Let Z ∈ {0, 1} be the true value of the outcome variable,
i.e., without any error, and let Y ∈ {0, 1} now be the error-    (29) PZ|X (Z = 1|X = x) = 0.5 = PZ|X (Z = 0|X = x),
prone, but observed variable. Y is not necessarily biased
for Z; it is just not measured error-free. We would ideally      i.e., the binary classification problem must be exactly bal-
want to learn fZ|X , but have to settle for fY |X as Z is        anced for all x and Z must be independent of X, rendering
unobserved. Thus, the difference fY |X − fZ|X is the bias        the whole exercise of data analysis moot. In short, equal-
that we incur by having to train with Y instead of Z. We         ity of conditional error probabilities might be common in
sketch the setup in Figure 4.                                    practice but is rather harmful than helpful in terms of bias.
                                                                 Conversely: for fixed, equal conditional error probabilities
  Adapting (19) to discrete Z leads to
                                                                 c(x) > 0, the less balanced the true classes, the greater the
                                                                 resulting bias (see Supplementary Material Gruber et al.).
                        X                                           Note also that the discussed bias is a form of model
(26)    PY |X (y|x) =         PY |X,Z (y|x, z)PZ|X (z|x)         uncertainty that cannot be reduced by increasing sample
                        z∈Z                                      size. All three components in (27), including the two bias
                                                                 components, are also subject to (reducible) random sam-
                                                                 pling uncertainty.
where P(·) denotes the corresponding probabilities. Ta-
ble 1 summarizes our scenario: Y and Z can be in line,
                                                           4.3 The Non-i.i.d. Setup
with true 1’s or true 0’s. There can also be two types
of error: false 0’s, with probability PY,Z|X (Y = 0, Z = Standard machine learning as well as statistical mod-
1|X = x) conditional on x; and false 1’s, with probability els build upon the standard setup that available data
PY,Z|X (Y = 1, Z = 0|X = x) conditional on x.              are drawn i.i.d. from (18), leading to the data source


                                                            10
D = {(y (i) , x(i) ), i = 1, . . . , n}. This assumption is of-      domly assigned to units: e.g., lay annotators may self-
ten violated and, if so, one needs to carefully adjust the           select which images they choose to label. If such labeller
training algorithm for that. For instance, when data are             effects are unaccounted for, the trained model may be bi-
collected over time and the aleatoric model (1) changes              ased (similar to unit nonresponse bias, see Section 5.3).
over time, the i.i.d. assumption does not hold. We will              Moreover, in most machine learning models the predic-
look deeper into such changes in Section 5.4. Here we                tions p̂(y|x0 ) are much more influenced by data points
focus on constellations where data are clustered and the             that are close to x0 than by those further away. Thus, to
assumption of independence is violated. As an illustrative           get at the actual level of local epistemic uncertainty we
example, we consider images X for which human labellers              must focus more on the uncertainty of labels of observa-
or annotators provide the corresponding labels Y .                   tions close to x0 in the training data instead of relying
   Let us first construct an i.i.d. setup for this example.          on global label uncertainty measures. However, there is
We consider each image X to be randomly drawn from a                 also epistemic uncertainty in estimating labeller effects.
set of infinitely many images. Each image X is labelled by           Hence, a sufficiently large number of labelled images from
a different randomly chosen labeller. Some crowd-sourcing            each labeller may be required.
initiatives in which images are classified by lay persons are           In sum, non-i.i.d. scenarios can be complex and the
approximately described by this setup (Northcutt et al.,             described labelling problem just serves as an example of
2021). Possible uncertainties in the labelling are often             how quickly independence, as well as identical distribu-
incorporated as so-called label noise (Rolnick et al., 2017).        tions, are violated in the data used for training machine
For a general discussion of labeller uncertainty see also            learning models. In general, this is still an open field for
Geva et al. (2019) or Misra et al. (2016).                           future research.
    However, image classification may require expertise or
training: e.g., when medical images are assessed with re-
spect to some disease (see, e.g., Zhou et al., 2021 and              5     Data Uncertainty
Dgani et al., 2018). Ambiguity occurs if different ex-
perts come to different conclusions and to account for               5.1    General Comments
this, one image is sometimes labelled by multiple labellers.
                                                                     Data are omnipresent in many machine learning applica-
The latter violates the assumption of independence among
                                                                     tions, and high data quality is key. Yet, following the
labels. If, for now, we ignore any dependence due to
                                                                     literature, we have discussed aleatoric and epistemic un-
the labellers, we can accommodate this data constella-
                                                                     certainty in terms of probability distributions, building on
tion by extending the framework from above. If each im-
                                                                     the idealized model that data are generated as identical
age x(i) is labelled by J labellers, we may denote the la-
           (i)          (i)                                          draws from some probability distribution. To properly de-
bels as y1 , . . . , yJ leading to the multivariate outcome          ploy machine learning models in real-world settings, data
           (i)          (i)
y (i) = (y1 , . . . , yJ ). Hence, in principle we are back in       scientists need some knowledge about the data produc-
the i.i.d. setup (18) but with a multivariate response vari-         tion process itself. Are the data suitable for the purpose
                     (i)
able. Letting yj ∈ {1, . . . , K} for all j = 1, . . . , J sug-      intended by the analyst?
gests to model fY |X (y|x) as multinomial or a Dirichlet-               This judgement call is often difficult to make as data
multinomial distribution, which requires that the entire             production can be a rather complex endeavour. One can
                             (i)    (i)
label vector y (i) = (y1 , . . . , yJ ) is used for training. Of-    hardly control all aspects of it. Data collection proto-
ten, however, this multivariate framework is ignored and             cols are only specific up to a point and may lack relevant
the outcome is reduced to a scalar, i.e., the majority class         detail. The social context as well as the technologies in
            (i)          (i)
among (y1 , . . . , yJ ), see, e.g., Zhu et al. (2020) or Ro-        use may influence the data production process and change
dríguez et al. (2018). It is important to note that such             over time. Data can have all sorts of deficiencies, fail-
an approach ignores information about the level of uncer-            ing to provide the desired virtual copy of the real world.
tainty expressed in different labels given by the labellers.         The uncertainty about how a given dataset relates to the
Recent work confirms that processing all votes takes uncer-          real world, including the unknown factors of what hap-
tainty more appropriately into account, see, e.g., Peterson          pened during its creation, is what we call “data uncer-
et al. (2019) or Battleday et al. (2020).                            tainty”. This all-embracing definition is meant to widen
                                                                     our perspective about the various kinds of uncertainties
   The above setup refers to a single observation, i.e., each
                                                                     that exist, besides the ones discussed in machine learning.
image is labelled by the same J labellers. Typically, how-
ever, not every annotator labels all the images. That is,               The next subsection illustrates common challenges
the data are not only clustered by images, with each im-             around data production, triggering data uncertainty.
age being labelled by multiple labellers, but often also clus-       Remedies in the face of data uncertainty are only possi-
tered by labellers, i.e., each labeller labels multiple images.      ble to some extent, as we exemplify afterwards for missing
In statistics, this is typically known as repeated measure-          data and for data with shifting distributions.
ments (Davis, 2002) or multilevel, hierarchical, nested,
or mixed models (Goldstein, 2011). Labellers can differ              5.2    Total Survey Error
in their level of uncertainty or reliability (variance) and
their central tendency (bias), which carries forward to the          When faced with data it is easy to overlook the fact that
data. In other words, the heterogeneity of labellers vio-            data are always designed, deliberately or unintentionally,
lates the i.i.d. assumption. If such labeller effects were           although the eventual data analyst might be uninvolved in
included in the model, aleatoric uncertainty could be re-            or even unaware of decisions going into the data generating
duced (see 4.2.2). In addition, labellers may not be ran-            process (Groves, 2011b,a, Japec et al., 2015, p. 843).


                                                                11
   For the special case of survey data, survey methodol-               be made for units with item nonresponse in features that
ogists and survey statisticians have used the Total Sur-               are part of the prediction model. Imputation models (Lit-
vey Error (TSE) framework (see Figure 5, left-hand side)               tle and Rubin, 2019, Ch. 4f.) estimate the missing value
to stay attuned to decisions going into the production of              based on the observed information, e.g., via regression of
survey statistics and errors arising alongside (Andersen               one feature on all the other features. A third reason is
et al., 1979; Groves et al., 2009; Groves and Lyberg, 2010).           efficiency. By default, most standard software packages
Such parsing of data generating processes can help for all             ignore all data from units with missing entries, which is
data types (tabular, semi-, and unstructured) to identify              called naive complete-case analysis. This is typically not
aleatoric and epistemic uncertainties. The framework is                efficient, because not all available information is used, and
also employed to improve the design and the collection of              epistemic uncertainty is elevated (Little and Rubin, 2019,
data. Aside from active learning, considerations to ad-                Ch. 3.2). In a sense, this problem is more pronounced in
dress data uncertainties at the design and collection stage            settings for machine learning than for traditional statistics
are mostly absent from the more theoretical literatures                (see Supplementary Material Gruber et al.).
in statistics and machine learning. In the design phase,                  Let R(i) be a response indicator random         variable which
what is aleatoric because of, e.g., omitted variables (see             equals 1 if all components of y (i) , x(i) are observed and
                                                                                                                      

Section 4.2.2) and what is not, is not yet set in stone.               0 otherwise, i.e., when at least one component or the
   West et al. (2023) extended the framework to be gener-              whole unit i is missing. Note that the complete-case
ally applicable beyond survey data in their Massive Open               data consist of (y (i) , x(i) , R(i) = 1) so that any prediction
Online Course (see Figure 5, right-hand side) and highlight            model trained with naive complete-case analysis will learn
examples of the various error sources in typical machine               fY |X,R (y|x, R = 1) instead of the population average
learning data. In this framework, error denotes devia-                                         X
tions of what we have (e.g., data) from the truth. Or,                 (30) fY |X (y|x) =              fY |X,R (y|x, R = r)P(R = r|x).
in circumstances in which “truth” is not an adequate con-                                   r∈{0,1}
cept: deviations from what we intended to capture. Thus,
                                                                       Because of its focus on population inference, traditional
error includes systematic differences, i.e., bias, but also
                                                                       statistical analysis targets Y |X, which we call the “popu-
non-systematic variation.
                                                                       lation model”. Predictive modelling is interested in learn-
   The widely used TSE framework and its extensions sum-
                                                                       ing Y |X when the goal is to predict and predict well for
marize the various possible sources of error that can arise
                                                                       all units, including those affected by missingness. We thus
during data production. It invites researchers to think
                                                                       compare the population model Y |X and the model from
through and compare the errors’ relative relevance in their
                                                                       naive complete-case analysis Y |X, R = 1. Unless noted
own data. It makes clear that datasets are often not the
                                                                       otherwise, mathematical derivations are analogous to 4.2.1
perfect abstraction of the real world that researchers would
                                                                       and 4.2.2 with R in the role of Z. In Appendix E.1 we show
like to have: we have data uncertainty. This can be highly
                                                                       that
relevant in practical machine learning applications, though
hard to take hold of in statistical models.                                                             P(R = 1|y, x)
                                                                       (31)    fY |X,R (y|x, R = 1) =                   fY |X (y|x).
                                                                                                          P(R = 1|x)
                                                                                                        |     {z      }
5.3     Missing Data                                                                                      bias factor

Data are often not complete, meaning that data entries are             Naive complete-case analysis yields the population model
missing. We therefore dedicate this section to illuminating            iff the bias factor equals 1, i.e., when the missingness R
the role of missing data in the context of machine learning.           is conditionally independent of Y given X. This is true
Generally, one distinguishes between two types of missing              for item missingness in Y , or in X, or in both, or for unit
data. First, unit nonresponse is when no data is collected             nonresponse.
at all for a unit, that is the entire data entry (y (i) , x(i) ) is       A more general discussion on missing data is found in
not available for unit i. Second, if some but not all values           the pertinent statistical literature (Little and Rubin, 2019,
in (y (i) , x(i) ) are missing, this is called item nonresponse:       Ch. 1.3), where missingness is categorized into three pat-
i.e., some cells for the i-th data entry are empty. For                terns. The first, missing completely at random (MCAR)
instance, certain parts of a text X or some pixels of an               defines the setting in which missingness depends on nei-
image X are missing, or an annotator did not provide a                 ther Y nor X, that is
label Y for a specific unit. Unit nonresponse is usually                        P(R = 1|y, x) = P(R = 1) = P(R = 1|x).
linked to the representation side in the TSE framework
(Section 5.2), whereas item nonresponse is mostly related              This is sufficient, but not necessary for unbiased naive
to the measurement side. Moreover, record linkage of two               complete-case analysis, as stated above. Second, data are
disparate data sources can cause unit nonresponse (when                called missing at random (MAR), if the propensity of miss-
keeping only units that are recognized to be in both data              ingness depends only on the observed but not on the miss-
sources) or item missingness (when keeping all units, those            ing values. MAR is a helpful concept for univariate anal-
who are only in one data source exhibit item nonresponse               ysis of Y , but not with regard to Y |X: MAR is neither
on the variables from the other source).                               necessary nor sufficient for unbiasedness of naive complete-
   The missing data problem is important for several rea-              case analysis – but the above-mentioned independence
sons. The main worry, addressed below, is that units that              R ⊥⊥ Y |X is. Also, in machine learning, even imputation
suffer from nonresponse tend to be different from those                is problematic when R ̸⊥⊥ Y |X, see Appendix E.2. Fi-
that do not. Second, there is also a practical mandate:                nally, the third missingness pattern is missing not at ran-
unless the missing values are filled in, no prediction can             dom (MNAR), when the propensity of missingness (also)


                                                                  12
Figure 5: Left: Total Survey Error Framework Components (copied from Groves et al., 2009), Right: Total Data
Quality Framework in Machine Learning (Dimensions of TDQ by West et al., 2023 is licensed under CC BY-NC 4.0).


depends on the missing values. This is generally a prob-          certainty is generally larger in the population model. How-
lematic scenario that implies an unspecifiable bias.              ever, in addition to the aforementioned efficiency, one ra-
  Let us now look at the aleatoric uncertainty in the pop-        tionale for the population model is that it is more suitable
ulation model expressed through the variance                      for nonrespondents than the naive complete-case model
                                                                  would be, regarding both, variance and expected value.
(32)
                                                    
         V arY |X (Y |x) = ER|X V arY |X,R (Y |x, r)                 Finally, as in previous sections, we see that what is con-
                   + ER|X bias(x, r)2                             sidered aleatoric uncertainty depends on context: here, on
                                      
                    X                                             how we choose to handle missing data – and the choices
                =         P(R = r|x)V arY |X,R (Y |x, r)          afforded to us by the data situation. In practice, fY |X may
                  r∈{0,1}                                         need to be recovered via weighting or imputation models.
                                                                  To do so, assumptions about the missingness mechanism
                         X
                  +             P(R = r|x)bias(x, r)2 ,
                      r∈{0,1}                                     are required, as the true mechanisms often remain un-
                                                                  known (data uncertainty). The aleatoric and epistemic
where, for r ∈ {0, 1},                                            uncertainty affecting the weighting and imputation mod-
                                                                  els are considered in the Supplementary Material Gruber
(33) bias(x, r) :=EY |X,R (Y |x, R = r) − EY |X (Y |x)            et al..
                                     
                 = [1 − P (R = r|x)] EY |X,R (Y |x, R = r)
                                           
                   − EY |X,R (Y |x, R ̸= r) .                     5.4     Deployment
                                                                  5.4.1    General Setup
First, instead of the conditional variances of the respon-
dents and nonrespondents respectively, the population             When machine learning models are deployed in real-world
model uses their weighted average. Investigating such vari-       applications, possible shifts in the data need to be dealt
ance heterogeneity, possibly aided by auxiliary variables         with. For example, new measurement protocols may be
W (see Appendix E.2), could improve pointwise predictive          in place, or in a new data source the relations learned
uncertainty quantification. Label noise being correlated          by the model may no longer be valid, for instance, due
with response propensity is one possible cause. A more            to changes in true relationships or due to changes in
holistic approach such as the TSE framework (5.2) makes           the data deficiencies and error mechanisms discussed in
it easier to recognize such possible “interactions” among         Section 5.2.     It may also occur that the model pre-
seemingly unconnected sources of uncertainty – here, non-         dictions lead to actual change in real-world behaviours
response and measurement error.                                   (Perdomo et al., 2020). Looking just at the conditional
   Second, the population model exhibits bias for both,           distribution fY |X (y|x) may, thus, oversimplify many is-
respondents and nonrespondents, if the respective condi-          sues in practical machine learning applications, as the
tional expectations EY |X,R differ, which is typically caused     implicit assumption that all observations are drawn in-
by fY |X,R (y|x, R = 1) ̸= fY |X,R (y|x, R = 0), which by         dependently from one single distribution (i.i.d.) does
                         ⊥ Y |X (see Appendix E.1). Setting
(31) is equivalent to R ̸⊥                                        not always hold. More realistically, we have one train-
variance heterogeneity aside, this bias is why aleatoric un-      ing dataset DT r = {(x(i) , y (i) ), i = 1, . . . , nT r }, which is


                                                             13
used to train or fit the model and a separate deployment       called transportability (e.g., Pearl and Bareinboim, 2014 in
dataset DDe = {(x(i) , y (i) ), i = 1, . . . , nDe }, on which the
                                                               the context of structural causal models and Carroll et al.,
previously trained model will be deployed. Note that we        2006, Ch. 2.2.4f. in the measurement error literature).
want to make a clear distinction between testing and de-       It requires that the same relations between variables are
ployment. While Y is readily available in the training         present in each of the environments. If the environments
data, it is typically unavailable during deployment at the     differ in uncontrolled ways, for example, because obser-
time when Y is predicted. Before deployment, it is com-        vational units are allowed to enter a study population
mon to assess the quality of the model and its predictions.    through unknown processes or due to any other source
For this purpose, the trained model is evaluated on test or    of error (see the TSE framework in Section 5.2), exter-
validation data for which Y is available, often obtained by    nal validity and transportability are at risk (Keiding and
a random train-test split of DT r . Both training and de-      Louis, 2016, 2018; Egami and Hartman, 2022).
ployment data can come from different sources and do not          In the machine learning literature, distribution shift,
need to be representative of the same population. For this     dataset shift, or concept drift occurs if the joint distri-
reason, our notation emphasizes that the joint distribution    bution of inputs and outputs differs between the training
can be different in DT r and DDe .                             and deployment stage, i.e., fY,X  Tr      De
                                                                                                     ̸= fY,X (e.g., Quiñonero-
  We want to formalize the previously described problem.       Candela, 2009; Gama et al., 2014; Varshney, 2022). Note
Training observations are drawn from a training (super)        that the terminology and the exact definitions vary. Some-
population according to                                        times there is no differentiation between testing and de-
                                                               ployment and distribution/dataset shift is defined as dif-
(34)                     Tr
        (X, Y, Z)T r ∼ fX,Y,Z  (x, y, z)                       ferences in the joint distribution of Y and X between train-
                     = fYT |X,Z
                           r               Tr
                                (y|x, z) fX|Z  (x|z) fZT r (z) ing and testing. We are, however, interested in the ac-
                                                               tual application/deployment. As a consequence, the con-
and the deployment observations are drawn from                 ditional distributions fYT |Xr
                                                                                               and fYDe|X will often differ as
                                                               well.
(35)                     De
        (X, Y, Z)De ∼ fX,Y,Z   (x, y, z)
                                                                  This lack of transportability is a critical problem for pre-
                         De                De
                     = fY |X,Z (y|x, z) fX|Z   (x|z) fZDe (z). dictive models, as what the model learned during training
                                                               might not be valid during deployment any more and the
The joint distributions fY,X
                          Tr
                              and fY,XDe
                                          follow from (34) and trained model will need to be updated. We discuss several
(35) analogously to the derivation of fY,X in (18). In the scenarios and how they lead to transportability next, es-
same manner, the conditional distributions are                 pecially with regard to the role of Z. We, therefore, assess
                        Z                                      whether the identity fYT |Xr
                                                                                              = fYDe|X holds, i.e., when is the
(36) fYT |X
          r
             (y|x) =          fYT |X,Z
                                   r              Tr
                                       (y|x, z) fZ|X (z|x)dz   conditional distribution fY |X estimated from the train-
                                                                                              Tr
                         z∈Z
                                                               ing data identical to the one present during deployment,
and                                                            fYDe|X ?
                       Z
(37) fYDe|X (y|x) =                              De
                              fYDe|X,Z (y|x, z) fZ|X (z|x)dz.
                         z∈Z
                                                               5.4.3 Identical Super Population

 A machine learning model is trained with data from DT r First, if the two samples D T rand D Deare created in iden-
                                                                                           Tr        De

to approximate fYT |X r
                        ; we denote the trained prediction tical ways, it follows that fX,Y,Z = fX,Y,Z and, then, triv-
                                                               ially, the respective conditional distributions are identical.
model as p̂T r (y|x) = p(y|x; θ̂T r ).                         One simple example of fX,Y,ZTr         De
                                                                                                 = fX,Y,Z   is when an ini-
  In the following section, we study the conditions under tial dataset is randomly split       into multiple  parts, some of
which fYT |X
          r
             and fYDe|X are identical or possibly different, a which are used for training and others for testing. This
common challenge in empirical work.                            train-test split does not correspond to what is meant by
                                                               deploying a model but oftentimes ensures identical distri-
5.4.2 External Validity, Transportability, and butions. This is the scenario that is underlying standard
        Distribution Shift                                     cross-validation.
The available data (DT r ) are only loosely related to the
environment we are interested in (DDe ). There is thus                5.4.4    Component-wise Equivalence
uncertainty about how well the causes and correlations
found in data from the first environment translate to re-             Second, if both components on the right-hand side of (36)
lated situations, i.e., (how well) are the findings from DT r         and (37) are equal, i.e., fYT |X,Z
                                                                                                    r
                                                                                                         = fYDe|X,Z and fZ|X
                                                                                                                          Tr       De
                                                                                                                              = fZ|X  ,
replicable in a different environment?                                then fY |X = fY |X , too. This leads directly to transporta-
                                                                              Tr      De

   Since experiments take place in highly controlled set-             bility. Conversely, if at least one of the components dif-
tings, practitioners often wonder if the lessons learned              fers between (36) and (37), then fYT |X   r
                                                                                                                   and fYDe|X will usu-
therein would still hold true beyond the experimental con-            ally differ. Note that equal marginal distributions of X,
text. Campbell and Stanley (1963) take up this concern                fXTr
                                                                           = fXDe
                                                                                  , are not required.
and examine the validity of various experimental designs,
drawing attention to external validity, i.e., factors imped-          5.4.5    Independence of Z
ing the generalizability of an experiment. One would wish
to take a model, including all its estimated parameters,              Third, if in both populations Y is independent of Z given
from the first environment and apply it in a second envi-             X, denoted as Y ⊥⊥ Z|X, i.e., fYT |X,Z   r
                                                                                                                     = fYT |X
                                                                                                                           r
                                                                                                                              and
ronment without bias. This feature of a model has been                fY |X,Z = fY |X , then the right-hand sides in (36) and (37)
                                                                       De         De



                                                                 14
simplify to fYT |X
                 r
                   and fYDe|X , respectively. This implies that       dataset are in any way special, but are representative of
the distributions of Z, fZ|XTr
                                   and fZ|X
                                         De
                                              , become irrelevant.    decisions others would make if they had images like ours.
In other words: to learn the conditional distributions fYT |X   r     Therefore, fYT |X,Z
                                                                                        r
                                                                                             ≈ fYDe|X,Z is a reasonable approxima-
                                                                      tion.
and fY |X , variables Z which contain no additional infor-
       De
                                                                         Let us now consider the deployment of the model. A
mation about Y beyond what is already contained in X
                                                                      photographer decides to train a machine learning model
can be safely ignored – even when X is not independent of
                                                                      with animal pictures taken in Europe. She wants to use
Z. This might be the case when Y is obtained by annotat-
                                                                      the trained model p̂T r (y|x) to label new pictures from her
ing X, e.g., in image classification, where human annota-
                                                                      latest safari tour. As we have argued, fYT |X,Zr
                                                                                                                          = fYT |X
                                                                                                                                r
                                                                                                                                   and
tors do not have access to Z, and the labels Y rely entirely
on the images X. Yet, assuming Y ⊥         ⊥ Z|X does not yield       fY |X,Z ≈ fY |X,Z are reasonable assumptions. It thus fol-
                                                                        Tr         De

transportability on its own, as the simplified distributions          lows that fYT |Xr
                                                                                          ≈ fYDe|X . The photographer can therefore
fYT |X
    r
       and fYDe|X can still differ.                                   use the data from European cities to train a model for
   As a recipe to ensure fYT |X,Zr
                                       = fYDe|X,Z holds, one may      African animals from the safari and does, in theory with
                                                                      infinite-sized samples, not need to worry about distribu-
include in the vector (X, Z) all variables that could pos-
                                                                      tion shift or transportability.
sibly affect Y (the unobserved Z is likely to be high-
                                                                         This framework depends on probability distributions,
dimensional). Such a model would make, apart from esti-
                                                                      which would need to be estimated. In practice, there will
mation uncertainty, an optimal prediction p̂T r (y|x, z) for
                                                                      be high estimation uncertainty (see Sections 3.1 and 3.2)
every single observation, meaning that the predictive ac-
                                                                      for classes with little observed data and the model might
curacy of fY |X,Z could not be improved upon. In par-
                                                                      perform better for animals that were more frequent in the
ticular, as long as fYT |X,Z
                        r
                               ̸= fYDe|X,Z , there are additional
                                                                      training data. Transportability remains an issue. Unequal
environment-related variables Z that affect Y and that
                                                                      subgroup accuracy might lead to varying uncertainty lev-
would need to be included, until
                                                                      els of a model and, thus, varying reliability. This would
                 fY |X,Z = fYT |X,Z
                               r
                                    = fYDe|X,Z .                      only cause minor inconvenience in an automated animal
                                                                      picture classification but can lead to major fairness issues,
One might call fY |X,Z the true model since the relation              if, for example, humans are underrepresented according
remains the same across environments. In practice, how-               to sensitive attributes, like gender, age, race, or health
ever, this model can hardly be built, since the constructs            status.
that would need to be included in (X, Z) are rarely known,               If however, the model is applied to animals that did not
and their measurement is an even greater challenge. Ex-               exist in the training data, e.g., images of zebras, we are
tensive expert knowledge would be needed to develop this              facing issues with out of distribution or out of data (OOD)
model, even if just a very rough approximation of it may              samples (Ren et al., 2019; Malinin and Gales, 2018). Note
be feasible. In fact, the recipe provided has little practical        that there are ambiguous definitions of the term out of
value, but its argument should remind readers that de-                distribution. See Farquhar and Gal (2022) for a discussion.
tailed (expert) knowledge is key to finding all the relevant             The two assumptions Y ⊥⊥ Z|X and fYT |X,Z      r
                                                                                                                            = fYDe|X,Z
and measurable variables X that ensure transportability.              are often violated in practice. Consider, as another ex-
All kinds of uncertainty have to be dealt with, and so the            ample, customer reviews about a product. The customers
model may even focus on the stylized facts, while neglect-            have their personal opinion Z about the product, which
ing predictive performance.                                           remains an unobserved variable. The customer writes a
                                                                      review, the text data X. She also ticks a star rating
                                                                      Y ∈ {1 star , . . . , 5 stars} as a rough summary of how
5.4.6    Examples
                                                                      much she recommends the product to others. The ques-
Consider image classification of animal photos as an exam-            tion is: Would customers always describe their full reason-
ple. Let therefore X be the pixels in a photo of an animal,           ing for why they choose a specific star rating? Or would
Y the annotated label of the depicted animal, and Z its               customers “forget” to mention some thoughts (Z) in the
true species. We take a convenience sample of animals                 reviews, but still decide on a star rating based on unmen-
living in European cities, implying that some of the most             tioned thoughts? If the latter is the case, Y will depend
frequent species in fZT r are cats, dogs, and pigeons. In             not just on X but also on Z. Therefore, the conditional
addition, the training data contains photos of elephants              independence assumption fYT |X,Z  r
                                                                                                            = fYT |X
                                                                                                                  r
                                                                                                                       would not hold
and giraffes taken in a zoo. Most annotators will easily              in this example. Similar issues will arise whenever the
identify the correct animal from the picture, but some un-            labellers, i.e., the persons selecting the Y -values, have ac-
intentional labelling errors might occur. Also, some dogs             cess to relevant information that is not included in X.
may look like cats and confusion would increase if pictures           For instance, a labeller annotates a low-resolution image
of wolves and wildcats were included as well. The proba-              X and classifies this into category Y , but she has a high-
bilistic framework allows for such mislabelling of species.           resolution image Z as an additional information source
As we can only make use of the pictures to obtain la-                 available.
bels (a zoological examination of all animals to determine               In our final example, occupation coding, scientists and
the true species z is not possible), it is safe to assume             statistical institutes around the world wish to measure
fYT |X,Z
    r
         = fYT |X
               r
                  , at least if the annotators do not know            and label the occupations people have. Simplifying the
the location from which the pictures originate. Moreover,             real challenges involved, X is what respondents describe
due to reasonable diligence among annotators and shared               verbally when asked about their job in a survey. Their
knowledge of what each animal looks like, we have no rea-             descriptions are often short, maybe just a job title, al-
son to believe that the labelling decisions in our training           though, ideally, one would want to capture the ground


                                                                 15
truth Z which is, roughly speaking, all the different tasks      and epistemic uncertainty.
and duties people do in their job. Labelling experts se-            We did not put emphasis on quantifying uncertainty.
lect the most appropriate label Y from a classification          This apparently would be the next step. However, be-
scheme, based on the input texts X. Since the labelling          fore quantifying uncertainty, it is necessary to allocate the
experts do not have access to the ground truth Z, the con-       possible sources. Moreover, we remained with probability
ditional independence assumption fYT |X,Z
                                       r
                                             = fYT |X
                                                   r
                                                      holds.     paradigm (18), which itself is a model. We refer to Walley
However, social scientists skilled in content analysis are       (2000) or Augustin et al. (2014) for an alternative utilizing
very much aware that accurate coding requires appropri-          imprecise probabilities.
ate training. Not only are the labellers expected to fol-           Moreover, we also did not focus on (algorithmic) fairness
low formalized coding instructions that they learn during        issues in machine learning which are connected to uncer-
theoretical training, but they also adopt informal, unwrit-      tainty as well as bias and its sources. Though this topic
ten rules from their peers during work (Hak and Bernts,          is of central importance and most topics in Sections 4 and
1996). Massing et al. (2019) report a 57% agreement rate         5 can be extended to discuss fairness, we considered it to
when experts from different institutes code the same oc-         be beyond the scope of this paper. We refer to Mehrabi
cupations. Due to institute-specific factors, this rate in-      et al. (2021) for a survey of this topic, see also Bothmann
creases substantially to ∼71% and 84%, depending on the          et al. (2022).
institute, if agreement is measured between two experts
from the same institute. All this means that a num-
ber of systematic factors related to the labelling process       A       Overparameterized models (p >
but unrelated to X affect the final labelling decision. As
the distributions of fY |X,Z differ between institutes, the              n)
trained model is not transportable from one institute to
the other. In addition, the low rates of agreement and           A.1      Kullback-Leibler Divergence in Over-
the challenges of obtaining sufficiently large amounts of                 parameterized Models
training data have hindered the large-scale deployment of
machine learning models for occupation coding (Schierholz        In this section, we look at the Kullback-Leibler divergence
and Schonlau, 2020). Those examples showed how com-              for overparameterized models and the effect of regulariza-
plex it might be to assess transportability in the real life     tion. Taylor series expansion of (11) yields
deployment of predictive models, and thus the difficulty
of assessing a model’s uncertainty.                                         ∂lpen (θ̂pen )
                                                                 (38)    0=
                                                                                 ∂θ
                                                                            ∂l(θ0 ) ∂ log pθ (θ0 ) ∂ 2 lpen (θ)
                                                                         ≈          +             +             (θ̂pen − θ0 )
6    Conclusion                                                               ∂θ           ∂θ        ∂θ ∂θT              
                                                                                        −1        ∂l(θ0 ) ∂ log pθ (θ0 )
                                                                     ⇐⇒ θ̂pen − θ0 ≈ Ipen,n (θ0 )        −
We conclude our discussion by emphasizing that uncer-                                               ∂θ            ∂θ
tainty has multiple sources and ignoring it can have severe
consequences on the validity of trained machine learning         with
models. We looked at this question from a mainly statis-
tical point of view and aimed to relate the discussion to        (39)                                            Ipen,n (θ0 ) =
traditional fields in statistics.                                   X n Z  2         (i)
                                                                           ∂ log p(y|x ; θ0 )
                                                                                                          
                                                                                                                  ∂ 2 log p(θ0 )
                                                                                                     (i)
   The key takeaways are: First, probability models are           −                           f (y|x     )  dy +
                                                                                ∂θ ∂θT                               ∂θ ∂θT
in our view a centrepiece to describe and define aleatoric          i=1

uncertainty. Second, the common definition of epistemic             Note that Ipen,n depends on the design points
uncertainty as the “remaining uncertainty” is vague and          x(1) , . . . , x(n) but not on the response variables
therefore of limited value. The bias-variance decompo-           y (1) , . . . , y (n) . We simplify this further by assuming
sition provides a possible mathematical formalization of         a random design x(i) ∼ f (x) so that we can write
the idea. We note, however, that the additive formula
“aleatoric uncertainty + epistemic uncertainty = total un-                                               ∂ 2 log pθ (θ0 )
certainty” is not universally valid. Third, contrary to          (40)         Ipen,n (θ0 ) ≈ nI(θ0 ) +
                                                                                                             ∂θ ∂θT
claims from machine learning about the flexibility of deep
learning models, we argue that model uncertainty remains         where
an issue if the available data are not suitable to infer the
desired relationship between variables. Omitted variables,                                  ∂ 2 log p(y|x; θ0 )
                                                                                      Z Z
                                                                 (41)    I(θ0 ) = −                             f (y|x)f (x)dy dx
measurement errors, and non- i.i.d. data are our partic-                                          ∂θ ∂θT
ular concern. Fourth, we point to additional sources of
uncertainty: the ones summarized in the TSE framework,           is the (expected) Fisher matrix for random design points
the challenges around missing data, or when deploying ma-        x.
chine learning solutions in changing environments. Read-            Looking at the Kullback-Leibler divergence we can
ers will easily identify others. All this shows that a simple    rewrite the decomposition (12) using second order Tay-
decomposition of uncertainty into aleatoric and epistemic        lor series expansion and utilizing (38) in combination with
does not do justice to a much more complex constellation         (40) to obtain the derivation in Table 2.
with multiple sources of uncertainty. It is crucial to ex-          Taking the expectation of the second component with
plore how various sources of uncertainty relate to aleatoric     respect to Y and x uncovers the classical bias-variance


                                                            16
                         Table 2: Second order Taylor series expansion of expected KL divergence.

    n                           o
  EX KL(f (·|x), p(·|x; θ̂pen ))
                                    1
    ≈EX {KL(f (·|x), p(·|x; θ0 ))} + (θ̂pen − θ0 )I(θ0 )(θ̂pen − θ0 )
                                    2 (
                                                                                                                                                                                T )
                                                   −1                −1                 ∂l(θ0 ) ∂ log p(θ0 )                            ∂l(θ0 ) ∂ log p(θ0 )
    ≈ EX {KL(f (·|x), p(·|x; θ0 ))} + tr          Ipen,n (θ0 )I(θ0 )Ipen,n (θ0 )               +                                               +
      |          {z               }                                                       ∂θ        ∂θ                                    ∂θ        ∂θ
                  1                   |                                                         {z                                                                                            }
                                                                                                        2




trade-off and we get                                                                EX{KL(f( ⋅ |x), p( ⋅ |x, θ^pen))}, Eq. (12)                 EX{KL(f( ⋅ |x), p( ⋅ |x, θ^pen))}, Eq. (12)

                                                  
       −1                −1                 ∂l(θ0 )
  tr Ipen,n  (θ0 )I(θ0 )Ipen,n (θ0 )V ar                +
                                              ∂θ                                0          50          100         150            200       0          50          100         150            200
                                                                
          −1               −1          ∂ log p(θ0 ) ∂ log p(θ0 )
    tr Ipen,n  (θ0 )I(θ0 )Ipen,n (θ0 )                                                              Eq. (13)                                                    Eq. (13)
                                           ∂θ           ∂θT
     =: V (θ0 ) + B(θ0 )
                                                                                0          50          100         150            200       0          50          100         150            200
The variance term itself decreases with increasing model
complexity. If dimension p is increased, the penalty term                                           Eq. (14)                                                    Eq. (14)

in (40) gets dominant in V (θ0 ) which in turn leads to
decreases for increasing p.
                                                                                0          50          100         150            200       0          50          100         150            200
                                                                                                        p                                                           p
A.1.1     Generalized Inverse as Prior
                                                                               (a) decreasing coefficients                                  (b) constant coefficients
We first show, that the generalized inverse can be refor-
mulated as imposing a prior on β. Let X = UΛVT be Figure 6: KL divergence depending on number of parame-
a singular value decomposition of X, where U ∈ Rn×n , ters using ridge regression. Left setting a), i.e. decreasing
Λ = diag(λ1 , . . . , λn ) and V ∈ Rp×n . Here U and V are coefficients, right setting b), i.e. constant coefficients
eigenvectors of XT X and XXT , respectively, and Λ is the
diagonal matrix of the n positive eigenvalues. We can ex-
tend matrix V through V̄ such that (V, V̄) is a full rank B       Omitted Variables
basis of the R and V V̄ = 0 and V̄ V̄ = Ip−n . Assum-
              p           T            T

ing now the improper prior β ∼ N (0, (V̄V̄T )− ) leads with Comparison            of      V arY |X,Z (Y |x, z)       and
(10) to the penalized likelihood                            V arY |X (Y |x)
                1                    1                                      Let x be an arbitrary value with fZ|X (z|x) > 0 for some
    lpen (β) = − (y − Xβ)T (y − Xβ) − β T (V̄ V̄ T )β                       z.
                2                    2
which is maximized through                                                  Case 1: Let the conditional variance in the full model
                        T            T −1     T                             be constant for all z with fZ|X (z|x) > 0 and let it exist.
           β̂pen = (X X + V̄ V̄ )           X y                             Then,
                 = (V Λ2 V T + V̄ V̄ T )−1 V ΛU T y
                                                                                           EZ|X (V ar(Y |x, z)) = V arY |X,Z (Y |x, z)
                 = (V Λ−2 V T )V ΛU T y
                                                                            for all z with fZ|X (z|x) > 0. As the expected squared
                 = (X T X)− X T y.                                          bias must be non-negative, it follows from (22) that
                                                                            V arY |X,Z (Y |x, z) ≤ V arY |X (Y |x) for all x and all z with
A.1.2     Ridge Prior                                                       fZ|X (z|x) > 0. Further,
We rerun the simulations shown in Section 3.3 but now                                            V arY |X,Z (Y |x, z) < V arY |X (Y |x)
using a simple ridge prior. We impose β ∼ N (0, σβ2 Ip )
                √                                                           for all z with fZ|X (z|x) > 0 among those x with positive
with σβ2 set to 10. The rest of the simulation setup is                     expected squared bias.
unchanged and we show in Figure 6 the resulting com-
ponents of the Kullback-Leibler Divergence. Apparently,
                                                                            Case 2: Contrary to case 1, let the conditional vari-
the interpretation of the clearly exposed second minimum
                                                                            ance in the full model now not be constant for all z with
remains unchanged with the change of the penalty.
                                                                            fZ|X (z|x) > 0 and let it exist.
                                                                              Then, because of the monotonicity of the expected value
                                                                            operator, there exist z̄ and z with fZ|X (z̄|x) > 0 and
                                                                                                                                        ¯
                                                                            fZ|X (z |x) > 0 such that
                                                                                    ¯
                                                                                                                                                                                     
                                                                                    V arY |X,Z (Y |x, z̄) > EZ|X V arY |X,Z (Y |x, z)


                                                                       17
and also                                                                 Second, Y may influence X, e.g., when Y is temporally
                                                                     situated before X. In such a case, there would be an
      V arY |X,Z (Y |x, z ) < EZ|X V arY |X,Z (Y |x, z) .             additional arrow X ←− Y in Figure 3.
                       ¯
                                                                         We note that traditional errors-in-variables models
By plugging the second inequality into (22) and minding               make this independence assumption. It may not be satis-
the non-negative expected squared bias, we see that                   fied in every setting.
  V arY |X (Y |x) > V arY |X,Z (Y |x, z ) + EZ|x bias(x, z)2
                                                             
                                     ¯
                 ≥ V arY |X,Z (Y |x, z ).                             D      Errors in Y
                                     ¯

  That is, for all x there exist z , with fZ|X (z |x) > 0,            D.1     Unbiased Classification
                                       ¯           ¯
for which the conditional variance in the full model is               We consider multi-class prediction with true values Z and
smaller than the conditional variance in the omitted vari-            observed, error-prone values Y .
able model.                                                              The sum in (26) can be split: either Z = υ or Z ̸= υ.
  For z̄, we get                                                      Next, we use that, since the probabilities always add to 1,
                                                                      PY |X,Z (Y = υ|X = x, Z = z) = 1 − PY |X,Z (Y ̸= υ|X =
 V arY |X (Y |x) < V arY |X,Z (Y |x, z̄) + EZ|X bias(x, z)2 .
                                                           
                                                                      x, Z = z) for all values of z, and hence also for z = υ.
Thus, in order for V arY |X (Y |x) < V arY |X,Z (Y |x, z̄) to be
fulfilled, the expected squared bias must be small enough (42)
relative to the difference in the conditional variances: e.g., PY |X (Y = υ|X = x)
the bias may be zero. That such values z̄ can exist but            X
                                                                 =     PY |X,Z (Y = υ|X = x, Z = z)PZ|X (Z = z|X = x)
do not have to, is best demonstrated by two examples.
                                                                   z∈Z
Consider a linear true relationship,
                                                                 = PY |X,Z (Y = υ|X = x, Z = υ)PZ|X (Z = υ|X = x)
   Y = β0 + βX X + βZ Z + ϵ, ϵ ∼ N (0, V ar(Y |x, z)) .            + PY |X,Z (Y = υ|X = x, Z ̸= υ)PZ|X (Z ̸= υ|X = x)
                                                                                                    
Let Z ∈ {0, 1} be binary and P(Z = 1|x), P(Z = 0|x) > 0. = 1 − PY |X,Z (Y ̸= υ|X = x, Z = υ) PZ|X (Z = υ|X = x)
   First, if βZ = 0, then bias(x, z) = 0 ∀x, z. Letting            + PY |X,Z (Y = υ|X = x, Z ̸= υ)PZ|X (Z ̸= υ|X = x)
V ar(Y |x, z = 0) < V ar(Y |x, z = 1), it follows that           = PZ|X (Z = υ|X = x)
V ar(Y |x, z = 1) >P(Z = 0|x)V ar(Y |x, z = 0)                            − PY |X,Z (Y ̸= υ|X = x, Z = υ)PZ|X (Z = υ|X = x)
                                                                            |                       {z                    }
                     + P(Z = 1|x)V ar(Y |x, z = 1)                                        PY,Z|X (Y ̸=υ,Z=υ|X=x)

                     = EZ|x (V ar(Y |x, z)) + 0 = V ar(Y |x)              + PY |X,Z (Y = υ|X = x, Z ̸= υ)PZ|X (Z ̸= υ|X = x)
                                                                            |                      {z                      }
                                                                                          PY,Z|X (Y =υ,Z̸=υ|X=x)
and the desired z̄ exists: z̄ = 1.
   Second, let X and Z be independent. Further, to make               = PZ|X (Z = υ|X = x)
calculations simpler, let βZ = 1, P(Z = 1) = P(Z = 0) =                   + PY,Z|X (Y = υ, Z ̸= υ|X = x)
0.5, and V ar(x, z = 0) = 0.1 < 0.2 = V ar(x, z = 1).                     − PY,Z|X (Y ̸= υ, Z = υ|X = x)
Thus, EZ|x (V ar(Y |x, z)) = 0.15. Further, for the omit-
ted variable model, Y = β̃0 + β̃X X + ϵ̃, it is estab-                  For binary classification, simply replace “= υ” with “=
lished (Fahrmeir et al., 2022, Ch. 3.4.1; Wooldridge, 2005,           1” and replace “̸= υ” with “= 0” everywhere to arrive at
Ch. 4.3.1) that then β̃0 = β0 + P(Z = 1)βZ and β̃X = βX .             equation (27).
Thus, the absolute bias is constant,    |bias(x, z)| = 0.5|βZ |,        For unbiased binary classification, (27) needs to hold
and hence EZ|x bias(x, z)2 = 0.25βZ2 = 0.25. Therefore,
                              
                                                                      for every x. For unbiased multi-class classification, (28)
0.1 ≤ V ar(Y |x, z) ≤ 0.2 < 0.4 = 0.15 + 0.25 = V ar(Y |x):           must hold for every x and also for every υ in the support:
the conditional variance for all z is smaller in the full model       the number of necessary assumptions is thus multiplied
than in the omitted variable model, i.e., the desired z̄ does         with a factor equal to the size of the support minus 1; as
not exist.                                                            the probabilities sum to 1, the last probability is already
                                                                      determined. This is also why it is sufficient to write (27)
                                                                      only for one value, υ = 1.
C     Errors in X
Discussion of the Assumption of Indepen- D.2                                  The Role of Conditional Error Equal-
dence of Y and X given Z                                                      ity
If Y is not independent of X given Z, then X contains Assume that the conditional error probabilities are iden-
information about Y that is not contained in the error-free tical,
features Z. We see two possible reasons for this scenario.
   First, X (also) contains omitted variables, i.e., features (28) PY |X,Z (Y = 1|X = x, Z = 0) =
that influence Y and that are not part of Z. However, that                  |         {z     }
                                                                                 false Y = 1
is not how we constructed Z in our setup. In addition, we
do not want to add an omitted variable problem on top of           PY |X,Z (Y = 0|X = x, Z = 1) =: c(x).
                                                                            |         {z     }
a measurement error problem in this section.                                     false Y = 0



                                                                 18
The bias does not vanish unless the marginal conditional 1) = fY |X,R (y|x, R = 0) follows from (31) and (31’):
probabilities PZ|X (Z = 0|X = x) and PZ|X (Z = 1|X = x)
                                                              fY |X,R (y|x, R = 1) =fY |X,R (y|x, R = 0)    ⇔
are also identical:
                                                                    P(R = 1|y, x) 1 − P(R = 1|y, x)
(43)                                                                               =                        ⇔
                                                                     P(R = 1|x)        1 − P(R = 1|x)
  biasY |X (Y = 1|X = x)                                            P(R = 1|y, x) =P(R = 1|x)
   = PY,Z|X (Y = 1, Z = 0 |X = x)
              |     {z   }
               false Y = 1                                        Differences between Respondents, Nonre-
      − PY,Z|X (Y = 0, Z = 1 |X = x)                              spondents, and the Population Average
                |   {z     }
                 false Y = 0
                                                                  Using (31) and (31’), it follows that the conditional inde-
    = PY |X,Z (Y = 1|X = x, Z = 0)PZ|X (Z = 0|X = x)
                                                                  pendence of missingness and Y given X is sufficient for no
      − PY |X,Z (Y = 0|X = x, Z = 1)PZ|X (Z = 1|X = x)            difference between the conditional expectations of respon-
                                                                  dents and nonrespondents, respectively:
                                                   
    = c(x) PZ|X (Z = 0|X = x) − PZ|X (Z = 1|X = x) .
                                                                     EY |X,R (Y |x, R = 1) − EY |X,R (Y |x, R = 0)
With equal and positive conditional error probability                Z
c(x) > 0, unbiasedness is only possible iff the term in
                                                                                                                     
                                                                    = y fY |X,R (Y |x, R = 1) − fY |X,R (Y |x, R = 0) dy
parentheses is zero, i.e., iff PZ|X (Z = 0|X = x) =
PZ|X (Z = 1|X = x). As these two complementary proba-
                                                                                                                   
                                                                                  P(R = 1|y, x) 1 − P(R = 1|y, x)
                                                                     Z
                                                                    = yfY |X                   −                      dy
bilities must also sum to 1, we have                                               P(R = 1|x)       1 − P(R = 1|x)
                                                                                P(R = 1|y, x) − P(R = 1|x)
                                                                     Z
(29) PZ|X (Z = 1|X = x) = 0.5 = PZ|X (Z = 0|X = x),                 = yfY |X                                  dy.
                                                                               P(R = 1|x) (1 − P(R = 1|x))
i.e., the binary classification problem must be exactly bal-      Conditional independence is not necessary, however: in
anced for the bias to vanish. As the two conditional              particular, Y |x, R = 1 and Y |x, R = 0 may have the same
marginal probabilities in (29) must be equal to 0.5 for           expectation, but one may have a larger variance. By (33),
all x, this implies independence of X.                            this translates to the same statements about a difference
                                                                  between respondents and the population average or a dif-
                                                                  ference between nonrespondents and the population aver-
E      Missing Data                                               age.

E.1     Some Formal Background                                    E.2    Discussion of Missing At Random
Proof Sketch for (31)                                                    (MAR) Data
We use the definition of a conditional density/probability   On the one hand, regardless of whether Y is observed or
repeatedly:                                                  not: as stated in the discussion of (31), if missingness
                                                             depends on Y given X, the bias factor is not equal to 1. On
                           fX,Y,R (x, y, R = 1)              the other hand, if missingness is independent of Y given
    fY |X,R (y|x, R = 1) =                                   X, P(R = 1|y, x) = P(R = 1|x), then by (31) unbiasedness
                             fX,R (x, R = 1)
                           fR|X,Y (R = 1|x, y)fX,Y (x, y)    is already guaranteed; splitting X = (Xmiss , Xobs ) into a
                         =                                   missing and an observed part and imposing the stronger
                               fR|X (R = 1|x)fX (x)          MAR assumption, P (R|xobs , xmiss ) = P (R|xobs ), provides
                           fR|X,Y (R = 1|x, y)               no additional benefit. In sum, MAR is neither necessary
                         =                      fY |X (y|x)
                             fR|X (R = 1|x)                  nor sufficient.
                           P(R = 1|y, x)                        Furthermore, in predictive modelling, using Y in an im-
                         =                fY |X (y|x).       putation model for missing feature values X often con-
                            P(R = 1|x)
                                                             stitutes impermissible target leakage (Ghani and Schier-
The requirements fR|X (R = 1|x) = P(R = 1|x) > 0 and holz, 2020, Ch. 7.8.1). (In traditional statistical analy-
fX (x) > 0 are naturally met since otherwise we could have sis, i.e., in estimation instead of prediction, this is not
never data for x.                                            a problem.) One way out are additional variables W ,
                                                             correlated with both, R and Y conditional on X, that
                                                             break the conditional dependence of response and out-
Equivalence of R ̸⊥⊥ Y |X and fY |X,R (y|x, R = come: P(R = 1|y, x, w) = P(R = 1|xobs , w). Auxiliary
1) = fY |X,R (y|x, R = 0)                                    information such as paradata (Kreuter, 2013; Schenk and
                                                             Reuß, 2023) are an example for such W that helps to re-
Analogously to (31), we get
                                                             cover fY |X , but would not be used as features X in the
                                P(R = 0|y, x)                prediction model. In fact, for unit nonresponse the MAR
(31’)    fY |X,R (y|x, R = 0) =                  fY |X (y|x) concept makes only sense in the presence of such W .
                                  P(R = 0|x)
             1 − P(R = 1|y, x)
          =                    fY |X (y|x).
               1 − P(R = 1|x)                                Funding
Assuming fY |X (y|x) > 0, the equivalence of the condi- CG is supported by the DAAD programme Konrad Zuse
tional independence implied by (31) and fY |X,R (y|x, R = Schools of Excellence in Artificial Intelligence, sponsored


                                                             19
by the Federal Ministry of Education and Research. D. T. Campbell and J. C. Stanley. Experimental and
POS is supported in part by the Federal Statistical Of- Quasi-Experimental Designs for Research. Rand Mc-
fice of Germany. MS has been partially funded by        Nally, Chicago, IL, 1963.
the Deutsche Forschungsgemeinschaft (DFG, German Re-
search Foundation) as part of BERD@NFDI - grant num- R. J. Carroll, D. Ruppert, L. A. Stefanski, and C. M.
ber 460037581.                                          Crainiceanu. Measurement Error in Nonlinear Models:
                                                        A Modern Perspective. Chapman and Hall/CRC, Boca
                                                        Raton, FL, 2nd edition edition, 2006.
References                                                       V. Chernozhukov, C. Cinelli, W. Newey, A. Sharma, and
M. Abdar, F. Pourpanah, S. Hussain, D. Rezazadegan,                V. Syrgkanis. Omitted variable bias in machine learned
  L. Liu, M. Ghavamzadeh, P. Fieguth, X. Cao, A. Khos-             causal models. arXiv preprint arXiv:2112.13398, 2021.
  ravi, U. R. Acharya, V. Makarenkov, and S. Naha- T. Ching, D. S. Himmelstein, B. K. Beaulieu-Jones, A. A.
  vandi. A review of uncertainty quantification in deep    Kalinin, B. T. Do, G. P. Way, E. Ferrero, P.-M. Agapow,
  learning: Techniques, applications and challenges. In-   M. Zietz, M. M. Hoffman, W. Xie, G. L. Rosen, B. J.
  formation Fusion, 76:243–297, December 2021. doi:        Lengerich, J. Israeli, J. Lanchantin, S. Woloszynek,
  10.1016/j.inffus.2021.05.008.                            A. E. Carpenter, A. Shrikumar, J. Xu, E. M. Cofer,
C. C. Aggarwal, X. Kong, Q. Gu, J. Han, and S. Y. Philip.  C. A. Lavender, S. C. Turaga, A. M. Alexandari, Z. Lu,
  Active learning: A survey. In Data Classification, pages D. J. Harris, D. DeCaprio, Y. Qi, A. Kundaje, Y. Peng,
  599–634. Chapman and Hall/CRC, 2014.                     L. K. Wiley, M. H. S. Segler, S. M. Boca, S. J. Swami-
                                                           dass, A. Huang, A. Gitter, and C. S. Greene. Op-
H. Akaike. Information theory and an extension of the      portunities and obstacles for deep learning in biology
  maximum likelihood principle. Selected papers of hiro-   and medicine. Journal of The Royal Society Interface,
  tugu akaike, pages 199–213, 1998.                        15(141):20170387, April 2018. doi: 10.1098/rsif.2017.
R. Andersen, J. Kasper, and M. R. Frankel. Total Survey    0387. URL https://royalsocietypublishing.org/
  Error: Applications to Improve Health Surveys. The       doi/full/10.1098/rsif.2017.0387.
  Jossey-Bass social and behavioral science series. Jossey- L. Clarté, B. Loureiro, F. Krzakala, and L. Zdeborová. A
  Bass, San Francisco, 1st edition, 1979. ISBN 978-0-         study of uncertainty quantification in overparametrized
  87589-409-6.                                                high-dimensional models, October 2022. URL http:
T. Augustin, F. P. Coolen, G. De Cooman, and M. C.            //arxiv.org/abs/2210.12760.
  Troffaes. Introduction to imprecise probabilities. John        C. S. Davis. Statistical methods for the analysis of re-
  Wiley & Sons, 2014.                                              peated measurements. Technical report, Springer, 2002.
P. L. Bartlett and M. H. Wegkamp. Classification with A. C. Davison. Statistical models, volume 11. Cambridge
  a reject option using a hinge loss. Journal of Machine      university press, 2003.
  Learning Research, 9(59):1823–1840, 2008. URL http:
  //jmlr.org/papers/v9/bartlett08a.html.                   J. De Fauw, J. R. Ledsam, B. Romera-Paredes, S. Nikolov,
                                                              N. Tomasev, S. Blackwell, H. Askham, X. Glorot,
P. L. Bartlett, A. Montanari, and A. Rakhlin. Deep learn-
                                                              B. O’Donoghue, D. Visentin, G. van den Driessche,
  ing: a statistical viewpoint. Acta numerica, 30:87–201,
                                                              B. Lakshminarayanan, C. Meyer, F. Mackinder, S. Bou-
  2021.
                                                              ton, K. Ayoub, R. Chopra, D. King, A. Karthike-
R. M. Battleday, J. C. Peterson, and T. L. Griffiths. Cap-    salingam, C. O. Hughes, R. Raine, J. Hughes, D. A.
  turing human categorization of natural images by com-       Sim, C. Egan, A. Tufail, H. Montgomery, D. Hass-
  bining deep networks and cognitive models. Nature com-      abis, G. Rees, T. Back, P. T. Khaw, M. Suleyman,
  munications, 11(1):5418, 2020.                              J. Cornebise, P. A. Keane, and O. Ronneberger. Clini-
                                                              cally applicable deep learning for diagnosis and refer-
E. Begoli, T. Bhattacharya, and D. Kusnezov. The need         ral in retinal disease. Nature Medicine, 24(9):1342–
  for uncertainty quantification in machine-assisted med-     1350, September 2018. ISSN 1078-8956, 1546-170X.
  ical decision making. Nature Machine Intelligence, 1        doi: 10.1038/s41591-018-0107-6. URL http://www.
  (1):20–23, January 2019. ISSN 2522-5839. doi: 10.           nature.com/articles/s41591-018-0107-6.
  1038/s42256-018-0004-1. URL http://www.nature.
  com/articles/s42256-018-0004-1.                          Y. Dgani, H. Greenspan, and J. Goldberger. Training a
                                                              neural network based on unreliable human annotation
M. Belkin, D. Hsu, S. Ma, and S. Mandal.              Rec-    of medical images. In 2018 IEEE 15th International
  onciling modern machine-learning practice and the           Symposium on Biomedical Imaging (ISBI 2018), pages
  classical bias–variance trade-off. Proceedings of the       39–42. IEEE, 2018.
  National Academy of Sciences, 116(32):15849–15854,
  2019. ISSN 0027-8424, 1091-6490. doi: 10.1073/pnas. B. Efron. Prediction, estimation, and attribution. Inter-
  1903070116. URL https://pnas.org/doi/full/10.               national Statistical Review, 88:S28–S59, 2020.
  1073/pnas.1903070116.
                                                           N. Egami and E. Hartman. Elements of External Valid-
L. Bothmann, K. Peters, and B. Bischl.            What is     ity: Framework, Design, and Analysis. American Po-
  fairness?     implications for fairml.  arXiv preprint      litical Science Review, pages 1–19, 2022. doi: 10.1017/
  arXiv:2205.09622, 2022.                                     S0003055422000880.


                                                            20
R. El-Yaniv and Y. Wiener.          On the Foundations I. Goodfellow, Y. Bengio, and A. Courville. Deep learning.
  of Noise-free Selective Classification.       Journal of     MIT Press, 2016.
  Machine Learning Research, 11(53):1605–1641, 2010.
                                                             R. M. Groves. Three Eras of Survey Research. Public
  ISSN 1533-7928. URL http://jmlr.org/papers/v11/
                                                               Opinion Quarterly, 75(5):861–871, 12 2011a.
  el-yaniv10a.html.
                                                             R. M. Groves.         ‘Designed Data’ and ‘Organic
L. Fahrmeir, T. Kneib, S. Lang, and B. D. Marx. Re-
                                                               Data’,   2011b.        URL https://www.census.
  gression: Models, Methods and Applications. Springer,
                                                               gov/newsroom/blogs/director/2011/05/
  Berlin/Heidelberg, Germany, 2nd edition, 2022.
                                                               designed-data-and-organic-data.html. US Cen-
J. Fan, C. Ma, and Y. Zhong. A selective overview of           sus, Director’s Blog, entry on 2011-05-31, accessed
  deep learning. Statistical science: a review journal of      2022-07-27.
  the Institute of Mathematical Statistics, 36(2):264, 2021. R. M. Groves and L. Lyberg.          Total Survey Er-
S. Farquhar and Y. Gal. What ’out-of-distribution’ is and           ror: Past, Present, and Future.      Public Opinion
   is not. In NeurIPS ML Safety Workshop, 2022. URL                 Quarterly, 74(5):849–879, January 2010. ISSN 0033-
   https://openreview.net/forum?id=XCS_zBHQA2i.                     362X, 1537-5331. doi: 10.1093/poq/nfq065. URL
                                                                    https://academic.oup.com/poq/article-lookup/
V. Fortuin. Priors in bayesian deep learning: A review.             doi/10.1093/poq/nfq065.
  International Statistical Review, 90(3):563–591, 2022.
                                                                  R. M. Groves, F. J. Fowler, M. P. Couper, J. M. Lep-
B. Frénay and M. Verleysen. Classification in the Presence          kowski, E. Singer, and R. Tourangeau. Survey Methodol-
  of Label Noise: A Survey. IEEE Transactions on Neural             ogy. Wiley Series in Survey Methodology. Wiley, Hobo-
  Networks and Learning Systems, 25(5):845–869, 2014.               ken, 2nd ed. edition, 2009. ISBN 978-1-118-21134-2.
  doi: 10.1109/TNNLS.2013.2292894.
                                                          C. Gruber, P. O. Schenk, M. Schierholz, F. Kreuter,
Y. Gal. Uncertainty in deep learning. PhD thesis, Univer-   and G. Kauermann. Supplement to “Sources of Un-
  sity of Cambridge, 2016.                                  certainty in Machine Learning - A Statisticians’ View”.
                                                            URL_will_be_inserted_by_publisher.
Y. Gal, R. Islam, and Z. Ghahramani. Deep Bayesian
  Active Learning with Image Data. In Proceedings of I. Hacking. The Emergence of Probability: A Philosophical
  the 34th International Conference on Machine Learn-       Study of Early Ideas About Probability, Induction and
  ing, pages 1183–1192. PMLR, July 2017. URL https:         Statistical Inference. Cambridge University Press, 1975.
  //proceedings.mlr.press/v70/gal17a.html. ISSN:
                                                          T. Hak and T. Bernts. Coder training: Theoretical
  2640-3498.
                                                            training or practical socialization?    Qualitative So-
J. Gama, I. Žliobaitė, A. Bifet, M. Pechenizkiy, and       ciology, 19(2):235–257, June 1996. ISSN 1573-7837.
  A. Bouchachia. A survey on concept drift adap-            doi: 10.1007/BF02393420. URL https://doi.org/10.
  tation. ACM Computing Surveys, 46(4):44:1–44:37,          1007/BF02393420.
  March 2014. ISSN 0360-0300. doi: 10.1145/2523813. T. Hastie, R. Tibshirani, J. H. Friedman, and J. H. Fried-
  URL https://doi.org/10.1145/2523813.                      man. The elements of statistical learning: data mining,
J. Gawlikowski, C. R. N. Tassi, M. Ali, J. Lee, M. Humt,    inference, and prediction, volume 2. Springer, 2009.
   J. Feng, A. Kruspe, R. Triebel, P. Jung, R. Roscher, T. Hastie, A. Montanari, S. Rosset, and R. J. Tibshirani.
   M. Shahzad, W. Yang, R. Bamler, and X. X. Zhu.           Surprises in high-dimensional ridgeless least squares in-
   A Survey of Uncertainty in Deep Neural Networks.         terpolation. The Annals of Statistics, 50(2):949–986,
   arXiv:2107.03342 [cs, stat], January 2022. URL http:     2022.
   //arxiv.org/abs/2107.03342.
                                                          S. C. Hora. Aleatory and epistemic uncertainty in
M. Geva, Y. Goldberg, and J. Berant. Are we modeling        probability elicitation with an example from haz-
   the task or the annotator? an investigation of anno-     ardous waste management. Reliability Engineering
   tator bias in natural language understanding datasets.   & System Safety, 54(2):217–223, 1996. ISSN 0951-
   In Proceedings of the 2019 Conference on Empirical       8320.    doi: https://doi.org/10.1016/S0951-8320(96)
   Methods in Natural Language Processing and the 9th       00077-4.     URL https://www.sciencedirect.com/
   International Joint Conference on Natural Language       science/article/pii/S0951832096000774.            Treat-
   Processing (EMNLP-IJCNLP), pages 1161–1166, Hong         ment of Aleatory and Epistemic Uncertainty.
   Kong, China, November 2019. Association for Compu-
   tational Linguistics. doi: 10.18653/v1/D19-1107. URL E. Hüllermeier and W. Waegeman. Aleatoric and epis-
   https://aclanthology.org/D19-1107.                       temic uncertainty in machine learning: an introduc-
                                                            tion to concepts and methods. Machine Learning, 110
R. Ghani and M. Schierholz. Machine Learning. In            (3):457–506, March 2021. ISSN 0885-6125, 1573-0565.
   I. Foster, R. Ghani, R. S. Jarmin, F. Kreuter, and       doi: 10.1007/s10994-021-05946-3. URL http://link.
   J. Lane, editors, Big Data and Social Science, chap-     springer.com/10.1007/s10994-021-05946-3.
   ter 7. CRC Press, Boca Raton, FL, 2nd edition, 2020.
   URL https://textbook.coleridgeinitiative.org. L. Japec, F. Kreuter, M. Berg, P. P. Biemer, P. Decker,
                                                            C. Lampe, J. Lane, C. O’Neil, and A. Usher. Big Data
H. Goldstein. Multilevel statistical models, volume 922.    in Survey Research: AAPOR Task Force Report. Public
   John Wiley & Sons, 2011.                                 Opinion Quarterly, 79(4):839–880, 2015.


                                                             21
G. Kauermann, H. Küchenhoff, and C. Heumann. Statisti- N. Massing, M. Wasmer, C. Wolf, and C. Zuell. How
  cal Foundations, Reasoning and Inference: For Science     Standardized is Occupational Coding? A Compar-
  and Data Science. Springer Series in Statistics. Springer ison of Results from Different Coding Agencies in
  International Publishing, Cham, 2021. ISBN 978-3-030-     Germany. Journal of Official Statistics, 35(1):167–
  69826-3. URL https://link.springer.com/10.1007/           187, March 2019.      ISSN 2001-7367.       doi: 10.
  978-3-030-69827-0.                                        2478/jos-2019-0008. URL https://www.sciendo.com/
                                                            article/10.2478/jos-2019-0008.
N. Keiding and T. A. Louis. Perils and potentials of self-
  selected entry to epidemiological studies and surveys N. Mehrabi, F. Morstatter, N. Saxena, K. Lerman, and
  (with discussion). Journal of the Royal Statistical So-   A. Galstyan. A survey on bias and fairness in machine
  ciety: Series A (Statistics in Society), 179(2):319–376,  learning. ACM Computing Surveys (CSUR), 54(6):1–
  February 2016. doi: 10.1111/rssa.12136.                   35, 2021.

N. Keiding and T. A. Louis. Web-Based Enrollment I. Misra, C. Lawrence Zitnick, M. Mitchell, and R. Gir-
  and Other Types of Self-Selection in Surveys and     shick. Seeing Through the Human Reporting Bias:
  Studies: Consequences for Generalizability.     An-  Visual Classifiers From Noisy Human-Centric Labels.
  nual Review of Statistics and Its Application, 5(1): In Proceedings of the IEEE Conference on Computer
  25–47, March 2018.      ISSN 2326-8298, 2326-831X.   Vision and Pattern Recognition (CVPR), pages 2930–
  doi: 10.1146/annurev-statistics-031017-100127. URL   2939, 6 2016. URL https://www.cv-foundation.
  https://www.annualreviews.org/doi/10.1146/           org/openaccess/content_cvpr_2016/html/Misra_
  annurev-statistics-031017-100127.                    Seeing_Through_the_CVPR_2016_paper.html.

A. Kendall and Y. Gal. What uncertainties do we need in M. Mohri, A. Rostamizadeh, and A. Talwalkar. Founda-
  bayesian deep learning for computer vision? Advances     tions of machine learning. MIT press, 2018.
  in neural information processing systems, 30, 2017.
                                                        J. Mukhoti, A. Kirsch, J. van Amersfoort, P. H. S. Torr,
A. D. Kiureghian and O. Ditlevsen. Aleatory or epis-       and Y. Gal. Deep Deterministic Uncertainty: A Sim-
  temic? Does it matter? Structural Safety, 31(2):105–     ple Baseline. arXiv:2102.11582 [cs, stat], January 2022.
  112, March 2009. doi: 10.1016/j.strusafe.2008.06.020.    URL http://arxiv.org/abs/2102.11582.

B. Kompa, J. Snoek, and A. L. Beam. Second opin- B. Neal, S. Mittal, A. Baratin, V. Tantia, M. Scicluna,
  ion needed: communicating uncertainty in medical             S. Lacoste-Julien, and I. Mitliagkas. A Modern Take on
  machine learning. npj Digital Medicine, 4(1):4, De-          the Bias-Variance Tradeoff in Neural Networks. October
  cember 2021.       ISSN 2398-6352.      doi: 10.1038/        2018.
  s41746-020-00367-3. URL http://www.nature.com/
  articles/s41746-020-00367-3.                              B. Neyshabur, Z. Li, S. Bhojanapalli, Y. LeCun, and
                                                               N. Srebro. Towards Understanding the Role of Over-
F. Kreuter, editor. Improving Surveys with Paradata: An-       Parametrization in Generalization of Neural Networks.
  alytic Uses of Process Information, Hoboken, NJ, 2013.       May 2018.
  John Wiley & Sons.
                                                            V.-L. Nguyen, M. H. Shaker, and E. Hüllermeier. How
W. Lederer and H. Küchenhoff. A short Introduction to          to measure uncertainty in uncertainty sampling for ac-
  the SIMEX and MCSIMEX. The Newsletter of the R               tive learning. Machine Learning, 111(1):89–122, Jan-
  Project Volume, 6(4):26–31, 2006.                            uary 2022. ISSN 0885-6125, 1573-0565. doi: 10.1007/
                                                               s10994-021-06003-9. URL https://link.springer.
C. Leibig, V. Allken, M. S. Ayhan, P. Berens, and S. Wahl.     com/10.1007/s10994-021-06003-9.
  Leveraging uncertainty information from deep neural
  networks for disease detection. Scientific reports, 7(1): C. Northcutt, L. Jiang, and I. Chuang. Confident learning:
  1–14, 2017.                                                  Estimating uncertainty in dataset labels. Journal of
                                                               Artificial Intelligence Research, 70:1373–1411, 2021.
Y. Li and J. Ibanez-Guzman. Lidar for Autonomous Driv-
  ing: The Principles, Challenges, and Trends for Au- Y. Pan, Y. Jing, T. Wu, and X. Kong. An Integrated Data
  tomotive Lidar and Perception Systems. IEEE Sig-             and Knowledge Model Addressing Aleatory and Epis-
  nal Processing Magazine, 37(4):50–61, July 2020. ISSN        temic Uncertainty for Oil Condition Monitoring. Reli-
  1558-0792. doi: 10.1109/MSP.2020.2973615. Confer-            ability Engineering & System Safety, 210:107546, June
  ence Name: IEEE Signal Processing Magazine.                  2021. ISSN 09518320. doi: 10.1016/j.ress.2021.107546.
                                                               URL https://linkinghub.elsevier.com/retrieve/
R. J. Little and D. B. Rubin. Statistical analysis with        pii/S0951832021001022.
  missing data. John Wiley & Sons, Hoboken, NJ, 2019.
                                                            J. Pearl and E. Bareinboim. External Validity: From Do-
A. Malinin and M. Gales.          Predictive Uncertainty       Calculus to Transportability Across Populations. Sta-
  Estimation via Prior Networks.            In Advances        tistical Science, 29(4):579–595, November 2014. doi:
  in Neural Information Processing Systems, vol-               10.1214/14-STS486.
  ume 31. Curran Associates, Inc., 2018. URL https:
  //proceedings.neurips.cc/paper/2018/hash/                 J. C. Perdomo, T. Zrnic, C. Mendler-Dünner, and
  3ea2db50e62ceefceaf70a9d9a56a6f4-Abstract.                   M. Hardt. Performative Prediction, 2020. URL https:
  html.                                                        //arxiv.org/abs/2002.06673.


                                                         22
J. C. Peterson, R. M. Battleday, T. L. Griffiths, and M. Schierholz and M. Schonlau.              Machine Learn-
  O. Russakovsky. Human uncertainty makes classifica-      ing for Occupation Coding—a Comparison Study.
  tion more robust. In Proceedings of the IEEE/CVF         Journal of Survey Statistics and Methodology, page
  International Conference on Computer Vision, pages       smaa023, November 2020. ISSN 2325-0984, 2325-
  9617–9626, 2019.                                         0992. doi: 10.1093/jssam/smaa023. URL https:
                                                           //academic.oup.com/jssam/advance-article/doi/
A. F. Psaros, X. Meng, Z. Zou, L. Guo, and G. E.           10.1093/jssam/smaa023/5952839.
  Karniadakis. Uncertainty Quantification in Scientific
  Machine Learning: Methods, Metrics, and Compar- W. Schwarting, J. Alonso-Mora, and D. Rus. Planning
  isons. Journal of Computational Physics, 477:111902,     and Decision-Making for Autonomous Vehicles. Annual
  March 2023. ISSN 00219991. doi: 10.1016/j.jcp.2022.      Review of Control, Robotics, and Autonomous Systems,
  111902. URL http://arxiv.org/abs/2201.07766.             1(1):187–210, May 2018. ISSN 2573-5144, 2573-5144.
  arXiv:2201.07766 [cs].                                   doi: 10.1146/annurev-control-060117-105157. URL
                                                           https://www.annualreviews.org/doi/10.1146/
A. Qayyum, J. Qadir, M. Bilal, and A. Al-Fuqaha. Secure    annurev-control-060117-105157.
  and Robust Machine Learning for Healthcare: A Survey.
  IEEE Reviews in Biomedical Engineering, 14:156–180, R. Sharma, H. Garayev, M. Kaushik, S. A. Peious, P. Ti-
  2021. ISSN 1937-3333, 1941-1189. doi: 10.1109/RBME.      wari, and D. Draheim. Detecting simpson’s paradox: A
  2020.3013489. URL https://ieeexplore.ieee.org/           machine learning perspective. In Database and Expert
  document/9153891/.                                       Systems Applications: 33rd International Conference,
                                                           DEXA 2022, Vienna, Austria, August 22–24, 2022,
J. Quiñonero-Candela, editor. Dataset shift in machine     Proceedings, Part I, pages 323–335. Springer, 2022.
  learning. Neural information processing series. MIT
  Press, Cambridge, Mass, 2009. ISBN 978-0-262-17005- L. Smith and Y. Gal. Understanding measures of uncer-
  5. OCLC: ocn227205909.                                   tainty for adversarial example detection. arXiv preprint
                                                           arXiv:1803.08533, 2018.
J. Ren, P. J. Liu, E. Fertig, J. Snoek, R. Poplin,
  M. Depristo, J. Dillon, and B. Lakshminarayanan. T. Sullivan. Introduction to Uncertainty Quantification,
  Likelihood Ratios for Out-of-Distribution Detection. In  volume 63 of Texts in Applied Mathematics. Springer
  Advances in Neural Information Processing Systems,       International Publishing, Cham, 2015. ISBN 978-3-319-
  volume 32. Curran Associates, Inc., 2019. URL https:     23394-9.   URL  http://link.springer.com/10.1007/
  //proceedings.neurips.cc/paper/2019/hash/                978-3-319-23395-6.
  1e79596878b2320cac26dd792a6c51c9-Abstract.              M. Valdenegro-Toro and D. Saromo. A Deeper Look into
  html.                                                    Aleatoric and Epistemic Uncertainty Disentanglement.
J. Ren, J. Luo, Y. Zhao, K. Krishna, M. Saleh, B. Lak-       In 2022 IEEE/CVF Conference on Computer Vision
   shminarayanan, and P. J. Liu. Out-of-Distribution De-     and Pattern Recognition Workshops (CVPRW), pages
   tection and Selective Generation for Conditional Lan-     1508–1516, New Orleans, LA, USA, June 2022. IEEE.
   guage Models, September 2022. URL http://arxiv.           ISBN 978-1-66548-739-9. doi: 10.1109/CVPRW56347.
   org/abs/2209.15558.                                       2022.00157.  URL https://ieeexplore.ieee.org/
                                                             document/9857056/.
P. Rodríguez, M. A. Bautista, J. Gonzàlez, and S. Es-
  calera. Beyond one-hot encoding: Lower dimensional J. Valen, I. Balki, M. Mendez, W. Qu, J. Levman, A. Bil-
  target embedding. Image and Vision Computing, 75:         bily, and P. N. Tyrrell. Quantifying uncertainty in ma-
  21–31, 2018.                                              chine learning classifiers for medical imaging. Inter-
                                                            national Journal of Computer Assisted Radiology and
D. Rolnick, A. Veit, S. Belongie, and N. Shavit. Deep       Surgery, 17(4):711–718, April 2022. ISSN 1861-6429.
  learning is robust to massive label noise. arXiv preprint doi: 10.1007/s11548-022-02578-3. URL https://link.
  arXiv:1705.10694, 2017.                                   springer.com/10.1007/s11548-022-02578-3.

S. J. Russell, P. Norvig, and E. Davis. Artificial intelli- K. R. Varshney. Trustworthy Machine Learning. Indepen-
  gence: a modern approach. Prentice Hall series in artifi-   dently Published, Chappaqua, NY, USA, 2022.
  cial intelligence. Prentice Hall, Upper Saddle River, 3rd
                                                            C. H. Wagner. Simpson’s paradox in real life. The Amer-
  edition, 2010. ISBN 978-0-13-604259-4.
                                                              ican Statistician, 36(1):46–48, 1982.
P. O. Schenk and S. Reuß. Paradata in Surveys. In P. Walley. Towards a unified theory of imprecise proba-
  I. Huvila, L. Börjesson, J. Kaiser, Z. Friberg, and      bility. International Journal of Approximate Reasoning,
  O. Sköld, editors, Perspectives on Paradata. Springer,   24(2-3):125–148, 2000.
  2023.
                                                         H. Wang and D.-Y. Yeung. A survey on bayesian deep
S. Scher and G. Messori.       Predicting weather fore-    learning. ACM computing surveys (csur), 53(5):1–37,
  cast uncertainty with machine learning. Quarterly        2020.
  Journal of the Royal Meteorological Society, 144(717):
  2830–2841, 2018. ISSN 1477-870X. doi: 10.1002/qj. B. T. West, J. Wagner, J. Kim, and T. D. Buskirk. The To-
  3410. URL https://onlinelibrary.wiley.com/doi/           tal Data Quality Framework. https://www.coursera.
  abs/10.1002/qj.3410.                                     org/specializations/total-data-quality,


                                                        23
  2023.     Online, accessed 13 March 2023; cited
  figure is licensed under CC BY-NC 4.0, https:
  //creativecommons.org/licenses/by-nc/4.0/.
S. N. Wood. Generalized Additive Models: An Intro-
  duction with R. Chapman and Hall/CRC, 2 edition,
  May 2017. ISBN 978-1-315-37027-9. URL https:
  //www.taylorfrancis.com/books/9781498728348.
J. M. Wooldridge. Econometric Analysis of Cross Section
   and Panel Data. MIT Press, Cambridge, MA, 2005.
Z. Yang, Y. Yu, C. You, J. Steinhardt, and Y. Ma.
  Rethinking bias-variance trade-off for generalization of
  neural networks. In International Conference on Ma-
  chine Learning, pages 10767–10777. PMLR, 2020.
C. Zhang, S. Bengio, M. Hardt, B. Recht, and O. Vinyals.
  Understanding deep learning (still) requires rethinking
  generalization. Communications of the ACM, 64(3):
  107–115, March 2021. ISSN 0001-0782, 1557-7317. doi:
  10.1145/3446776. URL https://dl.acm.org/doi/10.
  1145/3446776.
S. K. Zhou, H. Greenspan, C. Davatzikos, J. S. Dun-
  can, B. Van Ginneken, A. Madabhushi, J. L. Prince,
  D. Rueckert, and R. M. Summers. A review of deep
  learning in medical imaging: Imaging traits, technology
  trends, case studies with progress highlights, and future
  promises. Proceedings of the IEEE, 2021.

X. Zhou, H. Liu, F. Pourpanah, T. Zeng, and X. Wang. A
  Survey on Epistemic (Model) Uncertainty in Supervised
  Learning: Recent Advances and Applications. Neuro-
  computing, 489:449–465, June 2022. ISSN 09252312.
  doi: 10.1016/j.neucom.2021.10.119.     URL http://
  arxiv.org/abs/2111.01968. arXiv:2111.01968 [cs].

X. X. Zhu, D. Tuia, L. Mou, G.-S. Xia, L. Zhang, F. Xu,
  and F. Fraundorfer. Deep Learning in Remote Sensing:
  A Comprehensive Review and List of Resources. IEEE
  Geoscience and Remote Sensing Magazine, 5(4):8–36,
  December 2017. ISSN 2168-6831. doi: 10.1109/MGRS.
  2017.2762307.
X. X. Zhu, J. Hu, C. Qiu, Y. Shi, J. Kang, L. Mou,
  H. Bagheri, M. Haberle, Y. Hua, R. Huang, et al. So2sat
  lcz42: a benchmark data set for the classification of
  global local climate zones [software and data sets]. IEEE
  Geoscience and Remote Sensing Magazine, 8(3):76–89,
  2020.




                                                              24
Supplement to “Sources of Uncertainty in Machine Learning - A
                     Statisticians’ View”

Cornelia Gruber1 , Patrick Oliver Schenk, Malte Schierholz, Frauke Kreuter, and Göran
                                      Kauermann

Department of Statistics, Ludwig-Maximilians-University Munich, Ludwigstr. 33, 80539
                                 Munich, Germany


1        Omitted Variables
1.1        Relation between Variance Heterogeneity and Bias for Binary Y
The statement to verify is that generally, the omitted variable model suffers either from both,
neglected variance heterogeneity and bias for some z, or from neither.
  Let z1 , z2 be two distinct values. Denote p1 := P(y|x, z1 ) and p2 := P(y|x, z2 ). For binary vari-
ables Y , it is well known that E(Y |x, z) = P(Y |x, z) and V ar(Y |x, z) = P(Y |x, z) (1 − P(Y |x, z)).
  Before starting, we consider when V ar(Y |x, z1 ) = V ar(Y |x, z2 ):
                          V ar(Y |x, z1 ) =V ar(Y |x, z2 )                         ⇔
                             p1 (1 − p1 ) =p2 (1 − p2 )                            ⇔
                                p1 − p21 =p2 − p22                                 ⇔
                                p1 − p2 =p21 − p22                                 ⇔
                                p1 − p2 =(p1 + p2 )(p1 − p2 )
As a quadratic equation, this has two solutions. First, if p1 = p2 , then both sides are equal to
zero. Second, if p1 ̸= p2 , we have p1 = 1 − p2 .
  Variance Heterogeneity ⇒ Bias:
If variances are not homogeneous, there exist z1 , z2 , with z1                              ̸=     z2 and
fY |X,Z (y|x, z1 ), fY |X,Z (y|x, z2 ) > 0, such that V ar(Y |x, z1 ) ̸= V ar(Y |x, z2 ). From above,
we know that then p2 ∈       / {p1 , 1 − p1 }, and thus E(Y |x, z1 ) = p1 ̸= p2 = E(Y |x, z2 ). Therefore,
E(Y |x, z1 ) ̸= E(Y |x), E(Y |x, z2 ) ̸= E(Y |x), or both, i.e., bias.
  Bias ⇒ Variance Heterogeneity:
By bias we mean that there exist z1 , z2 , with z1 ̸= z2 and fY |X,Z (y|x, z1 ), fY |X,Z (y|x, z2 ) > 0, such
that E(Y |x, z1 ) < E(Y |x) and E(Y |x, z2 ) > E(Y |x). Thus, E(Y |x, z1 ) = p1 ̸= p2 = E(Y |x, z2 ).
From above, we know that then V ar(Y |x, z1 ) ̸= V ar(Y |x, z2 ), unless p1 ̸= 1 − p2 . This sole
exception is to what the qualifier “generally” refers in our statement.

1.2        Marginal Effects and Simpson’s Paradox
Let us now consider the marginal effect of X on Y . One may argue that marginal effects are
much more important in causal inference than in prediction. However, marginal effects are
an important tool in the increasing push to make (black box) machine learning models more
interpretable and, often, the derived marginal effects are taken as glimpses of the true nature of
the world instead of as mere descriptions of the learned model (Molnar, 2020). More importantly
for the topic of our paper, we show that even strong assumptions about the marginal effects of
X and about the relationship of X and Z are not enough for an omitted variable to be ignorable
for uncertainty quantification in prediction.
    1
        cornelia.gruber@stat.uni-muenchen.de


                                                          1
  Small changes in the input features X lead to changes in the output according to

          ∂E(Y |x)          ∂E(Y |x, z)                                 ∂fZ|X (z|x)
                      Z                                 Z
(1)                 =                   fZ|X (z|x) dz +      E(Y |x, z)             dz.
             ∂x         z∈Z     ∂x                       z∈Z                ∂x

First, we notice that for the marginal effect of X to be the same in the full model Y |x, z and
in the omitted variable model Y |x, it is not sufficient for the marginal effect ∂E(Y∂x|x,z) to be
independent of Z as there is a second term on the right-hand side of (1). Imagine a point
(x0 , z0 ) for which the full and the omitted variable model make the same prediction. However,
because the marginal effect in the omitted variable model is biased for the true marginal effect, it
is not possible that the omitted variable model yields unbiased predictions for all z. Uncertainty
measures such as prediction intervals that build on the expected conditional value of Y are thus
negatively affected.
   Second, we find that if X and Z are dependent then even the sign of the derivative can change.
For instance, even if ∂E(Y∂x|x,z) > 0 ∀z we may find ∂E(Y∂x
                                                            |x)
                                                                < 0, particularly when X and Z are
negatively related. This is typically known as Simpson’s paradox.
   Third, for the marginal effect of X to be the same in the full and in the omitted variable
model, one requires strong assumptions: e.g., in addition to Z not modifying the marginal effect
                                                     ∂f   (z|x)
of X, also that X and Z are independent so that Z|X     ∂x      = 0. However, there may still be bias
in the predictions so that prediction intervals will not be centred properly: e.g., in a linear model
example, while the marginal effect is unaffected, the intercept is biased and so are, therefore,
predictions. According to (22) in the main paper, the bias also means that aleatoric uncertainty
in the omitted variable model is higher than in the full model. Thus, even under these strong
assumptions, Z is not ignorable for uncertainty quantification.


2     Errors in Y
2.1    Example

Table 1: Imbalanced classification problem: identical conditional error probabilities of c(x) =
0.10 produce bias as PY |X (Y = 1|X = x) = 0.74 < 0.80 = PZ|X (Z = 1|X = x). All probabilities
are conditional on X. Within-cell values are joint probabilities of Y and Z, i.e., PY,Z|X (Y =
y, Z = z|X = x).

                                                 Y (Observed)          P
                                                 1           0
                                               0.72        0.08
                                        1                             0.80
                                            (true 1’s) (false 0’s)
                          Z (Truth)
                                               0.02        0.18
                                       0                              0.20
                                       P    (false 1’s) (true 0’s)
                                               0.74        0.26        1

   Table 1 presents an example of how equal conditional error probabilities (c(x) = 0.10) in
imbalanced binary classification (PZ|X (Z = 1|X = x) = 0.80) produce bias: there are 0.10·80 = 8
percentage points too few 1’s observed (in the Z = 1 row), but the only 0.10 · 20 = 2 percentage
points of false 1’s (in the Z = 0 condition) cannot make up for this, so that PY |X (Y = 1|X =
x) = 0.74 exhibits a downward bias of 6 percentage points for the true probability PZ|X (Z =
1|X = x) = 0.80.
   If we keep the imbalance (PZ|X (= 1|X = x) = 0.80) and the conditional error probability of
false 0’s at 0.10 from Table 1 but want unbiasedness, then the conditional error probability of
false 1’s must be 0.40 (see 2.2 for more). This illustrates what the formalism of requiring the two

                                                 2
joint error probabilities to be equal does not convey on its own: for unbiasedness, the conditional
                                                  P    (Z=1|X=x)
error probability in the minority class must be PZ|X (Z=0|X=x) times that in the majority class,
                                                   Z|X
which can be a very strong requirement unless, of course, the conditional error probability in the
majority class is close to zero.

2.2   Conditional Error Probability in the Minority Class
Without loss of generality, assume that 0 represents the minority class, i.e., PZ|X (Z = 0|X =
x) < PZ|X (Z = 1|X = x). The conditions for unbiasedness can be found by setting biasY |X (Y =
1|X = x) equal to zero in (43) in the main paper and solving for the (joint) error probability of
false 1’s:
                     false 1’s                         false 0’s
               z       }|       {             z       }|       { PZ|X (Z = 1|X = x)
(2)   PY |X,Z (Y = 1|X = x, Z = 0) = PY |X,Z (Y = 0|X = x, Z = 1) ·                    ,
                                                                    PZ|X (Z = 0|X = x)

i.e., the conditional error probability in the minority class must be inversely proportional to the
odds of the majority class and thus must always be greater than the conditional error probability
in the majority class.
   If Z = 1 is 0.80
               0.20 = 4 times as likely as Z = 0, as in the example from Table 1, the conditional
error probability in the minority class thus would need to be four times as high as the conditional
error probability in the majority class. If the latter is a not-uncommon 0.10, as in Table 1, the
former would need to be a whopping 0.40 for unbiasedness – close to coin-flipping territory.

2.3   Comments on Regression
In regression with unbiased errors of a quantitative Y , as modelled with the error term ϵ having
expected value zero in linear regression, there is higher epistemic uncertainty in the training of
the model but no bias in the parameter estimates (Carroll et al., 2006, Ch. 15). However, when
our focus is on prediction, even something benign such as unrecognized heteroscedasticity, which
is still unbiased in expectation, produces miscalibrated pointwise predictive uncertainty.


3     Missing Data
3.1   Relevance of Efficiency Loss in Machine Learning and High-Dimensional
      Data
There are two reasons why the relative loss of efficiency due to missingness may be greater
in typical machine learning settings than in traditional statistical analysis. First, a statistician
might decide to not use a feature that has high missing rates when, based on exploratory analysis,
it does not have much predictive power. The typical machine learning workflow would, however,
start with all features and rely on automatic feature selection, thereby including the particularly
efficiency-damaging features as well.
   Second, for a fixed fraction of missing cells, the larger the number of features, the higher the
share of units excluded in complete-case analysis. This is because the more features there are, the
higher the probability that an additional missing cell occurs in a row that has no other missing
cells and otherwise would not be excluded.

3.2   Aleatoric and Epistemic Uncertainty of Weighting and Imputation Mod-
      els
Weighting and imputation are based on models that themselves are subject to aleatoric and epis-
temic uncertainty. For weighting, the aleatoric uncertainty is already accounted for by estimating
response propensities. For imputation, using only a single imputation of a missing feature value

                                                 3
via the observed information neglects the aleatoric uncertainty of, e.g., Xmiss |Xobs , W . Hence,
in multiple imputation one draws multiple, say M , values from the predictive distribution for
the missing value, producing M datasets which are analysed separately and whose results are
combined according to appropriate rules (Little et al., 2022, p. 8f.).
   In deployment with item missingness, consider two units: for the first, the feature value
x0 is actually observed while for the second the same value x0 is the expected value of the
imputation. How much uncertainty in the prediction the item missingness adds for the second
unit as compared to the first can also be assessed with multiple imputation. We may need more
draws M for this purpose than what we are used to from traditional population inference, but
generating multiple predictions per unit based on the same prediction model is typically relatively
inexpensive computationally.
   The epistemic uncertainty in the missing data models is harder to tackle. Resampling-based
methods such as bootstrap are sometimes employed for this purpose in traditional statistics
(Little and Rubin, 2019, Ch. 3.3.4, 5.3). Embedding the above-mentioned multiple imputation
within bootstrapping would account for both aleatoric and epistemic uncertainty in the imputa-
tion model. However, because the two epistemic uncertainties – of the missing data model and
of the prediction model – “interact”, one would need to train the prediction model anew for each
bootstrap iteration of the missing data model. This is typically computationally infeasible unless
for the simplest prediction models.
   Our perception is that the consideration of the two types of uncertainty, aleatoric and epis-
temic, is not a consistent part of traditional statistical analysis of missing data.


References
R. J. Carroll, D. Ruppert, L. A. Stefanski, and C. M. Crainiceanu. Measurement Error in
  Nonlinear Models: A Modern Perspective. Chapman and Hall/CRC, Boca Raton, FL, 2nd
  edition edition, 2006.
R. J. Little and D. B. Rubin. Statistical analysis with missing data. John Wiley & Sons, Hoboken,
  NJ, 2019.
R. J. Little, J. R. Carpenter, and K. J. Lee. A Comparison of Three Popular Methods for
  Handling Missing Data: Complete-Case Analysis, Inverse Probability Weighting, and Multiple
  Imputation. Sociological Methods & Research, page 00491241221113873, 2022. doi: 10.1177/
  00491241221113873. published online first, August 5, 2022.
C. Molnar. Interpretable Machine Learning. A Guide for Making Black Box Models Explainable.
  Leanpub, 2nd edition, 2020. christophm.github.io/interpretable-ml-book, 2nd edition 2022.




                                                4
