View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Jerry W. Lewis Jerry W. Lewis is offline
external usenet poster
 
Posts: 837
Default Help picking a random number from a given distribution

Theoretically, =NORMSINV(RAND()) would be a normal random number. In
practice, prior to Excel 2003 NORMSINV() was too inaccurate for for this to
be acceptable even for non-stringent applications. Alternately you could use
Ian Smith's inv_normal() function instead of the native Excel function
NORMSINV()
http://members.aol.com/iandjmsmith/Examples.xls

Another approach would be to use the Box-Muller method
=SQRT(-2*LN(RAND()))*COS(2*PI()*RAND())
or
=SQRT(-2*LN(RAND()))*SIN(2*PI()*RAND())

Jerry

"McGinty" wrote:

Is there a way for me to have Excel select a random number from a given,
e.g., normal distribution? Also can I put a range on the distribution?

Thanks in advance