def percentile_index(category, x, inclusive = false)
      total_encountered = 0
      @categories[category][:buckets].each_with_index do |count, index|
        total_encountered += count
        percentage = ((total_encountered.to_f / hits(category).to_f) * 100).floor
        return index if (inclusive && percentage >= x) || (!inclusive && percentage > x)
      end
    end
def percentile_index(category, x, inclusive = false)
      total_encountered = 0
      @categories[category][:buckets].each_with_index do |count, index|
        total_encountered += count
        percentage = ((total_encountered.to_f / hits(category).to_f) * 100).floor
        return index if (inclusive && percentage >= x) || (!inclusive && percentage > x)
      end
    end
Returns the upper bound value that would include x% of the hits.