Closed
Description
When working with distributions it is very useful to have access to their density, their distribution function and their quantile function in addition to being able to sample from them. Furthermore, it is nice to be able to calculate their (theoretical, exact) moments. I think it makes sense to have all this functionality in a common interface.
This is implemented in the statrs
crate. There is some overlap with rand
, sampling is implemented there as well, but for a lot more distributions.
I see the following options:
- Only implement sampling in
rand
. Port the missing distributions fromstatrs
torand
. - Also implement the theoretical properties of the distributions mentioned above in
rand
, essentially duplicatingstatrs
. - Remove the distributions from
rand
and suggest to usestatrs
instead.
What do you think?