Package jline.api.sim

Class SimDist

java.lang.Object
jline.api.sim.SimDist

public final class SimDist extends Object
Normal and Student t quantiles used by the output-analysis routines.

Thin wrappers over commons-math3, kept in one place so the MATLAB twins (which reach the same values through erfc, erfinv and betaincinv to avoid a toolbox dependency) and the Python twins (which use SciPy) have a single point of comparison. Agreement across the three is to within 1e-10.

Since:
LINE 3.1.0
  • Method Summary

    Modifier and Type
    Method
    Description
    static double
    normcdf(double z)
    Standard normal cumulative distribution function.
    static double
    norminv(double p)
    Standard normal quantile function.
    static double
    tinv(double p, double nu)
    Quantile function of Student's t distribution.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • normcdf

      public static double normcdf(double z)
      Standard normal cumulative distribution function.
      Parameters:
      z - the argument
      Returns:
      Phi(z)
    • norminv

      public static double norminv(double p)
      Standard normal quantile function.
      Parameters:
      p - probability in [0,1]
      Returns:
      Phi inverse of p, infinite at the endpoints
    • tinv

      public static double tinv(double p, double nu)
      Quantile function of Student's t distribution.
      Parameters:
      p - probability in [0,1]
      nu - degrees of freedom, positive
      Returns:
      the p-quantile of t with nu degrees of freedom