# Re: [ROOT] Errors used in TGraphErrors

From: Edmond Offermann (edmondoffermann@yahoo.com)
Date: Sun Aug 01 2004 - 21:28:18 MEST

```Hi Stilianos,

Your 2 expressions are identical ?

http://root.cern.ch/root/htmldoc/TGraph.html#TGraph:Fit
In particular ,

"The chisquare is computed as the sum of the quantity below at each
point:

(y - f(x))**2
-----------------------------------
ey**2 + ((f(x+exhigh) - f(x-exlow))/2)**2

where x and y are the point coordinates.

In case the function lies below (above) the data point, ey is ey_low
(ey_high).

thanks to Andy Haas (haas@yahoo.com) for adding the case with
TGraphasymmerrors
University of Washington

a little different approach to approximating the uncertainty in y
because of the
errors in x, is to make it equal the error in x times the slope of the
line.
The improvement, compared to the first method (f(x+ exhigh) -
f(x-exlow))/2
is of (error of x)**2 order. This approach is called "effective
variance method".
This improvement has been made in version 4.00/08 by Anna Kreshuk.:

Eddy

--- Stilianos Kesisoglou <kesisogl@fnal.gov> wrote:

> Hi,
>
> I was wondering, which is the method implemented for the assignment
> of
> errors in
> the TGraphErrors class? The above class accepts errors on both x and
> y, so
> how
> exaclty the errors are combined for the fit? I assume there is a
> chi^2
> function like:
>
>              [ y-f(x) ]**2                     [ y-f(x) ]
>            ------------------       or        ( -------------- ) **2
>                  s**2                               s
>
> What is the s in the above expressions?
>
> Thanks!
>
> Stelios.
>
```

This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:09 MET