# Statistical aggregates

This section includes functions related to statistical aggregates.

Some hyperfunctions are included in the default TimescaleDB product. For additional hyperfunctions, you need to install the Timescale Toolkit PostgreSQL extension. All of these aggregates are in the Timescale Toolkit. They provide a superset of functionality available with PostgreSQL statistical aggregates.

Statistical aggregates have one-dimensional (1D) aggregates which are
computed for a single variable, and two-dimensional (2D) or regression
aggregates which are computed over two variables. All 1D aggregates are
available for each of the 2D variables separately, this is denoted by `_y`

or `_x`

following the name.

For more information about statistical aggregate functions, see the hyperfunctions documentation.

Hyperfunction subfamily | Hyperfunction type | API call | Toolkit | Experimental |
---|---|---|---|---|

Statistical aggregates | Aggregate | `stats_agg` | âœ… | |

Accessor-1d | `average | average_y | average_x` | âœ… | ||

`kurtosis | kurtosis_y | kurtosis_x` | âœ… | |||

`num_vals` | âœ… | |||

`skewness | skewness_y | skewness_x` | âœ… | |||

`stddev | stddev_y | stddev_x` | âœ… | |||

`sum | sum_y | sum_x` | âœ… | |||

`variance | variance_y | variance_x` | âœ… | |||

Accessor-2d | `corr` | âœ… | ||

`covariance` | âœ… | |||

`determination_coeff` | âœ… | |||

`intercept` | âœ… | |||

`slope` | âœ… | |||

`x_intercept` | âœ… | |||

Rollup | `rolling` | âœ… | ||

`rollup` | âœ… |

Found an issue on this page?

Report an issue!