Previous: Models, Up: Statistics

— Function File: **beta_cdf** (`x, a, b`)

For each element of

x, returns the CDF atxof the beta distribution with parametersaandb, i.e., PROB (beta (a,b) <=x).

— Function File: **beta_inv** (`x, a, b`)

For each component of

x, compute the quantile (the inverse of the CDF) atxof the Beta distribution with parametersaandb.

— Function File: **beta_pdf** (`x, a, b`)

For each element of

x, returns the PDF atxof the beta distribution with parametersaandb.

— Function File: **beta_rnd** (`a, b, r, c`)

— Function File:**beta_rnd** (`a, b, sz`)

— Function File:

Return an

rbycor`size (`

sz`)`

matrix of random samples from the Beta distribution with parametersaandb. Bothaandbmust be scalar or of sizerbyc.If

randcare omitted, the size of the result matrix is the common size ofaandb.

— Function File: **binomial_cdf** (`x, n, p`)

For each element of

x, compute the CDF atxof the binomial distribution with parametersnandp.

— Function File: **binomial_inv** (`x, n, p`)

For each element of

x, compute the quantile atxof the binomial distribution with parametersnandp.

— Function File: **binomial_pdf** (`x, n, p`)

For each element of

x, compute the probability density function (PDF) atxof the binomial distribution with parametersnandp.

— Function File: **binomial_rnd** (`n, p, r, c`)

— Function File:**binomial_rnd** (`n, p, sz`)

— Function File:

Return an

rbycor a`size (`

sz`)`

matrix of random samples from the binomial distribution with parametersnandp. Bothnandpmust be scalar or of sizerbyc.If

randcare omitted, the size of the result matrix is the common size ofnandp.

— Function File: **cauchy_cdf** (`x, lambda, sigma`)

For each element of

x, compute the cumulative distribution function (CDF) atxof the Cauchy distribution with location parameterlambdaand scale parametersigma. Default values arelambda= 0,sigma= 1.

— Function File: **cauchy_inv** (`x, lambda, sigma`)

For each element of

x, compute the quantile (the inverse of the CDF) atxof the Cauchy distribution with location parameterlambdaand scale parametersigma. Default values arelambda= 0,sigma= 1.

— Function File: **cauchy_pdf** (`x, lambda, sigma`)

For each element of

x, compute the probability density function (PDF) atxof the Cauchy distribution with location parameterlambdaand scale parametersigma> 0. Default values arelambda= 0,sigma= 1.

— Function File: **cauchy_rnd** (`lambda, sigma, r, c`)

— Function File:**cauchy_rnd** (`lambda, sigma, sz`)

— Function File:

Return an

rbycor a`size (`

sz`)`

matrix of random samples from the Cauchy distribution with parameterslambdaandsigmawhich must both be scalar or of sizerbyc.If

randcare omitted, the size of the result matrix is the common size oflambdaandsigma.

— Function File: **chisquare_cdf** (`x, n`)

For each element of

x, compute the cumulative distribution function (CDF) atxof the chisquare distribution withndegrees of freedom.

— Function File: **chisquare_inv** (`x, n`)

For each element of

x, compute the quantile (the inverse of the CDF) atxof the chisquare distribution withndegrees of freedom.

— Function File: **chisquare_pdf** (`x, n`)

For each element of

x, compute the probability density function (PDF) atxof the chisquare distribution withkdegrees of freedom.

— Function File: **chisquare_rnd** (`n, r, c`)

— Function File:**chisquare_rnd** (`n, sz`)

— Function File:

Return an

rbycor a`size (`

sz`)`

matrix of random samples from the chisquare distribution withndegrees of freedom.nmust be a scalar or of sizerbyc.If

randcare omitted, the size of the result matrix is the size ofn.

— Function File: **discrete_cdf** (`x, v, p`)

For each element of

x, compute the cumulative distribution function (CDF) atxof a univariate discrete distribution which assumes the values in v with probabilitiesp.

— Function File: **discrete_inv** (`x, v, p`)

For each component of

x, compute the quantile (the inverse of the CDF) atxof the univariate distribution which assumes the values invwith probabilitiesp.

