Those include the Cauchy, Weibull, normal, log-normal, logistic, exponential, uniform, gamma distributions, the central and noncentral beta, chi-squared, Fisher's F-distribution, Student's t-distribution, as well as the discrete binomial and negative binomial distributions, geometric, hypergeometric and Poisson distributions. In addition, there are functions for calculating theoretical moments of distributions, which allow to evaluate the degree of conformity of the real distribution to the modeled one.

The MQL5 standard library has been supplemented with numerous mathematical functions from R. Moreover, an increase in operation speed of 3 to 7 times has been achieved, compared to the initial versions in the R language. At the same time, errors in implementation of certain functions in R have been found.



Contents





Introduction

The R language is one of the best tools of statistical processing and analysis of data.

Thanks to availability and support of multiple statistical distributions, it had become widespread in the analysis and processing of various data. Using the apparatus of probability theory and mathematical statistics allows for a fresh look at the financial market data and provides new opportunities to create trading strategies. With the statistical library, all these features are now available in the MQL5.

The statistical library contains functions for calculating the statistical characteristics of data, as well as functions for working with statistical distributions.

This article considers the main functions of the library and an example of their practical use.





1. Functions for calculating the statistical characteristics of array elements



This group of functions calculates the standard characteristics (mean, variance, skewness, kurtosis, median, root-mean-square and standard deviations) of array elements.



1.1. MathMean

The function calculates the mean (first moment) of array elements. In case of error it returns NaN (not a number). Analog of the mean() in R.



double MathMean ( const double &array[] );

1.2. MathVariance

The function calculates the variance (second moment) of array elements. In case of error it returns NaN. Analog of the var() in R.

double MathVariance ( const double &array[] );





1.3. MathSkewness

The function calculates the skewness (third moment) of array elements. In case of error it returns NaN. Analog of the skewness() in R (e1071 library).

double MathSkewness ( const double &array[] );





1.4. MathKurtosis

The function calculates the kurtosis (fourth moment) of array elements. In case of error it returns NaN. Analog of the kurtosis() in R (e1071 library).

double MathKurtosis ( const double &array[] );





1.5. MathMoments

The function calculates the first 4 moments (mean, variance, skewness, kurtosis) of array elements. Returns true if the moments have been calculated successfully, otherwise false.

bool MathMoments ( const double &array[], double &mean, double &variance, double &skewness, double &kurtosis, const int start= 0 , const int count= WHOLE_ARRAY );





1.6. MathMedian

The function calculates the median value of array elements. In case of error it returns NaN. Analog of the median() in R.



double MathMedian ( double &array[] );





1.7. MathStandardDeviation

The function calculates the standard deviation of array elements. In case of error it returns NaN. Analog of the sd() in R.



double MathStandardDeviation ( const double &array[] );





1.8. MathAverageDeviation

The function calculates the average absolute deviation of array elements. In case of error it returns NaN. Analog of the aad() in R.

double MathAverageDeviation ( const double &array[] );





All functions that calculate the kurtosis use the excess kurtosis around the normal distribution (excess kurtosis=kurtosis-3), i.e. the excess kurtosis of a normal distribution is zero.

It is positive if the peak of the distribution around the expected value is sharp, and negative if the peak is flat.





2. Statistical distributions

The statistical library of the MQL5 contains 5 functions for working with the statistical distributions:



Calculation of probability density (the MathProbabilityDensityX() functions);

Calculation of probabilities (the MathCumulativeDistributionX() functions);

The probability distribution function is equal to the probability of a random variable falling within the range of (-inf; x]).

Calculation of distribution quantiles (the MathQuantileX() functions);

The quantile x of a distribution corresponds to a random value falling within the range of (-inf, x] with the specified probability for the given distribution parameters.

Generating random numbers with the specified distribution (the MathRandomX() functions); Calculation of the theoretical moments of the distributions (the MathMomentsX() functions);





2.1. Normal Distribution

2.1.1. MathProbabilityDensityNormal

double MathProbabilityDensityNormal ( const double x, const double mu, const double sigma, const bool log_mode, int &error_code );

The function calculates the value of the probability density function of normal distribution with the mu and sigma parameters for a random variable x. In case of error it returns

The function calculates the value of the probability density function of normal distribution with the mu and sigma parameters for a random variable x. In case of error it returns NaN.



double MathProbabilityDensityNormal ( const double x, const double mu, const double sigma, int &error_code );

The function calculates the values of the probability density function of normal distribution with the mu and sigma parameters for an array of random variables x[]. In case of error it returns false. Analog of the dnorm() in R.

bool MathProbabilityDensityNormal ( const double &x[], const double mu, const double sigma, const bool log_mode, double &result[] );

The function calculates the values of the probability density function of normal distribution with the mu and sigma parameters for an array of random variables x[]. In case of error it returns false.

bool MathProbabilityDensityNormal ( const double &x[], const double mu, const double sigma, double &result[] );





2.1.2. MathCumulativeDistributionNormal

The function calculates the value of the normal distribution function with the mu and sigma parameters for a random variable x. In case of error it returns NaN.



double MathCumulativeDistributionNormal ( const double x, const double mu, const double sigma, const bool tail, const bool log_mode, int &error_code );

The function calculates the value of the normal distribution function with the mu and sigma parameters for a random variable x. In case of error it returns NaN.



double MathCumulativeDistributionNormal ( const double x, const double mu, const double sigma, int &error_code );

bool MathCumulativeDistributionNormal ( const double &x[], const double mu, const double sigma, const bool tail, const bool log_mode, double &result[] );

The function calculates the value of the normal distribution function with the mu and sigma parameters for an array of random variables x[]. In case of error it returns false. Analog of the pnorm() in R.

The function calculates the value of the normal distribution function with the mu and sigma parameters for an array of random variables x[]. In case of error it returns false.



bool MathCumulativeDistributionNormal ( const double &x[], const double mu, const double sigma, double &result[] );





2.1.3. MathQuantileNormal

For the specified probability, the function calculates the value of inverse normal distribution function with the mu and sigma parameters. In case of error it returns NaN.

double MathQuantileNormal ( const double probability, const double mu, const double sigma, const bool tail, const bool log_mode, int &error_code );

For the specified probability, the function calculates the value of inverse normal distribution function with the mu and sigma parameters. In case of error it returns NaN.

double MathQuantileNormal ( const double probability, const double mu, const double sigma, int &error_code );

false

bool MathQuantileNormal ( const double &probability[], const double mu, const double sigma, const bool tail, const bool log_mode, double &result[] );

For the specified 'probability[]' array of probability values, the function calculates the values of inverse normal distribution function with the mu and sigma parameters. In case of error it returns. Analog of the qnorm() in R.

For the specified 'probability[]' array of probability values, the function calculates the values of inverse normal distribution function with the mu and sigma parameters. In case of error it returns false.



bool MathQuantileNormal ( const double &probability[], const double mu, const double sigma, double &result[] );





2.1.4. MathRandomNormal



The function generates a pseudorandom variable distributed according to the normal law with the mu and sigma parameters. In case of error it returns NaN.

double MathRandomNormal ( const double mu, const double sigma, int &error_code );

The function generates pseudorandom variables distributed according to the normal law with the mu and sigma parameters. In case of error it returns false. Analog of the rnorm() in R.

bool MathRandomNormal ( const double mu, const double sigma, const int data_count, double &result[] );





2.1.5. MathMomentsNormal

The function calculates the theoretical numerical values of the first 4 moments of the normal distribution. Returns true if calculation of the moments has been successful, otherwise false.

bool MathMomentsNormal ( const double mu, const double sigma, double &mean, double &variance, double &skewness, double &kurtosis, int &error_code );





2.2. Log-normal distribution

2.2.1. MathProbabilityDensityLognormal

The function calculates the value of the probability density function of log-normal distribution with the mu and sigma parameters for a random variable x. In case of error it returns NaN.

double MathProbabilityDensityLognormal ( const double x, const double mu, const double sigma, const bool log_mode, int &error_code );

The function calculates the value of the probability density function of log-normal distribution with the mu and sigma parameters for a random variable x. In case of error it returns NaN.

double MathProbabilityDensityLognormal ( const double x, const double mu, const double sigma, int &error_code );

The function calculates the value of the probability density function of log-normal distribution with the mu and sigma parameters for an array of random variables x[]. In case of error it returns NaN. Analog of the dlnorm() in R.

bool MathProbabilityDensityLognormal ( const double &x[], const double mu, const double sigma, const bool log_mode, double &result[] );

The function calculates the value of the probability density function of log-normal distribution with the mu and sigma parameters for an array of random variables x[]. In case of error it returns false.

bool MathProbabilityDensityLognormal ( const double &x[], const double mu, const double sigma, double &result[] );





2.2.2. MathCumulativeDistributionLognormal

The function calculates the value of the log-normal distribution function with the mu and sigma parameters for a random variable x. In case of error it returns NaN.

double MathCumulativeDistributionLognormal ( const double x, const double mu, const double sigma, const bool tail, const bool log_mode, int &error_code );

The function calculates the value of the log-normal distribution function with the mu and sigma parameters for a random variable x. In case of error it returns NaN.

double MathCumulativeDistributionLognormal ( const double x, const double mu, const double sigma, int &error_code );

The function calculates the value of the log-normal distribution function with the mu and sigma parameters for an array of random variables x[]. In case of error it returns false. Analog of the plnorm() in R.

bool MathCumulativeDistributionLognormal ( const double &x[], const double mu, const double sigma, const bool tail, const bool log_mode, double &result[] );

The function calculates the value of the log-normal distribution function with the mu and sigma parameters for an array of random variables x[]. In case of error it returns false.



bool MathCumulativeDistributionLognormal ( const double &x[], const double mu, const double sigma, double &result[] );





