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
| Input | Accepts | Required |
|---|---|---|
X | Series (a list of numbers) | Yes |
Y | Series (a list of numbers) | Yes |
Outputs
| Output | Produces |
|---|---|
Slope | Value (a single number) |
Intercept | Value (a single number) |
Predicted | Series (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.