stats_dens_pmf_hypergeometric

(PECL stats >= 1.0.0)

stats_dens_pmf_hypergeometric

Description

float stats_dens_pmf_hypergeometric ( float $n1 , float $n2 , float $N1 , float $N2 )
Warning

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

Parameters

n1

n2

N1

N2

Return Values

Коментарии

You can use this method to work out lottery odds:

/**
* N is the population size OR total balls in the lottery draw
* K is the number of success states in the population OR the number of correct balls drawn from the pool
* n is the number of draws OR the number of times we draw from the pool to get the winning numbers.
*/

$N = 49; //Total balls in the pool
$K = 1; //Successful matches to win

$method = new Hypergeometric($N, $K, $K);
$odds = $method->pmf($K);
       
return 1/$odds;

//Will return 49
2019-06-19 16:11:08
http://php5.kiev.ua/manual/ru/function.stats-dens-pmf-hypergeometric.html

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