2D data with asymmetric errors

Hi all,

I have data in 2D that I want to fit and need asymmetric errors in order to avoid a bias in my fit result. The bin errors I need to set differ from what I get by setting kPoisson as fBinStatErrOptt. Do you have a suggestion of how I can achieve this?

More precisely, I want to fill a TH2, where each bin content is the mean of a poisson distribution and the errors are (asymmetric) confidence intervals for that statistic. The problem is that if I use SetBinErrorOption(kPoisson), errors will be solely determined by the content in that bin, not taking into account the statistics I have for that bin. And setting the bin error resets the bin error option to be of Normal type.

Many thanks!

Hi,

I am not sure I have understood why your statistics will be different from the Poisson one.
In the histogram there is no notion to store asymmetric errors, in the case of kPoisson the asymmetric errors are computed on the fly.
If you cannot use the current computed values, a possible solution is to have a derived class re-implemeting the GetBinErrorLow/high functions or use the TGraphAsymmErrors class which can store asymmetric errors

Lorenzo

Hi @moneta,

Thank you for your suggestion. I will look into it.

Just to illustrate the necessity, let me elaborate on my statistics:
In each of my bins, the variable I am looking at is Poisson distributed and I make N observations of that variable per bin. If I want the bin content to be the average, then I think a sensible confidence interval has to take into account the number of observations per bin*. In my fit a bin with 1000 observations needs to weight more than one with 2 observations. Setting kPoisson would be sensible for 1 observation per bin.

** E.g. LowerLimit = Chi2(alpha1,mean*N)/2N, UpperLimit = Chi2(alpha2,(mean+1)*N)/2N,
with alpha1= (1-ConfidenceLevel)/2, alpha2= 1-(1-ConfidenceLevel)/2

Hi,
I have still do not understood. If you have N Poisson observations, the distributions of their sum is also Poisson, and it is equivalent of one observation equal to the sum of them. So, you should be able to use the current histogram functions to compute the intervals. If you are interested in the average, you might need to scale the result by N. However, is N is large (e.g. .> 5), the distribution of the average becomes normal for the central limit theorem.

Lorenzo

If you have N Poisson observations, the distributions of their sum is also Poisson, and it is equivalent of one observation equal to the sum of them. So, you should be able to use the current histogram functions to compute the intervals.

Yes I agree

If you are interested in the average, you might need to scale the result by N.

Maybe I am missing something, but I don’t see how I can do that. Every bin has a different N, so I need to scale down before fitting, in which case the information about N is lost.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.