How this calculator works
Fit a third-degree polynomial including all lower powers and an intercept. A cubic can describe a change in curvature, but extra flexibility can fit noise. At least four distinct predictor values are required. Residual standard deviation uses n - 4 degrees of freedom; an exactly determined fit has no such variance estimate.
Formula
ŷ = b0 + b1x + b2x² + b3x³; minimise Σ(y - ŷ)².
Worked example
Points at x = -2, -1, 0, 1, 2 with y = -8, -1, 0, 1, 8 fit y = x³. The prediction at x = 3 is 27.
Advertisement
Frequently asked questions
Can a cubic have two turning points?
Yes, depending on the coefficients of its derivative. It can also be monotonic.
Why keep the lower powers?
A full cubic model includes intercept, linear and quadratic terms. Dropping them imposes additional constraints.
Is cubic extrapolation reliable?
High powers can grow quickly outside the observed range. A good fit within the data is not evidence for distant predictions.