2.2.3. MathQuantileLognormal

The function calculates the value of the inverse log-normal distribution function with the mu and sigma parameters for the specified probability. In case of error it returns NaN.

double MathQuantileLognormal ( const double probability, const double mu, const double sigma, const bool tail, const bool log_mode, int &error_code );

The function calculates the value of the inverse log-normal distribution function with the mu and sigma parameters for the specified probability. In case of error it returns NaN.

double MathQuantileLognormal ( const double probability, const double mu, const double sigma, int &error_code );

For the specified 'probability[]' array of probability values, the function calculates the values of inverse log-normal distribution function with the mu and sigma parameters. In case of error it returns false. Analog of the qlnorm() in R.

bool MathQuantileLognormal ( const double &probability[], const double mu, const double sigma, const bool tail, const bool log_mode, double &result[] );

For the specified 'probability[]' array of probability values, the function calculates the values of inverse log-normal distribution function with the mu and sigma parameters. In case of error it returns false.

bool MathQuantileLognormal ( const double &probability[], const double mu, const double sigma, double &result[] );





2.2.4. MathRandomLognormal



The function generates a pseudorandom variable distributed according to the log-normal law with the mu sigma parameters. In case of error it returns NaN.

double MathRandomLognormal ( const double mu, const double sigma, int &error_code );

The function generates pseudorandom variables distributed according to the log-normal law with the mu and sigma parameters. In case of error it returns false. Analog of the rlnorm() in R.

bool MathRandomLognormal ( const double mu, const double sigma, const int data_count, double &result[] );





2.2.5. MathMomentsLognormal

The function calculates the theoretical numerical values of the first 4 moments of the log-normal distribution. Returns true if calculation of the moments has been successful, otherwise false.

bool MathMomentsLognormal ( const double mu, const double sigma, double &mean, double &variance, double &skewness, double &kurtosis, int &error_code );





2.3. Beta distribution

2.3.1. MathProbabilityDensityBeta

The function calculates the value of the probability density function of beta distribution with the a and b parameters for a random variable x. In case of error it returns NaN.

double MathProbabilityDensityBeta ( const double x, const double a, const double b, const bool log_mode, int &error_code );

The function calculates the value of the probability density function of beta distribution with the a and b parameters for a random variable x. In case of error it returns NaN.

double MathProbabilityDensityBeta ( const double x, const double a, const double b, int &error_code );

The function calculates the value of the probability density function of beta distribution with the a and b parameters for an array of random variables x[]. In case of error it returns false. Analog of the dbeta() in R.

bool MathProbabilityDensityBeta ( const double &x[], const double a, const double b, const bool log_mode, double &result[] );

The function calculates the value of the probability density function of beta distribution with the a and b parameters for an array of random variables x[]. In case of error it returns false.



bool MathProbabilityDensityBeta ( const double &x[], const double a, const double b, double &result[] );





2.3.2. MathCumulativeDistributionlBeta

The function calculates the value of the probability distribution function of beta distribution with the a and b parameters for a random variable x. In case of error it returns NaN.

double MathCumulativeDistributionBeta ( const double x, const double a, const double b, const bool tail, const bool log_mode, int &error_code );

The function calculates the value of the probability distribution function of beta distribution with the a and b parameters for a random variable x. In case of error it returns NaN.

double MathCumulativeDistributionBeta ( const double x, const double a, const double b, int &error_code );

The function calculates the value of the probability distribution function of beta distribution with the a and b parameters for an array of random variables x[]. In case of error it returns false. Analog of the pbeta() in R.

bool MathCumulativeDistributionBeta ( const double &x[], const double a, const double b, const bool tail, const bool log_mode, double &result[] );

The function calculates the value of the probability distribution function of beta distribution with the a and b parameters for an array of random variables x[]. In case of error it returns false.

bool MathCumulativeDistributionBeta ( const double &x[], const double a, const double b, double &result[] );





2.3.3. MathQuantileBeta

For the specified probability, the function calculates the value of inverse beta distribution function with the a and b parameters. In case of error it returns NaN.

double MathQuantileBeta ( const double probability, const double a, const double b, const bool tail, const bool log_mode, int &error_code );

For the specified probability, the function calculates the value of inverse beta distribution function with the a and b parameters. In case of error it returns NaN.

double MathQuantileBeta ( const double probability, const double a, const double b, int &error_code );

For the specified 'probability[]' array of probability values, the function calculates the values of inverse beta distribution function with the a and b parameters. In case of error it returns false. Analog of the qbeta() in R.

bool MathQuantileBeta ( const double &probability[], const double a, const double b, const bool tail, const bool log_mode, double &result[] );

For the specified 'probability[]' array of probability values, the function calculates the values of inverse beta distribution function with the a and b parameters. In case of error it returns false.

bool MathQuantileBeta ( const double &probability[], const double a, const double b, double &result[] );





2.3.4. MathRandomBeta



The function generates a pseudorandom variable distributed according to the law of beta distribution with the a and b parameters. In case of error it returns NaN.

double MathRandomBeta ( const double a, const double b, int &error_code );

The function generates pseudorandom variables distributed according to the law of beta distribution with the a and b parameters. In case of error it returns false. Analog of the rbeta() in R.

bool MathRandomBeta ( const double a, const double b, const int data_count, double &result[] );





2.3.5. MathMomentsBeta

The function calculates the theoretical numerical values of the first 4 moments of the beta distribution. Returns true if calculation of the moments has been successful, otherwise false.

bool MathMomentsBeta ( const double a, const double b, double &mean, double &variance, double &skewness, double &kurtosis, int &error_code );





2.4. Noncentral beta distribution

2.4.1. MathProbabilityDensityNoncentralBeta

double MathProbabilityDensityNoncentralBeta ( const double x, const double a, const double b, const double lambda, const bool log_mode, int &error_code );

The function calculates the value of the probability density function of noncentral beta distribution with the a, b and lambda parameters for a random variable x. In case of error it returns

The function calculates the value of the probability density function of noncentral beta distribution with the a, b and lambda parameters for a random variable x. In case of error it returns NaN.

double MathProbabilityDensityNoncentralBeta ( const double x, const double a, const double b, const double lambda, int &error_code );

The function calculates the value of the probability density function of noncentral beta distribution with the a, b and lambda parameters for an array of random variables x[]. In case of error it returns false. Analog of the dbeta() in R.

bool MathProbabilityDensityNoncentralBeta ( const double &x[], const double a, const double b, const double lambda, const bool log_mode, double &result[] );

The function calculates the value of the probability density function of noncentral beta distribution with the a, b and lambda parameters for an array of random variables x[]. In case of error it returns false.



bool MathProbabilityDensityNoncentralBeta ( const double &x[], const double a, const double b, const double lambda, double &result[] );





2.4.2. MathCumulativeDistributionNoncentralBeta

The function calculates the value of the probability distribution function of noncentral beta distribution with the a and b parameters for a random variable x. In case of error it returns NaN.

double MathCumulativeDistributionNoncentralBeta ( const double x, const double a, const double b, const double lambda, const bool tail, const bool log_mode, int &error_code );

The function calculates the value of the probability distribution function of noncentral beta distribution with the a and b parameters for a random variable x. In case of error it returns NaN.

double MathCumulativeDistributionNoncentralBeta ( const double x, const double a, const double b, const double lambda, int &error_code );

The function calculates the value of the probability distribution function of noncentral beta distribution with the a and b parameters for an array of random variables x[]. In case of error it returns false. Analog of the pbeta() in R.

bool MathCumulativeDistributionNoncentralBeta ( const double &x[], const double a, const double b, const double lambda, const bool tail, const bool log_mode, double &result[] );

The function calculates the value of the probability distribution function of noncentral beta distribution with the a and b parameters for an array of random variables x[]. In case of error it returns false.

bool MathCumulativeDistributionNoncentralBeta ( const double &x[], const double a, const double b, const double lambda, double &result[] );





2.4.3. MathQuantileNoncentralBeta

The function calculates the value of the inverse probability distribution function of noncentral beta distribution with the a, b and lambda parameters for the occurrence of a random variable x. In case of error it returns NaN.

double MathQuantileNoncentralBeta ( const double probability, const double a, const double b, const double lambda, const bool tail, const bool log_mode, int &error_code );

The function calculates the value of the inverse probability distribution function of noncentral beta distribution with the a, b and lambda parameters for the occurrence of a random variable x. In case of error it returns NaN.

double MathQuantileNoncentralBeta ( const double probability, const double a, const double b, const double lambda, int &error_code );

For the specified 'probability[]' array of probability values, the function calculates the value of inverse probability distribution function of noncentral beta distribution with the a, b and lambda parameters. In case of error it returns false. Analog of the qbeta() in R.

bool MathQuantileNoncentralBeta ( const double &probability[], const double a, const double b, const double lambda, const bool tail, const bool log_mode, double &result[] );

For the specified 'probability[]' array of probability values, the function calculates the value of inverse probability distribution function of noncentral beta distribution with the a, b and lambda parameters. In case of error it returns false.

bool MathQuantileNoncentralBeta ( const double &probability[], const double a, const double b, const double lambda, double &result[] );





2.4.4. MathRandomNoncentralBeta



The function generates a pseudorandom variable distributed according to the law of noncentral beta distribution the a, b and lambda parameters. In case of error it returns NaN.

double MathRandomNoncentralBeta ( const double a, const double b, const double lambda, int &error_code );

The function generates pseudorandom variables distributed according to the law of noncentral beta distribution the a, b and lambda parameters. In case of error it returns false. Analog of the rbeta() in R.

bool MathRandomNoncentralBeta ( const double a, const double b, const double lambda, const int data_count, double &result[] );





2.4.5. MathMomentsNoncentralBeta

