Skip to content

linearRegressionSlope

linearRegressionSlope(xValues, yValues): number

Defined in: regression.ts:15

Slope of the ordinary-least-squares line through paired xValues and yValues.

readonly number[]

Independent-variable samples. Not modified.

readonly number[]

Dependent-variable samples paired by index. Not modified.

number

The slope, or 0 for fewer than two values — the same underdetermined-input convention as sampleVariance.

If xValues and yValues have different lengths.