November 1, 2010
This is an example of a fit done using Root,
which in turn uses the MINUIT
software package for fitting. This example is based on one in Cowan.
Here is
the example script. The program creates random histograms according to
the function
,
where the true values of the parameters are
and
. Values of
range from
to
and the distribution is normalized over this interval.
Each ``experiment'' corresponds to a distribution of
2000
values chosen according to this function. The data
are then fit to this functional form to determine the parameters
and
. The best-fit values
and
are determined, and so are the components of the error
matrix for the fit.
The output for a fit of one ``experiment'' is shown in Figure 1.
|
The best-fit parameters for this specific experiment are
,
;
and the square roots of the values of the error matrix entries (output of MINUIT) are
,
,
.
Note that the covariance is non-zero, indicating that the best-fit
estimates are correlated.
The program loops over a total of 500 ``experiments'', each time
choosing a different random distribution (for the same true parameter
values) and re-doing the fit. Figure 2 shows the
distributions of
and
values for all of the experiments.
Figure 3 shows a 2D plot of
versus
for the set of experiments. The central red star
corresponds to the true parameter values. The ellipses shown are the
and
error ellipses for the parameters, for one
particular random data set and fit (the same one as shown in Figure 1). The correlation between the best-fit estimated parameters is
manifest in the slope of the ellipses: if
is overestimated for a particular dataset, then so will
be likely overestimated,
and similarly, if
is underestimated,
will likely
also be underestimated.