VectorExtensions.Quantile<T> Method

Gets the specified quantile.

Definition

Namespace: Numerics.NET.DataAnalysis
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4
C#
public static T Quantile<T>(
	this Vector<T> values,
	double probability,
	QuantileType type = QuantileType.R
)

Parameters

values  Vector<T>
A Vector<T>.
probability  Double
A value between 0 and 1, inclusive.
type  QuantileType  (Optional)
The type of quantile to compute.

Type Parameters

T

Return Value

T
The quantile corresponding to the probability specified by probability.

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).

Exceptions

ArgumentNullException

values is null.

ArgumentOutOfRangeException

probability is less than zero or greater than 1.

See Also