Aggregates Aggregate

regr_intercept()

Returns the intercept of the univariate linear regression line for non-null pairs in a group.

Arguments & returns

regr_intercept(y, x)

Aggregate
Overload link yx Returns
#01 DOUBLEDOUBLE DOUBLE

Example

regr_intercept example
SQL
Haybarn WASM 1.5.5-rc3 · In your browser

Engine example with sample data · Run to view results.

Catalog examples

SELECT
  AVG(y) - REGR_SLOPE(y, x) * AVG(x);