Ref/stats-Phpdoc专题

stats_absolute_deviation

Returns the absolute deviation of an array of values

说明

float <span class="methodname">stats_absolute_deviation ( <span class="methodparam">array $a )

Returns the absolute deviation of the values in a.

参数

a
The input array

返回值

Returns the absolute deviation of the values in a, or false if a is empty or is not an array.

stats_cdf_beta

Calculates any one parameter of the beta distribution given values for the others

说明

float <span class="methodname">stats_cdf_beta ( <span class="methodparam">float $par1 , float $par2 , float $par3 , int $which )

Returns the cumulative distribution function, its inverse, or one of its parameters, of the beta distribution. The kind of the return value and parameters (par1, par2, and par3) are determined by which.

The following table lists the return value and parameters by which. CDF, x, alpha, and beta denotes cumulative distribution function, the value of the random variable, and shape parameters of the beta distribution, respectively.

which Return value par1 par2 par3
1 CDF x alpha beta
2 x CDF alpha beta
3 alpha x CDF beta
4 beta x CDF alpha

参数

par1
The first parameter

par2
The second parameter

par3
The third parameter

which
The flag to determine what to be calculated

返回值

Returns CDF, x, alpha, or beta, determined by which.

stats_cdf_binomial

Calculates any one parameter of the binomial distribution given values for the others

说明

float <span class="methodname">stats_cdf_binomial ( <span class="methodparam">float $par1 , float $par2 , float $par3 , int $which )

Returns the cumulative distribution function, its inverse, or one of its parameters, of the binomial distribution. The kind of the return value and parameters (par1, par2, and par3) are determined by which.

The following table lists the return value and parameters by which. CDF, x, n, and p denotes cumulative distribution function, the number of successes, the number of trials, and the success rate for each trial, respectively.

which Return value par1 par2 par3
1 CDF x n p
2 x CDF n p
3 n x CDF p
4 p x CDF n

参数

par1
The first parameter

par2
The second parameter

par3
The third parameter

which
The flag to determine what to be calculated

返回值

Returns CDF, x, n, or p, determined by which.

stats_cdf_cauchy

Calculates any one parameter of the Cauchy distribution given values for the others

说明

float <span class="methodname">stats_cdf_cauchy ( <span class="methodparam">float $par1 , float $par2 , float $par3 , int $which )

Returns the cumulative distribution function, its inverse, or one of its parameters, of the Cauchy distribution. The kind of the return value and parameters (par1, par2, and par3) are determined by which.

The following table lists the return value and parameters by which. CDF, x, x0, and gamma denotes cumulative distribution function, the value of the random variable, the location and the scale parameter of the Cauchy distribution, respectively.

which Return value par1 par2 par3
1 CDF x x0 gamma
2 x CDF x0 gamma
3 x0 x CDF gamma
4 gamma x CDF x0

参数

par1
The first parameter

par2
The second parameter

par3
The third parameter

which
The flag to determine what to be calculated

返回值

Returns CDF, x, x0, or gamma, determined by which.

stats_cdf_chisquare

Calculates any one parameter of the chi-square distribution given values for the others

说明

float <span class="methodname">stats_cdf_chisquare ( <span class="methodparam">float $par1 , float $par2 , int $which )

Returns the cumulative distribution function, its inverse, or one of its parameters, of the chi-square distribution. The kind of the return value and parameters (par1 and par2) are determined by which.

The following table lists the return value and parameters by which. CDF, x, and k denotes cumulative distribution function, the value of the random variable, and the degree of freedom of the chi-square distribution, respectively.

which Return value par1 par2
1 CDF x k
2 x CDF k
3 k x CDF

参数

par1
The first parameter

par2
The second parameter

which
The flag to determine what to be calculated

返回值

Returns CDF, x, or k, determined by which.

stats_cdf_exponential

Calculates any one parameter of the exponential distribution given values for the others

说明

float <span class="methodname">stats_cdf_exponential ( <span class="methodparam">float $par1 , float $par2 , int $which )

Returns the cumulative distribution function, its inverse, or one of its parameters, of the exponential distribution. The kind of the return value and parameters (par1 and par2) are determined by which.

The following table lists the return value and parameters by which. CDF, x, and lambda denotes cumulative distribution function, the value of the random variable, and the rate parameter of the exponential distribution, respectively.

which Return value par1 par2
1 CDF x lambda
2 x CDF lambda
3 lambda x CDF

参数

par1
The first parameter

par2
The second parameter

which
The flag to determine what to be calculated

返回值

Returns CDF, x, or lambda, determined by which.

