Re: White noise



"Shaddy" <shaddyab@xxxxxxxxx> writes:

I am trying to generate white noise with a mean equal to 1 and
variance of of 2

r = 1 + 2*randn(1000,1);

but when I check mean(r) and std(r) I get values close to 1 and 2 but
not exact. Can someone explain it to me please.

Flip a coin 4 times. What is the expected value (you could say
"theoretical mean") of the number of heads? Exactly 2. Will you get 2
heads every time you run this trial? (This is the "sample mean"). No.
Sometimes you will get 3 or 1, sometimes even 4 or 0.

Same thing in your case. The expected value of the mean is exactly 1,
but the sample mean of any one trial will be somewhere near 1. If you
take many trials and look at the mean value you get each time, that
produces it's own distribution. You can even calculate the variance of
that distribution of sample means.

Another way to think of it is that the mean you are calculating is just
another random variable, which happens to be a sum of other random
variables. Probability theory lets you calculate the PDF of a sum of
Gaussian random variables.

-Peter
.



Relevant Pages

  • Re: sum of normal product distributions
    ... Then the sum ... >distribution with 1 degree of freedom. ... >random variables and negative Gamma random variables. ... and uses the moment generating function in the ...
    (sci.stat.math)
  • Re: A Gambling Math Question
    ... The standard deviation is approximately sqrt. ... The variance of the sum of independent random variables is the sum of ... The variance of r is easily seen to be p*q, ... property the sum of N such random variables has variance N*p*q. ...
    (sci.math)
  • Re: Generating Gaussian distributed random variable using C++
    ... That the sum of random variables tends ... towards a Gaussian dirstibution? ... 12 such independent uniform variates has variance 1. ...
    (comp.dsp)
  • Re: A question on a simple algorithm to apprximate normal distribution
    ... variable or the number of variables added and the variance ... The variance of a sum is the sum of their ... uniform. ... material about the uniform distribution. ...
    (sci.math)
  • Re: Adding Random Numbers
    ... the distribution of the individual random variables being summed. ... the mean and std dev of each of the N random variables. ... The sum of iid random variables is ASYMPTOTICALLY normal. ...
    (microsoft.public.excel.worksheet.functions)