Re: Random number generation( b/w two limits) with a gaussian
- To: mathgroup at smc.vnet.net
- Subject: [mg109784] Re: Random number generation( b/w two limits) with a gaussian
- From: Bill Rowe <readnews at sbcglobal.net>
- Date: Mon, 17 May 2010 07:12:08 -0400 (EDT)
On 5/16/10 at 5:57 AM, elvisgraceland at gmail.com wrote:
>Dear experts, Is it possible to generate random numbers b/w any two
>limits (say b/w -4 & 4 ) which would comply to a gaussian
>distribution ?
No. By definition, the domain for a gaussian distribution
extends from -Infinity to +Infinity. Any distribution bounded to
the range of -4 to 4 cannot be gaussian. But, having said that,
it is possible to have a gaussian distribution that has a very
low likelihood of finding values outside the range of -4 to 4.
RandomReal[NormalDistribution[0, .5]]
The probability of finding a value outside of the range from -4
to 4 for this guassian distribution would be:
In[2]:= 1 - (CDF[NormalDistribution[0, .5], 4] -
CDF[NormalDistribution[0, .5], -4])
Out[2]= 1.3322676295501878*^-15
The other choice would be to do
8(RandomReal[BetaDistribution[a,a]]-.5)
with a suitably large value for a
This distribution cannot have values outside the range of -4 to
4, is symmetrical and approaches the kurtosis of a normal
distribution as a tends to infinity