mirror of
https://github.com/postgres/postgres.git
synced 2026-03-17 16:12:13 -04:00
40 lines
1 KiB
Text
40 lines
1 KiB
Text
|
|
Statistical aggregate functions for PostgreSQL.
|
||
|
|
|
||
|
|
This module provides some aggregate functions for statistical
|
||
|
|
mathematics. A new datatype holding two double precision
|
||
|
|
floating point values is required by them.
|
||
|
|
|
||
|
|
The aggregates are:
|
||
|
|
|
||
|
|
average(float8) average value computed by
|
||
|
|
|
||
|
|
n
|
||
|
|
___
|
||
|
|
_ 1 \
|
||
|
|
x = --- > x
|
||
|
|
n /__ i
|
||
|
|
i=1
|
||
|
|
|
||
|
|
|
||
|
|
variance(float8 variance computed by
|
||
|
|
|
||
|
|
n
|
||
|
|
___
|
||
|
|
2 1 \ _ 2
|
||
|
|
s = --- > (x - x)
|
||
|
|
n-1 /__ i
|
||
|
|
i=1
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
stddev(float8) standard deviation computed by
|
||
|
|
|
||
|
|
_____
|
||
|
|
/ 2
|
||
|
|
s = / s
|
||
|
|
\/
|
||
|
|
|
||
|
|
|
||
|
|
--
|
||
|
|
Jan Wieck <JanWieck@Yahoo.com>
|