Stats.Percentiles Method
Definition
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.2
Overload List
Percentiles(Double[], Int32[]) | Gets the specified percentiles. |
Percentiles( | Gets the specified percentiles. |
Percentiles<T>(Vector<T>, Int32[]) | Gets the specified percentiles. |
Percentiles(Double[], Int32[])
public static double[] Percentiles(
double[] values,
int[] percents
)
Parameters
Return Value
Double[]A Double array containing the percentiles for to the percentage specified by the corresponding elements of percents.
Remarks
If a percentile falls between two observations, it is interpolated between the adjacent observations.
Exceptions
Argument | values is null. -or- percents is null. |
Argument | One or more of the elements of percents is less than zero or greater than 100. |
Percentiles(Vector<Double>, Int32[])
public static double[] Percentiles(
this Vector<double> values,
params int[] percents
)
Parameters
Return Value
Double[]A Double array containing the percentiles for to the percentage specified by the corresponding elements of percents.
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 percentile falls between two observations, it is interpolated between the adjacent observations.
Exceptions
Argument | values is null. -or- percents is null. |
Argument | One or more of the elements of percents is less than zero or greater than 100. |
Percentiles<T>(Vector<T>, Int32[])
public static T[] Percentiles<T>(
Vector<T> values,
int[] percents
)
Parameters
Type Parameters
- T
Return Value
T[]A Double array containing the percentiles for to the percentage specified by the corresponding elements of percents.
Remarks
If a percentile falls between two observations, it is interpolated between the adjacent observations.
Exceptions
Argument | values is null. -or- percents is null. |
Argument | One or more of the elements of percents is less than zero or greater than 100. |