+ Reply to Thread
Results 1 to 3 of 3

Random values from a Triangular Distribution

  1. #1
    Registered User
    Join Date
    02-02-2006
    Location
    London, England
    Posts
    5

    Random values from a Triangular Distribution

    I am trying to create a function that will extract random values from a triangular distribution (with min=.92, mode=.95, and max=.96). Any help most appreciated. Thanks!

  2. #2
    Jerry W. Lewis
    Guest

    RE: Random values from a Triangular Distribution

    Explicit formulas for the pdf and cdf are given at
    http://mathworld.wolfram.com/Triangu...tribution.html
    Specifically, with your values,
    CDF = (x-92)^2/12 for 92<=x<=95
    = 1-(96-x)^2/4 for 95<=x<=96

    The inverse is then
    INV = 92+2*sqrt(3*p) for 0<=p<=0.75
    = 96-2*sqrt(1-p) for 0.75<=p<=1

    You can generate random variates by INV(Rnd()). Implementation is
    straightforward in VBA. As cell formulas without a VBA UDF, it would require
    a helper column to avoid multiple calls to RAND() for each number.

    Jerry

    "leebean337" wrote:

    >
    > I am trying to create a function that will extract random values from a
    > triangular distribution (with min=.92, mode=.95, and max=.96). Any
    > help most appreciated. Thanks!


  3. #3
    Registered User
    Join Date
    02-02-2006
    Location
    London, England
    Posts
    5
    Thanks Jerry - very helpful!

+ 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