Skip site navigation (1) Skip section navigation (2)

numeric stddev_pop and var_pop are wrong

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-bugs(at)postgreSQL(dot)org
Cc: student23 <student23(at)o2(dot)pl>
Subject: numeric stddev_pop and var_pop are wrong
Date: 2007-07-09 14:39:47
Message-ID: 9501.1183991987@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
When applied to "numeric" input, stddev_pop produces the same result as
stddev_samp, and var_pop produces the same result as var_samp.  This
is because whoever wrote numeric_stddev_internal() forgot that the
divisor is different for the sample case.  This mistake is in fact
visible in the regression test outputs for the function, so those
outputs weren't checked very carefully :-(

			regards, tom lane

Responses

pgsql-bugs by date

Next:From: Neil ConwayDate: 2007-07-10 06:10:55
Subject: Re: numeric stddev_pop and var_pop are wrong
Previous:From: Tom LaneDate: 2007-07-08 21:56:26
Subject: Re: BUG #3431: age() gets the days wrong

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group