hist_ratio - add weights for numerator and handle errors correctly when weighted