— Function File: **discrete_pdf** (`x, v, p`)

For each element of

x, compute the probability density function (pDF) atxof a univariate discrete distribution which assumes the values invwith probabilitiesp.

— Function File: **discrete_rnd** (`n, v, p`)

— Function File:**discrete_rnd** (`v, p, r, c`)

— Function File:**discrete_rnd** (`v, p, sz`)

— Function File:

— Function File:

Generate a row vector containing a random sample of size

nfrom the univariate distribution which assumes the values invwith probabilitiesp.nmust be a scalar.If

randcare given create a matrix withrrows andccolumns. Or ifszis a vector, create a matrix of sizesz.

— Function File: **empirical_cdf** (`x, data`)

For each element of

x, compute the cumulative distribution function (CDF) atxof the empirical distribution obtained from the univariate sampledata.

— Function File: **empirical_inv** (`x, data`)

For each element of

x, compute the quantile (the inverse of the CDF) atxof the empirical distribution obtained from the univariate sampledata.

— Function File: **empirical_pdf** (`x, data`)

For each element of

x, compute the probability density function (PDF) atxof the empirical distribution obtained from the univariate sampledata.

— Function File: **empirical_rnd** (`n, data`)

— Function File:**empirical_rnd** (`data, r, c`)

— Function File:**empirical_rnd** (`data, sz`)

— Function File:

— Function File:

Generate a bootstrap sample of size

nfrom the empirical distribution obtained from the univariate sampledata.If

randcare given create a matrix withrrows andccolumns. Or ifszis a vector, create a matrix of sizesz.

— Function File: **exponential_cdf** (`x, lambda`)

For each element of

x, compute the cumulative distribution function (CDF) atxof the exponential distribution with parameterlambda.The arguments can be of common size or scalar.

— Function File: **exponential_inv** (`x, lambda`)

For each element of

x, compute the quantile (the inverse of the CDF) atxof the exponential distribution with parameterlambda.

— Function File: **exponential_pdf** (`x, lambda`)

For each element of

x, compute the probability density function (PDF) of the exponential distribution with parameterlambda.

— Function File: **exponential_rnd** (`lambda, r, c`)

— Function File:**exponential_rnd** (`lambda, sz`)

— Function File:

Return an

rbycmatrix of random samples from the exponential distribution with parameterlambda, which must be a scalar or of sizerbyc. Or ifszis a vector, create a matrix of sizesz.If

randcare omitted, the size of the result matrix is the size oflambda.

— Function File: **f_cdf** (`x, m, n`)

For each element of

x, compute the CDF atxof the F distribution withmandndegrees of freedom, i.e., PROB (F (m,n) <=x).

— Function File: **f_inv** (`x, m, n`)

For each component of

x, compute the quantile (the inverse of the CDF) atxof the F distribution with parametersmandn.

— Function File: **f_pdf** (`x, m, n`)

For each element of

x, compute the probability density function (PDF) atxof the F distribution withmandndegrees of freedom.

— Function File: **f_rnd** (`m, n, r, c`)

— Function File:**f_rnd** (`m, n, sz`)

— Function File:

Return an

rbycmatrix of random samples from the F distribution withmandndegrees of freedom. Bothmandnmust be scalar or of sizerbyc. Ifszis a vector the random samples are in a matrix of sizesz.If

randcare omitted, the size of the result matrix is the common size ofmandn.

— Function File: **gamma_cdf** (`x, a, b`)

For each element of

x, compute the cumulative distribution function (CDF) atxof the Gamma distribution with parametersaandb.

— Function File: **gamma_inv** (`x, a, b`)

For each component of

x, compute the quantile (the inverse of the CDF) atxof the Gamma distribution with parametersaandb.

— Function File: **gamma_pdf** (`x, a, b`)

For each element of

x, return the probability density function (PDF) atxof the Gamma distribution with parametersaandb.

— Function File: **gamma_rnd** (`a, b, r, c`)

— Function File:**gamma_rnd** (`a, b, sz`)

— Function File:

Return an

rbycor a`size (`

sz`)`