The function calculates the theoretical numerical values of the first 4 moments of the noncentral beta distribution with the a, b and lambda parameters. Returns true if calculation of the moments has been successful, otherwise false.

double MathMomentsNoncentralBeta ( const double a, const double b, const double lambda, double &mean, double &variance, double &skewness, double &kurtosis, int &error_code );





2.5. Gamma distribution

2.5.1. MathProbabilityDensityGamma

double MathProbabilityDensityGamma ( const double x, const double a, const double b, const bool log_mode, int &error_code );

The function calculates the value of the probability density function of gamma distribution with the a and b parameters for a random variable x. In case of error it returns

The function calculates the value of the probability density function of gamma distribution with the a and b parameters for a random variable x. In case of error it returns NaN.

double MathProbabilityDensityGamma ( const double x, const double a, const double b, int &error_code );

The function calculates the value of the probability density function of gamma distribution with the a and b parameters for an array of random variables x[]. In case of error it returns false. Analog of the dgamma() in R.

bool MathProbabilityDensityGamma ( const double &x[], const double a, const double b, const bool log_mode, double &result[] );

The function calculates the value of the probability density function of gamma distribution with the a and b parameters for an array of random variables x[]. In case of error it returns false.

bool MathProbabilityDensityGamma ( const double &x[], const double a, const double b, double &result[] );





2.5.2. MathCumulativeDistributionGamma

The function calculates the value of the gamma distribution function with the a and b parameters for a random variable x. In case of error it returns NaN.

double MathCumulativeDistributionGamma ( const double x, const double a, const double b, const bool tail, const bool log_mode, int &error_code );

The function calculates the value of the gamma distribution function with the a and b parameters for a random variable x. In case of error it returns NaN.

double MathCumulativeDistributionGamma ( const double x, const double a, const double b, int &error_code );

The function calculates the value of the gamma distribution function with the a and b parameters for an array of random variables x[]. In case of error it returns false. Analog of the pgamma() in R.

bool MathCumulativeDistributionGamma ( const double &x[], const double a, const double b, const bool tail, const bool log_mode, double &result[] );

The function calculates the value of the gamma distribution function with the a and b parameters for an array of random variables x[]. In case of error it returns false.



bool MathCumulativeDistributionGamma ( const double &x[], const double a, const double b, double &result[] );





2.5.3. MathQuantileGamma

For the specified probability, the function calculates the value of inverse gamma distribution function with the a and b parameters. In case of error it returns NaN.

double MathQuantileGamma ( const double probability, const double a, const double b, const bool tail, const bool log_mode, int &error_code );

For the specified probability, the function calculates the value of inverse gamma distribution function with the a and b parameters. In case of error it returns NaN.

double MathQuantileGamma ( const double probability, const double a, const double b, int &error_code );

For the specified 'probability[]' array of probability values, the function calculates the value of inverse gamma distribution function with the a and b parameters. In case of error it returns false. Analog of the qgamma() in R.

bool MathQuantileGamma ( const double &probability[], const double a, const double b, const bool tail, const bool log_mode, double &result[] );

For the specified 'probability[]' array of probability values, the function calculates the value of inverse gamma distribution function with the a and b parameters. In case of error it returns false.

bool MathQuantileGamma ( const double &probability[], const double a, const double b, double &result[] );





2.5.4. MathRandomGamma



The function generates a pseudorandom variable distributed according to the law of gamma distribution with the a and b parameters. In case of error it returns NaN.

double MathRandomGamma ( const double a, const double b, int &error_code );

The function generates pseudorandom variables distributed according to the law of gamma distribution with the a and b parameters. In case of error it returns false. Analog of the rgamma() in R.

bool MathRandomGamma ( const double a, const double b, const int data_count, double &result[] );





2.5.5. MathMomentsGamma

The function calculates the theoretical numerical values of the first 4 moments of the gamma distribution with the a and b parameters. Returns true if calculation of the moments has been successful, otherwise false.

bool MathMomentsGamma ( const double a, const double b, double &mean, double &variance, double &skewness, double &kurtosis, int &error_code );





2.6. Chi-squared distribution

2.6.1. MathProbabilityDensityChiSquare

The function calculates the value of the probability density function of chi-squared distribution with the nu parameter for a random variable x. In case of error it returns NaN.

double MathProbabilityDensityChiSquare ( const double x, const double nu, const bool log_mode, int &error_code );

double MathProbabilityDensityChiSquare ( const double x, const double nu, int &error_code );

The function calculates the value of the probability density function of chi-squared distribution with the nu parameter for a random variable x. In case of error it returns

The function calculates the value of the probability density function of chi-squared distribution with the nu parameter for an array of random variables x[]. In case of error it returns false. Analog of the dchisq() in R.

bool MathProbabilityDensityChiSquare ( const double &x[], const double nu, const bool log_mode, double &result[] );

The function calculates the value of the probability density function of chi-squared distribution with the nu parameter for an array of random variables x[]. In case of error it returns false.

bool MathProbabilityDensityChiSquare ( const double &x[], const double nu, double &result[] );





2.6.2. MathCumulativeDistributionChiSquare

The function calculates the value of the probability distribution function of chi-squared distribution with the nu parameter for a random variable x. In case of error it returns NaN.

double MathCumulativeDistributionChiSquare ( const double x, const double nu, const bool tail, const bool log_mode, int &error_code );

The function calculates the value of the probability distribution function of chi-squared distribution with the nu parameter for a random variable x. In case of error it returns NaN.

double MathCumulativeDistributionChiSquare ( const double x, const double nu, int &error_code );

The function calculates the value of the probability distribution function of chi-squared distribution with the nu parameter for an array of random variables x[]. In case of error it returns false. Analog of the pchisq() in R.

bool MathCumulativeDistributionChiSquare ( const double &x[], const double nu, const bool tail, const bool log_mode, double &result[] );

The function calculates the value of the probability distribution function of chi-squared distribution with the nu parameter for an array of random variables x[]. In case of error it returns false.

bool MathCumulativeDistributionChiSquare ( const double &x[], const double nu, double &result[] );





2.6.3. MathQuantileChiSquare

For the specified probability, the function calculates the value of inverse chi-squared distribution function. In case of error it returns NaN.

double MathQuantileChiSquare ( const double probability, const double nu, const bool tail, const bool log_mode, int &error_code );

For the specified probability, the function calculates the value of inverse chi-squared distribution function. In case of error it returns NaN.

double MathQuantileChiSquare ( const double probability, const double nu, int &error_code );

For the specified 'probability[]' array of probability values, the function calculates the value of inverse chi-squared distribution function. In case of error it returns false. Analog of the qchisq() in R.

bool MathQuantileChiSquare ( const double &probability[], const double nu, const bool tail, const bool log_mode, double &result[] );

For the specified 'probability[]' array of probability values, the function calculates the value of inverse chi-squared distribution function. In case of error it returns false.

bool MathQuantileChiSquare ( const double &probability[], const double nu, double &result[] );





2.6.4. MathRandomChiSquare

The function generates a pseudorandom variable distributed according to the law of chi-squared distribution with the nu parameter. In case of error it returns NaN.

double MathRandomChiSquare ( const double nu, int &error_code );

The function generates pseudorandom variables distributed according to the law of chi-squared distribution with the nu parameter. In case of error it returns false. Analog of the rchisq() in R.

bool MathRandomChiSquare ( const double nu, const int data_count, double &result[] );





2.6.5. MathMomentsChiSquare

The function calculates the theoretical numerical values of the first 4 moments of the chi-squared distribution with the nu parameter. Returns true if calculation of the moments has been successful, otherwise false.

bool MathMomentsChiSquare ( const double nu, double &mean, double &variance, double &skewness, double &kurtosis, int &error_code );





2.7. Noncentral chi-squared distribution

2.7.1. MathProbabilityDensityNoncentralChiSquare

The function calculates the value of the probability density function of noncentral chi-squared distribution with the nu and sigma parameters for a random variable x. In case of error it returns NaN.

double MathProbabilityDensityNoncentralChiSquare ( const double x, const double nu, const double sigma, const bool log_mode, int &error_code );

The function calculates the value of the probability density function of noncentral chi-squared distribution with the nu and sigma parameters for a random variable x. In case of error it returns NaN.

double MathProbabilityDensityNoncentralChiSquare ( const double x, const double nu, const double sigma, int &error_code );

The function calculates the value of the probability density function of noncentral chi-squared distribution with the nu and sigma parameters for an array of random variables x[]. In case of error it returns false. Analog of the dchisq() in R.

bool MathProbabilityDensityNoncentralChiSquare ( const double &x[], const double nu, const double sigma, const bool log_mode, double &result[] );

The function calculates the value of the probability density function of noncentral chi-squared distribution with the nu and sigma parameters for an array of random variables x[]. In case of error it returns false.

bool MathProbabilityDensityNoncentralChiSquare ( const double &x[], const double nu, const double sigma, double &result[] );





2.7.2. MathCumulativeDistributionNoncentralChiSquare

The function calculates the value of the probability distribution function of noncentral chi-squared distribution with the nu and sigma parameters for a random variable x. In case of error it returns NaN.

double MathCumulativeDistributionNoncentralChiSquare ( const double x, const double nu, const double sigma, const bool tail, const bool log_mode, int &error_code );

The function calculates the value of the probability distribution function of noncentral chi-squared distribution with the nu and sigma parameters for a random variable x. In case of error it returns NaN.

double MathCumulativeDistributionNoncentralChiSquare ( const double x, const double nu, const double sigma, int &error_code );

The function calculates the value of the probability distribution function of noncentral chi-squared distribution with the nu and sigma parameters for an array of random variables x[]. In case of error it returns false. Analog of the pchisq() in R.

bool MathCumulativeDistributionNoncentralChiSquare ( const double &x[], const double nu, const double sigma, const bool tail, const bool log_mode, double &result[] );

