Skip to content

compute wmean

kgryte edited this page May 12, 2015 · 1 revision

Computes a weighted mean of a numeric array.

var data = [ 2, 4, 2, 7, 3 ],
	weights = [ 1, 2, 1, 4, 0 ];

var wmean = compute.wmean( data, weights );
Clone this wiki locally