matrix of random samples from the Gamma distribution with parametersaandb. Bothaandbmust be scalar or of sizerbyc.If

randcare omitted, the size of the result matrix is the common size ofaandb.

— Function File: **geometric_cdf** (`x, p`)

For each element of

x, compute the CDF atxof the geometric distribution with parameterp.

— Function File: **geometric_inv** (`x, p`)

For each element of

x, compute the quantile atxof the geometric distribution with parameterp.

— Function File: **geometric_pdf** (`x, p`)

For each element of

x, compute the probability density function (PDF) atxof the geometric distribution with parameterp.

— Function File: **geometric_rnd** (`p, r, c`)

— Function File:**geometric_rnd** (`p, sz`)

— Function File:

Return an

rbycmatrix of random samples from the geometric distribution with parameterp, which must be a scalar or of sizerbyc.If

randcare given create a matrix withrrows andccolumns. Or ifszis a vector, create a matrix of sizesz.

— Function File: **hypergeometric_cdf** (`x, m, t, n`)

Compute the cumulative distribution function (CDF) at

xof the hypergeometric distribution with parametersm,t, andn. This is the probability of obtaining not more thanxmarked items when randomly drawing a sample of sizenwithout replacement from a population of total sizetcontainingmmarked items.The parameters

m,t, andnmust positive integers withmandnnot greater thant.

— Function File: **hypergeometric_inv** (`x, m, t, n`)

For each element of

x, compute the quantile atxof the hypergeometric distribution with parametersm,t, andn.The parameters

m,t, andnmust positive integers withmandnnot greater thant.

— Function File: **hypergeometric_pdf** (`x, m, t, n`)

Compute the probability density function (PDF) at

xof the hypergeometric distribution with parametersm,t, andn. This is the probability of obtainingxmarked items when randomly drawing a sample of sizenwithout replacement from a population of total sizetcontainingmmarked items.The arguments must be of common size or scalar.

— Function File: **hypergeometric_rnd** (`n_size, m, t, n`)

— Function File:**hypergeometric_rnd** (`m, t, n, r, c`)

— Function File:**hypergeometric_rnd** (`m, t, n, sz`)

— Function File:

— Function File:

Generate a row vector containing a random sample of size

n_sizefrom the hypergeometric distribution with parametersm,t, andn.randcare given create a matrix withrrows andccolumns. Or ifszis a vector, create a matrix of sizesz.The parameters

m,t, andnmust positive integers withmandnnot greater thant.

— Function File: **kolmogorov_smirnov_cdf** (`x, tol`)

Return the CDF at

xof the Kolmogorov-Smirnov distribution,Inf Q(x) = SUM (-1)^k exp(-2 k^2 x^2) k = -Inffor

x> 0.The optional parameter

tolspecifies the precision up to which the series should be evaluated; the default istol=`eps`

.

— Function File: **laplace_cdf** (`x`)

For each element of

x, compute the cumulative distribution function (CDF) atxof the Laplace distribution.

— Function File: **laplace_inv** (`x`)

For each element of

x, compute the quantile (the inverse of the CDF) atxof the Laplace distribution.

— Function File: **laplace_pdf** (`x`)

For each element of

x, compute the probability density function (PDF) atxof the Laplace distribution.

— Function File: **laplace_rnd** (`r, c`)

— Function File:**laplace_rnd** (`sz`)`;`

— Function File:

Return an

rbycmatrix of random numbers from the Laplace distribution. Or isszis a vector, create a matrix ofsz.

— Function File: **logistic_cdf** (`x`)

For each component of

x, compute the CDF atxof the logistic distribution.

— Function File: **logistic_inv** (`x`)

For each component of

x, compute the quantile (the inverse of the CDF) atxof the logistic distribution.

— Function File: **logistic_pdf** (`x`)

For each component of

x, compute the PDF atxof the logistic distribution.

— Function File: **logistic_rnd** (`r, c`)

— Function File:**logistic_rnd** (`sz`)

— Function File:

Return an

rbycmatrix of random numbers from the logistic distribution. Or isszis a vector, create a matrix ofsz.

— Function File: **lognormal_cdf** (`x, a, v`)