The function calculates the value of the probability distribution function of noncentral chi-squared distribution with the nu and sigma parameters for an array of random variables x[]. In case of error it returns false.



bool MathCumulativeDistributionNoncentralChiSquare ( const double &x[], const double nu, const double sigma, double &result[] );





2.7.3. MathQuantileNoncentralChiSquare

For the specified probability, the function calculates the value of inverse noncentral chi-squared distribution function with the nu and sigma parameters. In case of error it returns NaN.

double MathQuantileNoncentralChiSquare ( const double probability, const double nu, const double sigma, const bool tail, const bool log_mode, int &error_code );

For the specified probability, the function calculates the value of inverse noncentral chi-squared distribution function with the nu and sigma parameters. In case of error it returns NaN.

double MathQuantileNoncentralChiSquare ( const double probability, const double nu, const double sigma, int &error_code );

For the specified 'probability[]' array of probability values, the function calculates the value of inverse noncentral chi-squared distribution function with the nu and sigma parameters. In case of error it returns false. Analog of the qchisq() in R.

bool MathQuantileNoncentralChiSquare ( const double &probability[], const double nu, const double sigma, const bool tail, const bool log_mode, double &result[] );

For the specified 'probability[]' array of probability values, the function calculates the value of inverse noncentral chi-squared distribution function with the nu and sigma parameters. In case of error it returns false.



bool MathQuantileNoncentralChiSquare ( const double &probability[], const double nu, const double sigma, double &result[] );





2.7.4. MathRandomNoncentralChiSquare

The function generates a pseudorandom variable distributed according to the law of noncentral chi-squared distribution with the nu and sigma parameters. In case of error it returns NaN.

double MathRandomNoncentralChiSquare ( const double nu, const double sigma, int &error_code );

The function generates pseudorandom variables distributed according to the law of noncentral chi-squared distribution with the nu and sigma parameters. In case of error it returns false. Analog of the rchisq() in R.

bool MathRandomNoncentralChiSquare ( const double nu, const double sigma, const int data_count, double &result[] );





2.7.5. MathMomentsNoncentralChiSquare

The function calculates the theoretical numerical values of the first 4 moments of the noncentral chi-squared distribution with the nu and sigma parameters. Returns true if calculation of the moments has been successful, otherwise false.

bool MathMomentsNoncentralChiSquare ( const double nu, const double sigma, double &mean, double &variance, double &skewness, double &kurtosis, int &error_code );





2.8. Exponential distribution

2.8.1. MathProbabilityDensityExponential

The function calculates the value of the probability density function of exponential distribution with the mu parameter for a random variable x. In case of error it returns NaN.

double MathProbabilityDensityExponential ( const double x, const double mu, const bool log_mode, int &error_code );

The function calculates the value of the probability density function of exponential distribution with the mu parameter for a random variable x. In case of error it returns NaN.

double MathProbabilityDensityExponential ( const double x, const double mu, int &error_code );

The function calculates the value of the probability density function of exponential distribution with the mu parameter for an array of random variables x[]. In case of error it returns false. Analog of the dexp() in R.

bool MathProbabilityDensityExponential ( const double &x[], const double mu, const bool log_mode, double &result[] );

The function calculates the value of the probability density function of exponential distribution with the mu parameter for an array of random variables x[]. In case of error it returns false.

bool MathProbabilityDensityExponential ( const double &x[], const double mu, double &result[] );





2.8.2. MathCumulativeDistributionExponential

The function calculates the value of the exponential distribution function of probabilities with the mu parameter for a random variable x. In case of error it returns NaN.

double MathCumulativeDistributionExponential ( const double x, const double mu, const bool tail, const bool log_mode, int &error_code );

The function calculates the value of the exponential distribution function of probabilities with the mu parameter for a random variable x. In case of error it returns NaN.

double MathCumulativeDistributionExponential ( const double x, const double mu, int &error_code );

The function calculates the value of the exponential distribution function of probabilities with the mu parameter for a random variable x. In case of error it returns false. Analog of the pexp() in R.

bool MathCumulativeDistributionExponential ( const double &x[], const double mu, const bool tail, const bool log_mode, double &result[] );

The function calculates the value of the exponential distribution function of probabilities with the mu parameter for a random variable x. In case of error it returns false.

bool MathCumulativeDistributionExponential ( const double &x[], const double mu, double &result[] );





2.8.3. MathQuantileExponential

For the specified probability, the function calculates the value of inverse exponential distribution function with the mu parameter. In case of error it returns NaN.

double MathQuantileExponential ( const double probability, const double mu, const bool tail, const bool log_mode, int &error_code );

For the specified probability, the function calculates the value of inverse exponential distribution function with the mu parameter. In case of error it returns NaN.

double MathQuantileExponential ( const double probability, const double mu, int &error_code );

For the specified 'probability[]' array of probability values, the function calculates the value of inverse exponential distribution function with the mu parameter. In case of error it returns false. Analog of the qexp() in R.

bool MathQuantileExponential ( const double &probability[], const double mu, const bool tail, const bool log_mode, double &result[] );

For the specified 'probability[]' array of probability values, the function calculates the value of inverse exponential distribution function with the mu parameter. In case of error it returns false.



bool MathQuantileExponential ( const double &probability[], const double mu, double &result[] );





2.8.4. MathRandomExponential



The function generates a pseudorandom variable distributed according to the law of exponential distribution with the mu parameter. In case of error it returns NaN.

double MathRandomExponential ( const double mu, int &error_code );

The function generates pseudorandom variables distributed according to the law of exponential distribution with the mu parameter. In case of error it returns false. Analog of the rexp() in R.

bool MathRandomExponential ( const double mu, const int data_count, double &result[] );





2.8.5. MathMomentsExponential

The function calculates the theoretical numerical values of the first 4 moments of the exponential distribution with the mu parameter. Returns true if calculation of the moments has been successful, otherwise false.

bool MathMomentsExponential ( const double mu, double &mean, double &variance, double &skewness, double &kurtosis, int &error_code );





2.9. F-distribution



2.9.1. MathProbabilityDensityF

The function calculates the value of the probability density function of Fisher's F-distribution with the nu1 and nu2 parameters for a random variable x. In case of error it returns NaN.

double MathProbabilityDensityF ( const double x, const double nu1, const double nu2, const bool log_mode, int &error_code );

The function calculates the value of the probability density function of Fisher's F-distribution with the nu1 and nu2 parameters for a random variable x. In case of error it returns NaN.

double MathProbabilityDensityF ( const double x, const double nu1, const double nu2, int &error_code );

The function calculates the value of the probability density function of Fisher's F-distribution with the nu1 and nu2 parameters for an array of random variables x[]. In case of error it returns false. Analog of the df() in R.

bool MathProbabilityDensityF ( const double &x[], const double nu1, const double nu2, const bool log_mode, double &result[] );

The function calculates the value of the probability density function of Fisher's F-distribution with the nu1 and nu2 parameters for an array of random variables x[]. In case of error it returns false.

bool MathProbabilityDensityF ( const double &x[], const double nu1, const double nu2, double &result[] );





2.9.2. MathCumulativeDistributionF

The function calculates the value of the probability distribution function of Fisher's F-distribution with the nu1 and nu2 parameters for a random variable x. In case of error it returns NaN.

double MathCumulativeDistributionF ( const double x, const double nu1, const double nu2, const bool tail, const bool log_mode, int &error_code );

The function calculates the value of the probability distribution function of Fisher's F-distribution with the nu1 and nu2 parameters for a random variable x. In case of error it returns NaN.

double MathCumulativeDistributionF ( const double x, const double nu1, const double nu2, int &error_code );

The function calculates the value of the probability distribution function of Fisher's F-distribution with the nu1 and nu2 parameters for an array of random variables x[]. In case of error it returns false. Analog of the pf() in R.

bool MathCumulativeDistributionF ( const double &x[], const double nu1, const double nu2, const bool tail, const bool log_mode, double &result[] );

The function calculates the value of the probability distribution function of Fisher's F-distribution with the nu1 and nu2 parameters for an array of random variables x[]. In case of error it returns false.

bool MathCumulativeDistributionF ( const double &x[], const double nu1, const double nu2, double &result[] );





2.9.3. MathQuantileF

For the specified probability, the function calculates the value of inverse Fisher's F-distribution function with the nu1 and nu2 parameters. In case of error it returns NaN.

double MathQuantileF ( const double probability, const double nu1, const double nu2, const bool tail, const bool log_mode, int &error_code );

For the specified probability, the function calculates the value of inverse Fisher's F-distribution function with the nu1 and nu2 parameters. In case of error it returns NaN.

double MathQuantileF ( const double probability, const double nu1, const double nu2, int &error_code );

For the specified probability, the function calculates the value of inverse Fisher's F-distribution function with the nu1 and nu2 parameters. In case of error it returns false. Analog of the qf() in R.

bool MathQuantileF ( const double &probability[], const double nu1, const double nu2, const bool tail, const bool log_mode, double &result[] );

For the specified probability, the function calculates the value of inverse Fisher's F-distribution function with the nu1 and nu2 parameters. In case of error it returns false.

bool MathQuantileF ( const double &probability[], const double nu1, const double nu2, double &result[] );





2.9.4. MathRandomF



The function generates a pseudorandom variable distributed according to the law of Fisher's F-distribution with the nu1 and nu2 parameters. In case of error it returns NaN.

double MathRandomF ( const double nu1, const double nu2, int &error_code );

The function generates pseudorandom variables distributed according to the law of Fisher's F-distribution with the nu1 and nu2 parameters. In case of error it returns false. Analog of the rf() in R.

bool MathRandomF ( const double nu1, const double nu2, const int data_count, double &result[] );





2.9.5. MathMomentsF

