Home |
Search |
Today's Posts |
#1
|
|||
|
|||
how can I sample a number from a distribution?
I need to sample 100 numbers out of a specified distribution (normal or
other). So basically I know the parameters, and I need Execl to sample 100 numbers. How do I do it? |
#2
|
|||
|
|||
Roy,
For a normal distribution, =NORMINV(RAND(),mean,standard deviation) Copy this down for 100 cells. Eric "roy" wrote: I need to sample 100 numbers out of a specified distribution (normal or other). So basically I know the parameters, and I need Execl to sample 100 numbers. How do I do it? |
#3
|
|||
|
|||
In principle you can use the INV distribution functions to do this with
any distribution other than Student's t. In practice, the INV distribution functions are too crude for serious work (the exception is NORMINV in Excel 2003). Also, prior to Excel 2003, the RAND() function itself is not that random. Since this is how the Analysis ToolPak generates random variables from various distributions, hopefully the next version of Excel will do a better job of it. If a serious random number generator is not required, =TINV(RAND(),df)*SIGN(RAND()-0.5) would be the patch for Student's t. Jerry Eric wrote: Roy, For a normal distribution, =NORMINV(RAND(),mean,standard deviation) Copy this down for 100 cells. Eric "roy" wrote: I need to sample 100 numbers out of a specified distribution (normal or other). So basically I know the parameters, and I need Execl to sample 100 numbers. How do I do it? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
doubling a number X number of times | Excel Worksheet Functions | |||
Creating a certain number of entries based on a number in a cell | Excel Worksheet Functions | |||
Count Number of Characters in a cell? | Excel Discussion (Misc queries) | |||
Need number of Saturdays and number of Sundays between 2 dates | Excel Worksheet Functions | |||
How do I sort a column a unique number? | Excel Worksheet Functions |