Statistical distribution module. Common parameterisation and mathematical notation is used. Additional parameters are sometimes added to enhance functionality.
Impure wrapper function for f_dst_chi2_cdf_core
.
Handles optional arguments and invalid values for arguments.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | x |
sample position |
||
real(kind=wp), | intent(in) | :: | df |
degrees of freedom |
||
real(kind=wp), | intent(in), | optional | :: | loc |
location parameter |
|
real(kind=wp), | intent(in), | optional | :: | scale |
scale parameter |
|
character(len=*), | intent(in), | optional | :: | tail |
tail options |
resulting CDF value
Cumulative distribution function for the chi-squared distribution.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | x |
sample position |
||
real(kind=wp), | intent(in) | :: | df |
degrees of freedom |
||
real(kind=wp), | intent(in) | :: | loc |
location parameter |
||
real(kind=wp), | intent(in) | :: | scale |
scale parameter |
||
character(len=*), | intent(in) | :: | tail |
tail options |
resulting CDF value
Impure wrapper function for f_dst_chi2_pdf_core
.
Handles optional arguments and invalid values for arguments.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | x |
sample position |
||
real(kind=wp), | intent(in) | :: | df |
degrees of freedom |
||
real(kind=wp), | intent(in), | optional | :: | loc |
location parameter |
|
real(kind=wp), | intent(in), | optional | :: | scale |
scale parameter |
resulting PDF value
Probability density function for the chi-squared distribution.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | x |
sample position |
||
real(kind=wp), | intent(in) | :: | df |
degrees of freedom |
||
real(kind=wp), | intent(in) | :: | loc |
location parameter |
||
real(kind=wp), | intent(in) | :: | scale |
scale parameter |
resulting PDF value
Impure wrapper function for f_dst_chi2_ppf_core
.
Handles optional arguments and invalid values for arguments.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | p |
probability between 0.0 and 1.0 |
||
real(kind=wp), | intent(in) | :: | df |
degrees of freedom |
||
real(kind=wp), | intent(in), | optional | :: | loc |
location parameter |
|
real(kind=wp), | intent(in), | optional | :: | scale |
scale parameter |
sample position
Percent point function/quantile functionfor the chi-squared distribution.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | p |
probability between 0.0 and 1.0 |
||
real(kind=wp), | intent(in) | :: | df |
degrees of freedom |
||
real(kind=wp), | intent(in) | :: | loc |
location parameter |
||
real(kind=wp), | intent(in) | :: | scale |
scale parameter |
sample position
Impure wrapper function for f_dst_exp_cdf_core
.
Handles optional arguments and invalid values for arguments.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | x |
sample position |
||
real(kind=wp), | intent(in), | optional | :: | lambda |
lambda parameter, beta(scale) = 1/lambda = mu/mean |
|
real(kind=wp), | intent(in), | optional | :: | loc |
location parameter |
|
character(len=*), | intent(in), | optional | :: | tail |
tail options |
returned probability integral
Cumulative distribution function for exponential distribution.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | x |
sample position |
||
real(kind=wp), | intent(in) | :: | lambda |
lambda parameter, beta(scale) = 1/lambda = mu/mean |
||
real(kind=wp), | intent(in) | :: | loc |
location parameter |
||
character(len=*), | intent(in) | :: | tail |
tail options |
returned probability integral
Impure wrapper function for f_dst_exp_pdf_core
.
Handles optional arguments and invalid values for arguments.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | x |
sample position |
||
real(kind=wp), | intent(in), | optional | :: | lambda |
lambda parameter, beta(scale) = 1/lambda = mu/mean |
|
real(kind=wp), | intent(in), | optional | :: | loc |
location parameter |
Probability density function for exponential distribution.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | x |
sample position |
||
real(kind=wp), | intent(in) | :: | lambda |
lambda parameter, beta(scale) = 1/lambda = mu/mean |
||
real(kind=wp), | intent(in) | :: | loc |
location parameter |
Impure wrapper function for f_dst_exp_ppf_core
.
Handles optional arguments and invalid values for arguments.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | p |
probability between 0.0 - 1.0 |
||
real(kind=wp), | intent(in), | optional | :: | lambda |
lambda parameter, beta(scale) = 1/lambda = mu/mean |
|
real(kind=wp), | intent(in), | optional | :: | loc |
location parameter |
sample position
Percent point function/quantile function for exponential distribution.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | p |
probability between 0.0 - 1.0 |
||
real(kind=wp), | intent(in) | :: | lambda |
lambda parameter, beta(scale) = 1/lambda = mu/mean |
||
real(kind=wp), | intent(in) | :: | loc |
location parameter |
sample position
Impure wrapper function for f_dst_f_cdf_core
.
Handles optional arguments and invalid values for arguments.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | x |
sample position |
||
real(kind=wp), | intent(in) | :: | d1 |
numerator degrees of freedom |
||
real(kind=wp), | intent(in) | :: | d2 |
denominator degrees of freedom |
||
real(kind=wp), | intent(in), | optional | :: | loc |
location parameter |
|
real(kind=wp), | intent(in), | optional | :: | scale |
scale parameter |
|
character(len=*), | intent(in), | optional | :: | tail |
tail option |
output probability
Cumulative density function for the F distribution.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | x |
sample position |
||
real(kind=wp), | intent(in) | :: | d1 |
numerator degrees of freedom |
||
real(kind=wp), | intent(in) | :: | d2 |
denominator degrees of freedom |
||
real(kind=wp), | intent(in) | :: | loc |
location parameter |
||
real(kind=wp), | intent(in) | :: | scale |
scale parameter |
||
character(len=*), | intent(in) | :: | tail |
tail option |
output probability
Impure wrapper function for f_dst_f_pdf_core
.
Handles optional arguments and invalid values for arguments.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | x |
sample position |
||
real(kind=wp), | intent(in) | :: | d1 |
numerator degrees of freedom |
||
real(kind=wp), | intent(in) | :: | d2 |
denominator degrees of freedom |
||
real(kind=wp), | intent(in), | optional | :: | loc |
location parameter |
|
real(kind=wp), | intent(in), | optional | :: | scale |
scale parameter |
Probability density function for the F distribution.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | x |
sample position |
||
real(kind=wp), | intent(in) | :: | d1 |
numerator degrees of freedom |
||
real(kind=wp), | intent(in) | :: | d2 |
denominator degrees of freedom |
||
real(kind=wp), | intent(in) | :: | loc |
location parameter |
||
real(kind=wp), | intent(in) | :: | scale |
scale parameter |
Impure wrapper function for f_dst_f_ppf_core
.
Handles optional arguments and invalid values for arguments.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | p |
probability (0.0 < p < 1.0) |
||
real(kind=wp), | intent(in) | :: | d1 |
numerator degrees of freedom |
||
real(kind=wp), | intent(in) | :: | d2 |
denominator degrees of freedom |
||
real(kind=wp), | intent(in), | optional | :: | loc |
location parameter |
|
real(kind=wp), | intent(in), | optional | :: | scale |
scale parameter |
Percent point function / quantile function for the F distribution.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | p |
probability (0.0 < p < 1.0) |
||
real(kind=wp), | intent(in) | :: | d1 |
numerator degrees of freedom |
||
real(kind=wp), | intent(in) | :: | d2 |
denominator degrees of freedom |
||
real(kind=wp), | intent(in) | :: | loc |
location parameter |
||
real(kind=wp), | intent(in) | :: | scale |
scale parameter |
Impure wrapper function for f_dst_gamma_cdf_core
.
Handles optional arguments and invalid values for arguments.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | x |
sample position |
||
real(kind=wp), | intent(in), | optional | :: | alpha |
shape parameter |
|
real(kind=wp), | intent(in), | optional | :: | beta |
scale parameter |
|
real(kind=wp), | intent(in), | optional | :: | loc |
location parameter |
|
character(len=*), | intent(in), | optional | :: | tail |
tail options |
returned probability integral
Cumulative distribution function for gamma distribution.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | x |
sample position |
||
real(kind=wp), | intent(in) | :: | alpha |
shape parameter |
||
real(kind=wp), | intent(in) | :: | beta |
scale parameter |
||
real(kind=wp), | intent(in) | :: | loc |
location parameter |
||
character(len=*), | intent(in) | :: | tail |
tail options |
returned probability integral
Impure wrapper function for f_dst_gamma_pdf_core
.
Handles optional arguments and invalid values for arguments.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | x |
sample position |
||
real(kind=wp), | intent(in), | optional | :: | alpha |
shape parameter |
|
real(kind=wp), | intent(in), | optional | :: | beta |
scale parameter |
|
real(kind=wp), | intent(in), | optional | :: | loc |
location parameter |
Probability density function for gamma distribution.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | x |
sample position |
||
real(kind=wp), | intent(in) | :: | alpha |
shape parameter |
||
real(kind=wp), | intent(in) | :: | beta |
scale parameter |
||
real(kind=wp), | intent(in) | :: | loc |
location parameter |
Impure wrapper function for f_dst_gamma_ppf_core
.
Handles optional arguments and invalid values for arguments.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | p |
probability between 0.0 - 1.0 |
||
real(kind=wp), | intent(in), | optional | :: | alpha |
shape parameter |
|
real(kind=wp), | intent(in), | optional | :: | beta |
scale parameter |
|
real(kind=wp), | intent(in), | optional | :: | loc |
location parameter |
sample position
Percent point function/quantile function for gamma distribution.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | p |
probability between 0.0 - 1.0 |
||
real(kind=wp), | intent(in) | :: | alpha |
shape parameter |
||
real(kind=wp), | intent(in) | :: | beta |
scale parameter |
||
real(kind=wp), | intent(in) | :: | loc |
location parameter |
sample position
Impure wrapper function for f_dst_gpd_cdf_core
.
Handles optional arguments and invalid values for arguments.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | x |
sample position |
||
real(kind=wp), | intent(in) | :: | xi |
distribution shape parameter |
||
real(kind=wp), | intent(in), | optional | :: | mu |
distribution location |
|
real(kind=wp), | intent(in), | optional | :: | sigma |
distribution dispersion/scale (must be positive) |
|
character(len=*), | intent(in), | optional | :: | tail |
tail options |
returned probability integral
Cumulative distribution function for generalised pareto distribution.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | x |
sample position |
||
real(kind=wp), | intent(in) | :: | xi |
distribution shape parameter |
||
real(kind=wp), | intent(in) | :: | mu |
distribution location |
||
real(kind=wp), | intent(in) | :: | sigma |
distribution dispersion/scale (must be positive) |
||
character(len=*), | intent(in) | :: | tail |
tail options |
returned probability integral
Impure wrapper function for f_dst_gpd_pdf_core
.
Handles optional arguments and invalid values for arguments.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | x |
sample position |
||
real(kind=wp), | intent(in) | :: | xi |
distribution shape parameter |
||
real(kind=wp), | intent(in), | optional | :: | mu |
distribution location |
|
real(kind=wp), | intent(in), | optional | :: | sigma |
distribution dispersion/scale (must be positive) |
Probability density function for generalised pareto distribution.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | x |
sample position |
||
real(kind=wp), | intent(in) | :: | xi |
distribution shape parameter |
||
real(kind=wp), | intent(in) | :: | mu |
distribution location |
||
real(kind=wp), | intent(in) | :: | sigma |
distribution dispersion/scale (must be positive) |
Impure wrapper function for f_dst_gpd_ppf_core
.
Handles optional arguments and invalid values for arguments.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | p |
probability between 0.0 - 1.0 |
||
real(kind=wp), | intent(in), | optional | :: | xi |
distribution shape parameter |
|
real(kind=wp), | intent(in), | optional | :: | mu |
distribution location |
|
real(kind=wp), | intent(in), | optional | :: | sigma |
distribution dispersion/scale (must be positive) |
sample position
Percent point function/quantile function for generalised pareto distribution.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | p |
probability between 0.0 - 1.0 |
||
real(kind=wp), | intent(in) | :: | xi |
distribution shape parameter |
||
real(kind=wp), | intent(in) | :: | mu |
distribution location |
||
real(kind=wp), | intent(in) | :: | sigma |
distribution dispersion/scale (must be positive) |
sample position
Impure wrapper function for f_dst_norm_cdf_core
.
Handles optional arguments and invalid values for arguments.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | x |
sample position |
||
real(kind=wp), | intent(in), | optional | :: | mu |
distribution location (mean) |
|
real(kind=wp), | intent(in), | optional | :: | sigma |
distribution dispersion/scale (standard deviation) |
|
character(len=*), | intent(in), | optional | :: | tail |
tail options |
returned probability integral
Cumulative distribution function for normal distribution.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | x |
sample position |
||
real(kind=wp), | intent(in) | :: | mu |
distribution location (mean) |
||
real(kind=wp), | intent(in) | :: | sigma |
distribution dispersion/scale (standard deviation) |
||
character(len=*), | intent(in) | :: | tail |
tail options |
returned probability integral
Impure wrapper function for f_dst_norm_pdf_core
.
Handles optional arguments and invalid values for arguments.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | x |
sample position |
||
real(kind=wp), | intent(in), | optional | :: | mu |
distribution location (mean) |
|
real(kind=wp), | intent(in), | optional | :: | sigma |
distribution dispersion/scale (standard deviation) |
Probability density function for normal distribution.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | x |
sample position |
||
real(kind=wp), | intent(in) | :: | mu |
distribution location (mean) |
||
real(kind=wp), | intent(in) | :: | sigma |
distribution dispersion/scale (standard deviation) |
Impure wrapper function for f_dst_norm_ppf_core
.
Handles optional arguments and invalid values for arguments.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | p |
probability between 0.0 - 1.0 |
||
real(kind=wp), | intent(in), | optional | :: | mu |
distribution location (mean) |
|
real(kind=wp), | intent(in), | optional | :: | sigma |
distribution dispersion/scale (standard deviation) |
sample position
Percent point function/quantile function for normal distribution.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | p |
probability between 0.0 - 1.0 |
||
real(kind=wp), | intent(in) | :: | mu |
distribution location (mean) |
||
real(kind=wp), | intent(in) | :: | sigma |
distribution dispersion/scale (standard deviation) |
sample position
Impure wrapper function for f_dst_t_cdf_core
.
Handles optional arguments and invalid values for arguments.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | x |
sample position |
||
real(kind=wp), | intent(in) | :: | df |
degrees of freedom |
||
real(kind=wp), | intent(in), | optional | :: | mu |
distribution location (mean) |
|
real(kind=wp), | intent(in), | optional | :: | sigma |
distribution dispersion/scale (standard deviation) |
|
character(len=*), | intent(in), | optional | :: | tail |
tail options |
returned probability integral
Cumulative distribution function for student t distribution.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | x |
sample position |
||
real(kind=wp), | intent(in) | :: | df |
degrees of freedom |
||
real(kind=wp), | intent(in) | :: | mu |
distribution location (mean) |
||
real(kind=wp), | intent(in) | :: | sigma |
distribution dispersion/scale (standard deviation) |
||
character(len=*), | intent(in) | :: | tail |
tail options |
returned probability integral
Impure wrapper function for f_dst_t_pdf_core
.
Handles optional arguments and invalid values for arguments.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | x |
sample position |
||
real(kind=wp), | intent(in) | :: | df |
degrees of freedom |
||
real(kind=wp), | intent(in), | optional | :: | mu |
distribution location (~mean) |
|
real(kind=wp), | intent(in), | optional | :: | sigma |
distribution dispersion/scale (~standard deviation) |
Probability density function for student t distribution.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | x |
sample position |
||
real(kind=wp), | intent(in) | :: | df |
degrees of freedom |
||
real(kind=wp), | intent(in) | :: | mu |
distribution location (~mean) |
||
real(kind=wp), | intent(in) | :: | sigma |
distribution dispersion/scale (~standard deviation) |
Impure wrapper function for f_dst_t_ppf_core
.
Handles optional arguments and invalid values for arguments.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | p |
probability between 0.0 - 1.0 |
||
real(kind=wp), | intent(in) | :: | df |
degrees of freedom |
||
real(kind=wp), | intent(in), | optional | :: | mu |
distribution location (mean) |
|
real(kind=wp), | intent(in), | optional | :: | sigma |
distribution dispersion/scale (standard deviation) |
sample position
Percent point function/quantile function for t distribution.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | p |
probability between 0.0 - 1.0 |
||
real(kind=wp), | intent(in) | :: | df |
degrees of freedom |
||
real(kind=wp), | intent(in) | :: | mu |
distribution location (mean) |
||
real(kind=wp), | intent(in) | :: | sigma |
distribution dispersion/scale (standard deviation) |
sample position
Computes the regularised incomplete beta function. beta_inc and beta_cf algorithms are based on several public domain Fortran and C code, Lentz's algorithm (1976), and modified to use 2008+ intrinsics.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | x |
upper limit of integral |
||
real(kind=wp), | intent(in) | :: | a |
shape parameters for beta dist. |
||
real(kind=wp), | intent(in) | :: | b |
shape parameters for beta dist. |
regularised incomplete beta function
Incomplete gamma function. Needed by gamma and chi-squared cdf. Uses Fortran 2008+ intrinsics.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | a | |||
real(kind=wp), | intent(in) | :: | x |