note 108855 added to function.stats-cdf-gamma
| From: | dgcowboy70 at gmail dot com | Date: | Wed, 30 May 2012 16:17:24 +0000 |
| Subject: | note 108855 added to function.stats-cdf-gamma | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-188301@lists.php.net to get a copy of this message | ||
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.
----
Server IP: 94.141.21.201
Probable Submitter: 217.202.87.219
----
Manual Page -- http://www.php.net/manual/en/function.stats-cdf-gamma.php
Edit -- https://master.php.net/note/edit/108855
Del: integrated -- https://master.php.net/note/delete/108855/integrated
Del: useless -- https://master.php.net/note/delete/108855/useless
Del: bad code -- https://master.php.net/note/delete/108855/bad+code
Del: spam -- https://master.php.net/note/delete/108855/spam
Del: non-english -- https://master.php.net/note/delete/108855/non-english
Del: in docs -- https://master.php.net/note/delete/108855/in+docs
Del: other reasons-- https://master.php.net/note/delete/108855
Reject -- https://master.php.net/note/reject/108855
Search -- https://master.php.net/manage/user-notes.php