Polynomial Regression: When to Use Degree 2 (Quadratic) vs. Degree 3 (Cubic) with Real-World Examples
Polynomial regression is a powerful machine learning technique used to model non-linear relationships between variables. Unlike linear regression, which assumes a straight-line relationship, polynomial regression fits a curved trend line to the data.
In this tutorial, we will explore when to use quadratic regression (degree 2) and cubic regression (degree 3) with real-world examples, datasets, and graphical representations.
Polynomial regression is useful when the relationship between variables is non-linear. The choice of degree depends on how complex the curve needs to be.
How do you choose the degree of a polynomial regression?
Use Degree 2 (Quadratic) When:
- The data follows a U-shape or inverted U-shape (parabolic trend).
- The rate of change increases or decreases but doesn’t have multiple turning points.
- The relationship is simple but non-linear.
Use Degree 3 (Cubic) When:
- The data has multiple turning points (S-shaped or wave-like pattern)
- The relationship changes direction more than once.
- The pattern is more complex and cannot be captured by a quadratic function.

Example 1: Car Speed vs. Braking Distance (Quadratic- Degree 2)
Why Degree 2?
Braking distance increases at a non-constant rate as speed increases. The relationship follows a parabolic trend.
| Speed (km/h) | Braking Distance (m) |
|---|---|
| 10 | 2 |
| 20 | 6 |
| 30 | 12 |
| 40 | 20 |
| 50 | 30 |
| 60 | 42 |
Quadratic Regression Formula:
Distance=a⋅(Speed)2+b⋅(Speed)+c
There are no multiple turning points (humps). A quadratic curve is sufficient.
Example 2: Age vs. Happiness Level (Cubic- Degree 3)
Why Degree 3?
Happiness varies at different life stages:
- Young Age: People are happy.
- Middle Age: Happiness drops due to responsibilities.
- Old Age: Happiness increases again after retirement.
| Age (Years) | Happiness Score (0-100) |
|---|---|
| 10 | 80 |
| 25 | 70 |
| 40 | 50 |
| 60 | 65 |
| 80 | 85 |
Cubic Regression Formula:
Happiness=a⋅(Age)3+b⋅(Age)2+c⋅(Age)+d
A quadratic equation would miss the second turning point (increase in happiness in old age). A cubic model is better.