# TProfile errors: what happened to my question?

Hello,

A few days ago I posted a question about TProfile errors. I do not see it now in this
forum. What happened to the question?

Sergei.

Recently we lost several mails to the Forum (including answers) because
of a very stupid hacker (who runs the risk to have soon very serious problems).
Sorry for the problem and repost your question.
Concerning TProfile errors see
root.cern.ch/root/htmldoc/TProfi … etBinError

Feel free to participate to this debate and come with concrete suggestions and (better) code showing the proposed improvements.

Rene

Dear Rene,

My questions were approximately the following:

1. According to the User’s Guide the formula currently used for
a TProfile bin error estimation with option ‘s’ is the following:

$m_2 = \frac{1}{n} \sum_{k=1}^{n} (x_k-<x>)^2$

However it is known that this formula gives a little bit shifted value
of “sigma”, which is the central momentum of the second order. That
means that the mean value of the sigma found using the formula
is shifted. To get an non-shifted value of sigma one must use the
following formula:

$\sigma = \frac{1}{n-1} \sum_{k=1}^{n} (x_k-<x>)^2$

The difference between the two is only important for low statistics bins.

1. Are the options ’ ’ and ‘s’ of the TProfile equivalent to the options
’prof’ and ‘profs’ of the TTree::Draw ?

2. One more suggestion is to add options ‘profi’ and ‘profG’ for the
functions TTree::Draw which would be equivalent to the options ‘i’ and
’G’ of TProfile.

Sergei.

[quote]1) According to the User’s Guide the formula currently used for
a TProfile bin error estimation with option ‘s’ is the following:

Code:

[
m_2 = \frac{1}{n} \sum_{k=1}^{n} (x_k-)^2
]

However it is known that this formula gives a little bit shifted value
of “sigma”, which is the central momentum of the second order. That
means that the mean value of the sigma found using the formula
is shifted. To get an non-shifted value of sigma one must use the
following formula:

Code:

[
\sigma = \frac{1}{n-1} \sum_{k=1}^{n} (x_k-)^2
]

The difference between the two is only important for low statistics bins. [/quote]

We could add an option in TProfile::GetBinError to support this algorithm.
Anna will look into it.

[quote]2) Are the options ’ ’ and ‘s’ of the TProfile equivalent to the options
’prof’ and ‘profs’ of the TTree::Draw ? [/quote]

yes

[quote]3) One more suggestion is to add options ‘profi’ and ‘profG’ for the
functions TTree::Draw which would be equivalent to the options ‘i’ and
’G’ of TProfile. [/quote]

You can call TProfile::SetErrorOption on an existing TProfile to set
one of these options.

Rene

Dear Rene,

It would be much more convenient if one could use them as TTree::Draw
options (‘profi’ and ‘profG’). Here are two arguments in favor of this:

1. It would be possible to use the options using TTreeViewer without
having to type something in the ROOT command line by justt giving the
options in the “Option” field of the viewer.

2. It would be be possible to give the options in one single line
(TTree::Draw call).

Sincerely yours,
Sergei.

In the CVS version, the options “profi” and “profg” are now supported
by TTree::Draw

Rene