# Fit Option "L" or chi2 fit for a histogram with non-integer bin content after subtraction of another histogram?

Hi,

my questions concerns the fit option “L”. I have a histogram containing counts. I substract another histogram, which has an non-integer bincontent. I want to fit the resulting difference histogram with vonsequently non-integer bin content with an expontial function. I tried the log Likelihood option “L” and “WL” (same result with different errors). For comparison I also did a chi2 fit and I get a different result. The difference has a significant impact on the outcome of my analysis.

To my understanding the log Likelihood is prefered for a histogram containing counts, but in my case I first substract another histogram and grt the non-integer bin content. Can you please help me, whether the Log Likelihood fit option or the chi2 fit would be the correct way to deal with the situation?

Cheers,
Dorin

Hi,

In case of subtraction of histogram, the resulting obtained distribution is not anymore a Poisson. If you are considering histogram with counts, the resulting bin distribution is a Skellam distribution.
(see https://en.wikipedia.org/wiki/Skellam_distribution)
Now since you are subtracting weighted histogram the resulting distribution is something different. If you can assume a normal distributions for each bin content, you can then perform a chi2 fit.

Cheers

Lorenzo

Dear Lorenzo,

thanks a lot for the explanation! I think I can proceed with the chi2 fit for now. On the long run, maybe doing an log Likelihood fit of the histgram I am subtracting plus the expontial to the first histogram might be more straight forward (as I found in the helpful post here using skellam as search word: Skellam distribution maximum likelihood fitter? ).

Just do be sure I understood correctly, if I am doing the “L” or “WL” fit option as I do now, this might lead to incorrect results?

Cheer,
Dorin

Hi,

Both the chi2 and the weighted likelihood fits are approximations and they can give you both incorrect results. Which one is worst will depend on the problem, I would say probably the weighted likelihood one because it cannot also represent bins where the content is negative, which can result in case of subtracting two histograms.
The correct thing is either make a likelihood fit with the Skellam distribution or fitting the sum of the two histograms as explained in the linked post

Best regards

Lorenzo

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.