What is Quadratic regression?
Quadratic regression is a type of regression analysis used to model the relationship between a dependent variable and an independent variable when the relationship is not linear but curved.
It is also known as second-order regression analysis as it involves fitting a polynomial equation to the data, which can be described by a quadratic equation.
How does Quadratic Regression Work?
In quadratic regression, a quadratic equation is used to model the relationship between the dependent and independent variables. A quadratic equation is a polynomial equation of the second degree, which can be written in the form:
y = a + bx + cx^{2}
Where:
- “y” is the dependent variable,
- “x” is the independent variable, and
- a, b, and c are the coefficients of the quadratic equation.
The goal of quadratic regression is to find the values of a, b, and c that minimize the difference between the predicted values of y and the actual values of y. This is done using a method called the least squares method, which involves minimizing the sum of the squared differences between the predicted and actual values of y.
Formula:
The formula for the quadratic regression is,
a = ȳ - bx̄ - cx̄^{2}
b = S _{xy} S _{x }^{2}_{ x }^{2}_{ }- S _{x }^{2}_{ y }S _{xx }^{2 }/ S _{xx} S_{x}^{2}_{x }^{2} - (S _{xx }^{2}_{)} ^{2}
c = S _{x }^{2}_{ y }S _{xx} - S _{xy} S _{xx }^{2} / S _{xx} S _{x }^{2}_{ x }^{2}_{ }- (S _{xx }^{2}_{)} ^{2}
- x and y: The Variables
- a, b, and c: The Coefficients of the Quadratic Equation
- Σ x= Sum of First Scores
- Σ y = Sum of Second Scores
Advantages and Disadvantages of Quadratic Regression
Quadratic regression has several advantages and disadvantages that should be considered before using it.
Some of the advantages include:
- Quadratic regression can capture nonlinear patterns in the data that linear regression cannot.
- It provides a more accurate representation of the data when the relationship between the dependent and independent variables is nonlinear.
- It allows for better predictions of outcomes when there is a curved relationship between the variables.
Some of the disadvantages of quadratic regression include:
- It is more complex than linear regression and requires more computation.
- Quadratic regression assumes that the relationship between the dependent and independent variables is quadratic, which may not always be the case.
- It can be prone to overfitting, which occurs when the model fits too closely to the training data and does not generalize well to new data.
When should Quadratic Regression be used?
Quadratic regression should be used when there is a curved or nonlinear relationship between the dependent and independent variables. It can also be used when the relationship between the variables is not well represented by a linear equation.
Quadratic regression can be particularly useful in fields such as finance, engineering, and physics, where nonlinear relationships are common.
Example section:
In this section, we'll cover the method of calculating the quadratic regression.
Example 1:
Determine the quadratic regression equation of the following data set point.
X= 15, 14, 18, 13, 19, 20
Y = 23, 45, 9, 10, 16, 17
Solution:
Step 1: Extract the data
X= 15, 14, 18, 13, 19, 20
Y = 23, 45, 9, 10, 16, 17
Step 2: Calculate mean
Mean for Dataset X:
X (Mean)= 99 / 6
X = 16.5
Mean for Dataset Y:
Y (Mean)= 120 / 6
Y = 20
Step 3: Draw the table
S _{xx} | S _{xy} | S _{xx }^{2} | S _{x }^{2}_{ x }^{2} | S _{x }^{2}_{ y} |
2.25 | -4.5 | 81.251 | 2934.064 | -162.501 |
6.25 | -62.5 | 207.918 | 6916.75 | -2079.175 |
2.25 | -16.5 | 67.25 | 2009.998 | -493.163 |
12.25 | 35 | 385.585 | 12136.768 | 1101.67 |
6.25 | -10 | 204.583 | 6696.64 | -327.332 |
12.25 | -10.5 | 422.916 | 14600.614 | -362.499 |
∑S_{xx} = 41.5 | ∑S_{xy} = -69 | ∑S_{xx}^{2}_{ }= 1369 | ∑S_{x}^{2}_{x}^{2}_{ }= 45294.8 | ∑S_{x}^{2}_{y }= -2323 |
Step 4: Calculate the values of a, b, c
b = S _{xy} S _{x }^{2}_{ x }^{2}_{ }- S _{x }^{2}_{ y }S _{xx }^{2 }/ S _{xx} S_{x}^{2}_{x }^{2} - (S _{xx }^{2}_{)} ^{2}
b = (-69) (45294.833) - (-2323) (1369.5) / (41.5) (45294.833) - (1369.5) ^{2}
b = 13.31761245693
c = S _{x }^{2}_{ y }S _{xx} - S _{xy} S _{xx }^{2} / S _{xx} S _{x }^{2}_{ x }^{2}_{ }- (S _{xx }^{2}_{)} ^{2}
c = (-2323) (41.5) - (-69) (1369.5) / (41.5) (45294.833334) - (1369.5)^{2}
c = -0.4539
a = ȳ - bx̄ - cx̄^{2}
a = 20 - (13) (16.5) - (-0.4539) (279.167)
a = -73.013481373086
Step 5:
Formula For Quadratic Regression:
y = ax ^{2} + bx + c, where a ≠ 0
y = (-73.0135) x ^{2} + (13.3176) x + (-0.4539)