 My Math Forum random number generation with normal distribution
 User Name Remember Me? Password

 Advanced Statistics Advanced Probability and Statistics Math Forum

 January 8th, 2012, 10:52 PM #1 Newbie   Joined: Jan 2012 Posts: 2 Thanks: 0 random number generation with normal distribution Dear all Hi, I seek the formulation of generating a random number whithin for example 8
 January 9th, 2012, 12:45 AM #2 Newbie   Joined: Jun 2011 Posts: 5 Thanks: 0 Re: random number generation with normal distribution Hey, You can do this is several ways. Depending on what you want to achieve, here are some possibilities: 1. Based on the central limit theorem, you can add up an (arbitrary) large amonut of uniformly distributed numbers, and then scale them to your desired mu & sigma. The more numbers you add, the more it will approach the normal distribution. 2. This is a more general approach (it works for about any distribution), is to take the CDF (cumulative distribution function) of the distribution (in this case, an "erf" function). Next, you uniformly generate a random number between 0 and 1, and then take the INVERSE CDF function value of that random generated number. i.e.: You generated y (between 0 & 1), given that the CDF of the normal distribution equals to " 1 + erf( (x-mu)/(sigma*sqrt(2)) ) ", then by solving it to x: y = 1 + erf( (x-mu)/ ( sigma*sqrt(2)) ), or erf^-1(y-1) * sigma*sqrt(2) + mu = x By filling in a random generated y, you will get a randomly normal distributed x out of a PDF with mean "mu" and standard deviation "sigma". To keep the value between say, 8 and 12, you can either: * choose your interval for y in such a way that it only can return values for x between 8 and 12. (more elgant) * put it in a while loop, until it returns a value between 8 and 12. (ugly but easier) January 9th, 2012, 03:18 PM #3 Global Moderator   Joined: May 2007 Posts: 6,805 Thanks: 716 Re: random number generation with normal distribution There is an analytic method to generate two random variables, which are independent and standard normal. This is based on the fact that by using polar coordinates the joint density function for x and y (normal) can be converted into a joint density for u and ?, where u is distributed exponentially and ? is uniform over the unit circle. Then let r=?u, so X=rcos? and Y=rsin?. Tags distribution, generation, normal, number, random Search tags for this page

### normal distribution in a circle with random number

Click on a term to search for related topics.
 Thread Tools Show Printable Version Email this Page Display Modes Linear Mode Switch to Hybrid Mode Switch to Threaded Mode Similar Threads Thread Thread Starter Forum Replies Last Post nakys Advanced Statistics 0 October 3rd, 2013 08:27 AM PrayForStan Number Theory 1 November 28th, 2012 05:08 AM thesixmax Math Software 12 January 14th, 2012 07:00 PM callkalpa Advanced Statistics 0 May 17th, 2010 06:47 AM edu Advanced Statistics 18 April 6th, 2009 05:45 PM

 Contact - Home - Forums - Cryptocurrency Forum - Top

Copyright © 2019 My Math Forum. All rights reserved.      