scalation.random

Quantile

object Quantile extends Error

The Quantile object contains methods for computing 'Finv', the inverse Cumulative Distribution Functions (iCDF's) for popular sampling distributions: StandardNormal, StudentT, ChiSquare and Fisher. For a given CDF 'F' and quantile 'p', compute 'x' such that the 'F(x) = p'.

Linear Supertypes
Error, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Quantile
  2. Error
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. type ICDF = (Double, Array[Int]) ⇒ Double

    Type for inverse Cumulative Distribution Function (iCDF)

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def chiSquareCDF(x: Double, df: Int = 4): Double

    Compute the Cumulative Distribution Function (CDF) for the ChiSquare distribution by numerically integrating the ChiSquare probability density function (pdf).

    Compute the Cumulative Distribution Function (CDF) for the ChiSquare distribution by numerically integrating the ChiSquare probability density function (pdf). See Variate.scala.

    x

    the x coordinate

    df

    the degrees of freedom

  8. def chiSquareInv(p: Double, df: Int): Double

    Compute the p-th quantile for "ChiSquare distribution" function.

    Compute the p-th quantile for "ChiSquare distribution" function.

    p

    the p-th quantile, e.g., .95 (95%)

    df

    the degrees of freedom

  9. def chiSquareInv(p: Double = .95, _df: Array[Int] = Array (4)): Double

    Compute the p-th quantile for "ChiSquare distribution" function using bisection search of the CDF.

    Compute the p-th quantile for "ChiSquare distribution" function using bisection search of the CDF.

    p

    the p-th quantile, e.g., .95 (95%)

    _df

    the degrees of freedom

  10. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  13. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. def fisherCDF(p: Double, df: (Int, Int)): Double

    Compute the Cumulative Distribution Function (CDF) for the Fisher (F) distribution using beta functions.

    Compute the Cumulative Distribution Function (CDF) for the Fisher (F) distribution using beta functions.

    p

    the p-th quantile, e.g., .95 (95%)

    df

    the pair of degrees of freedom (df1, df2)

  15. def fisherCDF(p: Double, df1: Int, df2: Int): Double

    Compute the Cumulative Distribution Function (CDF) for the Fisher (F) distribution using beta functions.

    Compute the Cumulative Distribution Function (CDF) for the Fisher (F) distribution using beta functions.

    p

    the p-th quantile, e.g., .95 (95%)

    df1

    the degrees of freedom 1

    df2

    the degrees of freedom 2

  16. def fisherInv(p: Double, df: (Int, Int)): Double

    Compute the p-th quantile for "Fisher (F) distribution" function.

    Compute the p-th quantile for "Fisher (F) distribution" function.

    p

    the p-th quantile, e.g., .95 (95%)

    df

    the pair of degrees of freedom (df1 and df2)

  17. def fisherInv(p: Double = .95, _df: Array[Int] = Array (4, 5)): Double

    Compute the p-th quantile for "Fisher (F) distribution" function using bisection search of the CDF.

    Compute the p-th quantile for "Fisher (F) distribution" function using bisection search of the CDF.

    p

    the p-th quantile, e.g., .95 (95%)

    _df

    the degrees of freedom

  18. def flaw(method: String, message: String): Unit

    Show the flaw by printing the error message.

    Show the flaw by printing the error message.

    method

    the method where the error occurred

    message

    the error message

    Definition Classes
    Error
  19. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  20. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  21. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  22. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  23. def normalInv(p: Double = .95, _df: Array[Int] = Array ()): Double

    Compute the p-th quantile for the "standard normal distribution" function.

    Compute the p-th quantile for the "standard normal distribution" function. This function returns an approximation of the "inverse" cumulative standard normal distribution function. I.e., given p, it returns an approximation to the x satisfying p = P{Z <= x} where Z is a random variable from the standard normal distribution. The algorithm uses a minimax approximation by rational functions and the result has a relative error whose absolute value is less than 1.15e-9. Author: Peter J. Acklam (Adapted to Scala by John Miller) (Javascript version by Alankar Misra @ Digital Sutras (alankar@digitalsutras.com)) Time-stamp: 2003-05-05 05:15:14 E-mail: pjacklam@online.no WWW URL: http://home.online.no/~pjacklam

    p

    the p-th quantile, e.g., .95 (95%)

    _df

    the degrees of freedom (not used for Normal)

  24. final def notify(): Unit

    Definition Classes
    AnyRef
  25. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  26. def studentTInv(p: Double, df: Int): Double

    Compute the p-th quantile for "Student's t distribution" function.

    Compute the p-th quantile for "Student's t distribution" function.

    p

    the p-th quantile, e.g., 95 (95%)

    df

    the degrees of freedom

  27. def studentTInv(p: Double = .95, _df: Array[Int] = Array (10)): Double

    Compute the p-th quantile for "Student's t distribution" function.

    Compute the p-th quantile for "Student's t distribution" function. This function returns an approximation of the "inverse" cumulative Student's t distribution function. I.e., given p, it returns an approximation to the x satisfying p = P{T <= x} where T is a random variable from Student's t distribution. From K. Pawlikowski (www.cosc.canterbury.ac.nz). This function computes the upper p-th quantile of the t distribution (the value of t for which the area under the curve from t to +infinity is equal to p). It is a transliteration of the 'STUDTP' function given in Appendix C of "Principles of Discrete Event Simulation", G. S. Fishman, Wiley, 1978.

    p

    the p-th quantile, e.g., 95 (95%)

    _df

    the degrees of freedom

  28. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  29. def toString(): String

    Definition Classes
    AnyRef → Any
  30. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Error

Inherited from AnyRef

Inherited from Any

Ungrouped