Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Random values from a Triangular Distribution


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

--
leebean33
-----------------------------------------------------------------------
leebean337's Profile: http://www.excelforum.com/member.php...fo&userid=3109
View this thread: http://www.excelforum.com/showthread.php?threadid=50806

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 837
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Random values from a Triangular Distribution


Thanks Jerry - very helpful!


--
leebean337
------------------------------------------------------------------------
leebean337's Profile: http://www.excelforum.com/member.php...o&userid=31099
View this thread: http://www.excelforum.com/showthread...hreadid=508069

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
triangular distribution Yaarit Excel Worksheet Functions 4 April 3rd 23 06:50 PM
Special Random Numbers' Distribution Faraz A. Qureshi Excel Discussion (Misc queries) 4 February 27th 10 11:38 PM
triangular distribution TD Excel Discussion (Misc queries) 3 December 24th 05 12:30 AM
normal distribution of random no.'s ladee_bird Excel Programming 1 June 20th 05 03:31 PM
Random Distribution Rick via OfficeKB.com Excel Discussion (Misc queries) 3 April 29th 05 07:53 PM


All times are GMT +1. The time now is 08:01 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"