From: David Fetter <david@fetter.org>
To: Jeff Janes <jeff.janes@gmail.com>
Cc: Haribabu Kommi <kommi.haribabu@gmail.com>
Cc: Jim Nasby <Jim.Nasby@bluetreble.com>
Cc: PG Hackers <pgsql-hackers@postgresql.org>
Subject: Re: Weighted Stats
Date: Fri, 8 Apr 2016 16:31:52 -0700
Message-ID: <20160408233152.GD15407@fetter.org> (raw)
In-Reply-To: <CAMkU=1y45wFL72-HkFo9SDR=Gont9qxR3=H+JzuH7=ok=PQb7w@mail.gmail.com>
References: <20151102234644.GA31118@fetter.org>
<5677442D.9070204@BlueTreble.com>
<20151221025041.GC32120@fetter.org>
<CAJrrPGf1KT-5BN+RPuNXMkCiGXNQs5_RatYqseun-xfF9H+8aQ@mail.gmail.com>
<20160315153650.GC26662@fetter.org>
<CAMkU=1y45wFL72-HkFo9SDR=Gont9qxR3=H+JzuH7=ok=PQb7w@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
On Fri, Mar 18, 2016 at 06:12:12PM -0700, Jeff Janes wrote:
> On Tue, Mar 15, 2016 at 8:36 AM, David Fetter <david@fetter.org> wrote:
> >
> > Please find attached a patch that uses the float8 version to cover the
> > numeric types.
>
> Is there a well-defined meaning for having a negative weight? If no,
> should it be disallowed?
Done.
> Shouldn't these then give the same result:
>
> select stddev_samp(val) from foo;
> stddev_samp
> -------------------
> 2887.054977297105
>
> select weighted_stddev_samp(val,count) from foo2;
> weighted_stddev_samp
> ----------------------
> 2887.19919651336
>
> The 5th digit seems too early to be seeing round-off error.
Fixed down-thread.
Cheers,
David.
--
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david.fetter@gmail.com
Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: david@fetter.org, jeff.janes@gmail.com, kommi.haribabu@gmail.com, Jim.Nasby@bluetreble.com
Subject: Re: Weighted Stats
In-Reply-To: <20160408233152.GD15407@fetter.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox