[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-gsl] very naive question: how to fit _correctly_ an histogram ?

From: Jerome BENOIT
Subject: [Help-gsl] very naive question: how to fit _correctly_ an histogram ?
Date: Thu, 22 Jan 2009 03:18:21 +0800
User-agent: Mozilla-Thunderbird (X11/20090103)

Hello List,

I have a collection of histograms got from simulations to fit.
I want to perform nonlinear least-squares fits.

My concern is rather how to parametrise in a relevant way the a priori model
function of my choice, and how to extract in a pertinent way the information
from the histogram.

First, let say that the model function is a Gaussian:
Of course my histogram may be not centered, so beside
the scale sigma, a shift xi may be considered.
The model function then becomes
Following the same idea, a coefficient Alpha may be introduced: g2(x;Alpha,xi,sigma)=Alpha*g1(x;xi,sigma)=Alpha*g0(x-xi;sigma).

Second, what about the observed value G_i for the ith bin centered at x_i ?
G_i=(width of the bin)*(number of element inside the bin)/(sum over the bins of 

Finally, the function component to implement to feed GSL (section 37.1) may 
f_i=(G_i-g2(x_i;Alpha,xi,sigma)*(with of the bin))/(weight_i)
[by the way, how to get meaning full weight_i ?].

My questions are quite naive, but so far, I have found no totally satisfying 
By googling I have found a lot of fuzzy how to, but no explicit one:
does any know where a fully histogram least-squares fit example can be found
in literature or/and on the web ?

Thanks in advance,


reply via email to

[Prev in Thread] Current Thread [Next in Thread]