Quantile

scalation.random.Quantile
object Quantile

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 probability/quantile p, compute x such that F(x) = p. The iCDF may be thought of as giving value of x for which the area under the curve from -infinity to x of the probability density function (pdf) is equal to p.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Quantile.type

Members list

Value members

Concrete methods

def check(p: Double, x_min: Double): (Boolean, Double)

Check whether the probability p is out of range (giving -0.0) or extreme, either close to 0 (giving -infinity) or 1 (giving +infinity). Return (true, special-value) for these cases.

Check whether the probability p is out of range (giving -0.0) or extreme, either close to 0 (giving -infinity) or 1 (giving +infinity). Return (true, special-value) for these cases.

Value parameters

p

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

x_min

the smallest value in the distribution's domain

Attributes

def chiSquareInv(p: Double, pr: Parameters): Double

Compute the p-th quantile for "ChiSquare distribution" function using bisection search of the CDF. FIX: need a faster algorithm

Compute the p-th quantile for "ChiSquare distribution" function using bisection search of the CDF. FIX: need a faster algorithm

Value parameters

p

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

pr

parameter for the degrees of freedom

Attributes

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.

Value parameters

df

the degrees of freedom

p

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

Attributes

def empiricalInv(p: Double, eCDF: (VectorD, VectorD)): Double

Compute the p-th quantile for the Empirical distribution function.

Compute the p-th quantile for the Empirical distribution function.

Value parameters

eCDF

the empirical CDF

p

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

Attributes

def empiricalInv(p: Double, data: Parameters): Double

Compute the p-th quantile for the Empirical distribution function.

Compute the p-th quantile for the Empirical distribution function.

Value parameters

data

parameters as data

p

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

Attributes

def exponentialInv(p: Double, pr: Parameters): Double

Compute the p-th quantile for the Exponential distribution function.

Compute the p-th quantile for the Exponential distribution function.

Value parameters

p

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

pr

parameter for the rate

Attributes

def fisherInv(p: Double, pr: Parameters): Double

Compute the p-th quantile for "Fisher (F) distribution" function using bisection search of the CDF. FIX: need a faster algorithm

Compute the p-th quantile for "Fisher (F) distribution" function using bisection search of the CDF. FIX: need a faster algorithm

Value parameters

p

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

pr

parameters for the degrees of freedom (numerator, denominator)

Attributes

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.

Value parameters

df

the pair of degrees of freedom ('df1' and 'df2')

p

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

Attributes

def normalInv(p: Double, pr: Parameters): Double

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

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

Value parameters

p

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

pr

parameter for the distribution (currently not used)

Attributes

See also
def studentTInv(p: Double, pr: Parameters): Double

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

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

Value parameters

p

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

pr

parameter for the degrees of freedom

Attributes

See also
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.

Value parameters

df

the degrees of freedom

p

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

Attributes

def studentTInv2(p: Double, pr: Parameters): Double

It is a transliteration of the 'STUDTP' function given in Appendix C

Value parameters

p

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

pr

parameter for the degrees of freedom

Attributes

See also
def test(icdf: String): Unit

Test the given iCDF with name 'icdf'

Test the given iCDF with name 'icdf'

Value parameters

icdf

the name of the inverse CDF to test

Attributes

def test_df(fi: Distribution, name: String, pr: Parameters): Unit

Test the given iCDF fi over a range of p values for the given parameters e.g., degrees of freedom 'df'.

Test the given iCDF fi over a range of p values for the given parameters e.g., degrees of freedom 'df'.

Value parameters

fi

the iCDF 'Finv(.)'

name

the name of iCDF 'Finv(.)'

pr

the parameters for the distribution, e.g., degrees of freedom

Attributes

def uniformInv(p: Double, pr: Parameters): Double

Compute the p-th quantile for the Uniform distribution function.

Compute the p-th quantile for the Uniform distribution function.

Value parameters

p

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

pr

parameters for the end-points of the Uniform distribution

Attributes