Stats.Percentile Method
Definition
Namespace: Extreme.Statistics
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
Overload List
Percentile(Double[], Int32) | Gets the specified percentile. |
Percentile( | Gets the specified percentile. |
Percentile<T>(Vector<T>, Int32, Int32) | Gets the specified percentile. |
Percentile(Double[], Int32)
Gets the specified percentile.
public static double Percentile(
double[] values,
int percent
)
Parameters
- values Double[]
- A Double array.
- percent Int32
- An integer between 0 and 100, inclusive.
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
ArgumentNullException | values is null. |
ArgumentOutOfRangeException | 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
- values Vector<Double>
- A vector.
- percent Double
- An integer between 0 and 100, inclusive.
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
ArgumentNullException | values is null. |
ArgumentOutOfRangeException | percent is less than zero or greater than 100. |
Percentile<T>(Vector<T>, Int32, Int32)
Gets the specified percentile.
public static T Percentile<T>(
this Vector<T> values,
int percent,
int type = 7
)
Parameters
- values Vector<T>
- A Vector<T>.
- percent Int32
- An integer between 0 and 100, inclusive.
- type Int32 (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
ArgumentNullException | values is null. |
ArgumentOutOfRangeException | percent is less than zero or greater than 100. |