mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-12 10:18:39 +00:00
13 lines
264 B
PHP
13 lines
264 B
PHP
<?php
|
|
namespace phpOMS\Math\Statistic;
|
|
|
|
use phpOMS\Math\Functions;
|
|
|
|
class PoissonDistribution
|
|
{
|
|
public static function getPoisson(\int $k, \float $lambda)
|
|
{
|
|
return exp($k * log($lambda) - $lambda - log(Functions::getGammaInteger($k + 1)));
|
|
}
|
|
}
|