Why is the mean of value of gaussian white noise not zero?

조회 수: 12 (최근 30일)
Helge
Helge 2019년 8월 8일
댓글: Helge 2019년 8월 8일
I create a vector of randomly selected values from a normal distribution of mean = 0 and std = 1. I calculate the mean and expect as a result zero. And I calculate the mean of the absolute value and I expect as a result but instead I get a non-zero mean and a result of for the mean of the absolute value.
How is that?
>> noise=randn(1,1000000);
>> mean(noise)
ans =
0.0013
>> mean(abs(noise))
ans =
0.7985
  댓글 수: 2
Renato SL
Renato SL 2019년 8월 8일
For what you expect to be the value of the mean of the absolute value, I think the discussion here explains it well.
Helge
Helge 2019년 8월 8일
Thanks a lot, that was the discussion, I couldn't find this morning!

댓글을 달려면 로그인하십시오.

채택된 답변

Jos (10584)
Jos (10584) 2019년 8월 8일
The numbers are randomly drawn from a normal distribution. Although this underlyin distribution has a mean of 0 and a standard deviation of 1, this does not mean that your selected numbers should have this mean and standard deviation! Think about it when you draw only a few numbers from this distribution. Would you expect the mean to be 0 all the time?
To make the mean and std of your selection of numbers (almost) equal to 0 and 1, respectively, you can do:
R = randn(1,100) ;
R = (R - mean(R))./ std(R) ;
mean(R), std(R)
  댓글 수: 2
Walter Roberson
Walter Roberson 2019년 8월 8일
Flip a fair coin many times. The statistical mean is that half come out Heads and half come out Tails, so statistically for N throws, number of heads = N/2 and number of tails = N/2 . Okay, now flip the coin exactly once, N = 1. The expected number of heads is then 1/2 and the expected number of tails is 1/2. But the single coin flip was either all heads or all tails, not 1/2 a head and 1/2 a tail. Why wasn't the result of a single flip 1/2 a head and 1/2 a tail ?
Helge
Helge 2019년 8월 8일
I get your points. I just thought, that if I would do the experiment 1 mio times, I would get closer to zero than 0.0013, but of course this depends also on the standard deviation, which I set to 1.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by