[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: efficient kernel or masking algorithm ? UPDATE



> > interested in this method which is very fast. It is based on the crafty
> > formula for variance:
> >   variance = (sum of the squares)/n + (square of the sums)/n*n
>
> Righto.  I knew I was fishing for something like this.  Except I think you
mean:
>
> (population) variance = (sum of the squares)/n - (square of the sums)/n*n
>
> Luckily, that's how you've coded it too.  Sample variance (=population
> variance*n/(n-1)) is of course the more common case in science (as opposed
to
> gambling).

Sigh - I hear what you are saying, but this was a misunderstanding. I
*tried* to make its use unambiguous by making the default option the
absolute variance of the array (n as the denominator) , or when
POPULATION_ESTIMATE is set then calculate an *estimate* of the population
from which this dataset is assumed to be a SAMPLE [giving (n-1) as the
denominator]. Judging by your reply I failed dismally!

You are right - POPULATION_ESTIMATE is normally termed "sample stdev" and is
the equivalent of IDL's variance(x) - but what they mean is that it is an
estimator of the popn stdev! Still waiting to try it in the casinos :)

Martin