stats_cdf_f

Calculates any one parameter of the F distribution given values for the others

说明

float <span class="methodname">stats_cdf_f ( <span class="methodparam">float $par1 , float $par2 , float $par3 , int $which )

Returns the cumulative distribution function, its inverse, or one of its parameters, of the F distribution. The kind of the return value and parameters (par1, par2, and par3) are determined by which.

The following table lists the return value and parameters by which. CDF, x, d1, and d2 denotes cumulative distribution function, the value of the random variable, and the degree of freedoms of the F distribution, respectively.

which Return value par1 par2 par3
1 CDF x d1 d2
2 x CDF d1 d2
3 d1 x CDF d2
4 d2 x CDF d1

参数

par1
The first parameter

par2
The second parameter

par3
The third parameter

which
The flag to determine what to be calculated

返回值

Returns CDF, x, d1, or d2, determined by which.

stats_cdf_gamma

Calculates any one parameter of the gamma distribution given values for the others

说明

float <span class="methodname">stats_cdf_gamma ( <span class="methodparam">float $par1 , float $par2 , float $par3 , int $which )

Returns the cumulative distribution function, its inverse, or one of its parameters, of the gamma distribution. The kind of the return value and parameters (par1, par2, and par3) are determined by which.

The following table lists the return value and parameters by which. CDF, x, k, and theta denotes cumulative distribution function, the value of the random variable, and the shape and the scale parameter of the gamma distribution, respectively.

which Return value par1 par2 par3
1 CDF x k theta
2 x CDF k theta
3 k x CDF theta
4 theta x CDF k

参数

par1
The first parameter

par2
The second parameter

par3
The third parameter

which
The flag to determine what to be calculated

返回值

Returns CDF, x, k, or theta, determined by which.

stats_cdf_laplace

Calculates any one parameter of the Laplace distribution given values for the others

说明

float <span class="methodname">stats_cdf_laplace ( <span class="methodparam">float $par1 , float $par2 , float $par3 , int $which )

Returns the cumulative distribution function, its inverse, or one of its parameters, of the Laplace distribution. The kind of the return value and parameters (par1, par2, and par3) are determined by which.

The following table lists the return value and parameters by which. CDF, x, mu, and b denotes cumulative distribution function, the value of the random variable, and the location and the scale parameter of the Laplace distribution, respectively.

which Return value par1 par2 par3
1 CDF x mu b
2 x CDF mu b
3 mu x CDF b
4 b x CDF mu

参数

par1
The first parameter

par2
The second parameter

par3
The third parameter

which
The flag to determine what to be calculated

返回值

Returns CDF, x, mu, or b, determined by which.

stats_cdf_logistic

Calculates any one parameter of the logistic distribution given values for the others

说明

float <span class="methodname">stats_cdf_logistic ( <span class="methodparam">float $par1 , float $par2 , float $par3 , int $which )

Returns the cumulative distribution function, its inverse, or one of its parameters, of the logistic distribution. The kind of the return value and parameters (par1, par2, and par3) are determined by which.

The following table lists the return value and parameters by which. CDF, x, mu, and s denotes cumulative distribution function, the value of the random variable, and the location and the scale parameter of the logistic distribution, respectively.

which Return value par1 par2 par3
1 CDF x mu s
2 x CDF mu s
3 mu x CDF s
4 s x CDF mu

参数

par1
The first parameter

par2
The second parameter

par3
The third parameter

which
The flag to determine what to be calculated

返回值

Returns CDF, x, mu, or s, determined by which.

stats_cdf_negative_binomial

Calculates any one parameter of the negative binomial distribution given values for the others

说明

float <span class="methodname">stats_cdf_negative_binomial ( <span class="methodparam">float $par1 , float $par2 , float $par3 , int $which )

Returns the cumulative distribution function, its inverse, or one of its parameters, of the negative binomial distribution. The kind of the return value and parameters (par1, par2, and par3) are determined by which.

The following table lists the return value and parameters by which. CDF, x, r, and p denotes cumulative distribution function, the number of failure, the number of success, and the success rate for each trial, respectively.

which Return value par1 par2 par3
1 CDF x r p
2 x CDF r p
3 r x CDF p
4 p x CDF r

参数

par1
The first parameter

par2
The second parameter

par3
The third parameter

which
The flag to determine what to be calculated

返回值

Returns CDF, x, r, or p, determined by which.

stats_cdf_noncentral_chisquare

Calculates any one parameter of the non-central chi-square distribution given values for the others

说明

