Given that parton distributions are fitted to experimental data, it is
essential to determine not only the best-fit PDFs, but also the uncertainties associated to such best-fit set  in a
systematic way,
arising from instance from the data errors or from
methodological fit choices.
%
Subsequently, it should be possible to propagate
these uncertainties to the cross-sections predictions.
%
The most widely-used methods
to estimate PDF uncertainties fall into three main categories, known as the
Hessian, Monte Carlo, and Lagrange multiplier methods, respectively.
%
Each of these methods
will be explained in turn in the following sections.

\subsubsection{The Hessian method}
\label{sec:pdfuncertainties.hess}
%
The Hessian method to quantify PDF uncertainties was first developed
in~\cite{Pumplin:2001ct}.
%
Here, we describe the basic ingredients  of this method
and of their subsequent refinements, mostly following the
discussion of~\cite{Martin:2009iq}.
%
Given the $\chi^2$ estimator, the best-fit values correspond to those
for which this estimator has a global minimum,
$\chi^2_{\rm min}$.
%
In the vicinity of this minimum, the $\chi^2$ can
be approximated in terms of a quadratic expansion of the form
\be
\label{eq:hessianexpansion}
\Delta\chi^2 \equiv \chi^2- \chi^2_{\rm min}
=\sum_{i,j=1}^{n_{\rm par}}H_{ij}\lp a_i-a_i^0\rp
\lp a_j-a_j^0\rp \, ,
\ee
where the $n_{\rm par}$ fit parameters are denoted by $\{a_1,\ldots,
a_{n_{\rm par}}\}$, and where the best-fit values that minimize the
$\chi^2$ are indicated by
$\{a_1^0,\ldots,
a^0_{n_{\rm par}}\}$.
%
In the quadratic expansion Eq.~(\ref{eq:hessianexpansion})
we have introduced the Hessian matrix, defined as the matrix
of second derivatives of the $\chi^2$ with respect to the
fit parameters, namely
\be
H_{ij}(\{\vec{a}^0\})\equiv \frac{1}{2} \frac{\partial^2\chi^2}{\partial a_i
\partial a_j}\Bigg|_{\{\vec{a}\}=
\{\vec{a}^0\}} \, .
\ee
This Hessian matrix contains all the information necessary
to quantify the PDF uncertainties.
%
Indeed, for a generic function $ \mathcal{F} [ \{  a_i \}]$
that depends on the PDFs and thus indirectly on the fit
parameters, the associated uncertainty can be computed
by means of linear error propagation
\be
\label{eq:hessianmaster1}
\sigma_{\mathcal{F}}=T\lp \sum_{i,j}^{n_{\rm par}}
\frac{\partial\mathcal{F}}{\partial a_i} \lp H \rp^{-1}
\frac{\partial\mathcal{F}}{\partial a_j} \rp^{1/2} \, ,
\ee
where $T=\sqrt{\Delta \chi^2}$ is the
`tolerance factor' that determines the matching between
the allowed range of parameter variations around the best-fit
values and the associated confidence interval of the PDF
uncertainties.
%
While textbook statistics suggest that $T=1$ corresponds
to a 68\% confidence interval, in the context of a global
fit there is ample evidence that somewhat larger values
for the tolerance are required in the Hessian method, in particular
to account for inconsistent experiments, theoretical uncertainties, and for methodological
uncertainties such as the specific choice of functional form~\cite{Pumplin:2009bb}.

The main limitation of Eq.~(\ref{eq:hessianmaster1}) is that
in general the derivatives $\partial\mathcal{F}/\partial a_i$
are unknown.
%
This problem can be bypassed by diagonalizing the Hessian matrix
and then representing PDF uncertainties in terms of orthogonal eigenvalues.
%
After this diagonalization procedure, Eq.~(\ref{eq:hessianmaster1})
has the much simpler form
\be
\label{eq:hessianmaster2}
\sigma_{\mathcal{F}}=\frac{1}{2}\lp \sum_{i,j}^{n_{\rm par}}
\lc \mathcal{F}(S_i^+)-\mathcal{F}(S_i^-) \rc \rp^{1/2} \, ,
\ee
where $S_i^{\pm}$ corresponds to the $i$-th eigenvector
associated to positive and negative variations with respect
to the best-fit value.
%
Using the eigenvectors $\{ S_i^{\pm} \}$ it is also
possible to compute asymmetric PDF uncertainties using
the prescription of Ref.~\cite{Nadolsky:2001yg}.

Concerning the determination of the tolerance factor $T=\sqrt{\Delta\chi^2}$,
the original studies by the CTEQ and MRST group used values of $T=10$
and $T=\sqrt{50}$ respectively.
%
In more recent releases, the determination of this tolerance has been refined.
%
In the case of the MSTW08 analyses for example (as well as the subsequent MMHT14 set), the tolerance is
determined dynamically for each eigenvector by demanding that all
data sets are included within a given confidence level variation.
%
To illustrate this, in Fig.~\ref{fig:mstw08-tolerance}
we show the individual tolerance for each eigenvector
of the MSTW08 global analysis, determined
  by the criterion that each separate experiment should be described
  within 90\% CL.
  %
  For the various eigenvector directions,
  the figure indicates the name of the experiment
  that determines the tolerance - in other words, the experiment
  which is most sensitive to variations along this specific eigenvector
  direction.
  %
  The fact that many different experiments are responsible
  for determining this tolerances emphasizing the crucial
  importance of using a very wide dataset in the global
  PDF analysis.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{figure}[t]
\begin{center}
  \includegraphics[scale=0.70]{4-fitting/plots/mstw08-tolerance.pdf}
   \caption{\small 
  The individual tolerance for each eigenvector, determined
  by the criterion that each separate experiment should be described
  within 90\% CL.
  %
  In each case the figure indicates the name of the experiment
  that determines the tolerance for the various eigenvector directions.
    \label{fig:mstw08-tolerance}
  }
\end{center}
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\subsubsection{The Monte Carlo method}\label{sec:pdfuncertainties.MC}
%
In this method, the propagation of the experimental data uncertainties
to the parton distributions is achieved by means constructing a Monte Carlo
representation of the probability distribution associated to the original
measurements.
%
This requires generating a large number $N_{\rm rep}$ of artificial MC replicas
of the original data, the so-called `pseudo--data',
which encode the same information on
central values, variances and correlations as that provided by the experiment.
%
In particular, given an experimental measurement of a hard-scattering
cross-section denoted generically by $F_{I}^{\rm (exp)}$ with
total uncorrelated uncertainty $\sigma_{I}^{\rm (stat)}$, $N_{\rm sys}$ fully
correlated systematic uncertainties $\sigma^{\rm (c)}_{I,\alpha}$ and
$N_a$ ($N_r$) absolute (relative) normalization uncertainties
$\sigma^{\rm (norm)}_{I,n}$, the artificial
MC replicas are constructed using the following expression
\be
\label{eq:replicas}
F_{I}^{(\art)(k)}=S_{I,N}^{(k)} F_{I}^{\rm (\mrexp)}\lp 1+
 \sum_{\alpha=1}^{N_{\rm sys}}r_{I,\alpha}^{(k)}\sigma^{\rm (c)}_{I,c}+r_{I}^{(k)}\sigma_{I}^{\rm (stat)}\rp
 \ , \quad k=1,\ldots,N_{\rep} \ ,
