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

Consultant on development of quantitative models and methods in finance.


 

Watch this Author's files

 

Files Posted by Dave Dykes
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 7
  • 4.71429
4.7 | 7 ratings
Comments and Ratings on Dave Dykes' Files View all
Updated File Comment by Comments Rating
27 Oct 2013 Obs. from Arbitrary PDF Generate a sample from an arbitrary PDF. Author: Dave Dykes mutah

GOOD CODE BUT WHEN THE N IS LARGE THE EXCUTE VERY SLOW ?? HOW CAN FAST THIS EXECUTION

21 Apr 2013 Obs. from Arbitrary PDF Generate a sample from an arbitrary PDF. Author: Dave Dykes Jack Peterson

Very useful! I modified this a bit to generate many random numbers more efficiently -- in case this would be helpful to anyone else, the modified file is at: https://github.com/tensorjack/randarbmulti/blob/master/randarbmulti.m

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 Ahmed Fasih

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 Alex Lu

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

Contact us