Stats.Percentile Method
Definition
Namespace: Numerics.NET.Statistics
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3
Overload List
Percentile(Double[], Int32) | Gets the specified percentile. |
Percentile( | Gets the specified percentile. |
Percentile<T>(Vector<T>, Int32, QuantileType) | Gets the specified percentile. |
Percentile(Double[], Int32)
Gets the specified percentile.
public static double Percentile(
double[] values,
int percent
)
Parameters
Return Value
DoubleThe percentile corresponding to the percentage specified by percent.
Remarks
If the percentile falls between two observations, it is interpolated between the adjacent observations.
Exceptions
Argument | values is null. |
Argument | percent is less than zero or greater than 100. |
Percentile(Vector<Double>, Double)
Gets the specified percentile.
public static double Percentile(
this Vector<double> values,
double percent
)
Parameters
Return Value
DoubleThe percentile corresponding to the percentage specified by percent.
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 the percentile falls between two observations, it is interpolated between the adjacent observations.
Exceptions
Argument | values is null. |
Argument | percent is less than zero or greater than 100. |
Percentile<T>(Vector<T>, Int32, QuantileType)
Gets the specified percentile.
public static T Percentile<T>(
this Vector<T> values,
int percent,
QuantileType type = QuantileType.Default
)
Parameters
- values Vector<T>
- A Vector<T>.
- percent Int32
- An integer between 0 and 100, inclusive.
- type QuantileType (Optional)
- The type of quantile to compute.
Type Parameters
- T
Return Value
TThe percentile corresponding to the percentage specified by percent.
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).Remarks
If the percentile falls between two observations, it is interpolated between the adjacent observations.
Exceptions
Argument | values is null. |
Argument | percent is less than zero or greater than 100. |