Similar to tab_bins but instead of each observation being implicitly given weight 1, it now has weight given by wt[i].

tab_bins_weighted(a, wt, nbins)

Arguments

a

a set of observations

wt

a set of weights

nbins

number of bins