Rank: 3826 based on 9 downloads (last 30 days) and 1 file submitted
Personal Profile:

Consultant on development of quantitative models and methods in finance.

Professional Interests:
GPU Computing, HPC, High-frequency market data

 

Watch this Author's files

 

Files Posted by Dave
Updated   File Tags Downloads
(last 30 days)
Comments Rating
13 Dec 2004 Obs. from Arbitrary PDF Generate a sample from an arbitrary PDF. Author: Dave Dykes approximation, interpolation, random, sample, pdf, arbitrary 9 5
  • 4.8
4.8 | 5 ratings
Comments and Ratings on Dave's Files View all
Updated File Comment by Comments Rating
16 Oct 2009 Obs. from Arbitrary PDF Generate a sample from an arbitrary PDF. Author: Dave Dykes Seth
18 Nov 2008 Obs. from Arbitrary PDF Generate a sample from an arbitrary PDF. Author: Dave Dykes Fasih, Ahmed

Valuable code to have.

Code can be made faster by vectorizing the while loop, and also to return multiple draws from the distribution. Just make sure to validate your modifications with a non-symmetric distribution like a beta.

This technique of random number generation is discussed here: http://en.wikipedia.org/wiki/Inverse_transform_sampling

17 Nov 2008 Obs. from Arbitrary PDF Generate a sample from an arbitrary PDF. Author: Dave Dykes Lu, Alex

Thank you very much .for your excellent work, good luck

07 Nov 2008 Obs. from Arbitrary PDF Generate a sample from an arbitrary PDF. Author: Dave Dykes Deoras, Ameya

This method is called CDF inversion - Generate a standard uniform random number and apply the inverse CDF of the distribution D to that number to obtain a new random number drawn from distribution D. This is available in MATLAB for a number of densities: eg: expinv, binoinv etc..
http://www.mathworks.com/access/helpdesk/help/toolbox/stats/bqttfc1.html#bqucf5l-2

09 Feb 2007 Obs. from Arbitrary PDF Generate a sample from an arbitrary PDF. Author: Dave Dykes karauz, ibrahim
Top Tags Applied by Dave
approximation, arbitrary, interpolation, pdf, random
Files Tagged by Dave
Updated   File Tags Downloads
(last 30 days)
Comments Rating
13 Dec 2004 Obs. from Arbitrary PDF Generate a sample from an arbitrary PDF. Author: Dave Dykes approximation, interpolation, random, sample, pdf, arbitrary 9 5
  • 4.8
4.8 | 5 ratings

Contact us at files@mathworks.com