superbobry / pareto

GSL powered OCaml statistics library
http://superbobry.github.io/pareto/0.2
MIT License
40 stars 5 forks source link

Bad call for exponential distribution #33

Closed zoggy closed 10 years ago

zoggy commented 10 years ago

Hello,

In the Exponential module, I think there is an error in the random function:

let random ?(rng=default_rng) { exp_rate } = Randist.exponential ~mu:exp_rate rng

But Randist.exponential must be given the mean, not the rate: https://www.gnu.org/software/gsl/manual/html_node/The-Exponential-Distribution.html

Regards,

superbobry commented 10 years ago

Fixed, thanks!