# Likelihood ratio test for bi dimensional data

ROOT Version: 6.16
_Platform:_MacOs Mojave
Compiler: gcc

Hello Everyone. This might not be the best place to post this question but I can’t find a way out of this problem.
1- bosons have an angular distribution in θ and 𝜙

𝐹(𝜃,𝜙)=34𝜋[0.5(1−𝛼)+(0.5)(3𝛼−1)𝑐𝑜𝑠(𝜃)2−𝛽𝑠𝑖𝑛(𝜃)2𝑐𝑜𝑠(2𝜙)−2‾√𝛾𝑠𝑖𝑛(2𝜃)𝑐𝑜𝑠(𝜙)]

With 𝛼=0.65,𝛽=0.06,𝛾=−0.18

I sample some Monte Carlo events from this distribution (50000). Now 0- bosons are uniformly distributed 𝜃,𝜙,
that means that the pdf is a constant:
𝑓(𝜃,𝜙)=12𝜋2𝑖𝑓𝜃∈[0,𝜋],𝜙∈[0,2𝜋]

I’m asked to test the hypothesis that the Montecarlo data comes from 1- or 0- distribution. This sounds really trivial of course. I opted for a simple likelihood ratio. Note now that 𝐹(𝜃,𝜙) reduces to uniform when 𝛼=𝛼0=1./3,𝛽=𝛽0=0,𝛾=𝛾0=0:

𝜆=∏𝑓(𝜃,𝜙|𝛼0,𝛽0,𝛾0) / ∏𝐹(𝜃,𝜙|𝛼,𝛽,𝛾)

So basically what I do now is simple taking every 𝜃 and 𝜙 in my 50000 events and plug it into each pdf and get the value or the likelihood for that instance to be sampled given the uniform or alternative hypothesis.

Since both values are, by definition of pdf minor than 1, then this multiplication computation exceeds the numerical precision of a long double in c++. What I did then is turn into a logarithm:
𝑙𝑜𝑔(𝜆)=∑𝑙𝑜𝑔(𝑓(𝜃𝑖,𝜙𝑖|𝛼0,𝛽0,𝛾0))−∑𝑙𝑜𝑔(𝐹(𝜃𝑖,𝜙𝑖|𝛼,𝛽,𝛾))

This value turns out to be:
𝑙𝑜𝑔(𝜆)=−40051→𝜆=𝑒xp(−40051)

with the method I used before.

I expected a really small value for the statistics since a sample from one of the hypothesis I’m testing on but can it be this small?
Furthermore how do I compute the rejection region according to the Neyman Pearson Lemma?
Is this the best way do do a statistical hypothesis test in 2 dimensions?

I’ll post some snapshot of the distributions and their fits. Thank you everyone who can help, I’m kind of desperate ahah.

result_ML_unbinned_2.pdf (104.0 KB)
result_ML_unbinned.pdf (76.3 KB)

@moneta perhaps you can help here please?