stats_cdf_gamma

(PECL stats >= 1.0.0)

stats_cdf_gammaCalculates any one parameter of the gamma distribution given values for the others.

Description

float stats_cdf_gamma ( float $par1 , float $par2 , float $par3 , int $which )
Warning

This function is currently not documented; only its argument list is available.

Parameters

par1

par2

par3

which

Return Values

Коментарии

Hello, I needed badly this function, but there was no documentation available about it, so I dug deep into the code and found out something very interesting:

stats_cdf_gamma(float par1, float par2, float par3, int which)

The value of parameter “which” determines 
the meaning of the remaining 3 other parameters (par1,par2,par3) 
and the outcome of the calculation, as illustrated below:

WHICH --> Integer indicating which of the next four argument values is to be calculated from the others.
               Legal range: 1..4
               which = 1 : Calculate P and Q from X,SHAPE and SCALE
               which = 2 : Calculate X from P,Q,SHAPE and SCALE
               which = 3 : Calculate SHAPE from P,Q,X and SCALE
               which = 4 : Calculate SCALE from P,Q,X and SHAPE

Where the meaning of P,Q,SCALE,SHAPE is given below:

     P <--> The integral from 0 to X of the gamma density.
            Input range: [0,1].

     Q <--> 1-P.
            Input range: (0, 1].
            P + Q = 1.0.

     X <--> The upper limit of integration of the gamma density.
            Input range: [0, +infinity).
            Search range: [0,1E100]

     SHAPE <--> The shape parameter of the gamma density.
                Input range: (0, +infinity).
                Search range: [1E-100,1E100]

     SCALE <--> The scale parameter of the gamma density.
                Input range: (0, +infinity).
                Search range: (1E-100,1E100]
In summary: 

|    which    |par1    |par2    |par3    |the function returns:    |
|    1        |X        |SHAPE    |SCALE    |    P                    |
|    2        |P        |SHAPE    |SCALE    |    X                    |
|    3        |P        |X        |SCALE    |    SHAPE                |
|    4        |P        |X        |SHAPE    |    SCALE                |

I tried it for which=1 and it works fine.
2012-05-30 19:17:22
http://php5.kiev.ua/manual/ru/function.stats-cdf-gamma.html

    Поддержать сайт на родительском проекте КГБ