Extended Likelihood Question of ROOFIT

Hi, everyone,

I have a basic question about extended likelihood used in “fitTo“ in ROOFIT like this.

model.fitTo(data, Extended(kTure), Save());

I understand this extended means there is a Poisson distribution multiplied to regular likelihood function. From source code, maybe use Poisson from expected total number and put observed events to this Poisson to get a extra constrain from Line 752 of this websit:

My question is: why not we use Poisson distribution of observed event number, and take expected total number into this distribution as a extra constrain? And what’s the difference of these two opinions?

Thank you in advance!

Best Regards!

Hi @Gao,

Thank you for your question. I’m sure @jonas will be able to help you.

Cheers,

Dev

Hi, thanks for the question!

My question is: why not we use Poisson distribution of observed event number, and take expected total number into this distribution as a extra constrain?

I don’t see how this is different from what is done already :smiley: Maybe you mean to do the same with a different interface? Can you maybe show some code sketch about how you would expect these two options to look like and differ? Maybe I understand better what you mean then.

Cheers,
Jonas

Hi, firstly, thanks for devajith’s kind reminder and your generous help.

To be clear, I can show the formulas directly. The ROOFIT may use the extended likelihood as this

LL=\mathrm{Pois}(n_{obs}; n_{s}+n_{b})\times \mathrm{PDF}_{\mathrm{total}}=\frac{(n_{s}+n_{b})^{n_{obs}}e^{-(n_{s}+n_{b})}}{n_{obs}!}\times \mathrm{PDF}_{\mathrm{total}}

This is what we learn from some textbook. Then I wonder why not use this LL instead?

LL’=\mathrm{Pois}(n_{s}+n_{b}; n_{obs})\times \mathrm{PDF}_{\mathrm{total}}=\frac{n_{obs}^{(n_{s}+n_{b})}e^{-n_{obs}}}{(n_{s}+n_{b})!}\times \mathrm{PDF}_{\mathrm{total}}

Maybe these two LLs would have some differences in some cases?
Thanks for your generous help again.

Cheers,

Gao

Okay I see what you mean! The second formula is indeed not correct. The Poisson distribution is not symmetric under the exchange of the parameter and the observable, so mathematically your two options are not equivalent.

The first formula is correct. For the likelihood, you are interested in the probability of n_{obs} as a function of your model parameter, which is here n_s + n_b.

Thanks for your kind explanation! In addition, I have two following doubts.

One is what’s the solution that we should use extended likelihood? I think I only use it when I need to fit the mass distribution to get signal yields and when we perform pwa fit or polarization parameter fit, I think simple likelihood used in fact? Maybe I am wrong?

Another is that we are facing this case:
Step1, we fit a mass distribution with extended likelihood from ROOFIT and scan n_{s} to get a \mathrm{PDF}_{n_{s}}. We have many kinds of samples (\mathrm{sample}_{1}~...~\mathrm{sample}_{k}) and get these \mathrm{PDF}^{1}_{n_{s}}~...~\mathrm{PDF}^{k}_{n_{s}}. At the same time, we can also set n_{s} to be free and get the fitted mean value (n_{s~1}^{\mathrm{max}},...,n_{s~k}^{\mathrm{max}}) with the maximum extended likelihood.
Step2, we have some physical variables (\theta_{1}~...~\theta_{m}) and can get n^{i}_{\theta} with a function n^{i}_{\theta}=f_{i}(\theta_{1},...,\theta_{m}), then how should we construct the likelihood? We have three methods:

Method 1: Likelihood: L=\prod_{i=1}^{k}\mathrm{PDF}^{i}_{n_{s}}(n^{i}_{\theta}).
Method 2: Extended Likelihood like ROOFIT: L=\prod_{i=1}^{k}\mathrm{Pois}(n^{\mathrm{max}}_{s~i};n^{i}_{\theta})\mathrm{PDF}_{n_{s}}^{i}(n_{\theta}^{i})
Method 3: L=\prod_{i=1}^{k}\mathrm{Pois}(n_{s~i}^{\mathrm{max}};n_{\theta}^{i})

Whether we still need to use extended likelihood or not? Maybe \mathrm{PDF}^{i}_{n_{s}} has taken account into the extended Poisson contribution in step 1 and should use simple likelihood?

Many thanks for your generous answer again!

Best Regards!
G