stats_absolute_deviation

Returns the absolute deviation of an array of values

说明

float stats_absolute_deviation ( 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 stats_cdf_beta ( 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.

whichReturn valuepar1par2par3
1CDFxalphabeta
2xCDFalphabeta
3alphaxCDFbeta
4betaxCDFalpha

参数

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 stats_cdf_binomial ( 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.

whichReturn valuepar1par2par3
1CDFxnp
2xCDFnp
3nxCDFp
4pxCDFn

参数

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 stats_cdf_cauchy ( 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.

whichReturn valuepar1par2par3
1CDFxx0gamma
2xCDFx0gamma
3x0xCDFgamma
4gammaxCDFx0

参数

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 stats_cdf_chisquare ( 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.

whichReturn valuepar1par2
1CDFxk
2xCDFk
3kxCDF

参数

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 stats_cdf_exponential ( 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.

whichReturn valuepar1par2
1CDFxlambda
2xCDFlambda
3lambdaxCDF

参数

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 stats_cdf_f ( 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.

whichReturn valuepar1par2par3
1CDFxd1d2
2xCDFd1d2
3d1xCDFd2
4d2xCDFd1

参数

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 stats_cdf_gamma ( 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.

whichReturn valuepar1par2par3
1CDFxktheta
2xCDFktheta
3kxCDFtheta
4thetaxCDFk

参数

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 stats_cdf_laplace ( 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.

whichReturn valuepar1par2par3
1CDFxmub
2xCDFmub
3muxCDFb
4bxCDFmu

参数

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 stats_cdf_logistic ( 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.

whichReturn valuepar1par2par3
1CDFxmus
2xCDFmus
3muxCDFs
4sxCDFmu

参数

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 stats_cdf_negative_binomial ( 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.

whichReturn valuepar1par2par3
1CDFxrp
2xCDFrp
3rxCDFp
4pxCDFr

参数

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 stats_cdf_noncentral_chisquare ( 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.

whichReturn valuepar1par2par3
1CDFxklambda
2xCDFklambda
3kxCDFlambda
4lambdaxCDFk

参数

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 stats_cdf_noncentral_f ( float $par1 , float $par2 , float $par3 , float $par4 , 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.

whichReturn valuepar1par2par3par4
1CDFxnu1nu2lambda
2xCDFnu1nu2lambda
3nu1xCDFnu2lambda
4nu2xCDFnu1lambda
5lambdaxCDFnu1nu2

参数

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 stats_cdf_noncentral_t ( 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.

whichReturn valuepar1par2par3
1CDFxnumu
2xCDFnumu
3nuxCDFmu
4muxCDFnu

参数

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 stats_cdf_normal ( 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.

whichReturn valuepar1par2par3
1CDFxmusigma
2xCDFmusigma
3muxCDFsigma
4sigmaxCDFmu

参数

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 stats_cdf_poisson ( 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.

whichReturn valuepar1par2
1CDFxlambda
2xCDFlambda
3lambdaxCDF

参数

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 stats_cdf_t ( 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.

whichReturn valuepar1par2
1CDFxnu
2xCDFnu
3nuxCDF

参数

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 stats_cdf_uniform ( 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.

whichReturn valuepar1par2par3
1CDFxab
2xCDFab
3axCDFb
4bxCDFa

参数

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 stats_cdf_weibull ( 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.

whichReturn valuepar1par2par3
1CDFxklambda
2xCDFklambda
3kxCDFlambda
4lambdaxCDFk

参数

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 stats_covariance ( array $a , 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 stats_dens_beta ( float $x , float $a , 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 stats_dens_cauchy ( float $x , 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 stats_dens_chisquare ( float $x , 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 stats_dens_exponential ( float $x , 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 stats_dens_f ( float $x , 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 stats_dens_gamma ( float $x , 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 stats_dens_laplace ( float $x , 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 stats_dens_logistic ( float $x , 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 stats_dens_normal ( float $x , 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 stats_dens_pmf_binomial ( float $x , float $n , 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 stats_dens_pmf_hypergeometric ( float $n1 , float $n2 , float $N1 , 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 stats_dens_pmf_negative_binomial ( float $x , float $n , 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 stats_dens_pmf_poisson ( float $x , 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 stats_dens_t ( float $x , 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 stats_dens_uniform ( float $x , float $a , 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 stats_dens_weibull ( float $x , float $a , 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 stats_harmonic_mean ( 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 stats_kurtosis ( 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 stats_rand_gen_beta ( float $a , 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 stats_rand_gen_chisquare ( 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 stats_rand_gen_exponential ( 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 stats_rand_gen_f ( 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 stats_rand_gen_funiform ( 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 stats_rand_gen_gamma ( float $a , 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 stats_rand_gen_ibinomial_negative ( int $n , 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 stats_rand_gen_ibinomial ( int $n , 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 stats_rand_gen_int ( 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 stats_rand_gen_ipoisson ( 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 stats_rand_gen_iuniform ( int $low , 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 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 stats_rand_gen_noncentral_f ( 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 stats_rand_gen_noncentral_t ( float $df , 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 stats_rand_gen_normal ( float $av , 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 stats_rand_gen_t ( 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 stats_rand_get_seeds ( 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 stats_rand_phrase_to_seeds ( 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 stats_rand_ranf ( 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 stats_rand_setall ( 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 stats_skew ( 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 stats_standard_deviation ( array $a [, bool $sample = 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 stats_stat_binomial_coef ( int $x , 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 stats_stat_correlation ( 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 stats_stat_factorial ( 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 stats_stat_independent_t ( 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 stats_stat_innerproduct ( 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 stats_stat_paired_t ( 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 stats_stat_percentile ( 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 stats_stat_powersum ( 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 stats_variance ( array $a [, bool $sample = 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.

目录