Statistical

Regression

Fits a straight trend line through two columns of numbers and tells you how steeply one moves with the other. It returns the slope (how much Y changes for each one-unit change in X), the intercept (the Y value when X is zero), and a Predicted column holding the trend line's value at each row, ready to chart against the actuals. Both columns must have the same number of rows.

Inputs

InputAcceptsRequired
XSeries (a list of numbers)Yes
YSeries (a list of numbers)Yes

Outputs

OutputProduces
SlopeValue (a single number)
InterceptValue (a single number)
PredictedSeries (a list of numbers)

Example

The Shipments table has Units_Sold (X) and Shipping_Cost (Y) for 30 months. The fit comes back with a slope of 12.40 and an intercept of 8,500: each additional unit adds about $12.40 of shipping, on top of roughly $8,500 of fixed cost per month. Plot the actuals on a ScatterPlot and overlay Predicted to see which months ran meaningfully above or below the trend.

Related nodes