Rank: 6081 based on 15 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 15 7
  • 4.71429
4.7 | 7 ratings
Comments and Ratings on Dave's 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 Peterson, Jack

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

Contact us