Hypothesis test using likelihood function

hello
So I want a particle hypothesis test using likelihood function what I have is three root files ( with data of position x , y and time t )
two of these files are generated by a reconstructed algorithm and they are for a kaon and a pion
the third file is generated by Geant and this information is for a kaon.
what I have to do is test the particle Identification algorithm by testing the hypothesis of the particles.and I did this using a likelihood function from this formula :[url]http://math.stackexchange.com/questions/240603/maximum-likelihood-estimators-of-three-independent-normal-random-variables-with/url]
so having the observables X(x,y,t). and the relative likelihood of the data of kaon and pion (fk and fp)
I apply the ratio ((sum: xi fk)/(sum: xi(fk+fp))
if this ratio is close to 1 then it’s a kaon if it’s not then it’s a pion. what I did is write a macro that calculates the likelihood function for each of these root files data and apply the ratio. I am not sure if this is a correct way to do this though.
so I guess my main question is : is there a simpler way to calculate the likelihood function in root for each data set rather than writing the formula from scratch ? and how can I get the probability density function for each data set?

Thank you. I apologize if this is a bit confusing. please help any comment is appreciated.

Hi,

The easiest way for you is to use RooFit/RooStats. Describe your model using RooFIt and then buy using simple tools of RooStats, as the ProfileLikelihoodCalculator, see tutorial,
root.cern.ch/doc/master/Standar … mo_8C.html

You can perform an hypothesis test.
You do not need in this case to write yourself the likelihood function

Best Regards

Lorenzo

hi,
Thanks alot.
but I am not sure that I understand how to construct my model exactly , I mean my functions each depends on 3 parameters (x,y,t) . so any hints where to start from here?
Thank you.

Hi,
I would suggest you starting looking at the quick start guide of RooFit

root.cern.ch/download/doc/roofi … t_3.00.pdf

Lorenzo

Thanks!