\ee
where the normalization prefactor is given by
%
\be
\label{eq:totalnorm}
S_{I,N}^{(k)}=\prod_{n=1}^{N_a}\lp1+r_{I,n}^{(k)}\sigma^{\rm (norm)}_{I,n}\rp
\prod_{n'=1}^{N_r}\sqrt{1+r_{I,n'}^{(k)}\sigma^{\rm (norm)}_{I,n'}}.
\ee 
%
Here the variables $r_{I,c}^{(k)},r_{I}^{(k)},r_{p,n}^{(k)}$ are
 univariate Gaussian random numbers.
 %
 Eq.~(\ref{eq:replicas}) represents the fluctuations of the pseudo-data
 replicas around the measured central values by the amount allowed by the
 experimental uncertainties.
 %
 Note that for each replica the random fluctuations
 associated to a given fully correlated systematic
 uncertainty will be the same
 for all data points, that is, $r^{(k)}_{I,\alpha}=r^{(k)}_{I',\alpha}$.
 %
 The same condition holds for the normalization uncertainties.

An important question in the Monte Carlo method is how many replicas
$N_{\rm rep}$ need to be generated in order to achieve a faithful representation
of the underlying probability density in the space of data.
%
To this purpose, a number of statistical estimators were constructed in
Ref.~\cite{DelDebbio:2007ee}.
%
It was found that $N_{\rm rep}=10$ replicas are enough to reproduce
central values, $N_{\rm rep}=100$ for the variances and that
$N_{\rm rep}=1000$  to satisfactorily  reproduce the
data correlations.
%
Subsequent analysis have shown that this statement holds for
a generic input dataset.
%
To illustrate this point, in Fig.~\ref{fig:f2p-scatter} we show
the scatter between the mean values  and variances
  of all the data points included in the analysis of~\cite{DelDebbio:2004qj}, comparing
  the original experimental values with the results obtained from the MC representation
  for different number $N_{\rm rep}$ of replicas.
  %
  We find that indeed for central values, the averages computed using
  only $N_{\rm rep}=10$ replicas agree with the original data, but that
  for variances this is not the case, where $N_{\rm rep}=100$ replicas
  are required.
  %
  A similar study shows that $N_{\rm rep}=1000$ replicas are required
  to faithfully reproduce the experimental data correlations.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{figure}[t]
\begin{center}
  \includegraphics[scale=0.79]{4-fitting/plots/f2p-scatter.pdf}
   \caption{\small 
  The scatter between the mean values (left) and variances (right plot)
  of all the data points included in the analysis of~\cite{DelDebbio:2004qj}, comparing
  the original experimental values with the results obtained from the MC representation
  for different number $N_{\rm rep}$ of replicas.
    \label{fig:f2p-scatter}
  }
\end{center}
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Once the Monte Carlo sampling of the experimental data has been achieved,
a separate PDF fit is performed in each replica.
%
This can be done using either traditional polynomial functional forms
or other interpolators such as artificial neural networks - the MC method
works in both cases.
%
The resulting sample of $N_{\rep}$ PDF replicas realizes the concept of
the probability density in the space of parton distributions.
%
The calculation of the resulting PDF uncertainties and their propagation to generic
cross-sections can then be performed using textbook methods.
%
Note that in this approach the PDF uncertainty propagation is fully general,
and in particular is not restricted to the Gaussian approximation.

For instance, in the Monte Carlo method the expectation function of a generic
cross-section $ \mathcal{F} [ \{  q \}]$
is evaluated as an average over the replica sample,
\be
\label{masterave}
\la \mathcal{F} [ \{  q \}] \ra
= \frac{1}{N_{\rm rep}} \sum_{k=1}^{N_{\rm rep}}
\mathcal{F} [ \{  q^{(k)} \}] \, ,
\ee
and the corresponding uncertainty is then determined as the variance of the
Monte Carlo sample,
\be
\sigma_{\mathcal{F}} =
\left( \frac{1}{N_{\rm rep}-1}
\sum_{k=1}^{N_{\rm rep}}   
\lp \mathcal{F} [ \{  q^{(k)} \}] 
-   \la \mathcal{F} [ \{  q \}] \ra\rp^2 
 \right)^{1/2}.
\label{mastersig}
\ee
These formulae may also be used for the determination of central values and
uncertainties of the parton distribution themselves, in which case the
functional $\mathcal{F}$ is trivially
identified with the parton distribution $q$, that is,  
$\mathcal{F}[ \{ q\}]\equiv q$.

In the case of a fully consistent dataset, the Monte Carlo method
to estimate the PDF uncertainties is expected to coincide with the
Hessian method described in Sect.~\ref{sec:pdfuncertainties.hess} for a standard
tolerance $\Delta \chi^2=1$.
%
This equivalence was explicitly demonstrated in the HERA-LHC workshop
proceedings~\cite{Dittmar:2009ii}.
%
In Fig.~\ref{fig:heralhc} we show the gluon PDF at $Q=2$ GeV in this benchmark fit,
based on HERA inclusive structure function data and a HERAPDF-like
parametrization,
where the one-sigma PDF uncertainties
  computed with the Hessian method (black lines) are compared to
  those of the Monte Carlo method (red lines), finding good agreement.
  %
  In this figure, each of the green curves corresponds to an individual MC replica.
  %
  In the left fit, the normalization
  and systematic
  uncertainties in the MC replicas from Eq.~(\ref{eq:replicas}) fluctuate
  according to a multi-Gaussian distribution, while in the right
  fit they fluctuate instead according to a log-normal distribution, showing
  that the resulting PDFs depend only weakly on the specific assumptions about the
  specific probability distribution of the experimental systematic
  uncertainties.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{figure}[t]
\begin{center}
  \includegraphics[scale=0.79]{4-fitting/plots/heralhc.pdf}
   \caption{\small 
  The gluon PDF at $Q=2$ GeV in the HERA-LHC benchmark fit of
  Ref.~\cite{Dittmar:2009ii}, where the one-sigma PDF uncertainties
  computed with the Hessian method (black lines) are compared to
  those of the Monte Carlo method (red lines), finding good agreement.
  %
  Each of the green curves corresponds to an individual MC replica.
  %
  In the left fit, the normalization
  and systematic
  uncertainties in the MC replicas from Eq.~(\ref{eq:replicas}) fluctuate
  according to a multi-Gaussian distribution, while in the right
  fit they fluctuate instead according to a log-normal distribution.
    \label{fig:heralhc}
  }
\end{center}
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Finally, we note that a Monte Carlo
representation of a Hessian PDF set can be constructed
following the strategy of Ref.~\cite{Watt:2012tq}, and
conversely, that a
Hessian representation of a Monte Carlo
PDF set can be accurately constructed using the {\tt mc2h} algorithm
developed in Refs.~\cite{Carrazza:2015aoa,Carrazza:2016htc}.
%
These techniques are discussed in more detail below in Sect.~\ref{sec:fitmeth.combined}.

\subsubsection{The Lagrange multiplier method}\label{sec:pdfuncertainties.Lagrange}

This method was originally developed in Refs.~\cite{Stump:2001gu,Pumplin:2000vx}
as a generalization of the $\chi^2$ minimization procedure.
%
As in the Hessian case, the first step is to find the PDF parameters $\{a_i^0\}$
that minimize the global $\chi^2(\{a_i\})$.
%
Then one has to select a specific physical quantity that depends on the PDFs,
such a DIS structure function or a hadron collider cross-section,
which we denote generically by
$\mathcal{F}(\{a_i\})$, which takes the value $\mathcal{F}_0=\mathcal{F}(\{a_i^0\})$
at the global fit minimum.
%
The goal of the Lagrange multiplier method is then to determine the PDF uncertainty
associated to $\mathcal{F}_0$ without making any assumption on the specific behaviour
of the $\chi^2$ around the global minimum, and in particular avoiding the Gaussian
assumption which is at the core of the Hessian method.

In order to achieve this, the global fit $\chi^2$ is modified by introducing the
physical quantity $\mathcal{F}$ as a Lagrange multiplier, so that the new
function that needs to minimized is now given by the sum of two contributions,
\be
\label{eq:lagrange1}
\Psi(\lambda, \{a_i\} )\equiv \chi^2(\{a_i\}) + \lambda \mathcal{F}(\{a_i\}) \, .
\ee
Now for each specific value of $\lambda$, denoted by $\lambda_{\alpha}$, the minimization
of Eq.~(\ref{eq:lagrange1}) will lead to a different set of best-fit PDF
parameters, which we indicate by $\{a_i^{\rm (min)}(\lambda_\alpha)\}$.
%
Mathematically, these parameters are the result of a constrained PDF fit
where the value of the physical observable has been fixed to $\mathcal{F}_\alpha
=\mathcal{F}(\{a_i^{\rm (min)}(\lambda_\alpha)\} )$.
%
The resulting PDF set of this constrained fit is now indicated by $S_{\alpha}$.

The main result of this procedure is establishing a parametric relation between the value
of the physical quantity $\mathcal{F}$ and the global fit $\chi^2$ by means of
the Lagrange multiplier $\lambda$.
%
This means that we can determine the PDF uncertainty associated to $\mathcal{F}$
imposing that the $\chi^2$ satisfies $\chi^2=\chi^2_{\rm min}+\Delta\chi^2$
with $\Delta\chi^2=T^2$ representing the tolerance introduced
in Sect.~\ref{sec:pdfuncertainties.hess}.
%
Is clear that the main advantage of the Lagrange multiplier method as compared
to the Hessian method is that one does not need to restrict to the quadratic
expansion or linear error propagation, since the PDF uncertainties
in this method are determined only by the values of the $\chi^2$ and not by its
specific shape.
%
On the other hand, an important restriction of the method is that the PDF error
analysis for each specific physical quantity $\mathcal{F}$ requires redoing
a large number of new PDF fits.
%
This is an important limitation
not only because this method is CPU time intensive,
but also because it cannot be carried out
outside the PDF fitting collaborations themselves.

The Lagrange multiplier method is schematically illustrated in
Fig.~\ref{fig:LM}.
%
In the left plot we show a two-dimensional projection of the PDF parameter space,
   indicating the contours in $\chi^2$ for fixed values of
   the physical quantity $\mathcal{F}$.
   %
   The parametric relation is provided by the value of the Lagrange multiplier $\lambda$.
   %
   In the right plot we show how the PDF uncertainty associated to $\mathcal{F}$
   for a given confidence interval is determined by the condition that the
   global $\chi^2$ should not grow beyond the tolerance $\Delta\chi^2$.
   %
   As in the case of the Hessian method, the specific value of
   the tolerance $T=\sqrt{\Delta\chi^2}$ is an input to the method
   and must be determined independently.
   
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{figure}[t]
\begin{center}
  \includegraphics[scale=0.79]{4-fitting/plots/LM.pdf}
   \caption{\small Schematic representation of the Lagrange Multiplier method,
   from Refs.~\cite{Stump:2001gu,Pumplin:2000vx}.
   %
   In the left plot we show a two-dimensional projection of the PDF parameter space,
   indicating the contours in $\chi^2$ for fixed values of
   the physical quantity $\mathcal{F}$.
   %
   In the right plot we show how the PDF uncertainty associated to $\mathcal{F}$
   for a given confidence interval is determined by the condition that the
   global $\chi^2$ should not grow beyond the tolerance $\Delta\chi^2$.
    \label{fig:LM}
  }
\end{center}
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
