108 High-Function Business Intelligence in e-business
The following considerations apply to regression functions:
? The input for all of the regression functions must be numeric.
? The output of REGR_COUNT is integer and all the remaining functions output
in double-precision floating point.
? The regression functions are all computed simultaneously during a single
pass through the data set.
? If the input set is not empty, and after elimination of the null pairs:
– VARIANCE(
expression2
) is positive, then REGR_COUNT returns the
number of non-null pairs in the set, and the remaining functions return
results that are defined in Table 3-2.
– VARIANCE(expression2) is equal to zero, then the regression line either
has infinite slope or is undefined. In this case, the functions
REGR_SLOPE, REGR_INTERCEPT, and REGR_R2 each return a null
value, and the remaining functions return values defined in Table 3-2.
? If the input set is empty, REGR_COUNT returns zero, and the remaining
functions return a null value.
Important: Each function is applied to the set of values derived from the input
numeric pairs (
expression1
,
expression2
) by the elimination of all pairs for
which either
expression1
or
expression2
is null. In other words, both values
must be non-null to be considered for the function.
Attention:
expression1
corresponds to the Y variable and
expression2
corresponds to the X variable.