Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP: Random number from a normal distribution

In PHP, can I get a set of random numbers which conform to a specified mean and standard deviation?

like image 899
David Parks Avatar asked Nov 12 '11 22:11

David Parks


Video Answer


1 Answers

The stats_rand_gen_normal function will do exactly this. (Assuming you mean a normal distribution.)

like image 72
David Schwartz Avatar answered Sep 28 '22 04:09

David Schwartz