float <span class="methodname">stats_cdf_noncentral_chisquare ( <span class="methodparam">float $par1 , float $par2 , float $par3 , int $which )

Returns the cumulative distribution function, its inverse, or one of its parameters, of the non-central chi-square distribution. The kind of the return value and parameters (par1, par2, and par3) are determined by which.

The following table lists the return value and parameters by which. CDF, x, k, and lambda denotes cumulative distribution function, the value of the random variable, the degree of freedom and the non-centrality parameter of the distribution, respectively.

which Return value par1 par2 par3
1 CDF x k lambda
2 x CDF k lambda
3 k x CDF lambda
4 lambda x CDF k

参数

par1
The first parameter

par2
The second parameter

par3
The third parameter

which
The flag to determine what to be calculated

返回值

Returns CDF, x, k, or lambda, determined by which.

stats_cdf_noncentral_f

Calculates any one parameter of the non-central F distribution given values for the others

说明

float <span class="methodname">stats_cdf_noncentral_f ( <span class="methodparam">float $par1 , float $par2 , float $par3 , <span class="type">float $par4 , <span class="methodparam">int $which )

Returns the cumulative distribution function, its inverse, or one of its parameters, of the non-central F distribution. The kind of the return value and parameters (par1, par2, par3, and par4) are determined by which.

The following table lists the return value and parameters by which. CDF, x, nu1, nu2, and lambda denotes cumulative distribution function, the value of the random variable, the degree of freedoms and the non-centrality parameter of the distribution, respectively.

which Return value par1 par2 par3 par4
1 CDF x nu1 nu2 lambda
2 x CDF nu1 nu2 lambda
3 nu1 x CDF nu2 lambda
4 nu2 x CDF nu1 lambda
5 lambda x CDF nu1 nu2

参数

par1
The first parameter

par2
The second parameter

par3
The third parameter

par4
The fourth parameter

which
The flag to determine what to be calculated

返回值

Returns CDF, x, nu1, nu2, or lambda, determined by which.

stats_cdf_noncentral_t

Calculates any one parameter of the non-central t-distribution give values for the others

说明

float <span class="methodname">stats_cdf_noncentral_t ( <span class="methodparam">float $par1 , float $par2 , float $par3 , int $which )

Returns the cumulative distribution function, its inverse, or one of its parameters, of the non-central t-distribution. The kind of the return value and parameters (par1, par2, and par3) are determined by which.

The following table lists the return value and parameters by which. CDF, x, nu, and mu denotes cumulative distribution function, the value of the random variable, the degrees of freedom and the non-centrality parameter of the distribution, respectively.

which Return value par1 par2 par3
1 CDF x nu mu
2 x CDF nu mu
3 nu x CDF mu
4 mu x CDF nu

参数

par1
The first parameter

par2
The second parameter

par3
The third parameter

which
The flag to determine what to be calculated

返回值

Returns CDF, x, nu, or mu, determined by which.

stats_cdf_normal

Calculates any one parameter of the normal distribution given values for the others

说明

float <span class="methodname">stats_cdf_normal ( <span class="methodparam">float $par1 , float $par2 , float $par3 , int $which )

Returns the cumulative distribution function, its inverse, or one of its parameters, of the normal distribution. The kind of the return value and parameters (par1, par2, and par3) are determined by which.

The following table lists the return value and parameters by which. CDF, x, mu, and sigma denotes cumulative distribution function, the value of the random variable, the mean and the standard deviation of the normal distribution, respectively.

which Return value par1 par2 par3
1 CDF x mu sigma
2 x CDF mu sigma
3 mu x CDF sigma
4 sigma x CDF mu

参数

par1
The first parameter

par2
The second parameter

par3
The third parameter

which
The flag to determine what to be calculated

返回值

Returns CDF, x, mu, or sigma, determined by which.

stats_cdf_poisson

Calculates any one parameter of the Poisson distribution given values for the others

说明

float <span class="methodname">stats_cdf_poisson ( <span class="methodparam">float $par1 , float $par2 , int $which )

Returns the cumulative distribution function, its inverse, or one of its parameters, of the Poisson distribution. The kind of the return value and parameters (par1 and par2) are determined by which.

The following table lists the return value and parameters by which. CDF, x, and lambda denotes cumulative distribution function, the value of the random variable, and the parameter of the Poisson distribution, respectively.

which Return value par1 par2
1 CDF x lambda
2 x CDF lambda
3 lambda x CDF

参数

par1
The first parameter

par2
The second parameter

which
The flag to determine what to be calculated

返回值

Returns CDF, x, or lambda, determined by which.

stats_cdf_t

