Class InvCdf
-
Method Summary
Modifier and TypeMethodDescriptionstatic doublebeta(double p, double pin, double qin) Returns the inverse of the beta cumulative probability distribution function.static doublechi(double p, double df) Returns the inverse of the chi-squared cumulative probability distribution function.static doublecontinuousUniform(double p, double a, double b) Returns the inverse of the continuous uniform cumulative distribution function.static intdiscreteUniform(double p, int n) Returns the inverse of the discrete uniform cumulative probability distribution function.static doubleexponential(double p, double scale) Returns the inverse of the exponential cumulative probability distribution function.static doubleextremeValue(double p, double mu, double beta) Returns the inverse of the extreme value cumulative probability distribution function.static doubleF(double p, double dfn, double dfd) Returns the inverse of the F cumulative probability distribution function.static doublegamma(double p, double a) Returns the inverse of the gamma cumulative probability distribution function.static doublegeneralizedExtremeValue(double p, double mu, double sigma, double xi) Returns the inverse of the generalized extreme value cumulative distribution function.static doublegeneralizedGaussian(double p, double mu, double alpha, double beta) Returns the inverse of the generalized Gaussian (normal) cumulative distribution function.static doublegeneralizedPareto(double p, double mu, double sigma, double alpha) Returns the inverse of the generalized Pareto cumulative distribution function.static doublegeometric(double r, double pin) Returns the inverse of the discrete geometric cumulative probability distribution function.static doublelogistic(double p, double mu, double sigma) Returns the inverse of the logistic cumulative probability distribution function.static doublelogNormal(double p, double mu, double sigma) Returns the inverse of the standard lognormal cumulative probability distribution function.static doublenoncentralBeta(double p, double shape1, double shape2, double lambda) Returns the inverse of the noncentral beta cumulative distribution function (CDF).static doublenoncentralchi(double p, double df, double alam) Returns the inverse of the noncentral chi-squared cumulative probability distribution function.static doublenoncentralF(double p, double dfn, double dfd, double lambda) Returns the inverse of the noncentral F cumulative distribution function (CDF).static doublenoncentralstudentsT(double p, int idf, double delta) Returns the inverse of the noncentral Student's t cumulative probability distribution function.static doublenormal(double p) Returns the inverse of the normal (Gaussian) cumulative probability distribution function.static doublePareto(double p, double xm, double k) Returns the inverse of the Pareto cumulative probability density function.static doubleRayleigh(double p, double alpha) Returns the inverse of the Rayleigh cumulative probability distribution function.static doublestudentsT(double p, double df) Returns the inverse of the Student's t cumulative probability distribution function.static doubleuniform(double p, double aa, double bb) Deprecated.static doubleWeibull(double p, double gamma, double alpha) Returns the inverse of the Weibull cumulative probability distribution function.
-
Method Details
-
beta
public static double beta(double p, double pin, double qin) Returns the inverse of the beta cumulative probability distribution function.Method
betaevaluates the inverse distribution function of a beta random variable with parameterspinandqin, that is, with P = p, p = pin, and q = qin, it determines x (equal tobeta (p, pin, qin)), such that$$P = \frac{{\Gamma \left( p \right)\Gamma \left( q \right)}}{{\Gamma \left( {p + q} \right)}}\int_0^x {t^{p - 1} } \left( {1 - t} \right)^{q - 1} dt$$
where \(\Gamma(\cdot)\) is the gamma function. The probability that the random variable takes a value less than or equal to x is P.
- Parameters:
p- adouble, the probability for which the inverse of the beta CDF is to be evaluated.pin- adouble, the first beta distribution parameter.qin- adouble, the second beta distribution parameter.- Returns:
- a
double, thepth quantilexgiven the parameter values. - See Also:
-
F
public static double F(double p, double dfn, double dfd) Returns the inverse of the F cumulative probability distribution function.Method
Fevaluates the inverse distribution function of a Snedecor's F random variable withdfnnumerator degrees of freedom anddfddenominator degrees of freedom. The function is evaluated by making a transformation to a beta random variable and then usingbeta. If X is an F variate with \(v_1\) and \(v_2\) degrees of freedom and \(Y = v_1X/(v_2 + v_1X)\), then Y is a beta variate with parameters \(p = v_1/2\) and \(q = v_2/2\). If \(P \le 0.5\),Fuses this relationship directly, otherwise, it also uses a relationship between X random variables that can be expressed as follows, usingf, which is the F cumulative distribution function:$${\rm F}(X, {\it dfn}, {\it dfd})=1 - {\rm F}(1/X, {\it dfd}, {\it dfn})$$
- Parameters:
p- adouble, the probability for which the inverse of the F distribution function is to be evaluated. Argument p must be in the open interval (0.0, 1.0).dfn- adouble, the numerator degrees of freedom. It must be positive.dfd- adouble, the denominator degrees of freedom. It must be positive.- Returns:
- a
double, thepth quantilexgiven the parameter values. - See Also:
-
gamma
public static double gamma(double p, double a) Returns the inverse of the gamma cumulative probability distribution function.Method
gammaevaluates the inverse distribution function of a gamma random variable with shape parameter a. That is, it determines \(x \) such that$$p = \frac{1}{{\Gamma \left( a \right)}}\int_o^x {e^{ - t} } t^{a - 1} dt$$
where \(\Gamma(\cdot)\) is the gamma function. The probability that the random variable takes a value less than or equal to x is p. See the documentation for routine
gammafor further discussion of the gamma distribution.gammauses bisection and modified regula falsi to invert the distribution function, which is evaluated using methodgamma.- Parameters:
p- adouble, the probability at which the function is to be evaluateda- adouble, the value of the shape parameter. This must be positive.- Returns:
- a
double, thepth quantilexgiven the parameter values - See Also:
-
generalizedExtremeValue
public static double generalizedExtremeValue(double p, double mu, double sigma, double xi) Returns the inverse of the generalized extreme value cumulative distribution function.Returns the quantile \(x\) such that \(p = F(x|\mu,\sigma,\xi) \) where \(p\) is a probability and $$F(x|\mu,\sigma,\xi)=e^{-t(x)}$$ where $$t(x)=\left\{\begin{array}{lll} (1+\xi(\frac{x-\mu}{\sigma}))^{-\frac{1}{\xi}}& \mbox{for} & \xi \ne 0 \\ e^{-\frac{x-\mu}{\sigma}} & \mbox{for} & \xi = 0 \end{array}\right. $$ \( \mu\in \mathbb{R} \) is the location parameter, \(\sigma > 0 \) is the scale parameter, and \(\xi \in \mathbb{R} \) is the shape parameter. Furthermore, the support for the distribution is $$\left\{\begin{array}{lll} x \in \mathbb{R} & \mbox{for} & \xi = 0 \\ x \ge \mu - \frac{\sigma}{\xi} & \mbox{for} & \xi > 0 \\ x \le \mu - \frac{\sigma}{\xi} & \mbox{for} & \xi \lt 0 \end{array}\right. $$
- Parameters:
p- adouble, the probability at which to evaluate the inverse cdfmu- adouble, the location parametersigma- adouble, the scale parameterxi- adouble, the shape parameter- Returns:
- a
double, thepth quantilexgiven the parameter values
-
generalizedGaussian
public static double generalizedGaussian(double p, double mu, double alpha, double beta) Returns the inverse of the generalized Gaussian (normal) cumulative distribution function.Returns the quantile \(x\) satisfying \(p=F(x)\), where \(p\) is a probability. That is, the function solves for x in $$ p = F(x;\mu,\alpha,\beta) $$ where $$F(x;\mu,\alpha,\beta)=\frac{1}{2} + \frac{sign(x-\mu)}{2\Gamma(\frac{1}{\beta})}\gamma(\frac{1}{\beta},(\frac{|x-\mu|}{\alpha})^{\beta})$$ where \(\mu\) is the location parameter, \(\alpha\) is the scale parameter, \(\beta\) is the shape parameter, and \(\gamma(a,t)\) is the incomplete gamma function with parameter \(a\) evaluated at \(t\). The solution can be shown to be $$ x= sign(p-0.5)\alpha g^{-1}(|2p-1|,\frac{1}{\beta})^{\frac{1}{\beta}} + \mu$$ where \(g^{-1}(u,a)\) is the inverse gamma cumulative distribution function with shape parameter \(a\) evaluated at \(u\).
- Parameters:
p- adouble, the probability at which the function is to be evaluatedmu- adouble, the location parameteralpha- adouble, the scale parameter. It must be positive.beta- adouble, the shape parameter. It must be positive.- Returns:
- a
double, thepth quantilexgiven the parameter values
-
generalizedPareto
public static double generalizedPareto(double p, double mu, double sigma, double alpha) Returns the inverse of the generalized Pareto cumulative distribution function.Returns the quantile \(x\) satisfying \(p=F(x)\), where \(p\) is a probability. That is, the function solves for x in $$ p = F(x; \mu,\sigma, \alpha)$$ where $$ F(x; \mu,\sigma, \alpha) =\left\{\begin{array}{cl} 1 - \left( 1 + \frac{\alpha (x-\mu)}{\sigma}\right)^{(-\frac{1}{\alpha})} & \mbox{for}~ \alpha \ne 0 \\ 1 - \exp(-\frac{x-\mu}{\sigma}) & \mbox{for}~ \alpha = 0 \end{array}\right.$$ where \(\mu \in \mathbb{R} \) is the location parameter, \(\sigma \gt 0 \) is the scale parameter, and \(\alpha \in \mathbb{R} \) is the shape parameter. The support for \(\alpha \ge 0\) is \( x \ge \mu \), while for \( \alpha \lt 0 \), \(\mu \le x \le \mu - \frac{\sigma}{\alpha}\). The solution is easily shown to be $$ x =\left\{\begin{array}{cl} \left(\frac{(1 - p)^{-\alpha}-1}{\alpha}\right)\sigma +\mu & \mbox{for}~ \alpha \ne 0 \\ \mu - \sigma\ln(1-p) & \mbox{for}~ \alpha = 0 \end{array}\right.$$ Note that this follows the parameterization given in Wikipedia.
References
1. Wikipedia contributors. "Generalized Pareto distribution." Wikipedia, The Free Encyclopedia.
- Parameters:
p- adouble, the probability at which the function is to be evaluatedmu- adouble, the location parametersigma- adouble, the scale parameter. It must be positive.alpha- adouble, the shape parameter- Returns:
- a
double, the probability density atxgiven the parameter values
-
exponential
public static double exponential(double p, double scale) Returns the inverse of the exponential cumulative probability distribution function.Method
exponentialevaluates the inverse distribution function of a gamma random variable with scale parameter b and shape parameter a=1.0. That is, it determines \(x\) such that$$p = \frac{1}{{\Gamma \left( a \right)}}\int_o^x {e^{ - t/b} } dt$$
where \(\Gamma(\cdot)\) is the gamma function. The probability that the random variable takes a value less than or equal to x is p. See the documentation for routine
gammafor further discussion of the gamma distribution.exponentialuses bisection and modified regula falsi to invert the distribution function, which is evaluated using methodgamma.- Parameters:
p- adouble, the probability at which the function is to be evaluatedscale- adouble, the scale parameter- Returns:
- a
double, thepth quantilexgiven the parameter values - See Also:
-
normal
public static double normal(double p) Returns the inverse of the normal (Gaussian) cumulative probability distribution function.Method
normalevaluates the inverse of the distribution function \(\Phi\) of a standard normal (Gaussian) random variable, that is,normal\(({\rm p})=\Phi^{-1}(p)\), where$$\Phi \left( x \right) = \frac{1}{{\sqrt {2\pi } }}\int_{ - \infty }^x {e^{ - t^2 /2} dt}$$
The value of the distribution function at the point x is the probability that the random variable takes a value less than or equal to x. The standard normal distribution has a mean of 0 and a variance of 1.
- Parameters:
p- adouble, the probability at which the function is to be evaluated- Returns:
- a
double, thepth quantilexgiven the parameter values - See Also:
-
chi
public static double chi(double p, double df) Returns the inverse of the chi-squared cumulative probability distribution function.Method
chievaluates the inverse distribution function of a chi-squared random variable withdfdegrees of freedom, that is, with P = p and v = df, it determines x (equal tochi(p, df)), such that$$P = \frac{1}{{2^{\nu /2} \Gamma \left( {\nu /2} \right)}}\int_0^x {e^{ - t/2} t^{\nu /2 - 1} } dt$$
where \(\Gamma(\cdot)\) is the gamma function. The probability that the random variable takes a value less than or equal to x is P.
For \(v \lt 40\),
chiuses bisection, if \(v \ge 2\) or \(P \gt 0.98\), or regula falsi to find the point at which the chi-squared distribution function is equal to P. The distribution function is evaluated usingchi.For \(40 \le v \lt 100\), a modified Wilson-Hilferty approximation (Abramowitz and Stegun 1964, equation 26.4.18) to the normal distribution is used, and
normalis used to evaluate the inverse of the normal distribution function. For \(v \ge 100\), the ordinary Wilson-Hilferty approximation (Abramowitz and Stegun 1964, equation 26.4.17) is used.- Parameters:
p- adouble, the probability at which the function is to be evaluateddf- adouble, the number of degrees of freedom. This must be at least 0.5.- Returns:
- a
double, thepth quantilexgiven the parameter values - See Also:
-
noncentralF
public static double noncentralF(double p, double dfn, double dfd, double lambda) Returns the inverse of the noncentral F cumulative distribution function (CDF).If \(X\) is a noncentral chi-square random variable with noncentrality parameter \(\lambda\) and \(\nu_1\) degrees of freedom, and \(Y\) is a chi-square random variable with \(\nu_2\) degrees of freedom which is statistically independent of \(X\), then $$F \;\; = \;\; (X/\nu_1)/(Y/\nu_2)$$ is a noncentral F-distributed random variable whose CDF is given by: $$CDF(f, \nu_1, \nu_2, \lambda) \;\; = \;\; \int_0^f {PDF(x, \nu_1, \nu_2, \lambda)dx} $$ where the probability density function \(PDF(x, \nu_1, \nu_2, \lambda)\) is given by: $$PDF(x, \nu_1, \nu_2, \lambda) \;\; = \;\; \Psi \; \sum_{k = 0}^\infty {\Phi_k} $$ $$\Psi \;\; = \;\; \frac{ e^{-\lambda/2}(\nu_1 x)^{\nu_1/2}(\nu_2)^{\nu_2/2} } { x \; (\nu_1 x \; + \; \nu_2)^{(\nu_1 + \nu_2)/2} \; \Gamma(\nu_2/2) }$$ $$\Phi_k \;\; = \;\; \frac{ R^k \; \Gamma(\frac{\nu_1 + \nu_2}{2} \; + \; k) } { k! \; \Gamma(\frac{\nu_1}{2} \; + \; k) } $$ $$R \;\; = \;\; \frac{ \lambda \nu_1 x }{ 2 (\nu_1 x \; + \; \nu_2)} $$ where \(\Gamma (\cdot)\) is the gamma function, \(\nu_1\) =
dfn, \(\nu_2\) =dfd, \(\lambda\) =lambda, and \(p \;\; = \;\; CDF(f, \nu_1, \nu_2, \lambda)\) is the probability that \(F \le f\).Method
noncentralFevaluates $$f \;\; = \;\; CDF^{-1}(p, \nu_1, \nu_2, \lambda)$$ MethodnoncentralFuses bisection and modified regula falsi search algorithms to invert the distribution function \(CDF(f, \nu_1, \nu_2, \lambda)\), which is evaluated using methodnoncentralF. For sufficiently small p, an accurate approximation of \(CDF^{-1}(p, \nu_1, \nu_2, \lambda)\) can be used which requires no such inverse search algorithms.- Parameters:
p- adoublescalar value representing the probability for which the inverse of the noncentral F cumulative distribution function is to be evaluated.pmust be non-negative and less than one.dfn- adoublescalar value representing the number of numerator degrees of freedom.dfnmust be positive.dfd- adoublescalar value representing the number of denominator degrees of freedom.dfdmust be positive.lambda- adoublescalar value representing the noncentrality parameter.lambdamust nonnegative.- Returns:
- a
double, thepth quantilexgiven the parameter values
-
noncentralBeta
public static double noncentralBeta(double p, double shape1, double shape2, double lambda) Returns the inverse of the noncentral beta cumulative distribution function (CDF).If \(Z\) is a noncentral chi-square random variable with noncentrality parameter \(\lambda\) and \(2 \alpha_1\) degrees of freedom, and \(Y\) is a chi-square random variable with \(2 \alpha_2\) degrees of freedom which is statistically independent of \(Z\), then
$$X \;\; = \;\; \frac{Z}{Z \; + \; Y} \;\; = \;\; \frac{\alpha_1 F}{\alpha_1 F \; + \; \alpha_2}$$
is a noncentral beta-distributed random variable and
$$F \;\; = \;\; \frac{\alpha_2 Z}{\alpha_1 Y} \;\; = \;\; \frac{\alpha_2 X}{\alpha_1 (1 \; - \; X)}$$
is a noncentral F-distributed random variable. The CDF for noncentral beta variable X can thus be simply defined in terms of the noncentral F CDF:
$$CDF_{nc\beta}(x, \; \alpha_1, \; \alpha_2, \; \lambda) \;\; = \;\; CDF_{ncF}(f, \; 2 \alpha_1, \; 2 \alpha_2, \; \lambda)$$
where \(CDF_{nc\beta}(x, \; \alpha_1, \; \alpha_2, \; \lambda)\) is the noncentral beta CDF with \(x\) =
x, \(\alpha_1\) =shape1, \(\alpha_2\) =shape2, and noncentrality parameter \(\lambda\) =lambda; \(CDF_{ncF}(f, \; 2 \alpha_1, \; 2 \alpha_2, \; \lambda)\) is the noncentral F CDF with argument f, numerator and denominator degrees of freedom \(2 \alpha_1\) and \(2 \alpha_2\) respectively, and noncentrality parameter \(\lambda\); and:$$f \;\; = \;\; \frac{\alpha_2 x}{\alpha_1 (1 \; - \; x)}; \;\; x \;\; = \;\; \frac{\alpha_1 f}{\alpha_1 f \; + \; \alpha_2}$$
(See documentation for class
CdfmethodnoncentralFfor a discussion of how the noncentral F CDF is defined and calculated.)Method
noncentralBetaevaluates$$x \;\; = \;\; CDF_{nc\beta}^{-1}(p, \; \alpha_1, \; \alpha_2, \; \lambda)$$
by first evaluating:
$$f \;\; = \;\; CDF_{ncF}^{-1}(p, \; 2 \alpha_1, \; 2 \alpha_2, \; \lambda)$$
and then solving for x using \(x \;\; = \;\; \frac{\alpha_1 f}{\alpha_1 f \; + \; \alpha_2}\). (See documentation for class
CdfmethodnoncentralFfor a discussion of how the inverse noncentral F CDF is calculated.)- Parameters:
p- adoublescalar value representing the probability for which the inverse of the noncentral beta cumulative distribution function is to be evaluated.pmust be non-negative and less than or equal to one.shape1- adoublescalar value representing the first shape parameter.shape1must be positive.shape2- adoublescalar value representing the second shape parameter.shape2must be positive.lambda- adoublescalar value representing the noncentrality parameter.lambdamust be nonnegative.- Returns:
- a
double, thepth quantilexgiven the parameter values.
-
noncentralchi
public static double noncentralchi(double p, double df, double alam) Returns the inverse of the noncentral chi-squared cumulative probability distribution function.Method
noncentralchievaluates the inverse distribution function of a noncentral chi-squared random variable withdfdegrees of freedom and noncentrality parameteralam, that is, with P = p, \(\nu = {\rm df}\), and \(\lambda = {\rm alam}\), it determines \(c_{0} = \)noncentralchi(p, df, alam)), such that$$P = \sum\limits_{i = 0}^\infty {\frac{e^{-\lambda/2}\left(\lambda/2\right)^i}{i!}} \int_0^{c_{0}} {\frac{x^{\left(\nu + 2i\right)/2-1}e^{ - x/2}} {2^{\left(\nu+2i\right)/2}{\Gamma\left(\frac{\nu+2i}{2}\right)}}} dx$$
where \(\Gamma (\cdot)\) is the gamma function. The probability that the random variable takes a value less than or equal to \(c_{0}\) is \(P\).
Method
noncentralchiuses bisection and modified regula falsi to invert the distribution function, which is evaluated usingnoncentralchi. Seenoncentralchifor an alternative definition of the noncentral chi-squared random variable in terms of normal random variables.- Parameters:
p- adouble, the probability at which the function is to be evaluateddf- adouble, the number of degrees of freedom. This must be at least 0.5 but less than or equal to 200,000.alam- adouble, the noncentrality parameter. This must be nonnegative, andalam + dfmust be less than or equal to 200,000.- Returns:
- a
double, thepth quantilexgiven the parameter values - See Also:
-
studentsT
public static double studentsT(double p, double df) Returns the inverse of the Student's t cumulative probability distribution function.studentsTevaluates the inverse distribution function of a Student's t random variable withdfdegrees of freedom. Let v = df. If v equals 1 or 2, the inverse can be obtained in closed form, if v is between 1 and 2, the relationship of a t to a beta random variable is exploited andbetais used to evaluate the inverse; otherwise the algorithm of Hill (1970) is used. For small values of v greater than 2, Hill's algorithm inverts an integrated expansion in \(1/(1 + t^2/v)\) of the t density. For larger values, an asymptotic inverse Cornish-Fisher type expansion about normal deviates is used.- Parameters:
p- adouble, the probability at which the function is to be evaluateddf- adoublescalar value representing the number of degrees of freedom. This must be at least one.- Returns:
- a
double, thepth quantilexgiven the parameter values - See Also:
-
noncentralstudentsT
public static double noncentralstudentsT(double p, int idf, double delta) Returns the inverse of the noncentral Student's t cumulative probability distribution function.Method
noncentralstudentsTevaluates the inverse distribution function of a noncentral t random variable withidfdegrees of freedom and noncentrality parameterdelta; that is, with \(\nu = idf\), \(\delta = delta\), it determines \(t_{0} = \)noncentralstudentsT(p, idf, delta)), such that$$p = \int_{-{\infty}}^{t_{0}}{\frac{\nu^{\nu/2}e^{{-\delta^2}/2}} {{\sqrt{\pi}\Gamma\left(\nu/2\right)\left(\nu+x^2\right)}^{\left(\nu+1\right)/2}} } \sum\limits_{i = 0}^\infty {\Gamma\left(\left(\nu+i+1\right)/2\right)\left(\frac{\delta^i}{i!}\right) \left(\frac{2x^2}{\nu+x^2}\right)^{i/2} dx}$$
where \(\Gamma (\cdot)\) is the gamma function. The probability that the random variable takes a value less than or equal to \(t_{0}\) is
P. SeenoncentralstudentsTfor an alternative definition in terms of normal and chi-squared random variables. The methodnoncentralstudentsTuses bisection and modified regula falsi to invert the distribution function, which is evaluated usingnoncentralstudentsT.- Parameters:
p- adouble, the probability at which the function is to be evaluatedidf- anint, the number of degrees of freedom. This must be positive.delta- adouble, the noncentrality parameter- Returns:
- a
double, thepth quantilexgiven the parameter values - See Also:
-
Weibull
public static double Weibull(double p, double gamma, double alpha) Returns the inverse of the Weibull cumulative probability distribution function.- Parameters:
p- adouble, the probability at which the function is to be evaluatedgamma- adouble, the shape parameteralpha- adouble, the scale parameter- Returns:
- a
double, thepth quantilexgiven the parameter values
-
logNormal
public static double logNormal(double p, double mu, double sigma) Returns the inverse of the standard lognormal cumulative probability distribution function.- Parameters:
p- adouble, the probability at which the function is to be evaluatedmu- adouble, the location parametersigma- adouble, the shape parameter.sigmamust be a positive.- Returns:
- a
double, thepth quantilexgiven the parameter values
-
extremeValue
public static double extremeValue(double p, double mu, double beta) Returns the inverse of the extreme value cumulative probability distribution function.- Parameters:
p- adouble, the probability at which the function is to be evaluatedmu- adouble, the location parameterbeta- adouble, the scale parameter- Returns:
- a
double, thepth quantilexgiven the parameter values
-
Rayleigh
public static double Rayleigh(double p, double alpha) Returns the inverse of the Rayleigh cumulative probability distribution function.- Parameters:
p- adouble, the probability at which the function is to be evaluatedalpha- adouble, the scale parameter- Returns:
- a
double, thepth quantilexgiven the parameter values
-
uniform
public static double uniform(double p, double aa, double bb) Deprecated.usecontinuousUniform(double, double, double)insteadReturns the inverse of the uniform cumulative probability distribution function.- Parameters:
p- adouble, the probability at which the function is to be evaluatedaa- adouble, the minimum valuebb- adouble, the maximum value- Returns:
- a
double, thepth quantilexgiven the parameter values
-
continuousUniform
public static double continuousUniform(double p, double a, double b) Returns the inverse of the continuous uniform cumulative distribution function.- Parameters:
p- adouble, the probability at which to evaluate the inverse cdfa- adouble, the lower parameter \(a\)b- adouble, the upper parameter \(b\)- Returns:
- a
double, thepth quantilexgiven the parameter values
-
discreteUniform
public static int discreteUniform(double p, int n) Returns the inverse of the discrete uniform cumulative probability distribution function.- Parameters:
p- adouble, the probability at which the function is to be evaluatedn- anint, the upper limit of the discrete uniform distribution- Returns:
- a
double, thepth quantilexgiven the parameter values
-
geometric
public static double geometric(double r, double pin) Returns the inverse of the discrete geometric cumulative probability distribution function.- Parameters:
r- adouble, the probability for which the inverse geometric function is to be evaluatedpin- adouble, the probability parameter for each independent trial (the probability of success for each independent trial)- Returns:
- a
double, thepth quantilexgiven the parameter values
-
logistic
public static double logistic(double p, double mu, double sigma) Returns the inverse of the logistic cumulative probability distribution function.- Parameters:
p- adouble, the probability at which the function is to be evaluatedmu- adouble, the location parametersigma- adouble, the scale parameter- Returns:
- a
double, thepth quantilexgiven the parameter values
-
Pareto
public static double Pareto(double p, double xm, double k) Returns the inverse of the Pareto cumulative probability density function.- Parameters:
p- adouble, the probability at which the function is to be evaluatedxm- adouble,the scale parameterk- adouble, the shape parameter- Returns:
- a
double, thepth quantilexgiven the parameter values
-
continuousUniform(double, double, double)instead