Click or drag to resize

DescriptiveStatistics.Percentile<T> Method

Returns the nth percentile value from the list. The list is assumed to be sorted.

Namespace:  AGI.Foundation
Assembly:  AGI.Foundation.Core (in AGI.Foundation.Core.dll) Version: 24.3.420.0 (24.3.420.0)
Syntax
public static T Percentile<T>(
	IList<T> dataList,
	double percentile
)

Parameters

dataList
Type: System.Collections.Generic.IList<T>
The sorted list from which to find the nth value.
percentile
Type: System.Double
The percentile you seek (1-100).

Type Parameters

T
The type of element in the list.

Return Value

Type: T
The nth percentile value from the sorted list.
Exceptions
ExceptionCondition
ArgumentNullException Thrown when dataList is null.
ArgumentException Thrown when dataList is empty.
ArgumentOutOfRangeException Thrown when the parameter percentile is not between 1 and 100.
See Also