Calculates any one parameter of the t-distribution given values for the others

说明

float <span class="methodname">stats_cdf_t ( <span class="methodparam">float $par1 , float $par2 , int $which )

Returns the cumulative distribution function, its inverse, or one of its parameters, of the t-distribution. The kind of the return value and parameters (par1 and par2) are determined by which.

The following table lists the return value and parameters by which. CDF, x, and nu denotes cumulative distribution function, the value of the random variable, and the degrees of freedom of the t-distribution, respectively.

which Return value par1 par2
1 CDF x nu
2 x CDF nu
3 nu x CDF

参数

par1
The first parameter

par2
The second parameter

which
The flag to determine what to be calculated

返回值

Returns CDF, x, or nu, determined by which.

stats_cdf_uniform

Calculates any one parameter of the uniform distribution given values for the others

说明

float <span class="methodname">stats_cdf_uniform ( <span class="methodparam">float $par1 , float $par2 , float $par3 , int $which )

Returns the cumulative distribution function, its inverse, or one of its parameters, of the uniform distribution. The kind of the return value and parameters (par1, par2, and par3) are determined by which.

The following table lists the return value and parameters by which. CDF, x, a, and b denotes cumulative distribution function, the value of the random variable, the lower bound and the higher bound of the uniform distribution, respectively.

which Return value par1 par2 par3
1 CDF x a b
2 x CDF a b
3 a x CDF b
4 b x CDF a

参数

par1
The first parameter

par2
The second parameter

par3
The third parameter

which
The flag to determine what to be calculated

返回值

Returns CDF, x, a, or b, determined by which.

stats_cdf_weibull

Calculates any one parameter of the Weibull distribution given values for the others

说明

float <span class="methodname">stats_cdf_weibull ( <span class="methodparam">float $par1 , float $par2 , float $par3 , int $which )

Returns the cumulative distribution function, its inverse, or one of its parameters, of the Weibull distribution. The kind of the return value and parameters (par1, par2, and par3) are determined by which.

The following table lists the return value and parameters by which. CDF, x, k, and lambda denotes cumulative distribution function, the value of the random variable, the shape and the scale parameter of the Weibull distribution, respectively.

which Return value par1 par2 par3
1 CDF x k lambda
2 x CDF k lambda
3 k x CDF lambda
4 lambda x CDF k

参数

par1
The first parameter

par2
The second parameter

par3
The third parameter

which
The flag to determine what to be calculated

返回值

Returns CDF, x, k, or lambda, determined by which.

stats_covariance

Computes the covariance of two data sets

说明

float <span class="methodname">stats_covariance ( <span class="methodparam">array $a , <span class="methodparam">array $b )

Returns the covariance of a and b.

参数

a
The first array

b
The second array

返回值

Returns the covariance of a and b, or false on failure.

stats_dens_beta

Probability density function of the beta distribution

说明

float <span class="methodname">stats_dens_beta ( <span class="methodparam">float $x , <span class="methodparam">float $a , <span class="methodparam">float $b )

Returns the probability density at x, where the random variable follows the beta distribution of which the shape parameters are a and b.

参数

x
The value at which the probability density is calculated

a
The shape parameter of the distribution

b
The shape parameter of the distribution

返回值

The probability density at x or false for failure.

stats_dens_cauchy

Probability density function of the Cauchy distribution

说明

float <span class="methodname">stats_dens_cauchy ( <span class="methodparam">float $x , <span class="methodparam">float $ave , float $stdev )

Returns the probability density at x, where the random variable follows the Cauchy distribution whose location and scale are ave and stdev, respectively.

参数

x
The value at which the probability density is calculated

ave
The location parameter of the distribution

stdev
The scale parameter of the distribution

返回值

The probability density at x or false for failure.

stats_dens_chisquare

Probability density function of the chi-square distribution

说明

float <span class="methodname">stats_dens_chisquare ( <span class="methodparam">float $x , <span class="methodparam">float $dfr )

Returns the probability density at x, where the random variable follows the chi-square distribution of which the degree of freedom is dfr.

参数

x
The value at which the probability density is calculated

dfr
The degree of freedom of the distribution

返回值

The probability density at x or false for failure.

stats_dens_exponential

Probability density function of the exponential distribution

说明

float <span class="methodname">stats_dens_exponential ( <span class="methodparam">float $x , <span class="methodparam">float $scale )

Returns the probability density at x, where the random variable follows the exponential distribution of which the scale is scale.

参数

x
The value at which the probability density is calculated

scale
The scale of the distribution

返回值

The probability density at x or false for failure.

