Re: variance aggregate function incorrect? Reference Materials reg create aggregate

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Joseph Syjuco <joseph(at)asti(dot)dost(dot)gov(dot)ph>
Cc: postgres <pgsql-sql(at)postgresql(dot)org>
Subject: Re: variance aggregate function incorrect? Reference Materials reg create aggregate
Date: 2002-06-24 15:39:25
Message-ID: 18525.1024933165@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Joseph Syjuco <joseph(at)asti(dot)dost(dot)gov(dot)ph> writes:
> i needed the variance function ... i dont know if i introduced the wrong
> parameters or maybe this variance is not the variance that im looking
> for but it doesnt provide the right results

> variance=(nEx^2 - (Ex)^2)/(n(n-1))

That's what I'd expect it to do, all right. Please define "doesnt
provide the right results".

regards, tom lane

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2002-06-24 16:12:33 Re: assign count() result to a declared variable in plpgsql
Previous Message Joseph Syjuco 2002-06-24 15:25:30 assign count() result to a declared variable in plpgsql