measure of central tendency
weighted arithmetic mean
Alejandra Gonzalez-Beltran
From numpy
https://docs.scipy.org/doc/numpy/reference/generated/numpy.average.html
np.average(range(1,11), weights=range(10,0,-1))
Matthew Diller
Orlaith Burke
Philippe Rocca-Serra
The weighted arithmetic mean is a measure of central tendency that is the sum of the products of each observed value and their respective non-negative weights, divided by the sum of the weights, such that the contribution of each observed value to the mean may defer according to its respective weight. It is defined by the formula: A = sum(vi*wi)/sum(wi), where 'i' ranges from 1 to n, 'vi' is the value of each observation, and 'wi' is the value of the respective weight for each observed value.
The weighted arithmetic mean is a kind of mean similar to an ordinary arithmetic mean (the most common type of average), except that instead of each of the data points contributing equally to the final average, some data points are weighted, meaning they contribute more than others.
The weighted arithmetic mean is often used if one wants to combine average values from samples of the same population with different sample sizes.
https://en.wikipedia.org/wiki/Weighted_arithmetic_mean
https://github.com/ISA-tools/stato/issues/59
weighted average
weighted.mean(x, w, ...)
https://stat.ethz.ch/R-manual/R-devel/library/stats/html/weighted.mean.html
ready for release