note 123960 added to function.stats-dens-pmf-hypergeometric

From: Date: Wed, 19 Jun 2019 13:11:08 +0000
Subject: note 123960 added to function.stats-dens-pmf-hypergeometric
Groups: php.notes 
Request: Send a blank email to php-notes+get-211314@lists.php.net to get a copy of this message
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 ---- Server IP: 208.43.231.9 Probable Submitter: 82.199.130.26 (proxied: 197.87.63.161) ---- Manual Page -- http://php.net/manual/en/function.stats-dens-pmf-hypergeometric.php Edit -- https://master.php.net/note/edit/123960 Del: integrated -- https://master.php.net/note/delete/123960/integrated Del: useless -- https://master.php.net/note/delete/123960/useless Del: bad code -- https://master.php.net/note/delete/123960/bad+code Del: spam -- https://master.php.net/note/delete/123960/spam Del: non-english -- https://master.php.net/note/delete/123960/non-english Del: in docs -- https://master.php.net/note/delete/123960/in+docs Del: other reasons-- https://master.php.net/note/delete/123960 Reject -- https://master.php.net/note/reject/123960 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#211314) next »