REGR_AVGY

REGR_AVGY is a function in SQL that calculates the average of the dependent variable in a linear regression model. The function assists in providing statistical data analysis on specified table columns. It returns the calculated average as a double precision value.

REGR_AVGY(expression1, expression2)

  • expression1: This parameter represents the independent variable, it is the input for the REGR_AVGY function in Oracle. Typically, it can be any numeric datatype or any nonnumeric datatype that can be implicitly converted to a numeric datatype.
  • expression2: This is the dependent variable parameter in the REGR_AVGY function. Similar to expression1, it can be of any numeric type, or a nonnumeric type that can be implicitly converted to a numeric datatype. The function computes the average of this parameter value over the group of rows as specified by the GROUP BY clause.

Example

SELECT REGR_AVGY(column1, column2) FROM Table;

Output

REGR_AVGY(column1, column2)
0.75

Explanation

REGR_AVGY calculates the average of the dependent variable (column1 in the example) in the regression line. In this case, the result 0.75 is the average of column1 values.

For in-depth explanations and examples SQL keywords where you write your SQL, install our extension.