mardi 4 août 2015

Random numbers algorithm

I have decided to ask because I cant find a algorithm browsing and im trying to do it but I could not.

I need to generate random numbers in groups: 100, 500, 1000 and 10000 numbers uniforms and gaussians. This is necessary for create some histograms and other stadistics stuffs.

I cant use the random function in python because is a condition so i was thinking in use this method (linear congruential generator): Xn+1 ≡ (aXn + c) mod m

here i need 4 variables. Can someone please tell me how can i implement this algorithm ? i assume that the m variable the first time is 100 Thank you so much




Aucun commentaire:

Enregistrer un commentaire