I have a histogram of a variable x
, and I would like to get the histogram of f(x)
. Let's just say the transformation function is elementary and smooth. Is there a good method (maybe unbiased?) to transform the histogram(x)
into histogram(f(x))
, without having to re-aggregate on the raw samples?
Some ideas I had:
- transform bin center, and then rounding; seems to leave a lot of gaps in the result though
- transform bin center, and proportionally incrementing the two closest bins; gets rid of some of the gaps, but not entirely
- thought of using some linear interpolation to increase the bin count of the original by 10x, and then transforming these back down to 1/10 size; have not tried this yet
Seems like it would be a common thing to do, so I don't want to reinvent the wheel here.