Alea::CDF
Alea::CDF is the interface used to calculate the Cumulative Distribution Functions.
Given X ~ D and a fixed quantile x, CDFs are defined as the functions that associate x
to the probability that the real-valued random X from the distribution D
will take a value less or equal to x.
Arguments passed to Alea::CDF methods to shape the distributions are analogous to those used for sampling:
Alea::CDF.normal(0.0) # => 0.5
Alea::CDF.normal(2.0, loc: 1.0, sigma: 0.5) # => 0.9772498680518208
Alea::CDF.chisq(5.279, df: 5.0) # => 0.6172121213841358
NOTE: for real-valued quantiles is used x, k for discrete-valued instead.
Class methods
Calculate the cumulative distribution function evaluated at x.
@parameters:
x: real-valued quantile of which estimate the cdf.df: degrees of freedom of the distribution; usually mentioned ask.
@exceptions:
Alea::NaNErrorif any of the arguments isNaN.Alea::InfinityErrorif any of the arguments isInfinity.Alea::UndefinedErrorifdfis negative or zero.
Calculate the cumulative distribution function evaluated at x.
@parameters:
x: real-valued quantile of which estimate the cdf.df: degrees of freedom of the distribution; usually mentioned ask.
@exceptions:
Alea::NaNErrorif any of the arguments isNaN.Alea::InfinityErrorif any of the arguments isInfinity.Alea::UndefinedErrorifdfis negative or zero.
Calculate the cumulative distribution function evaluated at x.
@parameters:
x: real-valued quantile of which estimate the cdf.scale: scale parameter of the distribution; usually mentioned asλ^-1.
@exceptions:
Alea::NaNErrorif any of the arguments isNaN.Alea::InfinityErrorif any of the arguments isInfinity.Alea::UndefinedErrorifscaleis negative or zero.
Calculate the cumulative distribution function evaluated at x.
@parameters:
x: real-valued quantile of which estimate the cdf.scale: scale parameter of the distribution; usually mentioned asλ^-1.
@exceptions:
Alea::NaNErrorif any of the arguments isNaN.Alea::InfinityErrorif any of the arguments isInfinity.Alea::UndefinedErrorifscaleis negative or zero.
Calculate the cumulative distribution function evaluated at x.
@parameters:
x: real-valued quantile of which estimate the cdf.shape: shape parameter of the distribution; usually mentioned ask.scale: scale parameter of the distribution; usually mentioned asθ.
@exceptions:
Alea::NaNErrorif any of the arguments isNaN.Alea::InfinityErrorif any of the arguments isInfinity.Alea::UndefinedErrorif any ofshapeorscaleis negative or zero.
Calculate the cumulative distribution function evaluated at x.
@parameters:
x: real-valued quantile of which estimate the cdf.shape: shape parameter of the distribution; usually mentioned ask.scale: scale parameter of the distribution; usually mentioned asθ.
@exceptions:
Alea::NaNErrorif any of the arguments isNaN.Alea::InfinityErrorif any of the arguments isInfinity.Alea::UndefinedErrorif any ofshapeorscaleis negative or zero.
Calculate the cumulative distribution function evaluated at x.
@parameters:
x: real-valued quantile of which estimate the cdf.loc: centrality parameter, or mean of the distribution; usually mentioned asμ.scale: scale parameter of the distribution; usually mentioned asb.
@exceptions:
Alea::NaNErrorif any of the arguments isNaN.Alea::InfinityErrorif any of the arguments isInfinity.Alea::UndefinedErrorifscaleis negative or zero.
Calculate the cumulative distribution function evaluated at x.
@parameters:
x: real-valued quantile of which estimate the cdf.loc: centrality parameter, or mean of the distribution; usually mentioned asμ.scale: scale parameter of the distribution; usually mentioned asb.
@exceptions:
Alea::NaNErrorif any of the arguments isNaN.Alea::InfinityErrorif any of the arguments isInfinity.Alea::UndefinedErrorifscaleis negative or zero.
Calculate the cumulative distribution function evaluated at x.
@parameters:
x: real-valued quantile of which estimate the cdf.loc: centrality parameter, or mean of the underlying normal distribution; usually mentioned asμ.sigma: scale parameter, or standard deviation of the underlying normal distribution; usually mentioned asσ.
@exceptions:
Alea::NaNErrorif any of the arguments isNaN.Alea::InfinityErrorif any of the arguments isInfinity.Alea::UndefinedErrorifsigmais negative or zero.
Calculate the cumulative distribution function evaluated at x.
@parameters:
x: real-valued quantile of which estimate the cdf.loc: centrality parameter, or mean of the underlying normal distribution; usually mentioned asμ.sigma: scale parameter, or standard deviation of the underlying normal distribution; usually mentioned asσ.
@exceptions:
Alea::NaNErrorif any of the arguments isNaN.Alea::InfinityErrorif any of the arguments isInfinity.Alea::UndefinedErrorifsigmais negative or zero.
Calculate the cumulative distribution function evaluated at x.
@parameters:
x: real-valued quantile of which estimate the cdf.loc: centrality parameter, or mean of the distribution; usually mentioned asμ.sigma: scale parameter, or standard deviation of the distribution; usually mentioned asσ.
@exceptions:
Alea::NaNErrorif any of the arguments isNaN.Alea::InfinityErrorif any of the arguments isInfinity.Alea::UndefinedErrorifsigmais negative or zero.
Calculate the cumulative distribution function evaluated at x.
@parameters:
x: real-valued quantile of which estimate the cdf.loc: centrality parameter, or mean of the distribution; usually mentioned asμ.sigma: scale parameter, or standard deviation of the distribution; usually mentioned asσ.
@exceptions:
Alea::NaNErrorif any of the arguments isNaN.Alea::InfinityErrorif any of the arguments isInfinity.Alea::UndefinedErrorifsigmais negative or zero.
Calculate the cumulative distribution function evaluated at k.
@parameters:
k: discrete-valued quantile of which estimate the cdf.lam: separation parameter of the distribution; usually mentioned asλ.
@exceptions:
Alea::NaNErrorif any of the arguments isNaN.Alea::InfinityErrorif any of the arguments isInfinity.Alea::UndefinedErroriflamis negative or zero.
Calculate the cumulative distribution function evaluated at k.
@parameters:
k: discrete-valued quantile of which estimate the cdf.lam: separation parameter of the distribution; usually mentioned asλ.
@exceptions:
Alea::NaNErrorif any of the arguments isNaN.Alea::InfinityErrorif any of the arguments isInfinity.Alea::UndefinedErroriflamis negative or zero.
Calculate the cumulative distribution function evaluated at x.
@parameters:
x: real-valued quantile of which estimate the cdf.min: left bound parameter of range of the distribution; usually mentioned asa.max: right bound parameter of range of the distribution; usually mentioned asb.
@notes:
- range is
[min, max).
@exceptions:
Alea::NaNErrorif any of the arguments bound isNaN.Alea::InfinityErrorif any of the arguments bound isInfinity.Alea::UndefinedErrorifmaxis less thanmin.
Calculate the cumulative distribution function evaluated at x.
@parameters:
x: real-valued quantile of which estimate the cdf.min: left bound parameter of range of the distribution; usually mentioned asa.max: right bound parameter of range of the distribution; usually mentioned asb.
@notes:
- range is
[min, max).
@exceptions:
Alea::NaNErrorif any of the arguments bound isNaN.Alea::InfinityErrorif any of the arguments bound isInfinity.Alea::UndefinedErrorifmaxis less thanmin.