jeudi 26 janvier 2017

How to generate n random numbers from a normal distribution using random-fu (Haskell)?

The question seems straightforward to me, yet I couldn't find easily an answer.

Lets say that you want to take a sample of size n from a normal distribution with mean 10 and variance 1 and then get their average and variance to verify that the sample is from a normal distribution.

It would be something like this, I suppose:

values = take n $ sample (normal 10 1)
(avg values, variance values)

I'm trying to use the library random-fu, so if you can provide an answer using that lib, I would really appreciate it.




Aucun commentaire:

Enregistrer un commentaire