Hi all,
I’ve been seeing a bias in the fitted mean of the distribution when doing a maximum likelihood fit to toy datasets, generated from a PDF with asymmetric tails.
I’ve attached the code I’m using, demonstrated on a Crystal Ball (CB) function.
To summarise the operation of the code:
- Create a CB model
- Generate a toy dataset of 200 events from this model (extended)
- Fit the CB back to this toy dataset, with only the mu parameter (peak of the distribution) free
- Calculate the pull of the mu (i.e. (fittedMu - trueMu) / muErr)
- Repeat 1e6 times
Ideally, the pull distribution should be Gaussian and centred at 0. However, what I’ve been seeing is that the pull distribution is not centred at 0 when the PDF of choice is asymmetric and tends to be shifted in the direction of the longer tail. The effect is larger the smaller the number of events.
Has anyone ever seen this before? Does anyone know how to fix it?
The things I’ve tried so far are:
- Using minos to calculate errors rather than hesse
- Reducing eps (I have tried 1e-8 and 1e-10)
- Using minuit rather than minuit2
- Checking all fits converge. Most do, but around 0.01% of fits return a status of 4, rather than 0
- Using both extended and non-extended fits
Thanks in advance!
slimToyDCBTest.py (3.3 KB)
