VectorExtensions.Quantiles<T> Method

Gets the specified quantile.


Namespace: Extreme.DataAnalysis
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
public static Vector<T> Quantiles<T>(
	this Vector<T> values,
	IList<double> probabilities,
	int type = 7,
	bool labels = false


values  Vector<T>
A vector.
probabilities  IList<Double>
A vector of values between 0 and 1, inclusive that specify the quantiles to be computed.
type  Int32  (Optional)
The type of quantiles to compute.
labels  Boolean  (Optional)
If true, percentage labels are added to the result vector.

Type Parameters


Return Value

A vector of the quantiles of values corresponding to the values in probabilities.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Vector<T>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).


If the quantile falls between two observations, it is interpolated between the adjacent observations.



values is null.


probabilities is null.

ArgumentException One or more of the elements of probabilities is less than zero or greater than 1.
ArgumentOutOfRangeExceptiontype is less than 1 or greater than 9.

See Also