The function calculates the theoretical numerical values of the first 4 moments of the Fisher's F-distribution with the nu1 and nu2 parameters. Returns true if calculation of the moments has been successful, otherwise false.

bool MathMomentsF ( const double nu1, const double nu2, double &mean, double &variance, double &skewness, double &kurtosis, int &error_code );





2.10. Noncentral F-distribution

2.10.1. MathProbabilityDensityNoncentralF

The function calculates the value of the probability density function of noncentral Fisher's F-distribution with the nu1, nu2 and sigma parameters for a random variable x. In case of error it returns NaN.

double MathProbabilityDensityNoncentralF ( const double x, const double nu1, const double nu2, const double sigma, const bool log_mode, int &error_code );

The function calculates the value of the probability density function of noncentral Fisher's F-distribution with the nu1, nu2 and sigma parameters for a random variable x. In case of error it returns NaN.

double MathProbabilityDensityNoncentralF ( const double x, const double nu1, const double nu2, const double sigma, int &error_code );

The function calculates the value of the probability density function of noncentral Fisher's F-distribution with the nu1, nu2 and sigma parameters for an array of random variables x[]. In case of error it returns false. Analog of the df() in R.

double MathProbabilityDensityNoncentralF ( const double &x[], const double nu1, const double nu2, const double sigma, const bool log_mode, double &result[] );

The function calculates the value of the probability density function of noncentral Fisher's F-distribution with the nu1, nu2 and sigma parameters for an array of random variables x[]. In case of error it returns false.

double MathProbabilityDensityNoncentralF ( const double &x[], const double nu1, const double nu2, const double sigma, double &result[] );





2.10.2. MathCumulativeDistributionlNoncentralF

The function calculates the value of the probability distribution function of noncentral Fisher's F-distribution with the nu1, nu2 and sigma parameters for a random variable x. In case of error it returns NaN.

double MathCumulativeDistributionNoncentralF ( const double x, const double nu1, const double nu2, const double sigma, const bool tail, const bool log_mode, int &error_code );

The function calculates the value of the probability distribution function of noncentral Fisher's F-distribution with the nu1, nu2 and sigma parameters for a random variable x. In case of error it returns NaN.

double MathCumulativeDistributionNoncentralF ( const double x, const double nu1, const double nu2, const double sigma, int &error_code );

The function calculates the value of the probability distribution function of noncentral Fisher's F-distribution with the nu1, nu2 and sigma parameters for a random variable x. In case of error it returns false. Analog of the pf() in R.

bool MathCumulativeDistributionNoncentralF ( const double &x[], const double nu1, const double nu2, const double sigma, const bool tail, const bool log_mode, double &result[] );

The function calculates the value of the probability distribution function of noncentral Fisher's F-distribution with the nu1, nu2 and sigma parameters for a random variable x. In case of error it returns NaN.

bool MathCumulativeDistributionNoncentralF ( const double &x[], const double nu1, const double nu2, const double sigma, double &result[] );





2.10.3. MathQuantileNoncentralF

For the specified probability, the function calculates the value of inverse noncentral Fisher's F-distribution function with the nu1, nu2 and sigma parameters. In case of error it returns NaN.

double MathQuantileNoncentralF ( const double probability, const double nu1, const double nu2, const double sigma, const bool tail, const bool log_mode, int &error_code );

For the specified probability, the function calculates the value of inverse noncentral Fisher's F-distribution function with the nu1, nu2 and sigma parameters. In case of error it returns NaN.

double MathQuantileNoncentralF ( const double probability, const double nu1, const double nu2, const double sigma, int &error_code );

For the specified probability, the function calculates the value of inverse noncentral Fisher's F-distribution function with the nu1, nu2 and sigma parameters. In case of error it returns false. Analog of the qf() in R.

bool MathQuantileNoncentralF ( const double &probability[], const double nu1, const double nu2, const double sigma, const bool tail, const bool log_mode, double &result[] );

For the specified probability, the function calculates the value of inverse noncentral Fisher's F-distribution function with the nu1, nu2 and sigma parameters. In case of error it returns false.

bool MathQuantileNoncentralF ( const double &probability[], const double nu1, const double nu2, const double sigma, double &result[] );





2.10.4. MathRandomNoncentralF



The function generates a pseudorandom variable distributed according to the law of noncentral Fisher's F-distribution with the nu1, nu2 and sigma parameters. In case of error it returns NaN.

double MathRandomNoncentralF ( const double nu1, const double nu2, const double sigma, int &error_code );

The function generates pseudorandom variables distributed according to the law of noncentral Fisher's F-distribution with the nu1, nu2 and sigma parameters. In case of error it returns false. Analog of the rf() in R.

bool MathRandomNoncentralF ( const double nu1, const double nu2, const double sigma, double &result[] );





2.10.5. MathMomentsNoncentralF

The function calculates the theoretical numerical values of the first 4 moments of the noncentral Fisher's F-distribution with the nu1, nu2 and sigma parameters. Returns true if calculation of the moments has been successful, otherwise false.

bool MathMomentsNoncentralF ( const double nu1, const double nu2, const double sigma, double &mean, double &variance, double &skewness, double &kurtosis, int &error_code e.)





2.11. t-distribution

2.11.1. MathProbabilityDensityT

The function calculates the value of the probability density function of Student's t-distribution with the nu parameter for a random variable x. In case of error it returns NaN.

double MathProbabilityDensityT ( const double x, const double nu, const bool log_mode, int &error_code );

The function calculates the value of the probability density function of Student's t-distribution with the nu parameter for a random variable x. In case of error it returns NaN.

double MathProbabilityDensityT ( const double x, const double nu, int &error_code );

The function calculates the value of the probability density function of Student's t-distribution with the nu parameter for an array of random variables x[]. In case of error it returns false. Analog of the dt() in R.

bool MathProbabilityDensityT ( const double &x[], const double nu, const bool log_mode, double &result[] );

The function calculates the value of the probability density function of Student's t-distribution with the nu parameter for an array of random variables x[]. In case of error it returns false.

bool MathProbabilityDensityT ( const double &x[], const double nu, double &result[] );





2.11.2. MathCumulativeDistributionT

The function calculates the value of the Student's t-distribution function with the nu parameter for a random variable x. In case of error it returns NaN.

double MathCumulativeDistributionT ( const double x, const double nu, const bool tail, const bool log_mode, int &error_code );

The function calculates the value of the Student's t-distribution function with the nu parameter for a random variable x. In case of error it returns NaN.

double MathCumulativeDistributionT ( const double x, const double nu, int &error_code );

The function calculates the value of the Student's t-distribution function with the nu parameter for an array of random variables x[]. In case of error it returns false. Analog of the pt() in R.

bool MathCumulativeDistributionT ( const double &x[], const double nu, const bool tail, const bool log_mode, double &result[] );

The function calculates the value of the Student's t-distribution function with the nu parameter for an array of random variables x[]. In case of error it returns false.

bool MathCumulativeDistributionT ( const double &x[], const double nu, double &result[] );





2.11.3. MathQuantileT

For the specified probability, the function calculates the value of inverse Student's t-distribution function with the nu parameter. In case of error it returns NaN.

double MathQuantileT ( const double probability, const double nu, const bool tail, const bool log_mode, int &error_code );

For the specified probability, the function calculates the value of inverse Student's t-distribution function with the nu parameter. In case of error it returns NaN.

double MathQuantileT ( const double probability, const double nu, int &error_code );

For the specified 'probability[]' array of probability values, the function calculates the value of inverse Student's t-distribution function with the nu parameter. In case of error it returns false. Analog of the qt() in R.

bool MathQuantileT ( const double &probability[], const double nu, const bool tail, const bool log_mode, double &result[] );

For the specified 'probability[]' array of probability values, the function calculates the value of inverse Student's t-distribution function with the nu parameter. In case of error it returns false.

bool MathQuantileT ( const double &probability[], const double nu, double &result[] );





2.11.4. MathRandomT

The function generates a pseudorandom variable distributed according to the law of Student's t-distribution with the nu parameter. In case of error it returns NaN.

double MathRandomT ( const double nu, int &error_code );

The function generates pseudorandom variables distributed according to the law of Student's t-distribution with the nu parameter. In case of error it returns false. Analog of the rt() in R.

bool MathRandomT ( const double nu, const int data_count, double &result[] );





2.11.5. MathMomentsT

The function calculates the theoretical numerical values of the first 4 moments of the Student's t-distribution with the nu parameter. Returns true if calculation of the moments has been successful, otherwise false.

double MathMomentsT ( const double nu, double &mean, double &variance, double &skewness, double &kurtosis, int &error_code );





2.12. Noncentral t-distribution

2.12.1. MathProbabilityDensityNoncentralT

The function calculates the value of the probability density function of noncentral Student's t-distribution with the nu parameter for a random variable x. In case of error it returns NaN.

double MathProbabilityDensityNoncentralT ( const double x, const double nu, const double delta, const bool log_mode, int &error_code );

The function calculates the value of the probability density function of noncentral Student's t-distribution with the nu parameter for a random variable x. In case of error it returns NaN.

double MathProbabilityDensityNoncentralT ( const double x, const double nu, const double delta, int &error_code );

The function calculates the value of the probability density function of noncentral Student's t-distribution with the nu parameter for an array of random variables x[]. In case of error it returns false. Analog of the dt() in R.

bool MathProbabilityDensityNoncentralT ( const double &x[], const double nu, const double delta, const bool log_mode, double &result[] );

The function calculates the value of the probability density function of noncentral Student's t-distribution with the nu parameter for an array of random variables x[]. In case of error it returns false.

bool MathProbabilityDensityNoncentralT ( const double &x[], const double nu, const double delta, double &result[] );





2.12.2. MathCumulativeDistributionlNoncentralT

