muppet77 Posted April 29, 2012 Share Posted April 29, 2012 is it possible to calculate values in php using the poisson distribution? I have searched for a function and also searched this forum. I found stats_cdf_poisson but with not much help at http://php.net/manual/en/function.stats-cdf-poisson.php I tried plugging in some numbers but i just got Call to undefined function stats_cdf_poisson() echo stats_cdf_poisson(10,10.1,1); any ideas please? I don't think that it can be mathematically calculated can it? In excel there is a nice function already set up. Every web search seems to lead back to the link I posted above. Thanks in advance! Quote Link to comment https://forums.phpfreaks.com/topic/261813-poisson-distribution-function/ Share on other sites More sharing options...
muppet77 Posted April 29, 2012 Author Share Posted April 29, 2012 Ah, seen i need a library to make it work. Do i need PECL stats and PEAR? What do I do with them - just upload them to my host??? They are zipped files, but i'm not sure what to do next. Any help please? Quote Link to comment https://forums.phpfreaks.com/topic/261813-poisson-distribution-function/#findComment-1341562 Share on other sites More sharing options...
ignace Posted April 30, 2012 Share Posted April 30, 2012 If you are using shared hosting then it will be unlikely for you to install them. You can try contacting the host provider and ask them if they could install the extension but it's also unlikely they will. An other option you may have is finding the poisson distribution in pure PHP like: http://www.phpmath.com/build02/PDL/docs/package.php?view=6c892fdf713fd5c15ff0cdd31daf79463531ceef Which uses PEAR (quite likely to be installed on your host). A full index of pure PHP mathematical functions can be found at: http://www.phpmath.com/build02/ Quote Link to comment https://forums.phpfreaks.com/topic/261813-poisson-distribution-function/#findComment-1341646 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.