+ Reply to Thread
Results 1 to 3 of 3

how can I sample a number from a distribution?

  1. #1
    roy
    Guest

    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. #2
    Eric
    Guest

    RE: how can I sample a number from a distribution?

    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. #3
    Jerry W. Lewis
    Guest

    Re: how can I sample a number from a distribution?

    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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1