Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: How do I get random numbers that follow standard distribution?

by tilly (Archbishop)
on Aug 09, 2000 at 02:57 UTC ( [id://26910]=note: print w/replies, xml ) Need Help??


in reply to How do I get random numbers that follow standard distribution?

If you don't need a perfect normal distribution then you can get a very good approximation by choosing several random numbers and adding them together. You can then multiply then add by appropriate constants to get the desired average and variance.

For most purposes, adding a dozen is good enough.

If you want better than that, try installing Math::Random.

DISCLAIMER: I am one dissertation short of a PhD in math. (It is hand-written, needed an income so I never cleaned it up and typed it.) Therefore for all intents and purposes, I am a mathematician. :-)

  • Comment on Re: How do I get random numbers that follow standard distribution?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://26910]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2024-04-23 23:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found