Re: root : unbinned fit 1D

From: Elemer Nagy <nagy_at_cppm.in2p3.fr>
Date: Sun, 6 Dec 2009 01:53:17 +0100

There was a typo:  

         s**2 ~ s_f**2 = 1/N Sum_i (x_i - c_f)**2

Elemer

On Sun, 6 Dec 2009, Elemer Nagy wrote:

Hi Marc,

assuming that each of the N data points x_i is independent: construct a likelihood L as a product of Gaussians from the datapoints and apply MINUIT to determine the Gaussian central value, c and (if needed) its sigma, s. It is more easy if you take the logarithm of the likelihood, in this case you deal with the sum of data:

Even w/o MINUIT you can solve the fit equations:

     dL/dc = dL/ds = 0

which gives you (of course):

     c ~ c_f = 1/N Sum_i x_i
and

     s ~ s_f = 1/N Sum_i (x_i - c_f)**2

Elemer

On Sun, 6 Dec 2009, Marc Escalier wrote:

Dear root experts,

would somebody know how to proceed to do a unbinned fit of a TH1 histo ?

for example, lets consider
MyTH1Histo->Fit("gaus")

==>i wish to do this fit, but with a unbinned fit

thank you

(i will thank those who know in private to prevent spamming people)

-- 
--------------------------------------------------------------------------

| Elemér Nagy | Phone : (+33) (0)4-91-82-72-73
|
| C.P.P.M. | Fax : (+33) (0)4-91-82-72-99 |
| 163, av. de Luminy Case 902 | Internet : nagy_at_cppm.in2p3.fr |
| F-13288 Marseille CEDEX 09 | |
| FRANCE | |
--------------------------------------------------------------------------
Received on Sun Dec 06 2009 - 01:53:20 CET

This archive was generated by hypermail 2.2.0 : Sun Dec 06 2009 - 11:50:03 CET