LINEST (KnownYValues, KnownXValues?) LINEST (KnownYValues; KnownXValues?)

KnownYValues

The set of known vertical values. This array must have the same size as the KnownXValues parameter, if that parameter is provided.

KnownXValues

The set of known horizontal values. If provided, this array must have the same size as the KnownYValues parameter. If omitted, this parameter is assumed to be equivalent to SEQUENCE ( SIZE (knownYValues)) SEQUENCE ( SIZE (knownYValues)): { 1, 2, 3, ... }{ 1; 2; 3; ... }.

Returns

An array containing two values corresponding to m and b in the equation y = m * x + b , describing a straight line that best fits the given data.

Finds a straight line, y = m * x + b , that best fits the given data, and returns an array containing two values corresponding to m and b in the equation above. This function uses linear regression.

Example

LINEST ({ 4, 5, 6 }, { 130, 135, 140 })
LINEST ({ 4; 5; 6 }; { 130; 135; 140 })

Returns the array { 0.2, - 22 }{ 0,2; - 22 }.

fxEngine Shell Want this in your own terminal? A standalone version is coming. Get notified.
Loading fxEngine Shell