Stats.Quantiles Method

Definition

Namespace: Extreme.Statistics
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23

Overload List

Quantiles(Double[], Double[]) Gets the specified quantiles.
Quantiles(Vector<Double>, Double[]) Gets the specified quantiles.
Quantiles<T>(Vector<T>, Double[]) Gets the specified quantiles.

Quantiles(Double[], Double[])

Gets the specified quantiles.
C#
public static double[] Quantiles(
	double[] values,
	double[] probabilities
)

Parameters

values  Double[]
A Double array.
probabilities  Double[]
An array of values between 0 and 1, inclusive.

Return Value

Double[]
A Double array containing the quantiles for to the percentage specified by the corresponding elements of probabilities.

Remarks

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

Exceptions

ArgumentNullExceptionvalues is null.

-or-

probabilities is null.

ArgumentExceptionOne or more of the elements of probabilities is less than zero or greater than 1.

Quantiles(Vector<Double>, Double[])

Gets the specified quantiles.
C#
public static double[] Quantiles(
	this Vector<double> values,
	params double[] probabilities
)

Parameters

values  Vector<Double>
A vector.
probabilities  Double[]
An array of values between 0 and 1, inclusive.

Return Value

Double[]
A Double array containing the quantiles for the percentage specified by the corresponding elements of probabilities.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Vector<Double>. 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).

Remarks

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

Exceptions

ArgumentNullExceptionvalues is null.

-or-

probabilities is null.

ArgumentExceptionOne or more of the elements of probabilities is less than zero or greater than 1.

Quantiles<T>(Vector<T>, Double[])

Gets the specified quantiles.
C#
public static T[] Quantiles<T>(
	Vector<T> values,
	double[] probabilities
)

Parameters

values  Vector<T>
A Vector<T>.
probabilities  Double[]
An array of values between 0 and 1, inclusive.

Type Parameters

T

Return Value

T[]
A Double array containing the quantiles for to the percentage specified by the corresponding elements of probabilities.

Remarks

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

Exceptions

ArgumentNullExceptionvalues is null.

-or-

probabilities is null.

ArgumentExceptionOne or more of the elements of probabilities is less than zero or greater than 1.

See Also