Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

how to gerenate gaussian and rayleigh RV from uniform RV?

Status
Not open for further replies.

kydong

Junior Member level 2
Joined
Jan 24, 2010
Messages
24
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
vietnam
Activity points
1,446
Hi all,

I have a question related with statistic. I read some other website and they said that: "An easy way to approximate normal distribution is to add three random numbers:

G = X + X + X

X = a uniformly distributed random number between -1 and 1.

G ~ a standard normal random number."
and
"
If X and Y are independent Gaussian random variables with mean 0 and standard deviation sigma, then sqrt(X^2 + Y^2) has a Rayleigh distribution with parameter sigma."

I wonder if anyone can confirm this and show me some other related articles Thanks so much,
site: http://www.protonfish.com/random.shtml
and http://wiki.answers.com/Q/Relationship_between_rayleigh_distribution_and_gaussian_distribution
 

Hi kydong,

Adding several iid (independent, identically distributed) RV (random variables) get a distribution that resembles more and more a normal distribution.
It is a consequence of the central limit theorem.

The number of RV to be added depends on how much similar to gaussian has to be the resultant distribution.
Only 3 RV give a rough approximation, but enough for many applications. It is usual to use 6. Using 10 or more is much better, in the sense that extreme values (values with very low probability) can be obtained only with many additions.

If X and Y are independent Gaussian random variables with mean 0 and standard deviation sigma, then sqrt(X^2 + Y^2) has a Rayleigh distribution with parameter sigma.

It's right.

Regards

Z
 
  • Like
Reactions: kydong

    kydong

    Points: 2
    Helpful Answer Positive Rating
I know that we can get the gaussian approximation by central theory. However, in my question, why is three not four? I tried by matlab the four normal RV case (adding four normal RV) and using the histogram to plot the pdf of the sum. the result showed that not not the shape of gaussian RV. but in three normal RV case, the pdf shape is gaussian. I dont know why,
 

I tried by matlab the four normal RV case (adding four normal RV) and using the histogram to plot the pdf of the sum. the result showed that not not the shape of gaussian RV. but in three normal RV case, the pdf shape is gaussian. I dont know why,
How many samples have you used for the histogram? Remember that a sufficient number of samples is required in order that the histogram resembles the distribution. Please try to increase the number of samples.
Regards

Z
 
  • Like
Reactions: kydong

    kydong

    Points: 2
    Helpful Answer Positive Rating
I mean if I add 4 normal RV between -1 and 1, I cannot get a standard normal distribution ( mean of 0 and variance of 1).
>> a=rand(1,100000)*2-1;
>> b=rand(1,100000)*2-1;
>> c=rand(1,100000)*2-1;
>> d=rand(1,100000)*2-1;
>> x=a+b+c;
>> hist(x,100)
>> y=a+b+c+d;
>> figure
>> hist(y,100)
>> mean(x)

ans =

7.8934e-007

>> mean(y)

ans =

0.0022

>> var(x)

ans =

0.9933

>> var(y)

ans =

1.3248

thanks
 

A RV with uniform distribution between -1 and 1 has mean µ=0 and variance σ²=1/3.
If n such RV are added, the resultant mean is nµ and variance nσ².
So, the results you got are consistent. In order to obtain variance 1, is is necessary to multiply the result by √(3/n) .
Regards

Z
 
  • Like
Reactions: kydong

    kydong

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top