From: hrubin@mean.stat.purdue.edu (Herman Rubin) Newsgroups: sci.math.num-analysis Subject: Re: probability problem !! Date: 16 Dec 1997 09:54:52 -0500 In article <3495AFB0.97F@supelec.fr>, Julien Restat wrote: >Please help me ! >How could I generate a random variable with a given pdf f(x) using a >uniform random variable ? >Thank you for your help. >Gadjoule. There is one guaranteed method, which is rarely used because there are usually much cheaper ways. That is to invert the cdf. If U is uniform between 0 and 1, the smallest solution of F(x) >= U will have the cdf F. However, most generation is by methods for the specific problem, as this is much faster. Acceptance-rejection methods are the most used. -- This address is for information only. I do not claim that these views are those of the Statistics Department or of Purdue University. Herman Rubin, Dept. of Statistics, Purdue Univ., West Lafayette IN47907-1399 hrubin@stat.purdue.edu Phone: (765)494-6054 FAX: (765)494-0558