REGR_SLOPE Function | Regression Function | VantageCloud Lake - REGR_SLOPE - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
Language
English (United States)
Last Update
2024-04-03
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

Returns the slope of the univariate linear regression line through all non-null data pairs of the dependent and independent variable arguments.

Slope

The slope of the best fit linear regression is a measure of the rate of change of the regression of one independent variable on the dependent variable.

The plot of the linear regression on the variables is used to predict the behavior of the dependent variable from the change in the independent variable.

This computation assumes a linear relationship between the variables.

There can be a strong nonlinear relationship between independent and dependent variables, and the computation of the simple linear regression between such variable pairs does not reflect such a relationship.

Independent and Dependent Variables

An independent variable is a treatment: something that is varied under your control to test the behavior of another variable.

A dependent variable is something that is measured in response to a treatment.

For example, you may want to test the ability of promotions to enhance sales of an item.

The promotion is the independent variable and the sales of the item made as a result of the individual promotion is the dependent variable.

Computation

When there are fewer than two non-null data point pairs in the data used for the computation, then REGR_SLOPE returns NULL.

Division by zero returns NULL rather than an error.

ANSI Compliance

This statement is ANSI SQL:2011 compliant.