CDF

scalation.random.CDF
object CDF

The CDF object contains methods for computing 'F(x)', the Cumulative Distribution Functions 'CDF's for popular distributions: Uniform Exponential Weibel Empirical StandardNormal StudentT ChiSquare Fisher For a given CDF 'F' with argument 'x', compute 'p = F(x)'.

Attributes

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

Members list

Value members

Concrete methods

def _normalCDF(x: Double): Double

Compute the Cumulative Distribution Function (CDF) 'F(x)' for the Standard Normal distribution using the Hart function. Recoded in Scala from C code

Compute the Cumulative Distribution Function (CDF) 'F(x)' for the Standard Normal distribution using the Hart function. Recoded in Scala from C code

Value parameters

x

the x coordinate, argument to F(x)

Attributes

See also

stackoverflow.com/questions/2328258/cumulative-normal-distribution-function-in-c-c which was recoded from VB code.

def _normalCDF(x: Double, pr: Parameters): Double

Compute the Cumulative Distribution Function (CDF) for the Normal distribution.

Compute the Cumulative Distribution Function (CDF) for the Normal distribution.

Value parameters

pr

parameters for the mean and standard deviation

x

the x coordinate, argument to F(x)

Attributes

Build an empirical CDF from input data vector 'x'. Ex: x = (2, 1, 2, 3, 2) -> cdf = ((1, .2), (2, .8), (3, 1.))

Build an empirical CDF from input data vector 'x'. Ex: x = (2, 1, 2, 3, 2) -> cdf = ((1, .2), (2, .8), (3, 1.))

Value parameters

x

the input data vector

Attributes

def chiSquareCDF(x: Double, df: Int): Double

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

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

Value parameters

df

the degrees of freedom

x

the x coordinate, argument to F(x)

Attributes

def chiSquareCDF(x: Double, pr: Parameters): Double

Compute the Cumulative Distribution Function (CDF) for the ChiSquare distribution.

Compute the Cumulative Distribution Function (CDF) for the ChiSquare distribution.

Value parameters

df

parameter for the degrees of freedom

x

the x coordinate, argument to F(x)

Attributes

def empiricalCDF(x: Double, eCDF: (VectorD, VectorD)): Double

Compute the Cumulative Distribution Function 'CDF' 'F(x)' for the Empirical distribution 'eCDF'.

Compute the Cumulative Distribution Function 'CDF' 'F(x)' for the Empirical distribution 'eCDF'.

Value parameters

eCDF

the Empirical CDF

x

the x coordinate, argument to F(x)

Attributes

def exponentialCDF(x: Double, λ: Double): Double

Compute the Cumulative Distribution Function 'CDF' 'F(x)' for the Exponential distribution.

Compute the Cumulative Distribution Function 'CDF' 'F(x)' for the Exponential distribution.

Value parameters

x

the x coordinate, argument to F(x)

λ

the rate parameter

Attributes

def exponentialCDF(x: Double, pr: Parameters): Double

Compute the Cumulative Distribution Function 'CDF' 'F(x)' for the Exponential distribution.

Compute the Cumulative Distribution Function 'CDF' 'F(x)' for the Exponential distribution.

Value parameters

parm

parameter giving the rate

x

the x coordinate, argument to F(x)

Attributes