stats_dens_f

Probability density function of the F distribution

说明

float <span class="methodname">stats_dens_f ( <span class="methodparam">float $x , <span class="methodparam">float $dfr1 , float $dfr2 )

Returns the probability density at x, where the random variable follows the F distribution of which the degree of freedoms are dfr1 and dfr2.

参数

x
The value at which the probability density is calculated

dfr1
The degree of freedom of the distribution

dfr2
The degree of freedom of the distribution

返回值

The probability density at x or false for failure.

stats_dens_gamma

Probability density function of the gamma distribution

说明

float <span class="methodname">stats_dens_gamma ( <span class="methodparam">float $x , <span class="methodparam">float $shape , float $scale )

Returns the probability density at x, where the random variable follows the gamma distribution of which the shape parameter is shape and the scale parameter is scale.

参数

x
The value at which the probability density is calculated

shape
The shape parameter of the distribution

scale
The scale parameter of the distribution

返回值

The probability density at x or false for failure.

stats_dens_laplace

Probability density function of the Laplace distribution

说明

float <span class="methodname">stats_dens_laplace ( <span class="methodparam">float $x , <span class="methodparam">float $ave , float $stdev )

Returns the probability density at x, where the random variable follows the Laplace distribution of which the location parameter is ave and the scale parameter is stdev.

参数

x
The value at which the probability density is calculated

ave
The location parameter of the distribution

stdev
The shape parameter of the distribution

返回值

The probability density at x or false for failure.

stats_dens_logistic

Probability density function of the logistic distribution

说明

float <span class="methodname">stats_dens_logistic ( <span class="methodparam">float $x , <span class="methodparam">float $ave , float $stdev )

Returns the probability density at x, where the random variable follows the logistic distribution of which the location parameter is ave and the scale parameter is stdev.

参数

x
The value at which the probability density is calculated

ave
The location parameter of the distribution

stdev
The shape parameter of the distribution

返回值

The probability density at x or false for failure.

stats_dens_normal

Probability density function of the normal distribution

说明

float <span class="methodname">stats_dens_normal ( <span class="methodparam">float $x , <span class="methodparam">float $ave , float $stdev )

Returns the probability density at x, where the random variable follows the normal distribution of which the mean is ave and the standard deviation is stdev.

参数

x
The value at which the probability density is calculated

ave
The mean of the distribution

stdev
The standard deviation of the distribution

返回值

The probability density at x or false for failure.

stats_dens_pmf_binomial

Probability mass function of the binomial distribution

说明

float <span class="methodname">stats_dens_pmf_binomial ( <span class="methodparam">float $x , <span class="methodparam">float $n , <span class="methodparam">float $pi )

Returns the probability mass at x, where the random variable follows the binomial distribution of which the number of trials is n and the success rate is pi.

参数

x
The value at which the probability mass is calculated

n
The number of trials of the distribution

pi
The success rate of the distribution

返回值

The probability mass at x or false for failure.

stats_dens_pmf_hypergeometric

Probability mass function of the hypergeometric distribution

说明

float <span class="methodname">stats_dens_pmf_hypergeometric ( <span class="methodparam">float $n1 , <span class="methodparam">float $n2 , <span class="methodparam">float $N1 , <span class="methodparam">float $N2 )

Returns the probability mass at n1, where the random variable follows the hypergeometric distribution of which the number of failure is n2, the number of success samples is N1, and the number of failure samples is N2.

参数

n1
The number of success, at which the probability mass is calculated

n2
The number of failure of the distribution

N1
The number of success samples of the distribution

N2
The number of failure samples of the distribution

返回值

The probability mass at n1 or false for failure.

stats_dens_pmf_negative_binomial

Probability mass function of the negative binomial distribution

说明

float <span class="methodname">stats_dens_pmf_negative_binomial ( <span class="methodparam">float $x , <span class="methodparam">float $n , <span class="methodparam">float $pi )

Returns the probability mass at x, where the random variable follows the negative binomial distribution of which the number of the success is n and the success rate is pi.

参数

x
The value at which the probability mass is calculated

n
The number of the success of the distribution

pi
The success rate of the distribution

返回值

The probability mass at x or false for failure.

stats_dens_pmf_poisson

Probability mass function of the Poisson distribution

说明

float <span class="methodname">stats_dens_pmf_poisson ( <span class="methodparam">float $x , <span class="methodparam">float $lb )

Returns the probability mass at x, where the random variable follows the Poisson distribution whose parameter is lb.

参数

x
The value at which the probability mass is calculated

lb
The parameter of the Poisson distribution