The function calculates the value of the probability distribution function of noncentral Student's t-distribution with the nu and delta parameters for a random variable x. In case of error it returns NaN.

double MathCumulativeDistributionNoncentralT ( const double x, const double nu, const double delta, const bool tail, const bool log_mode, int &error_code );

The function calculates the value of the probability distribution function of noncentral Student's t-distribution with the nu and delta parameters for a random variable x. In case of error it returns NaN.

double MathCumulativeDistributionNoncentralT ( const double x, const double nu, const double delta, int &error_code );

The function calculates the value of the probability distribution function of noncentral Student's t-distribution with the nu and delta parameters for an array of random variables x[]. In case of error it returns false. Analog of the pt() in R.

bool MathCumulativeDistributionNoncentralT ( const double &x[], const double nu, const double delta, const bool tail, const bool log_mode, double &result[] );

The function calculates the value of the probability distribution function of noncentral Student's t-distribution with the nu and delta parameters for an array of random variables x[]. In case of error it returns false.

bool MathCumulativeDistributionNoncentralT ( const double &x[], const double nu, const double delta, double &result[] );





2.12.3. MathQuantileNoncentralT

For the specified probability, the function calculates the value of inverse noncentral Student's t-distribution function with the nu and delta parameters. In case of error it returns NaN.

double MathQuantileNoncentralT ( const double probability, const double nu, const double delta, const bool tail, const bool log_mode, int &error_code );

For the specified probability, the function calculates the value of inverse noncentral Student's t-distribution function with the nu and delta parameters. In case of error it returns NaN.

double MathQuantileNoncentralT ( const double probability, const double nu, const double delta, int &error_code );

For the specified 'probability[]' array of probability values, the function calculates the value of inverse noncentral Student's t-distribution function with the nu and delta parameters. In case of error it returns false. Analog of the qt() in R.

bool MathQuantileNoncentralT ( const double &probability[], const double nu, const double delta, const bool tail, const bool log_mode, double &result[] );

For the specified 'probability[]' array of probability values, the function calculates the value of inverse noncentral Student's t-distribution function with the nu and delta parameters. In case of error it returns false.



bool MathQuantileNoncentralT ( const double &probability[], const double nu, const double delta, double &result[] );





2.12.4. MathRandomNoncentralT

The function generates a pseudorandom variable distributed according to the law of noncentral Student's t-distribution with the nu and delta parameters. In case of error it returns NaN.

double MathRandomNoncentralT ( const double nu, const double delta, int &error_code );

The function generates pseudorandom variables distributed according to the law of noncentral Student's t-distribution with the nu and delta parameters. In case of error it returns false. Analog of the rt() in R.

bool MathRandomNoncentralT ( const double nu, const double delta, const int data_count, double &result[] );





2.12.5. MathMomentsNoncentralT

The function calculates the theoretical numerical values of the first 4 moments of the noncentral Student's t-distribution with the nu and delta parameters. Returns true if calculation of the moments has been successful, otherwise false.

double MathMomentsNoncentralT ( const double nu, const double delta, double &mean, double &variance, double &skewness, double &kurtosis, int &error_code );





2.13. Logistic distribution

2.13.1. MathProbabilityDensityLogistic

The function calculates the value of the probability density function of logistic distribution with the mu and sigma parameters for a random variable x. In case of error it returns NaN.

double MathProbabilityDensityLogistic ( const double x, const double mu, const double sigma, const bool log_mode, int &error_code );

The function calculates the value of the probability density function of logistic distribution with the mu and sigma parameters for a random variable x. In case of error it returns NaN.

double MathProbabilityDensityLogistic ( const double x, const double mu, const double sigma, int &error_code );

The function calculates the value of the probability density function of logistic distribution with the mu and sigma parameters for an array of random variables x[]. In case of error it returns false. Analog of the dlogis() in R.

bool MathProbabilityDensityLogistic ( const double &x[], const double mu, const double sigma, const bool log_mode, double &result[] );

The function calculates the value of the probability density function of logistic distribution with the mu and sigma parameters for an array of random variables x[]. In case of error it returns false.

bool MathProbabilityDensityLogistic ( const double &x[], const double mu, const double sigma, double &result[] );





2.13.2. MathCumulativeDistributionlLogistic

The function calculates the value of the logistic distribution function with the mu and sigma parameters for a random variable x. In case of error it returns NaN.

double MathCumulativeDistributionLogistic ( const double x, const double mu, const double sigma, const bool tail, const bool log_mode, int &error_code );

The function calculates the value of the logistic distribution function with the mu and sigma parameters for a random variable x. In case of error it returns NaN.

double MathCumulativeDistributionLogistic ( const double x, const double mu, const double sigma, int &error_code );

The function calculates the value of the logistic distribution function with the mu and sigma parameters for an array of random variables x[]. In case of error it returns false. Analog of the plogis() in R.

bool MathCumulativeDistributionLogistic ( const double &x[], const double mu, const double sigma, const bool tail, const bool log_mode, double &result[] );

The function calculates the value of the logistic distribution function with the mu and sigma parameters for an array of random variables x[]. In case of error it returns false. Analog of the plogis() in R.

bool MathCumulativeDistributionLogistic ( const double &x[], const double mu, const double sigma, double &result[] );





2.13.3. MathQuantileLogistic

For the specified probability, the function calculates the value of inverse logistic distribution function with the mu and sigma parameters. In case of error it returns NaN.

double MathQuantileLogistic ( const double probability, const double mu, const double sigma, const bool tail, const bool log_mode, int &error_code );

For the specified probability, the function calculates the value of inverse logistic distribution function with the mu and sigma parameters. In case of error it returns NaN.

double MathQuantileLogistic ( const double probability, const double mu, const double sigma, int &error_code );

For the specified 'probability[]' array of probability values, the function calculates the value of inverse logistic distribution function with the mu and sigma parameters. In case of error it returns false. Analog of the qlogis() in R.

bool MathQuantileLogistic ( const double &probability[], const double mu, const double sigma, const bool tail, const bool log_mode, double &result[] );

For the specified 'probability[]' array of probability values, the function calculates the value of inverse logistic distribution function with the mu and sigma parameters. In case of error it returns false.

bool MathQuantileLogistic ( const double &probability[], const double mu, const double sigma, double &result[] );





2.13.4. MathRandomLogistic

The function generates a pseudorandom variable distributed according to the law of logistic distribution with the mu and sigma parameters. In case of error it returns NaN.

double MathRandomLogistic ( const double mu, const double sigma, int &error_code );

The function generates pseudorandom variables distributed according to the law of logistic distribution with the mu and sigma parameters. In case of error it returns false. Analog of the rlogis() in R.

bool MathRandomLogistic ( const double mu, const double sigma, const int data_count, double &result[] );





2.13.5. MathMomentsLogistic

The function calculates the theoretical numerical values of the first 4 moments of the logistic distribution with the mu and sigma parameters. Returns true if calculation of the moments has been successful, otherwise false.

bool MathMomentsLogistic ( const double mu, const double sigma, double &mean, double &variance, double &skewness, double &kurtosis, int &error_code );





2.14. Cauchy distribution

2.14.1. MathProbabilityDensityCauchy

The function calculates the value of the probability density function of Cauchy distribution with the a and b parameters for a random variable x. In case of error it returns NaN.

double MathProbabilityDensityCauchy ( const double x, const double a, const double b, const bool log_mode, int &error_code );

The function calculates the value of the probability density function of Cauchy distribution with the a and b parameters for a random variable x. In case of error it returns NaN.

double MathProbabilityDensityCauchy ( const double x, const double a, const double b, int &error_code );

The function calculates the value of the probability density function of Cauchy distribution with the a and b parameters for an array of random variables x[]. In case of error it returns false. Analog of the dcauchy() in R.

bool MathProbabilityDensityCauchy ( const double &x[], const double a, const double b, const bool log_mode, double &result[] );

The function calculates the value of the probability density function of Cauchy distribution with the a and b parameters for an array of random variables x[]. In case of error it returns false.

bool MathProbabilityDensityCauchy ( const double &x[], const double a, const double b, double &result[] );





2.14.2. MathCumulativeDistributionCauchy

The function calculates the value of the probability distribution function of Cauchy distribution with the a and b parameters for a random variable x. In case of error it returns NaN.

double MathCumulativeDistributionCauchy ( const double x, const double a, const double b, const bool tail, const bool log_mode, int &error_code );

The function calculates the value of the probability distribution function of Cauchy distribution with the a and b parameters for a random variable x. In case of error it returns NaN.

double MathCumulativeDistributionCauchy ( const double x, const double a, const double b, int &error_code );

The function calculates the value of the probability distribution function of Cauchy distribution with the a and b parameters for an array of random variables x[]. In case of error it returns false. Analog of the pcauchy() in R.

bool MathCumulativeDistributionCauchy ( const double &x[], const double a, const double b, const bool tail, const bool log_mode, double &result[] );

The function calculates the value of the probability distribution function of Cauchy distribution with the a and b parameters for an array of random variables x[]. In case of error it returns false.

bool MathCumulativeDistributionCauchy ( const double &x[], const double a, const double b, double &result[] );





2.14.3. MathQuantileCauchy

For the specified probability, the function calculates the value of inverse Cauchy distribution function with the a and b parameters. In case of error it returns NaN.

double MathQuantileCauchy ( const double probability, const double a, parameter of the distribution const double b, const bool tail, const bool log_mode, int &error_code );

For the specified probability, the function calculates the value of inverse Cauchy distribution function with the a and b parameters. In case of error it returns NaN.

double MathQuantileCauchy ( const double probability, const double a, parameter of the distribution const double b, int &error_code );

For the specified 'probability[]' array of probability values, the function calculates the value of inverse Cauchy distribution function with the a and b parameters. In case of error it returns false. Analog of the qcauchy() in R.