def fisherCDF(x: 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.

Value parameters

df1

the degrees of freedom 1 (numerator)

df2

the degrees of freedom 2 (denominator)

x

the x coordinate, argument to F(x)

Attributes

def fisherCDF(x: 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.

Value parameters

df

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

x

the x coordinate, argument to F(x)

Attributes

def fisherCDF(x: Double, pr: Parameters): 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.

Value parameters

df

parameters for degrees of freedom numerator and denominator

x

the x coordinate, argument to F(x)

Attributes

def noncentralTCDF(x: Double, mu: Double, df: Double): Double

Compute the Cumulative Distribution Function (CDF) for "Noncentral t" distribution.

Compute the Cumulative Distribution Function (CDF) for "Noncentral t" distribution.

Value parameters

df

the degrees of freedom (must be > 0.0)

mu

the noncentrality parameter (or mean)

x

the x coordinate, argument to F(x)

Attributes

See also
def normalCDF(x: Double): Double

Compute the Cumulative Distribution Function 'CDF' 'F(x)' for the Standard Normal distribution using the Hart function. Recoded in Scala from Java code. Apache license given above.

Compute the Cumulative Distribution Function 'CDF' 'F(x)' for the Standard Normal distribution using the Hart function. Recoded in Scala from Java code. Apache license given above.

Value parameters

x

the x coordinate, argument to F(x)

Attributes

See also
def normalCDF(x: Double, pr: Parameters): Double

Compute the Cumulative Distribution Function (CDF) for the Normal distribution.

Compute the Cumulative Distribution Function (CDF) for the Normal distribution.

Value parameters

pr

parameters for the mean and standard deviation

x

the x coordinate, argument to F(x)

Attributes

def studentTCDF(x: Double, df: Double): Double

Compute the Cumulative Distribution Function (CDF) for "Student's t" distribution.

Compute the Cumulative Distribution Function (CDF) for "Student's t" distribution.

Value parameters

df

the degrees of freedom (must be > 0.0)

x

the x coordinate, argument to F(x)

Attributes

See also

[JKB 1995] Johnson, Kotz & Balakrishnan "Continuous Univariate Distributions" (Volume 2) (2nd Edition) (Chapter 28) (1995)

def studentTCDF(x: Double, pr: Parameters): Double

Compute the Cumulative Distribution Function (CDF) for "Student's t" distribution.

Compute the Cumulative Distribution Function (CDF) for "Student's t" distribution.

Value parameters

pr

parameter for the degrees of freedom

x

the x coordinate, argument to F(x)

Attributes

def test(cdf: String): Unit

Test the given CDF with name 'cdf'

Test the given CDF with name 'cdf'

Value parameters

cdf

the name of the CDF to test

Attributes

def test_df(ff: Distribution, name: String, x_min: Double, x_max: Double, pr: Parameters): Unit

Test the given CDF 'ff' over a range of 'x' values for the given parameters, e.g., degrees of freedom 'df'.

Test the given CDF 'ff' over a range of 'x' values for the given parameters, e.g., degrees of freedom 'df'.

Value parameters

ff

the CDF F(.)

name

the name of CDF F(.)

pr

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

x_max

the maximum of value of x to test

x_min

the minimum of value of x to test

Attributes

def test_diff(ff1: Distribution, ff2: Distribution, name: String, x_min: Double, x_max: Double, pr: Parameters): Unit

Test the difference CDF 'ff1' and 'ff2' over a range of 'x' values for the given parameters. e.g., degrees of freedom 'df'.

Test the difference CDF 'ff1' and 'ff2' over a range of 'x' values for the given parameters. e.g., degrees of freedom 'df'.

Value parameters

ff

the CDF F(.)

name

the name of CDF F(.)

pr

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

x_max

the maximum of value of x to test

x_min

the minimum of value of x to test

Attributes

def uniformCDF(x: Double, a: Double, b: Double): Double

Compute the Cumulative Distribution Function 'CDF' 'F(x)' for the Uniform distribution.

Compute the Cumulative Distribution Function 'CDF' 'F(x)' for the Uniform distribution.

Value parameters

a

the lower end-point of the uniform distribution

b

the upper end-point of the uniform distribution

x

the x coordinate, argument to F(x)

Attributes

def uniformCDF(x: Double, pr: Parameters): Double

Compute the Cumulative Distribution Function 'CDF' 'F(x)' for the Uniform distribution.

Compute the Cumulative Distribution Function 'CDF' 'F(x)' for the Uniform distribution.

Value parameters

pr

parameters giving the end-points of the uniform distribution

x

the x coordinate, argument to F(x)

Attributes

def weibullCDF(x: Double, α: Double, β: Double): Double

Compute the Cumulative Distribution Function 'CDF' 'F(x)' for the Weibull distribution.

Compute the Cumulative Distribution Function 'CDF' 'F(x)' for the Weibull distribution.

Value parameters

x

the x coordinate, argument to F(x)

α

the shape parameter

β

the scale parameter

Attributes

def weibullCDF(x: Double, pr: Parameters): Double

Compute the Cumulative Distribution Function 'CDF' 'F(x)' for the Weibull distribution.

Compute the Cumulative Distribution Function 'CDF' 'F(x)' for the Weibull distribution.

Value parameters

parm

parameters giving the shape and scale

x

the x coordinate, argument to F(x)

Attributes