2D maximum likelihood fit - a measure of goodness of fit

Heya everyone,

I was hoping people could offer me some advice - sorry in advance if this is a stupid question.

I am fitting a 2D function to some Monte Carlo samples using an unbinned likelihood fit with RooFit. The fits are looking good and converging nicely however, I would like a measure of just how good the fit is.

I thought I could use the Kolmogorov-Smirnov test, but that appears to be for 1D functions only.

I know I could do just find the chi^2 but that would mean binning everything - and I would rather not bin my data unless absolutely necessary.

Is there any standard way of evaluating a 2D unbinned fit?


There have been some studies of porting the K-S algorithm to the 2D case. See for example
v-scheiner.brunel.ac.uk/bitstrea … at2007.pdf

Some software should also be available somewhere, but it is not part of ROOT.

Otherwise, you can just bin the data for the GOF test and use the chi2 test, but still doing an unbinned fit.
You could also use the TKDTreeBinning class for optimal binning of your data (same number of events in each bin)

Best Regards