返回值

The probability mass at x or false for failure.

stats_dens_t

Probability density function of the t-distribution

说明

float <span class="methodname">stats_dens_t ( <span class="methodparam">float $x , <span class="methodparam">float $dfr )

Returns the probability density at x, where the random variable follows the t-distribution of which the degree of freedom is dfr.

参数

x
The value at which the probability density is calculated

dfr
The degree of freedom of the distribution

返回值

The probability density at x or false for failure.

stats_dens_uniform

Probability density function of the uniform distribution

说明

float <span class="methodname">stats_dens_uniform ( <span class="methodparam">float $x , <span class="methodparam">float $a , <span class="methodparam">float $b )

Returns the probability density at x, where the random variable follows the uniform distribution of which the lower bound is a and the upper bound is b.

参数

x
The value at which the probability density is calculated

a
The lower bound of the distribution

b
The upper bound of the distribution

返回值

The probability density at x or false for failure.

stats_dens_weibull

Probability density function of the Weibull distribution

说明

float <span class="methodname">stats_dens_weibull ( <span class="methodparam">float $x , <span class="methodparam">float $a , <span class="methodparam">float $b )

Returns the probability density at x, where the random variable follows the Weibull distribution of which the shape parameter is a and the scale parameter is b.

参数

x
The value at which the probability density is calculated

a
The shape parameter of the distribution

b
The scale parameter of the distribution

返回值

The probability density at x or false for failure.

stats_harmonic_mean

Returns the harmonic mean of an array of values

说明

number <span class="methodname">stats_harmonic_mean ( <span class="methodparam">array $a )

Returns the harmonic mean of the values in a.

参数

a
The input array

返回值

Returns the harmonic mean of the values in a, or false if a is empty or is not an array.

stats_kurtosis

Computes the kurtosis of the data in the array

说明

float <span class="methodname">stats_kurtosis ( <span class="methodparam">array $a )

Returns the kurtosis of the values in a.

参数

a
The input array

返回值

Returns the kurtosis of the values in a, or false if a is empty or is not an array.

stats_rand_gen_beta

Generates a random deviate from the beta distribution

说明

float <span class="methodname">stats_rand_gen_beta ( <span class="methodparam">float $a , <span class="methodparam">float $b )

Returns a random deviate from the beta distribution with parameters A and B. The density of the beta is x^(a-1) * (1-x)^(b-1) / B(a,b) for 0 \< x \<. Method R. C. H. Cheng.

参数

a
The shape parameter of the beta distribution

b
The shape parameter of the beta distribution

返回值

A random deviate

stats_rand_gen_chisquare

Generates a random deviate from the chi-square distribution

说明

float <span class="methodname">stats_rand_gen_chisquare ( <span class="methodparam">float $df )

Returns a random deviate from the chi-square distribution where the degrees of freedom is df.

参数

df
The degrees of freedom

返回值

A random deviate

stats_rand_gen_exponential

Generates a random deviate from the exponential distribution

说明

float <span class="methodname">stats_rand_gen_exponential ( <span class="methodparam">float $av )

Returns a random deviate from the exponential distribution of which the scale is av.

参数

av
The scale parameter

返回值

A random deviate

stats_rand_gen_f

Generates a random deviate from the F distribution

说明

float <span class="methodname">stats_rand_gen_f ( <span class="methodparam">float $dfn , float $dfd )

Generates a random deviate from the F (variance ratio) distribution with "dfn" degrees of freedom in the numerator and "dfd" degrees of freedom in the denominator. Method : directly generates ratio of chisquare variates.

参数

dfn
The degrees of freedom in the numerator

dfd
The degrees of freedom in the denominator

返回值

A random deviate

stats_rand_gen_funiform

Generates uniform float between low (exclusive) and high (exclusive)

说明

float <span class="methodname">stats_rand_gen_funiform ( <span class="methodparam">float $low , float $high )

Returns a random deviate from the uniform distribution from low to high.

参数

low
The lower bound (inclusive)

high
The upper bound (exclusive)

返回值

A random deviate

stats_rand_gen_gamma

Generates a random deviate from the gamma distribution

说明

float <span class="methodname">stats_rand_gen_gamma ( <span class="methodparam">float $a , <span class="methodparam">float $r )

Generates a random deviate from the gamma distribution whose density is (A**R)/Gamma(R) * X**(R-1) * Exp(-A*X).

参数

a
location parameter of Gamma distribution (a > 0).

r
shape parameter of Gamma distribution (r > 0).

返回值

A random deviate

stats_rand_gen_ibinomial_negative

