Details
-
Sub-task
-
Status: Resolved
-
Major
-
Resolution: Later
-
3.0.0
-
None
-
None
Description
Function | Argument Type | Return Type | Partial Mode | Description |
---|---|---|---|---|
corr(Y, X) | double precision | double precision | Yes | correlation coefficient |
covar_pop(Y, X) | double precision | double precision | Yes | population covariance |
covar_samp(Y, X) | double precision | double precision | Yes | sample covariance |
regr_avgx(Y, X) | double precision | double precision | Yes | average of the independent variable (sum({{X)/N}}) |
regr_avgy(Y, X) | double precision | double precision | Yes | average of the dependent variable (sum({{Y)/N}}) |
regr_count(Y, X) | double precision | bigint | Yes | number of input rows in which both expressions are nonnull |
regr_intercept(Y, X) | double precision | double precision | Yes | y-intercept of the least-squares-fit linear equation determined by the (X, Y) pairs |
regr_r2(Y, X) | double precision | double precision | Yes | square of the correlation coefficient |
regr_slope(Y, X) | double precision | double precision | Yes | slope of the least-squares-fit linear equation determined by the (X, Y) pairs |
regr_sxx(Y, X) | double precision | double precision | Yes | sum({{X^2) - sum(X)^2/N}} (“sum of squares” of the independent variable) |
regr_sxy(Y, X) | double precision | double precision | Yes | sum({{X*Y) - sum(X) * sum(Y)/N}} (“sum of products”of independent times dependent variable) |
regr_syy(Y, X) | double precision | double precision | Yes | sum({{Y^2) - sum(Y)^2/N}} (“sum of squares” of the dependent variable) |
https://www.postgresql.org/docs/11/functions-aggregate.html#FUNCTIONS-AGGREGATE-STATISTICS-TABLE