CALL HDIFF (ID1,ID2,PROB*,CHOPT)
Action: Statistical test of compatibility in shape between two histograms using the Kolmogorov test. The histograms are compared and the probability that they could come from the same parent distribution is calculated.
The comparison may be done between two 1-dimensional histograms or between two 2-dimensional histograms. For further details on the method, see below.
ID
,
the number
of events in each histogram, the value of PROB
, and the maximum
Kolmogorov distance between the two histograms.
For 2-dimensional histograms,
there are two Kolmogorov distances (see below). If option 'N'
is
specified, there is a third line of output giving the probalility
PROB
for shape and normalization alone separately.
ID1
has no errors (it is a function).
ID2
has no errors (it is a function).
PROB
is then
a combined confidence level taking into account absolute contents.
Remark:
'O'
and 'U'
can also refer to 2-dimensional
histograms, so that, for example the string 'UT'
means that
underflows in X and Y and overflows in Y should be
included in the calculation.
ID1
and ID2
must exist and already
have been filled before the call to HDIFF. They must also have
identical binning (lower and upper limits as well as number of bins).
PROB
is returned as a number
between zero and one.
A values close to one
indicates very similar histograms, and a value near zero
means that it is very unlikely that the two arose from the same
parent distribution.
CHOPT
)
the comparison is done only
on the shape of the two histograms, without consideration of
the difference in number of events, and ignoring all
underflow and overflow bins.