Generates a random deviate from the negative binomial distribution

说明

int <span class="methodname">stats_rand_gen_ibinomial_negative ( <span class="methodparam">int $n , <span class="methodparam">float $p )

Returns a random deviate from a negative binomial distribution where the number of success is n and the success rate is p.

参数

n
The number of success

p
The success rate

返回值

A random deviate, which is the number of failure.

stats_rand_gen_ibinomial

Generates a random deviate from the binomial distribution

说明

int <span class="methodname">stats_rand_gen_ibinomial ( <span class="methodparam">int $n , <span class="methodparam">float $pp )

Returns a random deviate from the binomial distribution whose number of trials is n and whose probability of an event in each trial is pp.

参数

n
The number of trials

pp
The probability of an event in each trial

返回值

A random deviate

stats_rand_gen_int

Generates random integer between 1 and 2147483562

说明

int <span class="methodname">stats_rand_gen_int ( <span class="methodparam">void )

Returns a random integer between 1 and 2147483562

返回值

A random integer

stats_rand_gen_ipoisson

Generates a single random deviate from a Poisson distribution

说明

int <span class="methodname">stats_rand_gen_ipoisson ( <span class="methodparam">float $mu )

Returns a random deviate from the Poisson distribution with parameter mu.

参数

mu
The parameter of the Poisson distribution

返回值

A random deviate

stats_rand_gen_iuniform

Generates integer uniformly distributed between LOW (inclusive) and HIGH (inclusive)

说明

int <span class="methodname">stats_rand_gen_iuniform ( <span class="methodparam">int $low , <span class="methodparam">int $high )

Returns a random integer from the discrete uniform distribution between low (inclusive) and high (inclusive).

参数

low
The lower bound

high
The upper bound

返回值

A random integer

stats_rand_gen_noncentral_chisquare

Generates a random deviate from the non-central chi-square distribution

说明

float <span class="methodname">stats_rand_gen_noncentral_chisquare ( float $df , float $xnonc )

Returns a random deviate from the non-central chi-square distribution with degrees of freedom, df, and non-centrality parameter, xnonc.

参数

df
The degrees of freedom

xnonc
The non-centrality parameter

返回值

A random deviate

stats_rand_gen_noncentral_f

Generates a random deviate from the noncentral F distribution

说明

float <span class="methodname">stats_rand_gen_noncentral_f ( <span class="methodparam">float $dfn , float $dfd , float $xnonc )

Returns a random deviate from the non-central F distribution where the degrees of freedoms are dfn (numerator) and dfd (denominator), and the non-centrality parameter is xnonc.

参数

dfn
The degrees of freedom of the numerator

dfd
The degrees of freedom of the denominator

xnonc
The non-centrality parameter

返回值

A random deviate

stats_rand_gen_noncentral_t

Generates a single random deviate from a non-central t-distribution

说明

float <span class="methodname">stats_rand_gen_noncentral_t ( <span class="methodparam">float $df , <span class="methodparam">float $xnonc )

Returns a random deviate from the non-central t-distribution with the degrees of freedom, df, and the non-centrality parameter, xnonc.

参数

df
The degrees of freedom

xnonc
The non-centrality parameter

返回值

A random deviate

stats_rand_gen_normal

Generates a single random deviate from a normal distribution

说明

float <span class="methodname">stats_rand_gen_normal ( <span class="methodparam">float $av , <span class="methodparam">float $sd )

Returns a random deviate from the normal distribution with mean, av, and standard deviation, sd.

参数

av
The mean of the normal distribution

sd
The standard deviation of the normal distribution

返回值

A random deviate

stats_rand_gen_t

Generates a single random deviate from a t-distribution

说明

float <span class="methodname">stats_rand_gen_t ( <span class="methodparam">float $df )

Returns a random deviate from the t-distribution with the degrees of freedom, df.

参数

df
The degrees of freedom

返回值

A random deviate

stats_rand_get_seeds

Get the seed values of the random number generator

说明

array <span class="methodname">stats_rand_get_seeds ( <span class="methodparam">void )

Returns the current seed values of the random number generator

返回值

Returns an array of two integers.

stats_rand_phrase_to_seeds

Generate two seeds for the RGN random number generator

说明

array <span class="methodname">stats_rand_phrase_to_seeds ( <span class="methodparam">string $phrase )

Generate two seeds for the random number generator from a phrase.

参数

phrase
The input phrase

返回值

Returns an array of two integers.

stats_rand_ranf

Generates a random floating point number between 0 and 1

说明

