PHP Statistics Functions
EditRocket provides the following information on Statistics functions in the PHP source code builder.
float stats_absolute_deviation ( array $a ) -
float stats_cdf_beta ( float $par1 , float $par2 , float $par3 , int $which ) - Method Cumulative distribution function (P) is calculated directly by code associated with the following reference. DiDinato, A. R. and Morris, A. H. Algorithm 708: Significant Digit Computation of the Incomplete Beta Function Ratios. ACM Trans. Math. Softw. 18 (1993), 360-373. Computation of other parameters involve a search for a value that produces the desired value of P. The search relies on the monotinicity of P with the other parameter. Note The beta density is proportional to t^(A-1) * (1-t)^(B-1) Arguments P -- The integral from 0 to X of the chi-square distribution. Input range: [0, 1]. Q -- 1-P. Input range: [0, 1]. P + Q = 1.0. X -- Upper limit of integration of beta density. Input range: [0,1]. Search range: [0,1] Y -- 1-X. Input range: [0,1]. Search range: [0,1] X + Y = 1.0. A -- The first parameter of the beta density. Input range: (0, +infinity). Search range: [1D-100,1D100] B -- The second parameter of the beta density. Input range: (0, +infinity). Search range: [1D-100,1D100] STATUS -- 0 if calculation completed correctly -I if input parameter number I is out of range 1 if answer appears to be lower than lowest search bound 2 if answer appears to be higher than greatest search bound 3 if P + Q .ne. 1 4 if X + Y .ne. 1 BOUND -- Undefined if STATUS is 0 Bound exceeded by parameter number I if STATUS is negative. Lower search bound if STATUS is 1. Upper search bound if STATUS is 2.
float stats_cdf_binomial ( float $par1 , float $par2 , float $par3 , int $which ) -
float stats_cdf_cauchy ( float $par1 , float $par2 , float $par3 , int $which ) -
float stats_cdf_chisquare ( float $par1 , float $par2 , int $which ) -
float stats_cdf_exponential ( float $par1 , float $par2 , int $which ) -
float stats_cdf_f ( float $par1 , float $par2 , float $par3 , int $which ) -
float stats_cdf_gamma ( float $par1 , float $par2 , float $par3 , int $which ) -
float stats_cdf_laplace ( float $par1 , float $par2 , float $par3 , int $which ) -
float stats_cdf_logistic ( float $par1 , float $par2 , float $par3 , int $which ) -
float stats_cdf_negative_binomial ( float $par1 , float $par2 , float $par3 , int $which ) -
float stats_cdf_noncentral_chisquare ( float $par1 , float $par2 , float $par3 , int $which ) -
float stats_cdf_noncentral_f ( float $par1 , float $par2 , float $par3 , float $par4 , int $which ) -
float stats_cdf_poisson ( float $par1 , float $par2 , int $which ) -
float stats_cdf_t ( float $par1 , float $par2 , int $which ) -
float stats_cdf_uniform ( float $par1 , float $par2 , float $par3 , int $which ) -
float stats_cdf_weibull ( float $par1 , float $par2 , float $par3 , int $which ) -
float stats_covariance ( array $a , array $b ) -
float stats_den_uniform ( float $x , float $a , float $b ) -
float stats_dens_beta ( float $x , float $a , float $b ) -
float stats_dens_cauchy ( float $x , float $ave , float $stdev ) -
float stats_dens_chisquare ( float $x , float $dfr ) -
float stats_dens_exponential ( float $x , float $scale ) -
float stats_dens_f ( float $x , float $dfr1 , float $dfr2 ) -
float stats_dens_gamma ( float $x , float $shape , float $scale ) -
float stats_dens_laplace ( float $x , float $ave , float $stdev ) -
float stats_dens_logistic ( float $x , float $ave , float $stdev ) -
float stats_dens_negative_binomial ( float $x , float $n , float $pi ) -
float stats_dens_normal ( float $x , float $ave , float $stdev ) -
float stats_dens_pmf_binomial ( float $x , float $n , float $pi ) -
float stats_dens_pmf_hypergeometric ( float $n1 , float $n2 , float $N1 , float $N2 ) -
float stats_dens_pmf_poisson ( float $x , float $lb ) -
float stats_dens_t ( float $x , float $dfr ) -
float stats_dens_weibull ( float $x , float $a , float $b ) -
number stats_harmonic_mean ( array $a ) -
float stats_kurtosis ( array $a ) -
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.
float stats_rand_gen_chisquare ( float $df ) -
float stats_rand_gen_exponential ( float $av ) -
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.
float stats_rand_gen_funiform ( float $low , float $high ) -
float stats_rand_gen_gamma ( float $a , float $r ) - Generates random deviates from the gamma distribution whose density is (A**R)/Gamma(R) * X**(R-1) * Exp(-A*X).
int stats_rand_gen_ibinomial ( int $n , float $pp ) -
int stats_rand_gen_ibinomial_negative ( int $n , float $p ) -
int stats_rand_gen_int ( void ) -
int stats_rand_gen_ipoisson ( float $mu ) -
int stats_rand_gen_iuniform ( int $low , int $high ) -
float stats_rand_gen_noncenral_chisquare ( float $df , float $xnonc ) -
float stats_rand_gen_noncentral_f ( float $dfn , float $dfd , float $xnonc ) -
float stats_rand_gen_noncentral_t ( float $df , float $xnonc ) -
float stats_rand_gen_normal ( float $av , float $sd ) -
float stats_rand_gen_t ( float $df ) -
array stats_rand_get_seeds ( void ) -
array stats_rand_phrase_to_seeds ( string $phrase ) -
float stats_rand_ranf ( void ) -
void stats_rand_setall ( int $iseed1 , int $iseed2 ) -
float stats_skew ( array $a ) -
float stats_standard_deviation ( array $a [, bool $sample ] ) -
float stats_stat_binomial_coef ( int $x , int $n ) -
float stats_stat_correlation ( array $arr1 , array $arr2 ) -
float stats_stat_gennch ( int $n ) -
float stats_stat_independent_t ( array $arr1 , array $arr2 ) -
float stats_stat_innerproduct ( array $arr1 , array $arr2 ) -
float stats_stat_noncentral_t ( float $par1 , float $par2 , float $par3 , int $which ) -
float stats_stat_paired_t ( array $arr1 , array $arr2 ) -
float stats_stat_percentile ( float $df , float $xnonc ) -
float stats_stat_powersum ( array $arr , float $power ) -
float stats_variance ( array $a [, bool $sample ] ) -