[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: var(1) = 0 ??
From: |
c. |
Subject: |
Re: var(1) = 0 ?? |
Date: |
Fri, 27 Jan 2012 23:32:22 +0100 |
On 27 Jan 2012, at 22:40, Muhali wrote:
> var(1) = 0 is at least in conflict with the standard definition of the
> unbiased estimate, where the sum of squared deviations is scaled by n-1 (n
> sample size).
but if all elements in the sample are equal, e.g.:
>> n = 100;
>> samp = ones (1, n);
then the mean value has that same value
>> mean (samp)
ans = 1
therefore all the squred deviations are 0:
>> mu = mean (samp);
>> any ((samp - mu).^2)
ans = 0
and the "standard definition of the unbiased estimate" still returns 0:
>> sum ((samp - mu).^2) / (n - 1)
ans = 0
why would you expect a different result?
c.
- var(1) = 0 ??, Muhali, 2012/01/27
- Re: var(1) = 0 ??, Ismael Núñez-Riboni, 2012/01/27
- Re: var(1) = 0 ??, Muhali, 2012/01/27
- Re: var(1) = 0 ??, c., 2012/01/28
- Re: var(1) = 0 ??, pathematica, 2012/01/28
- Re: var(1) = 0 ??, c., 2012/01/28
- Re: var(1) = 0 ??, pathematica, 2012/01/28
- Re: var(1) = 0 ??, pathematica, 2012/01/28
- Re: var(1) = 0 ??, c., 2012/01/28
- Re: var(1) = 0 ??, Jordi Gutiérrez Hermoso, 2012/01/28