Skip to content

compute quantile

kgryte edited this page May 12, 2015 · 1 revision

Computes a quantile for a numeric array.

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

var q = compute.quantile( data, 0.25 );

If the input array is already sorted in ascending order, set the sorted option to true.

var opts = {
	'sorted': true
};

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

var q = compute.quantile( data, 0.25, opts );
Clone this wiki locally