Skip to content

compute incrstdev

kgryte edited this page May 12, 2015 · 1 revision

Returns a method to compute a sample standard deviation incrementally.

var data = [ 2, 4, 2, 7, 3 ];

var stdev = compute.incrstdev(),
	sigma;

for ( var i = 0; i < data.length; i++ ) {
	sigma = stdev( data[ i ] );
	console.log( sigma );
}
console.log( stdev() );
Clone this wiki locally