Enum Class Percentile.Type

java.lang.Object
java.lang.Enum<Percentile.Type>
com.singularsys.extensions.statistical.Percentile.Type
All Implemented Interfaces:
Serializable, Comparable<Percentile.Type>, Constable
Enclosing class:
Percentile

public static enum Percentile.Type extends Enum<Percentile.Type>
Type of Rank to percentile to calculate.
  • Enum Constant Details

    • NEAREST

      public static final Percentile.Type NEAREST
      Nearest rank, the smallest value such that least p% of the data is less than or equal to that value.
    • INCLUSIVE

      public static final Percentile.Type 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

      public static final Percentile.Type 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's Percentile.EXC method
    • MID

      public static final Percentile.Type 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's prctile method.
    • MEDIAN

      public static final Percentile.Type 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

      public static Percentile.Type[] 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

      public static Percentile.Type valueOf(String name)
      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 name
      NullPointerException - if the argument is null