+ Reply to Thread
Results 1 to 6 of 6

How do you generate random numbers in a normal distribution?

  1. #1
    Ladee_bird
    Guest

    How do you generate random numbers in a normal distribution?

    Hi,
    How do you generate 100 random numbers with a normal distribution between 0
    and 90? And when this is done how do you stop the random numbers changing
    each time you do something else?
    Thanks

  2. #2
    Patrick Molloy
    Guest

    RE: How do you generate random numbers in a normal distribution?

    Option Explicit

    Sub genRan()
    Dim index As Long
    For index = 1 To 100
    Cells(index, 1).Value = Rnd() * 90
    Next
    End Sub

    "Ladee_bird" wrote:

    > Hi,
    > How do you generate 100 random numbers with a normal distribution between 0
    > and 90? And when this is done how do you stop the random numbers changing
    > each time you do something else?
    > Thanks


  3. #3
    ladee_bird
    Guest

    RE: How do you generate random numbers in a normal distribution?

    Thanks,
    I'm a complete novice at this. So you just enter this into the equation bar?
    Thanks

    "Patrick Molloy" wrote:

    > Option Explicit
    >
    > Sub genRan()
    > Dim index As Long
    > For index = 1 To 100
    > Cells(index, 1).Value = Rnd() * 90
    > Next
    > End Sub
    >
    > "Ladee_bird" wrote:
    >
    > > Hi,
    > > How do you generate 100 random numbers with a normal distribution between 0
    > > and 90? And when this is done how do you stop the random numbers changing
    > > each time you do something else?
    > > Thanks


  4. #4
    K Dales
    Guest

    RE: How do you generate random numbers in a normal distribution?

    This will not generate a normal distribution, unfortunately. Rnd() has an
    equal probability for every number in the range, so its distribution is flat,
    not normal.

    "Patrick Molloy" wrote:

    > Option Explicit
    >
    > Sub genRan()
    > Dim index As Long
    > For index = 1 To 100
    > Cells(index, 1).Value = Rnd() * 90
    > Next
    > End Sub
    >
    > "Ladee_bird" wrote:
    >
    > > Hi,
    > > How do you generate 100 random numbers with a normal distribution between 0
    > > and 90? And when this is done how do you stop the random numbers changing
    > > each time you do something else?
    > > Thanks


  5. #5
    Mike Middleton
    Guest

    Re: How do you generate random numbers in a normal distribution?

    Ladee_bird -

    > How do you generate 100 random numbers with a normal distribution between
    > 0 and 90? <


    The normal distribution is determined by its mean and standard deviation,
    not by a range "between 0 and 90."

    Theoretically, the possible values from a normal distribution range from
    minus infinity to plus infinity. But most values are within three or four
    standard deviations from the mean.

    One way to get normal distribution values with mean 45 and standard
    deviation 5 is to use the worksheet functions =NORMINV(RAND(),45,5). Copy to
    100 cells for 100 such random numbers.

    > And when this is done how do you stop the random numbers changing each
    > time you do something else? <


    Edit Copy. Edit Paste Special Values.

    - Mike
    www.mikemiddleton.com



  6. #6
    Registered User
    Join Date
    03-13-2013
    Location
    Kona, HI
    MS-Off Ver
    Excel 2010
    Posts
    1

    Re: How do you generate random numbers in a normal distribution?

    How do you paste the formula in 100 cells at one time?

+ 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