My simple MATLAB script can show that if we take 100 samples and compute the mean of them, then do it again 1000 times:
>> dat=poissrnd(5,100,1000);
>> meandat=mean(dat);
>> meandat=mean(dat);
the variance of their means are:
>> var(meandat)
ans =
0.0506
and if we take the variance of all samples (100 x 1000), divide by sample size (100), we got:
>> var(dat(:))/100
ans =
0.0502
ans =
0.0502
These two numbers are very close!
No comments:
Post a Comment