Re: [HACKERS] Perl Standard Deviation function is wrong !

From: Colin Kuskie <ckuskie(at)teleport(dot)com>
To: Brook Milligan <brook(at)trillium(dot)NMSU(dot)Edu>, andreas(dot)zeugswetter(at)telecom(dot)at, jason(at)wagner(dot)com, dg(at)illustra(dot)com, hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Perl Standard Deviation function is wrong !
Date: 1998-06-06 01:41:07
Message-ID: 35789E33.F9E1475A@teleport.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Brook Milligan wrote:
>
> >Variance is just square of std. dev, no?
>
> No ! Stdev is divided by count, Variance by (count - 1)
>
> I think the difference really has to do with what you are calculating.
> If you want the std. dev./var. of the data THEMSELVES, divide by the
> count. If you want an estimate about the properties of the POPULATION
> from which the data were sampled, divide by count-1. People have
> needs for both in different circumstances.
>
> Perhaps there needs to be two versions, or a function argument, to
> distinguish the two uses, both of which are legitimate.

Gentlemen,
First let me apologize if this conversation has been taking place in
the Perl newsgroups. You've caught me at a time when I'm sans news
reader. (I could use Netscape, but .... <shudder> and I'd be ignored
by most of the guru's in the group).

Back to the topic at hand. The module states its references for the
statistical formulae as well as its methods of calculation so you
should always know what you're getting.

I haven't done intensive statistics for a long time. I inherited the
module from Jason Kastner to add more methods to it and to see if I
could make some changes to the interface. Since then, I've released
several bug fixes caused by those changes. If the public demands
more statistics, then I'll make it so.

I'm a little leary of making changes without having some hard
references. If any of you would like to send me some (I'll be tracking
them down, too!) I'd appreciate it.

Once I have that warm fuzzy that I'm not just inventing mathematics,
then I'll change the methods for standard variation and variance to
accept a single argument that causes them to give the DATA statistics
instead of the population statistics. I can't see overhauling the
default behavior and forcing people to rewrite scripts already in place.
It made them angry enough when I changed the OO interface...

I look forward to hearing from you, or having results to share with
you, soon!

Colin Kuskie

p.s. I recently changed jobs. My new email address is:
ckuskie(at)cadence(dot)com A new release will give me the excuse to change
the modules documentation to reflect that.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message The Hermit Hacker 1998-06-06 03:03:18 Re: [HACKERS] keeping track of connections
Previous Message Chris Olivier 1998-06-05 23:13:34 dfas