ROOT 6.14/05 Reference Guide |
Cumulative distribution functions of various distributions.
The functions with the extension _cdf calculate the lower tail integral of the probability density function
\[ D(x) = \int_{-\infty}^{x} p(x') dx' \]
while those with the _cdf_c extension calculate the complement of cumulative distribution function, called in statistics the survival function. It corresponds to the upper tail integral of the probability density function
\[ D(x) = \int_{x}^{+\infty} p(x') dx' \]
NOTE: In the old releases (< 5.14) the _cdf functions were called _quant and the _cdf_c functions were called _prob. These names are currently kept for backward compatibility, but their usage is deprecated.
These functions are defined in the header file Math/ProbFunc.h or in the global one including all statistical functions Math/DistFunc.h
Functions | |
double | ROOT::Math::beta_cdf (double x, double a, double b) |
Cumulative distribution function of the beta distribution Upper tail of the integral of the beta_pdf. More... | |
double | ROOT::Math::beta_cdf_c (double x, double a, double b) |
Complement of the cumulative distribution function of the beta distribution. More... | |
double | ROOT::Math::binomial_cdf (unsigned int k, double p, unsigned int n) |
Cumulative distribution function of the Binomial distribution Lower tail of the integral of the binomial_pdf. More... | |
double | ROOT::Math::binomial_cdf_c (unsigned int k, double p, unsigned int n) |
Complement of the cumulative distribution function of the Binomial distribution. More... | |
double | ROOT::Math::breitwigner_cdf (double x, double gamma, double x0=0) |
Cumulative distribution function (lower tail) of the Breit_Wigner distribution and it is similar (just a different parameter definition) to the Cauchy distribution (see cauchy_cdf ) More... | |
double | ROOT::Math::breitwigner_cdf_c (double x, double gamma, double x0=0) |
Complement of the cumulative distribution function (upper tail) of the Breit_Wigner distribution and it is similar (just a different parameter definition) to the Cauchy distribution (see cauchy_cdf_c ) More... | |
double | ROOT::Math::cauchy_cdf (double x, double b, double x0=0) |
Cumulative distribution function (lower tail) of the Cauchy distribution which is also Lorentzian distribution. More... | |
double | ROOT::Math::cauchy_cdf_c (double x, double b, double x0=0) |
Complement of the cumulative distribution function (upper tail) of the Cauchy distribution which is also Lorentzian distribution. More... | |
double | ROOT::Math::chisquared_cdf (double x, double r, double x0=0) |
Cumulative distribution function of the \(\chi^2\) distribution with \(r\) degrees of freedom (lower tail). More... | |
double | ROOT::Math::chisquared_cdf_c (double x, double r, double x0=0) |
Complement of the cumulative distribution function of the \(\chi^2\) distribution with \(r\) degrees of freedom (upper tail). More... | |
double | ROOT::Math::crystalball_cdf (double x, double alpha, double n, double sigma, double x0=0) |
Cumulative distribution for the Crystal Ball distribution function. More... | |
double | ROOT::Math::crystalball_cdf_c (double x, double alpha, double n, double sigma, double x0=0) |
Complement of the Cumulative distribution for the Crystal Ball distribution. More... | |
double | ROOT::Math::crystalball_integral (double x, double alpha, double n, double sigma, double x0=0) |
Integral of the not-normalized Crystal Ball function. More... | |
double | ROOT::Math::exponential_cdf (double x, double lambda, double x0=0) |
Cumulative distribution function of the exponential distribution (lower tail). More... | |
double | ROOT::Math::exponential_cdf_c (double x, double lambda, double x0=0) |
Complement of the cumulative distribution function of the exponential distribution (upper tail). More... | |
double | ROOT::Math::fdistribution_cdf (double x, double n, double m, double x0=0) |
Cumulative distribution function of the F-distribution (lower tail). More... | |
double | ROOT::Math::fdistribution_cdf_c (double x, double n, double m, double x0=0) |
Complement of the cumulative distribution function of the F-distribution (upper tail). More... | |
double | ROOT::Math::gamma_cdf (double x, double alpha, double theta, double x0=0) |
Cumulative distribution function of the gamma distribution (lower tail). More... | |
double | ROOT::Math::gamma_cdf_c (double x, double alpha, double theta, double x0=0) |
Complement of the cumulative distribution function of the gamma distribution (upper tail). More... | |
double | ROOT::Math::landau_cdf (double x, double xi=1, double x0=0) |
Cumulative distribution function of the Landau distribution (lower tail). More... | |
double | ROOT::Math::landau_cdf_c (double x, double xi=1, double x0=0) |
Complement of the distribution function of the Landau distribution (upper tail). More... | |
double | ROOT::Math::lognormal_cdf (double x, double m, double s, double x0=0) |
Cumulative distribution function of the lognormal distribution (lower tail). More... | |
double | ROOT::Math::lognormal_cdf_c (double x, double m, double s, double x0=0) |
Complement of the cumulative distribution function of the lognormal distribution (upper tail). More... | |
double | ROOT::Math::negative_binomial_cdf (unsigned int k, double p, double n) |
Cumulative distribution function of the Negative Binomial distribution Lower tail of the integral of the negative_binomial_pdf. More... | |
double | ROOT::Math::negative_binomial_cdf_c (unsigned int k, double p, double n) |
Complement of the cumulative distribution function of the Negative Binomial distribution. More... | |
double | ROOT::Math::normal_cdf (double x, double sigma=1, double x0=0) |
Cumulative distribution function of the normal (Gaussian) distribution (lower tail). More... | |
double | ROOT::Math::normal_cdf_c (double x, double sigma=1, double x0=0) |
Complement of the cumulative distribution function of the normal (Gaussian) distribution (upper tail). More... | |
double | ROOT::Math::poisson_cdf (unsigned int n, double mu) |
Cumulative distribution function of the Poisson distribution Lower tail of the integral of the poisson_pdf. More... | |
double | ROOT::Math::poisson_cdf_c (unsigned int n, double mu) |
Complement of the cumulative distribution function of the Poisson distribution. More... | |
double | ROOT::Math::tdistribution_cdf (double x, double r, double x0=0) |
Cumulative distribution function of Student's t-distribution (lower tail). More... | |
double | ROOT::Math::tdistribution_cdf_c (double x, double r, double x0=0) |
Complement of the cumulative distribution function of Student's t-distribution (upper tail). More... | |
double | ROOT::Math::uniform_cdf (double x, double a, double b, double x0=0) |
Cumulative distribution function of the uniform (flat) distribution (lower tail). More... | |
double | ROOT::Math::uniform_cdf_c (double x, double a, double b, double x0=0) |
Complement of the cumulative distribution function of the uniform (flat) distribution (upper tail). More... | |
double | ROOT::Math::vavilov_accurate_cdf (double x, double kappa, double beta2) |
The Vavilov cumulative probability density function. More... | |
double | ROOT::Math::vavilov_accurate_cdf_c (double x, double kappa, double beta2) |
The Vavilov complementary cumulative probability density function. More... | |
double | ROOT::Math::vavilov_fast_cdf (double x, double kappa, double beta2) |
The Vavilov cumulative probability density function. More... | |
double | ROOT::Math::vavilov_fast_cdf_c (double x, double kappa, double beta2) |
The Vavilov complementary cumulative probability density function. More... | |
double ROOT::Math::beta_cdf | ( | double | x, |
double | a, | ||
double | b | ||
) |
Cumulative distribution function of the beta distribution Upper tail of the integral of the beta_pdf.
Definition at line 27 of file ProbFuncMathCore.cxx.
double ROOT::Math::beta_cdf_c | ( | double | x, |
double | a, | ||
double | b | ||
) |
Complement of the cumulative distribution function of the beta distribution.
Upper tail of the integral of the beta_pdf
Definition at line 20 of file ProbFuncMathCore.cxx.
double ROOT::Math::binomial_cdf | ( | unsigned int | k, |
double | p, | ||
unsigned int | n | ||
) |
Cumulative distribution function of the Binomial distribution Lower tail of the integral of the binomial_pdf.
Definition at line 304 of file ProbFuncMathCore.cxx.
double ROOT::Math::binomial_cdf_c | ( | unsigned int | k, |
double | p, | ||
unsigned int | n | ||
) |
Complement of the cumulative distribution function of the Binomial distribution.
Upper tail of the integral of the binomial_pdf
Definition at line 293 of file ProbFuncMathCore.cxx.
double ROOT::Math::breitwigner_cdf | ( | double | x, |
double | gamma, | ||
double | x0 = 0 |
||
) |
Cumulative distribution function (lower tail) of the Breit_Wigner distribution and it is similar (just a different parameter definition) to the Cauchy distribution (see cauchy_cdf )
\[ D(x) = \int_{-\infty}^{x} \frac{1}{\pi} \frac{b}{x'^2 + (\frac{1}{2} \Gamma)^2} dx' \]
Definition at line 39 of file ProbFuncMathCore.cxx.
double ROOT::Math::breitwigner_cdf_c | ( | double | x, |
double | gamma, | ||
double | x0 = 0 |
||
) |
Complement of the cumulative distribution function (upper tail) of the Breit_Wigner distribution and it is similar (just a different parameter definition) to the Cauchy distribution (see cauchy_cdf_c )
\[ D(x) = \int_{x}^{+\infty} \frac{1}{\pi} \frac{\frac{1}{2} \Gamma}{x'^2 + (\frac{1}{2} \Gamma)^2} dx' \]
Definition at line 33 of file ProbFuncMathCore.cxx.
double ROOT::Math::cauchy_cdf | ( | double | x, |
double | b, | ||
double | x0 = 0 |
||
) |
Cumulative distribution function (lower tail) of the Cauchy distribution which is also Lorentzian distribution.
It is similar (just a different parameter definition) to the Breit_Wigner distribution (see breitwigner_cdf )
\[ D(x) = \int_{-\infty}^{x} \frac{1}{\pi} \frac{ b }{ (x'-m)^2 + b^2} dx' \]
For detailed description see Mathworld.
Definition at line 51 of file ProbFuncMathCore.cxx.
double ROOT::Math::cauchy_cdf_c | ( | double | x, |
double | b, | ||
double | x0 = 0 |
||
) |
Complement of the cumulative distribution function (upper tail) of the Cauchy distribution which is also Lorentzian distribution.
It is similar (just a different parameter definition) to the Breit_Wigner distribution (see breitwigner_cdf_c )
\[ D(x) = \int_{x}^{+\infty} \frac{1}{\pi} \frac{ b }{ (x'-m)^2 + b^2} dx' \]
For detailed description see Mathworld.
Definition at line 45 of file ProbFuncMathCore.cxx.
double ROOT::Math::chisquared_cdf | ( | double | x, |
double | r, | ||
double | x0 = 0 |
||
) |
Cumulative distribution function of the \(\chi^2\) distribution with \(r\) degrees of freedom (lower tail).
\[ D_{r}(x) = \int_{-\infty}^{x} \frac{1}{\Gamma(r/2) 2^{r/2}} x'^{r/2-1} e^{-x'/2} dx' \]
For detailed description see Mathworld. It is implemented using the incomplete gamma function, ROOT::Math::inc_gamma_c, from Cephes
Definition at line 63 of file ProbFuncMathCore.cxx.
double ROOT::Math::chisquared_cdf_c | ( | double | x, |
double | r, | ||
double | x0 = 0 |
||
) |
Complement of the cumulative distribution function of the \(\chi^2\) distribution with \(r\) degrees of freedom (upper tail).
\[ D_{r}(x) = \int_{x}^{+\infty} \frac{1}{\Gamma(r/2) 2^{r/2}} x'^{r/2-1} e^{-x'/2} dx' \]
For detailed description see Mathworld. It is implemented using the incomplete gamma function, ROOT::Math::inc_gamma_c, from Cephes
Definition at line 57 of file ProbFuncMathCore.cxx.
double ROOT::Math::crystalball_cdf | ( | double | x, |
double | alpha, | ||
double | n, | ||
double | sigma, | ||
double | x0 = 0 |
||
) |
Cumulative distribution for the Crystal Ball distribution function.
See the definition of the Crystal Ball function at Wikipedia.
The distribution is defined only for n > 1 when the integral converges
Definition at line 69 of file ProbFuncMathCore.cxx.
double ROOT::Math::crystalball_cdf_c | ( | double | x, |
double | alpha, | ||
double | n, | ||
double | sigma, | ||
double | x0 = 0 |
||
) |
Complement of the Cumulative distribution for the Crystal Ball distribution.
See the definition of the Crystal Ball function at Wikipedia.
The distribution is defined only for n > 1 when the integral converges
Definition at line 84 of file ProbFuncMathCore.cxx.
double ROOT::Math::crystalball_integral | ( | double | x, |
double | alpha, | ||
double | n, | ||
double | sigma, | ||
double | x0 = 0 |
||
) |
Integral of the not-normalized Crystal Ball function.
See the definition of the Crystal Ball function at Wikipedia.
see ROOT::Math::crystalball_function for the function evaluation.
Definition at line 98 of file ProbFuncMathCore.cxx.
double ROOT::Math::exponential_cdf | ( | double | x, |
double | lambda, | ||
double | x0 = 0 |
||
) |
Cumulative distribution function of the exponential distribution (lower tail).
\[ D(x) = \int_{-\infty}^{x} \lambda e^{-\lambda x'} dx' \]
For detailed description see Mathworld.
Definition at line 161 of file ProbFuncMathCore.cxx.
double ROOT::Math::exponential_cdf_c | ( | double | x, |
double | lambda, | ||
double | x0 = 0 |
||
) |
Complement of the cumulative distribution function of the exponential distribution (upper tail).
\[ D(x) = \int_{x}^{+\infty} \lambda e^{-\lambda x'} dx' \]
For detailed description see Mathworld.
Definition at line 154 of file ProbFuncMathCore.cxx.
double ROOT::Math::fdistribution_cdf | ( | double | x, |
double | n, | ||
double | m, | ||
double | x0 = 0 |
||
) |
Cumulative distribution function of the F-distribution (lower tail).
\[ D_{n,m}(x) = \int_{-\infty}^{x} \frac{\Gamma(\frac{n+m}{2})}{\Gamma(\frac{n}{2}) \Gamma(\frac{m}{2})} n^{n/2} m^{m/2} x'^{n/2 -1} (m+nx')^{-(n+m)/2} dx' \]
For detailed description see Mathworld. It is implemented using the incomplete beta function, ROOT::Math::inc_beta, from Cephes
Definition at line 183 of file ProbFuncMathCore.cxx.
double ROOT::Math::fdistribution_cdf_c | ( | double | x, |
double | n, | ||
double | m, | ||
double | x0 = 0 |
||
) |
Complement of the cumulative distribution function of the F-distribution (upper tail).
\[ D_{n,m}(x) = \int_{x}^{+\infty} \frac{\Gamma(\frac{n+m}{2})}{\Gamma(\frac{n}{2}) \Gamma(\frac{m}{2})} n^{n/2} m^{m/2} x'^{n/2 -1} (m+nx')^{-(n+m)/2} dx' \]
For detailed description see Mathworld. It is implemented using the incomplete beta function, ROOT::Math::inc_beta, from Cephes
Definition at line 169 of file ProbFuncMathCore.cxx.
double ROOT::Math::gamma_cdf | ( | double | x, |
double | alpha, | ||
double | theta, | ||
double | x0 = 0 |
||
) |
Cumulative distribution function of the gamma distribution (lower tail).
\[ D(x) = \int_{-\infty}^{x} {1 \over \Gamma(\alpha) \theta^{\alpha}} x'^{\alpha-1} e^{-x'/\theta} dx' \]
For detailed description see Mathworld. It is implemented using the incomplete gamma function, ROOT::Math::inc_gamma, from Cephes
Definition at line 204 of file ProbFuncMathCore.cxx.
double ROOT::Math::gamma_cdf_c | ( | double | x, |
double | alpha, | ||
double | theta, | ||
double | x0 = 0 |
||
) |
Complement of the cumulative distribution function of the gamma distribution (upper tail).
\[ D(x) = \int_{x}^{+\infty} {1 \over \Gamma(\alpha) \theta^{\alpha}} x'^{\alpha-1} e^{-x'/\theta} dx' \]
For detailed description see Mathworld. It is implemented using the incomplete gamma function, ROOT::Math::inc_gamma, from Cephes
Definition at line 198 of file ProbFuncMathCore.cxx.
double ROOT::Math::landau_cdf | ( | double | x, |
double | xi = 1 , |
||
double | x0 = 0 |
||
) |
Cumulative distribution function of the Landau distribution (lower tail).
\[ D(x) = \int_{-\infty}^{x} p(x) dx \]
where \(p(x)\) is the Landau probability density function :
\[ p(x) = \frac{1}{\xi} \phi (\lambda) \]
with
\[ \phi(\lambda) = \frac{1}{2 \pi i}\int_{c-i\infty}^{c+i\infty} e^{\lambda s + s \log{s}} ds\]
with \(\lambda = (x-x_0)/\xi\). For a detailed description see K.S. Kölbig and B. Schorr, A program package for the Landau distribution, Computer Phys. Comm. 31 (1984) 97-111 [Erratum-ibid. 178 (2008) 972]. The same algorithms as in CERNLIB (DISLAN) is used.
x | The argument \(x\) |
xi | The width parameter \(\xi\) |
x0 | The location parameter \(x_0\) |
Definition at line 336 of file ProbFuncMathCore.cxx.
|
inline |
Complement of the distribution function of the Landau distribution (upper tail).
\[ D(x) = \int_{x}^{+\infty} p(x) dx \]
where p(x) is the Landau probability density function. It is implemented simply as 1. - landau_cdf
x | The argument \(x\) |
xi | The width parameter \(\xi\) |
x0 | The location parameter \(x_0\) |
Definition at line 402 of file ProbFuncMathCore.h.
double ROOT::Math::lognormal_cdf | ( | double | x, |
double | m, | ||
double | s, | ||
double | x0 = 0 |
||
) |
Cumulative distribution function of the lognormal distribution (lower tail).
\[ D(x) = \int_{-\infty}^{x} {1 \over x' \sqrt{2 \pi s^2} } e^{-(\ln{x'} - m)^2/2 s^2} dx' \]
For detailed description see Mathworld.
Definition at line 218 of file ProbFuncMathCore.cxx.
double ROOT::Math::lognormal_cdf_c | ( | double | x, |
double | m, | ||
double | s, | ||
double | x0 = 0 |
||
) |
Complement of the cumulative distribution function of the lognormal distribution (upper tail).
\[ D(x) = \int_{x}^{+\infty} {1 \over x' \sqrt{2 \pi s^2} } e^{-(\ln{x'} - m)^2/2 s^2} dx' \]
For detailed description see Mathworld.
Definition at line 210 of file ProbFuncMathCore.cxx.
double ROOT::Math::negative_binomial_cdf | ( | unsigned int | k, |
double | p, | ||
double | n | ||
) |
Cumulative distribution function of the Negative Binomial distribution Lower tail of the integral of the negative_binomial_pdf.
Definition at line 316 of file ProbFuncMathCore.cxx.
double ROOT::Math::negative_binomial_cdf_c | ( | unsigned int | k, |
double | p, | ||
double | n | ||
) |
Complement of the cumulative distribution function of the Negative Binomial distribution.
Upper tail of the integral of the negative_binomial_pdf
Definition at line 326 of file ProbFuncMathCore.cxx.
double ROOT::Math::normal_cdf | ( | double | x, |
double | sigma = 1 , |
||
double | x0 = 0 |
||
) |
Cumulative distribution function of the normal (Gaussian) distribution (lower tail).
\[ D(x) = \int_{-\infty}^{x} {1 \over \sqrt{2 \pi \sigma^2}} e^{-x'^2 / 2\sigma^2} dx' \]
For detailed description see Mathworld.
Definition at line 234 of file ProbFuncMathCore.cxx.
double ROOT::Math::normal_cdf_c | ( | double | x, |
double | sigma = 1 , |
||
double | x0 = 0 |
||
) |
Complement of the cumulative distribution function of the normal (Gaussian) distribution (upper tail).
\[ D(x) = \int_{x}^{+\infty} {1 \over \sqrt{2 \pi \sigma^2}} e^{-x'^2 / 2\sigma^2} dx' \]
For detailed description see Mathworld.
Definition at line 226 of file ProbFuncMathCore.cxx.
double ROOT::Math::poisson_cdf | ( | unsigned int | n, |
double | mu | ||
) |
Cumulative distribution function of the Poisson distribution Lower tail of the integral of the poisson_pdf.
Definition at line 284 of file ProbFuncMathCore.cxx.
double ROOT::Math::poisson_cdf_c | ( | unsigned int | n, |
double | mu | ||
) |
Complement of the cumulative distribution function of the Poisson distribution.
discrete distributions
Upper tail of the integral of the poisson_pdf
Definition at line 275 of file ProbFuncMathCore.cxx.
double ROOT::Math::tdistribution_cdf | ( | double | x, |
double | r, | ||
double | x0 = 0 |
||
) |
Cumulative distribution function of Student's t-distribution (lower tail).
\[ D_{r}(x) = \int_{-\infty}^{x} \frac{\Gamma(\frac{r+1}{2})}{\sqrt{r \pi}\Gamma(\frac{r}{2})} \left( 1+\frac{x'^2}{r}\right)^{-(r+1)/2} dx' \]
For detailed description see Mathworld. It is implemented using the incomplete beta function, ROOT::Math::inc_beta, from Cephes
Definition at line 250 of file ProbFuncMathCore.cxx.
double ROOT::Math::tdistribution_cdf_c | ( | double | x, |
double | r, | ||
double | x0 = 0 |
||
) |
Complement of the cumulative distribution function of Student's t-distribution (upper tail).
\[ D_{r}(x) = \int_{x}^{+\infty} \frac{\Gamma(\frac{r+1}{2})}{\sqrt{r \pi}\Gamma(\frac{r}{2})} \left( 1+\frac{x'^2}{r}\right)^{-(r+1)/2} dx' \]
For detailed description see Mathworld. It is implemented using the incomplete beta function, ROOT::Math::inc_beta, from Cephes
Definition at line 242 of file ProbFuncMathCore.cxx.
double ROOT::Math::uniform_cdf | ( | double | x, |
double | a, | ||
double | b, | ||
double | x0 = 0 |
||
) |
Cumulative distribution function of the uniform (flat) distribution (lower tail).
\[ D(x) = \int_{-\infty}^{x} {1 \over (b-a)} dx' \]
For detailed description see Mathworld.
Definition at line 266 of file ProbFuncMathCore.cxx.
double ROOT::Math::uniform_cdf_c | ( | double | x, |
double | a, | ||
double | b, | ||
double | x0 = 0 |
||
) |
Complement of the cumulative distribution function of the uniform (flat) distribution (upper tail).
\[ D(x) = \int_{x}^{+\infty} {1 \over (b-a)} dx' \]
For detailed description see Mathworld.
Definition at line 258 of file ProbFuncMathCore.cxx.
double ROOT::Math::vavilov_accurate_cdf | ( | double | x, |
double | kappa, | ||
double | beta2 | ||
) |
The Vavilov cumulative probability density function.
x | The Landau parameter \(x = \lambda_L\) |
kappa | The parameter \(\kappa\), which must be in the range \(\kappa \ge 0.001 \) |
beta2 | The parameter \(\beta^2\), which must be in the range \(0 \le \beta^2 \le 1 \) |
Definition at line 472 of file VavilovAccurate.cxx.
double ROOT::Math::vavilov_accurate_cdf_c | ( | double | x, |
double | kappa, | ||
double | beta2 | ||
) |
The Vavilov complementary cumulative probability density function.
x | The Landau parameter \(x = \lambda_L\) |
kappa | The parameter \(\kappa\), which must be in the range \(\kappa \ge 0.001 \) |
beta2 | The parameter \(\beta^2\), which must be in the range \(0 \le \beta^2 \le 1 \) |
Definition at line 467 of file VavilovAccurate.cxx.
double ROOT::Math::vavilov_fast_cdf | ( | double | x, |
double | kappa, | ||
double | beta2 | ||
) |
The Vavilov cumulative probability density function.
x | The Landau parameter \(x = \lambda_L\) |
kappa | The parameter \(\kappa\), which must be in the range \(0.01 \le \kappa \le 12 \) |
beta2 | The parameter \(\beta^2\), which must be in the range \(0 \le \beta^2 \le 1 \) |
Definition at line 582 of file VavilovFast.cxx.
double ROOT::Math::vavilov_fast_cdf_c | ( | double | x, |
double | kappa, | ||
double | beta2 | ||
) |
The Vavilov complementary cumulative probability density function.
x | The Landau parameter \(x = \lambda_L\) |
kappa | The parameter \(\kappa\), which must be in the range \(0.01 \le \kappa \le 12 \) |
beta2 | The parameter \(\beta^2\), which must be in the range \(0 \le \beta^2 \le 1 \) |
Definition at line 587 of file VavilovFast.cxx.