linearRegressionSlope
linearRegressionSlope(
xValues,yValues):number
Defined in: regression.ts:15
Slope of the ordinary-least-squares line through paired xValues and
yValues.
Parameters
Section titled “Parameters”xValues
Section titled “xValues”readonly number[]
Independent-variable samples. Not modified.
yValues
Section titled “yValues”readonly number[]
Dependent-variable samples paired by index. Not modified.
Returns
Section titled “Returns”number
The slope, or 0 for fewer than two values — the same
underdetermined-input convention as sampleVariance.
Throws
Section titled “Throws”If xValues and yValues have different lengths.