Technical discussion about Matlab and issues related to Digital Signal Processing.
|
Hi, Am trying to generate complex gaussian random variables using the randn function but when I calculated the mean of those random variables it is not giving zero as answer.Can anyone tell why this is happening? mohan |
|
|
|
Let's say you are
taking multiple independent identically distributed values from a gaussian random value
generator. The mean of those values is itself a random variable. Say you take
values X1, X2, ..., XN from a random number generator, then the mean of them is MX =
sum(X1,...,XN)/N, which itself is a random variable. The expectation of MX (or its mean,
if you formed many MX's from different sets of Xi's, i from 1 to N) is zero, but the variance
of MX, E{ MX^2 } if MX is zero-mean, is NOT zero.
If the variance of the
random value generator was 1, then the variance of MX is 1/N. So any finite set of X's
has a mean that on average will be zero, but is not guaranteed (indeed, has infinitesimal
probability of being exactly) zero. The larger the set, the closer MX should be to
zero.
Most likely, the
number generator is working perfectly, and you are observing an effect caused by a finite set
of samples.
Sincerely,
Glen
Ragan
----Original
Message----- Hi,From: mohan prasad [mailto:m...@yahoo.com] Sent: Tuesday, March 04, 2003 1:48 PM To: m...@yahoogroups.com Subject: [matlab] zero mean random variables Am trying to generate complex gaussian random variables using the randn function but when I calculated the mean of those random variables it is not giving zero as answer.Can anyone tell why this is happening? mohan _____________________________________ /groups.php3 Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. |