Currently, histogram_stddev and histogram_stdvar use the geometric mean of a bucket range as representative for the observations in that bucket. That makes sense for exponential buckets, but for NHCB, we should simply use the arithmetic mean (as we also use linear interpolation to estimate quantiles and fractions).
Example for the geometric mean in histogram_stddev:
|
val = math.Sqrt(bucket.Upper * bucket.Lower) |
This should be an easy change. Just do the arithmetic mean instead for NHCBs.