For each element of

x, compute the cumulative distribution function (CDF) atxof the lognormal distribution with parametersaandv. If a random variable follows this distribution, its logarithm is normally distributed with mean`log (`

a`)`

and variancev.Default values are

a= 1,v= 1.

— Function File: **lognormal_inv** (`x, a, v`)

For each element of

x, compute the quantile (the inverse of the CDF) atxof the lognormal distribution with parametersaandv. If a random variable follows this distribution, its logarithm is normally distributed with mean`log (`

a`)`

and variancev.Default values are

a= 1,v= 1.

— Function File: **lognormal_pdf** (`x, a, v`)

For each element of

x, compute the probability density function (PDF) atxof the lognormal distribution with parametersaandv. If a random variable follows this distribution, its logarithm is normally distributed with mean`log (`

a`)`

and variancev.Default values are

a= 1,v= 1.

— Function File: **lognormal_rnd** (`a, v, r, c`)

— Function File:**lognormal_rnd** (`a, v, sz`)

— Function File:

Return an

rbycmatrix of random samples from the lognormal distribution with parametersaandv. Bothaandvmust be scalar or of sizerbyc. Or ifszis a vector, create a matrix of sizesz.If

randcare omitted, the size of the result matrix is the common size ofaandv.

— Function File: **normal_cdf** (`x, m, v`)

For each element of

x, compute the cumulative distribution function (CDF) atxof the normal distribution with meanmand variancev.Default values are

m= 0,v= 1.

— Function File: **normal_inv** (`x, m, v`)

For each element of

x, compute the quantile (the inverse of the CDF) atxof the normal distribution with meanmand variancev.Default values are

m= 0,v= 1.

— Function File: **normal_pdf** (`x, m, v`)

For each element of

x, compute the probability density function (PDF) atxof the normal distribution with meanmand variancev.Default values are

m= 0,v= 1.

— Function File: **normal_rnd** (`m, v, r, c`)

— Function File:**normal_rnd** (`m, v, sz`)

— Function File:

Return an

rbycor`size (`

sz`)`

matrix of random samples from the normal distribution with parametersmandv. Bothmandvmust be scalar or of sizerbyc.If

randcare omitted, the size of the result matrix is the common size ofmandv.

— Function File: **pascal_cdf** (`x, n, p`)

For each element of

x, compute the CDF at x of the Pascal (negative binomial) distribution with parametersnandp.The number of failures in a Bernoulli experiment with success probability

pbefore then-th success follows this distribution.

— Function File: **pascal_inv** (`x, n, p`)

For each element of

x, compute the quantile atxof the Pascal (negative binomial) distribution with parametersnandp.The number of failures in a Bernoulli experiment with success probability

pbefore then-th success follows this distribution.

— Function File: **pascal_pdf** (`x, n, p`)

For each element of

x, compute the probability density function (PDF) atxof the Pascal (negative binomial) distribution with parametersnandp.The number of failures in a Bernoulli experiment with success probability

pbefore then-th success follows this distribution.

— Function File: **pascal_rnd** (`n, p, r, c`)

— Function File:**pascal_rnd** (`n, p, sz`)

— Function File:

Return an

rbycmatrix of random samples from the Pascal (negative binomial) distribution with parametersnandp. Bothnandpmust be scalar or of sizerbyc.If

randcare omitted, the size of the result matrix is the common size ofnandp. Or ifszis a vector, create a matrix of sizesz.

— Function File: **poisson_cdf** (`x, lambda`)

For each element of

x, compute the cumulative distribution function (CDF) atxof the Poisson distribution with parameter lambda.

— Function File: **poisson_inv** (`x, lambda`)

For each component of

x, compute the quantile (the inverse of the CDF) atxof the Poisson distribution with parameterlambda.

— Function File: **poisson_pdf** (`x, lambda`)

For each element of

x, compute the probability density function (PDF) atxof the poisson distribution with parameterlambda.

— Function File: **poisson_rnd** (`lambda, r, c`)

Return an

rbycmatrix of random samples from the Poisson distribution with parameterlambda, which must be a scalar or of sizerbyc.If

