I want to ask what is the meaning of the axis in your diagram, especially the y-axis. I understand that the x-axis is the x. What is y-axis here? Is it the probability?
Thanks so much.
[quote=“Jet”]Hello,
ok, now it’s clear the problem you have come into.
The first way that comes i my mind about how to translate the x-uncertainties in y-uncertainties is using a function that gives y=f(x). that function may be a fit of the data (with N=nbinsx parameters, that’s not a physics fit) or a local interpolation of the data (lets say a pol1 curve).
in this way, via the convolution of your p(x) (uncertainties distribution around data along x direction, for example a gaussian distribution with variance=x-uncertainties) with the f(x) you could get the errors you want.
I try to attach an image to explain my solution.
Anyway ROOT has some math tool that could be useful, for example the TGraph::Fit() method and the generic function class TF#.
I don’t know if there’s a straight forward method for getting this result in ROOT.
In the image:
- orange points + error bars = data
- green lines = interpolation with neighbors
- blue curves = data distribution inside error bar
- black arrows = axis
- red area = overlapping area
the idea is to consider the integral of the (data distribution)*(data interpolation) in order to achieve the maximum number of entries that could have been counted in a wrong bin due to x-uncertainties.
note that since the total number of entries can’t change, the negative value of the y-uncertainty of a bin is equal to the sum of all its contribution to POSITIVE y-uncertainty of the previous and next bins.
That’s my solution. For the convolution try this Convolution of two function .
have fun
Gabriele[/quote]