bool MathQuantileCauchy ( const double &probability[], const double a, parameter of the distribution const double b, const bool tail, const bool log_mode, double &result[] );

For the specified 'probability[]' array of probability values, the function calculates the value of inverse Cauchy distribution function with the a and b parameters. In case of error it returns false.

bool MathQuantileCauchy ( const double &probability[], const double a, parameter of the distribution const double b, double &result[] );





2.14.4. MathRandomCauchy

The function generates a pseudorandom variable distributed according to the law of Cauchy distribution with the a and b parameters. In case of error it returns NaN.

double MathRandomCauchy ( const double a, const double b, int &error_code );

The function generates pseudorandom variables distributed according to the law of Cauchy distribution with the a and b parameters. In case of error it returns false. Analog of the rcauchy() in R.

double MathRandomCauchy ( const double a, const double b, const int data_count, double &result[] );





2.14.5. MathMomentsCauchy

The function calculates the theoretical numerical values of the first 4 moments of the Cauchy distribution. Returns true if calculation of the moments has been successful, otherwise false.

bool MathMomentsCauchy ( const double a, const double b, double &mean, double &variance, double &skewness, double &kurtosis, int &error_code );





2.15. Uniform distribution

2.15.1. MathProbabilityDensityUniform

The function calculates the value of the probability density function of uniform distribution with the a and b parameters for a random variable x. In case of error it returns NaN.

double MathProbabilityDensityUniform ( const double x, const double a, const double b, const bool log_mode, int &error_code );

The function calculates the value of the probability density function of uniform distribution with the a and b parameters for a random variable x. In case of error it returns NaN.

double MathProbabilityDensityUniform ( const double x, const double a, const double b, int &error_code );

The function calculates the value of the probability density function of uniform distribution with the a and b parameters for an array of random variables x[]. In case of error it returns false. Analog of the dunif() in R.

bool MathProbabilityDensityUniform ( const double &x[], const double a, const double b, const bool log_mode, double &result[] );

The function calculates the value of the probability density function of uniform distribution with the a and b parameters for an array of random variables x[]. In case of error it returns false.

bool MathProbabilityDensityUniform ( const double &x[], const double a, const double b, double &result[] );





2.15.2. MathCumulativeDistributionUniform

The function calculates the value of the uniform distribution function with the a and b parameters for a random variable x. In case of error it returns

double MathCumulativeDistributionUniform ( const double x, const double a, const double b, const bool tail, const bool log_mode, int &error_code );

The function calculates the value of the uniform distribution function with the a and b parameters for a random variable x. In case of error it returns NaN.

double MathCumulativeDistributionUniform ( const double x, const double a, const double b, int &error_code );

The function calculates the value of the uniform distribution function with the a and b parameters for an array of random variables x[]. In case of error it returns false. Analog of the punif() in R.

bool MathCumulativeDistributionUniform ( const double &x[], const double a, const double b, const bool tail, const bool log_mode, double &result[] );

The function calculates the value of the uniform distribution function with the a and b parameters for an array of random variables x[]. In case of error it returns false.

bool MathCumulativeDistributionUniform ( const double &x[], const double a, const double b, double &result[] );





2.15.3. MathQuantileUniform

For the specified probability, the function calculates the value of inverse uniform distribution function with the a and b parameters. In case of error it returns NaN.

double MathQuantileUniform ( const double probability, const double a, const double b, const bool tail, const bool log_mode, int &error_code );

For the specified probability, the function calculates the value of inverse uniform distribution function with the a and b parameters. In case of error it returns NaN.

double MathQuantileUniform ( const double probability, const double a, const double b, int &error_code );

For the specified 'probability[]' array of probability values, the function calculates the value of inverse uniform distribution function with the a and b parameters. In case of error it returns false. Analog of the qunif() in R.

bool MathQuantileUniform ( const double &probability[], const double a, const double b, const bool tail, const bool log_mode, double &result[] );

For the specified 'probability[]' array of probability values, the function calculates the value of inverse uniform distribution function with the a and b parameters. In case of error it returns false.

bool MathQuantileUniform ( const double &probability[], const double a, const double b, double &result[] );





2.15.4. MathRandomUniform



The function generates a pseudorandom variable distributed according to the law of uniform distribution with the a and b parameters. In case of error it returns NaN.

double MathRandomUniform ( const double a, const double b, int &error_code );

The function generates pseudorandom variables distributed according to the law of uniform distribution with the a and b parameters. In case of error it returns false. Analog of the runif() in R.

bool MathRandomUniform ( const double a, const double b, const int data_count, double &result[] );





2.15.5. MathMomentsUniform

The function calculates the theoretical numerical values of the first 4 moments for the uniform distribution. Returns true if calculation of the moments has been successful, otherwise false.

bool MathMomentsUniform ( const double a, const double b, double &mean, double &variance, double &skewness, double &kurtosis, int &error_code );





2.16. Weibull distribution

2.16.1. MathProbabilityDensityWeibull

The function calculates the value of the probability density function of Weibull distribution with the a and b parameters for a random variable x. In case of error it returns NaN.

double MathProbabilityDensityWeibull ( const double x, const double a, const double b, const bool log_mode, int &error_code );

The function calculates the value of the probability density function of Weibull distribution with the a and b parameters for a random variable x. In case of error it returns NaN.

double MathProbabilityDensityWeibull ( const double x, const double a, const double b, int &error_code );

The function calculates the value of the probability density function of Weibull distribution with the a and b parameters for an array of random variables x[]. In case of error it returns false. Analog of the dweibull() in R.

bool MathProbabilityDensityWeibull ( const double &x[], const double a, const double b, const bool log_mode, double &result[] );

The function calculates the value of the probability density function of Weibull distribution with the a and b parameters for an array of random variables x[]. In case of error it returns false.

bool MathProbabilityDensityWeibull ( const double &x[], const double a, const double b, double &result[] );





2.16.2. MathCumulativeDistributionWeibull

double MathCumulativeDistributionWeibull ( const double x, const double a, const double b, const bool tail, const bool log_mode, int &error_code );

The function calculates the value of the Weibull distribution function with the a and b parameters for a random variable x. In case of error it returns

The function calculates the value of the Weibull distribution function with the a and b parameters for a random variable x. In case of error it returns NaN.

double MathCumulativeDistributionWeibull ( const double x, const double a, const double b, int &error_code );

The function calculates the value of the Weibull distribution function with the a and b parameters for a random variable x. In case of error it returns false. Analog of the pweibull() in R.

bool MathCumulativeDistributionWeibull ( const double &x[], const double a, const double b, const bool tail, const bool log_mode, double &result[] );

The function calculates the value of the Weibull distribution function with the a and b parameters for a random variable x. In case of error it returns false.

bool MathCumulativeDistributionWeibull ( const double &x[], const double a, const double b, double &result[] );





2.16.3. MathQuantileWeibull

For the specified probability, the function calculates the value of inverse Weibull distribution function with the a and b parameters. In case of error it returns NaN.

double MathQuantileWeibull ( const double probability, const double a, const double b, const bool tail, const bool log_mode, int &error_code );

For the specified probability, the function calculates the value of inverse Weibull distribution function with the a and b parameters. In case of error it returns NaN.

double MathQuantileWeibull ( const double probability, const double a, const double b, int &error_code );

For the specified 'probability[]' array of probability values, the function calculates the value of inverse Weibull distribution function with the a and b parameters. In case of error it returns false. Analog of the qweibull() in R.

bool MathQuantileWeibull ( const double &probability[], const double a, const double b, const bool tail, const bool log_mode, double &result[] );

For the specified 'probability[]' array of probability values, the function calculates the value of inverse Weibull distribution function with the a and b parameters. In case of error it returns false.

bool MathQuantileWeibull ( const double &probability[], const double a, const double b, double &result[] );





2.16.4. MathRandomWeibull

The function generates a pseudorandom variable distributed according to the law of Weibull distribution with the a and b parameters. In case of error it returns NaN.

double MathRandomWeibull ( const double a, const double b, int &error_code );

The function generates pseudorandom variables distributed according to the law of Weibull distribution with the a and b parameters. In case of error it returns false. Analog of the rweibull() in R.

bool MathRandomWeibull ( const double a, const double b, const int data_count, double &result[] );





2.16.5. MathMomentsWeibull

The function calculates the theoretical numerical values of the first 4 moments of the Weibull distribution. Returns true if calculation of the moments has been successful, otherwise false.

bool MathMomentsWeibull ( const double a, const double b, double &mean, double &variance, double &skewness, double &kurtosis, int &error_code );





2.17. Binomial distribution

2.17.1. MathProbabilityDensityBinomial

The function calculates the value of the probability mass function of binomial distribution with the n and p parameters for a random variable x. In case of error it returns NaN.

double MathProbabilityDensityBinomial ( const double x, const double n, const double p, const bool log_mode, int &error_code );

The function calculates the value of the probability mass function of binomial distribution with the n and p parameters for a random variable x. In case of error it returns NaN.

double MathProbabilityDensityBinomial ( const double x, const double n, const double p, int &error_code );

The function calculates the value of the probability mass function of binomial distribution with the n and p parameters for an array of random variables x[]. In case of error it returns false. Analog of the dbinom() in R.

bool MathProbabilityDensityBinomial ( const double &x[], const double n, const double p, const bool log_mode, double &result[] );

The function calculates the value of the probability mass function of binomial distribution with the n and p parameters for an array of random variables x[]. In case of error it returns false.

bool MathProbabilityDensityBinomial ( const double &x[], const double n, const double p, double &result[] );





2.17.2. MathCumulativeDistributionBinomial

The function calculates the value of the probability distribution function for binomial law with the n and p parameters for a random variable x. In case of error it returns NaN.