randcare omitted, the size of the result matrix is the size oflambda.

— Function File: **stdnormal_cdf** (`x`)

For each component of

x, compute the CDF of the standard normal distribution atx.

— Function File: **stdnormal_inv** (`x`)

For each component of

x, compute compute the quantile (the inverse of the CDF) atxof the standard normal distribution.

— Function File: **stdnormal_pdf** (`x`)

For each element of

x, compute the probability density function (PDF) of the standard normal distribution atx.

— Function File: **stdnormal_rnd** (`r, c`)

— Function File:**stdnormal_rnd** (`sz`)

— Function File:

Return an

rbycor`size (`

sz`)`

matrix of random numbers from the standard normal distribution.

— Function File: **t_cdf** (`x, n`)

For each element of

x, compute the CDF atxof the t (Student) distribution withndegrees of freedom, i.e., PROB (t(n) <=x).

— Function File: **t_inv** (`x, n`)

For each component of

x, compute the quantile (the inverse of the CDF) atxof the t (Student) distribution with parametern.

— Function File: **t_pdf** (`x, n`)

For each element of

x, compute the probability density function (PDF) atxof thet(Student) distribution withndegrees of freedom.

— Function File: **t_rnd** (`n, r, c`)

— Function File:**t_rnd** (`n, sz`)

— Function File:

Return an

rbycmatrix of random samples from the t (Student) distribution withndegrees of freedom.nmust be a scalar or of sizerbyc. Or ifszis a vector create a matrix of sizesz.If

randcare omitted, the size of the result matrix is the size ofn.

— Function File: **uniform_cdf** (`x, a, b`)

Return the CDF at

xof the uniform distribution on [a,b], i.e., PROB (uniform (a,b) <= x).Default values are

a= 0,b= 1.

— Function File: **uniform_inv** (`x, a, b`)

For each element of

x, compute the quantile (the inverse of the CDF) atxof the uniform distribution on [a,b].Default values are

a= 0,b= 1.

— Function File: **uniform_pdf** (`x, a, b`)

For each element of

x, compute the PDF atxof the uniform distribution on [a,b].Default values are

a= 0,b= 1.

— Function File: **uniform_rnd** (`a, b, r, c`)

— Function File:**uniform_rnd** (`a, b, sz`)

— Function File:

Return an

rbycor a`size (`

sz`)`

matrix of random samples from the uniform distribution on [a,b]. Bothaandbmust be scalar or of sizerbyc.If

randcare omitted, the size of the result matrix is the common size ofaandb.

— Function File: **weibull_cdf** (`x, alpha, sigma`)

Compute the cumulative distribution function (CDF) at

xof the Weibull distribution with shape parameteralphaand scale parametersigma, which is1 - exp(-(x/sigma)^alpha)for

x>= 0.

— Function File: **weibull_inv** (`x, lambda, alpha`)

Compute the quantile (the inverse of the CDF) at

xof the Weibull distribution with shape parameteralphaand scale parametersigma.

— Function File: **weibull_pdf** (`x, alpha, sigma`)

Compute the probability density function (PDF) at

xof the Weibull distribution with shape parameteralphaand scale parametersigmawhich is given byalpha * sigma^(-alpha) * x^(alpha-1) * exp(-(x/sigma)^alpha)for

x> 0.

— Function File: **weibull_rnd** (`alpha, sigma, r, c`)

— Function File:**weibull_rnd** (`alpha, sigma, sz`)

— Function File:

Return an

rbycmatrix of random samples from the Weibull distribution with parametersalphaandsigmawhich must be scalar or of sizerbyc. Or ifszis a vector return a matrix of sizesz.If

randcare omitted, the size of the result matrix is the common size ofalphaandsigma.

— Function File: **wiener_rnd** (`t, d, n`)

Return a simulated realization of the

d-dimensional Wiener Process on the interval [0,t]. Ifdis omitted,d= 1 is used. The first column of the return matrix contains time, the remaining columns contain the Wiener process.The optional parameter

ngives the number of summands used for simulating the process over an interval of length 1. Ifnis omitted,n= 1000 is used.