float <span class="methodname">stats_rand_ranf ( <span class="methodparam">void )

Returns a random floating point number from a uniform distribution between 0 (exclusive) and 1 (exclusive).

返回值

A random floating point number

stats_rand_setall

Set seed values to the random generator

说明

void <span class="methodname">stats_rand_setall ( <span class="methodparam">int $iseed1 , int $iseed2 )

Set iseed1 and iseed2 as seed values to the random generator used in statistic functions.

参数

iseed1
The value which is used as the random seed

iseed2
The value which is used as the random seed

返回值

No values are returned.

stats_skew

Computes the skewness of the data in the array

说明

float <span class="methodname">stats_skew ( <span class="type">array $a )

Returns the skewness of the values in a.

参数

a
The input array

返回值

Returns the skewness of the values in a, or false if a is empty or is not an array.

stats_standard_deviation

Returns the standard deviation

说明

float <span class="methodname">stats_standard_deviation ( <span class="methodparam">array $a [, bool $sample<span class="initializer"> = false ] )

Returns the standard deviation of the values in a.

参数

a
The array of data to find the standard deviation for. Note that all values of the array will be cast to float.

sample
Indicates if a represents a sample of the population; defaults to false.

返回值

Returns the standard deviation on success; false on failure.

错误/异常

Raises an E_WARNING when there are fewer than 2 values in a.

stats_stat_binomial_coef

Returns a binomial coefficient

说明

float <span class="methodname">stats_stat_binomial_coef ( <span class="methodparam">int $x , <span class="methodparam">int $n )

Returns the binomial coefficient of n choose x.

参数

x
The number of chooses from the set

n
The number of elements in the set

返回值

Returns the binomial coefficient

stats_stat_correlation

Returns the Pearson correlation coefficient of two data sets

说明

float <span class="methodname">stats_stat_correlation ( <span class="methodparam">array $arr1 , array $arr2 )

Returns the Pearson correlation coefficient between arr1 and arr2.

参数

arr1
The first array

arr2
The second array

返回值

Returns the Pearson correlation coefficient between arr1 and arr2, or false on failure.

stats_stat_factorial

Returns the factorial of an integer

说明

float <span class="methodname">stats_stat_factorial ( <span class="methodparam">int $n )

Returns the factorial of an integer, n.

参数

n
An integer

返回值

The factorial of n.

stats_stat_independent_t

Returns the t-value from the independent two-sample t-test

说明

float <span class="methodname">stats_stat_independent_t ( <span class="methodparam">array $arr1 , array $arr2 )

Returns the t-value of the independent two-sample t-test between arr1 and arr2.

Warning

本函数还未编写文档,仅有参数列表。

参数

arr1
The first set of values

arr2
The second set of values

返回值

Returns the t-value, or false if failure.

stats_stat_innerproduct

Returns the inner product of two vectors

说明

float <span class="methodname">stats_stat_innerproduct ( <span class="methodparam">array $arr1 , array $arr2 )

Returns the inner product of arr1 and arr2.

参数

arr1
The first array

arr2
The second array

返回值

Returns the inner product of arr1 and arr2, or false on failure.

stats_stat_paired_t

Returns the t-value of the dependent t-test for paired samples

说明

float <span class="methodname">stats_stat_paired_t ( <span class="methodparam">array $arr1 , array $arr2 )

Returns the t-value of the dependent t-test for paired samples arr1 and arr2.

参数

arr1
The first samples

arr2
The second samples

返回值

Returns the t-value, or false if failure.

stats_stat_percentile

Returns the percentile value

说明

float <span class="methodname">stats_stat_percentile ( <span class="methodparam">array $arr , float $perc )

Returns the perc-th percentile value of the array arr.

参数

arr
The input array

perc
The percentile

返回值

Returns the percentile values of the input array.

stats_stat_powersum

Returns the power sum of a vector

说明

float <span class="methodname">stats_stat_powersum ( <span class="methodparam">array $arr , float $power )

Returns the sum of the power-th power of a vector represented as an array arr.

参数

arr
The input array

power
The power

返回值

Returns the power sum of the input array.

stats_variance

Returns the variance

说明

float <span class="methodname">stats_variance ( <span class="methodparam">array $a [, bool $sample<span class="initializer"> = false ] )

Returns the variance of the values in a.

参数

a
The array of data to find the standard deviation for. Note that all values of the array will be cast to float.

sample
Indicates if a represents a sample of the population; defaults to false.

返回值

Returns the variance on success; false on failure.

目录


本站为非盈利网站,作品由网友提供上传,如无意中有侵犯您的版权,请联系删除