double MathCumulativeDistributionBinomial ( const double x, const double n, const double p, const bool tail, const bool log_mode, int &error_code );

The function calculates the value of the probability distribution function for binomial law with the n and p parameters for a random variable x. In case of error it returns NaN.

double MathCumulativeDistributionBinomial ( const double x, const double n, const double p, int &error_code );

The function calculates the value of the probability distribution function for binomial law with the n and p parameters for an array of random variables x[]. In case of error it returns false. Analog of the pbinom() in R.

bool MathCumulativeDistributionBinomial ( const double &x[], const double n, const double p, const bool tail, const bool log_mode, double &result[] );

The function calculates the value of the probability distribution function for binomial law with the n and p parameters for an array of random variables x[]. In case of error it returns false.

bool MathCumulativeDistributionBinomial ( const double &x[], const double n, const double p, double &result[] );





2.17.3. MathQuantileBinomial

For the specified probability, the function calculates the inverse value of function distribution for binomial law with the n and p parameters. In case of error it returns NaN.

double MathQuantileBinomial ( const double probability, const double n, const double p, const bool tail, const bool log_mode, int &error_code );

For the specified probability, the function calculates the inverse value of function distribution for binomial law with the n and p parameters. In case of error it returns NaN.

double MathQuantileBinomial ( const double probability, const double n, const double p, int &error_code );

For the specified 'probability[]' array of probability values, the function calculates the inverse value of function distribution for binomial law with the n and p parameters. In case of error it returns false. Analog of the qbinom() in R.

bool MathQuantileBinomial ( const double &probability[], const double n, const double p, const bool tail, const bool log_mode, double &result[] );

For the specified 'probability[]' array of probability values, the function calculates the inverse value of function distribution for binomial law with the n and p parameters. In case of error it returns false.

bool MathQuantileBinomial ( const double &probability[], const double n, const double p, double &result[] );





2.17.4. MathRandomBinomial

The function generates a pseudorandom variable distributed according to the law of binomial distribution with the n and p parameters. In case of error it returns NaN.

double MathRandomBinomial ( const double n, const double p, int &error_code );

The function generates pseudorandom variables distributed according to the law of binomial distribution with the n and p parameters. In case of error it returns false. Analog of the rbinom() in R.

bool MathRandomBinomial ( const double n, const double p, const int data_count, double &result[] );





2.17.5. MathMomentsBinomial

The function calculates the theoretical numerical values of the first 4 moments of the binomial distribution with the n and p parameters. Returns true if calculation of the moments has been successful, otherwise false.

bool MathMomentsBinomial ( const double n, const double p, double &mean, double &variance, double &skewness, double &kurtosis, int &error_code );





2.18. Negative binomial distribution

2.18.1. MathProbabilityDensityNegativeBinomial

The function calculates the value of the probability mass function of negative binomial distribution with the r and p parameters for a random variable x. In case of error it returns NaN.

double MathProbabilityDensityNegativeBinomial ( const double x, const double r, double p, const bool log_mode, int &error_code );

The function calculates the value of the probability mass function of negative binomial distribution with the r and p parameters for a random variable x. In case of error it returns NaN.

double MathProbabilityDensityNegativeBinomial ( const double x, const double r, double p, int &error_code );

The function calculates the value of the probability mass function of negative binomial distribution with the r and p parameters for an array of random variables x[]. In case of error it returns false. Analog of the dnbinom() in R.

bool MathProbabilityDensityNegativeBinomial ( const double &x[], const double r, double p, const bool log_mode, double &result[] );

The function calculates the value of the probability mass function of negative binomial distribution with the r and p parameters for an array of random variables x[]. In case of error it returns false.



bool MathProbabilityDensityNegativeBinomial ( const double &x[], const double r, double p, double &result[] );





2.18.2. MathCumulativeDistributionNegativeBinomial

The function calculates the value of the probability distribution function for negative binomial law with the r and p parameters for a random variable x. In case of error it returns NaN.

double MathCumulativeDistributionNegativeBinomial ( const double x, const double r, double p, const bool tail, const bool log_mode, int &error_code );

The function calculates the value of the probability distribution function for negative binomial law with the r and p parameters for a random variable x. In case of error it returns NaN.

double MathCumulativeDistributionNegativeBinomial ( const double x, const double r, double p, int &error_code );

The function calculates the value of the probability distribution function for negative binomial law with the r and p parameters for an array of random variables x[]. In case of error it returns false. Analog of the pnbinom() in R.

bool MathCumulativeDistributionNegativeBinomial ( const double &x[], const double r, double p, const bool tail, const bool log_mode, double &result[] );

The function calculates the value of the probability distribution function for negative binomial law with the r and p parameters for an array of random variables x[]. In case of error it returns false.

bool MathCumulativeDistributionNegativeBinomial ( const double &x[], const double r, double p, double &result[] );





2.18.3. MathQuantileNegativeBinomial

For the specified probability, the function calculates the inverse value of function distribution for negative binomial law with the r and p parameters. In case of error it returns NaN.

double MathQuantileNegativeBinomial ( const double probability, const double r, double p, const bool tail, const bool log_mode, int &error_code );

For the specified probability, the function calculates the inverse value of function distribution for negative binomial law with the r and p parameters. In case of error it returns NaN.

double MathQuantileNegativeBinomial ( const double probability, const double r, double p, int &error_code );

For the specified 'probability[]' array of probability values, the function calculates the inverse value of function distribution for negative binomial law with the r and p parameters. In case of error it returns false. Analog of the qnbinom() in R.

bool MathQuantileNegativeBinomial ( const double &probability[], const double r, double p, const bool tail, const bool log_mode, double &result[] );

For the specified 'probability[]' array of probability values, the function calculates the inverse value of function distribution for negative binomial law with the r and p parameters. In case of error it returns false.

bool MathQuantileNegativeBinomial ( const double &probability[], const double r, double p, double &result[] );





2.18.4. MathRandomNegativeBinomial

The function generates a pseudorandom variable distributed according to the law of negative binomial distribution with the r and p parameters. In case of error it returns NaN.

double MathRandomNegativeBinomial ( const double r, double p, int &error_code );

The function generates pseudorandom variables distributed according to the law of negative binomial distribution with the r and p parameters. In case of error it returns false. Analog of the rnbinom() in R.

bool MathRandomNegativeBinomial ( const double r, double p, const int data_count, double &result[] );





2.18.5. MathMomentsNegativeBinomial

The function calculates the theoretical numerical values of the first 4 moments of the negative binomial distribution with the r and p parameters. Returns true if calculation of the moments has been successful, otherwise false.

bool MathMomentsNegativeBinomial ( const double r, double p, double &mean, double &variance, double &skewness, double &kurtosis, int &error_code );

2.19. Geometric distribution

2.19.1. MathProbabilityDensityGeometric

The function calculates the value of the probability mass function of geometric distribution with the p parameter for a random variable x. In case of error it returns NaN.

double MathProbabilityDensityGeometric ( const double x, const double p, const bool log_mode, int &error_code );

The function calculates the value of the probability mass function of geometric distribution with the p parameter for a random variable x. In case of error it returns NaN.

double MathProbabilityDensityGeometric ( const double x, const double p, int &error_code );

The function calculates the value of the probability mass function of geometric distribution with the p parameter for an array of random variables x[]. In case of error it returns false. Analog of the dgeom() in R.

bool MathProbabilityDensityGeometric ( const double &x[], const double p, const bool log_mode, double &result[] );

The function calculates the value of the probability mass function of geometric distribution with the p parameter for an array of random variables x[]. In case of error it returns false.

bool MathProbabilityDensityGeometric ( const double &x[], const double p, double &result[] );





2.19.2. MathCumulativeDistributionGeometric

The function calculates the value of the probability distribution function for geometric law with the p parameter for a random variable x. In case of error it returns NaN.

double MathCumulativeDistributionGeometric ( const double x, const double p, const bool tail, const bool log_mode, int &error_code );

The function calculates the value of the probability distribution function for geometric law with the p parameter for a random variable x. In case of error it returns NaN.

double MathCumulativeDistributionGeometric ( const double x, const double p, int &error_code );

The function calculates the value of the probability distribution function for geometric law with the p parameter for an array of random variables x[]. In case of error it returns false. Analog of the pgeom() in R.

bool MathCumulativeDistributionGeometric ( const double &x[], const double p, const bool tail, const bool log_mode, double &result[] );

The function calculates the value of the probability distribution function for geometric law with the p parameter for an array of random variables x[]. In case of error it returns false.

bool MathCumulativeDistributionGeometric ( const double &x[], const double p, double &result[] );





2.19.3. MathQuantileGeometric

For the specified probability, the function calculates the inverse value of function distribution for geometric law with the p parameter. In case of error it returns NaN.

double MathQuantileGeometric ( const double probability, const double p, const bool tail, const bool log_mode, int &error_code );

For the specified probability, the function calculates the inverse value of function distribution for geometric law with the p parameter. In case of error it returns NaN.

double MathQuantileGeometric ( const double probability, const double p, int &error_code );

For the specified 'probability[]' array of probability values, the function calculates the inverse value of function distribution for geometric law with the p parameter. In case of error it returns false. Analog of the qgeom() in R.

bool MathQuantileGeometric ( const double &probability[], const double p, const bool tail, const bool log_mode, double &result[] );

For the specified 'probability[]' array of probability values, the function calculates the inverse value of function distribution for geometric law with the p parameter. In case of error it returns false.

bool MathQuantileGeometric ( const double &probability[], const double p, double &result[] );





2.19.4. MathRandomGeometric

The function generates a pseudorandom variable distributed according to the law of geometric distribution with the p parameter. In case of error it returns NaN.

double MathRandomGeometric ( const double p, int &error_code );

The function generates pseudorandom variables distributed according to the law of geometric distribution with the p 