Re: White noise
- From: Peter Boettcher <boettcher@xxxxxxxxxx>
- Date: Wed, 01 Apr 2009 09:04:13 -0400
"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
.
- Follow-Ups:
- Re: White noise
- From: Steven Lord
- Re: White noise
- References:
- White noise
- From: Shaddy
- White noise
- Prev by Date: Adding intensities of spectral lines using matlab
- Next by Date: Re: Fitting two planes
- Previous by thread: Re: White noise
- Next by thread: Re: White noise
- Index(es):
Relevant Pages
|