array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'zh', ), 'this' => array ( 0 => 'function.stats-rand-gen-gamma.php', 1 => 'stats_rand_gen_gamma', 2 => 'Generates a random deviate from the gamma distribution', ), 'up' => array ( 0 => 'ref.stats.php', 1 => 'Statistic 函数', ), 'prev' => array ( 0 => 'function.stats-rand-gen-funiform.php', 1 => 'stats_rand_gen_funiform', ), 'next' => array ( 0 => 'function.stats-rand-gen-ibinomial.php', 1 => 'stats_rand_gen_ibinomial', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/stats/functions/stats-rand-gen-gamma.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>

stats_rand_gen_gamma

(PECL stats >= 1.0.0)

stats_rand_gen_gammaGenerates a random deviate from the gamma distribution

说明

stats_rand_gen_gamma(float $a, float $r): float

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