Enum Class Percentile.Type
- All Implemented Interfaces:
Serializable,Comparable<Percentile.Type>,Constable
- Enclosing class:
Percentile
Type of Rank to percentile to calculate.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionExcludes end points.Includes end points.Percentile of i-th point is (i-1/3)/(n+1/3) * 100%.Mid-range, Percentile of i-th point is (i-0.5)/n * 100% so highest and lowest points correspond to (1-0.5)/n-th and (n-.5)/n-th percentiles.Nearest rank, the smallest value such that least p% of the data is less than or equal to that value. -
Method Summary
Modifier and TypeMethodDescriptionstatic Percentile.TypeReturns the enum constant of this class with the specified name.static Percentile.Type[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NEAREST
Nearest rank, the smallest value such that least p% of the data is less than or equal to that value. -
INCLUSIVE
Includes end points. The percentile of i-th point is (i-1)/(n-1)*100% so the lowest and highest values corresponds to 0-th and 100-th percentiles. Like EXCEL's Percentile method -
EXCLUSIVE
Excludes end points. Percentile of i-th point is i/(n+1)*100% so lowest and highest values correspond to 1/(n+1)-th and n/(n+1) percentiles. Like EXCEL'sPercentile.EXCmethod -
MID
Mid-range, Percentile of i-th point is (i-0.5)/n * 100% so highest and lowest points correspond to (1-0.5)/n-th and (n-.5)/n-th percentiles. Like Matlab'sprctilemethod. -
MEDIAN
Percentile of i-th point is (i-1/3)/(n+1/3) * 100%. Unbiased estimator see https://www.itl.nist.gov/div898/handbook/prc/section2/prc262.htm
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-