Quadratic regression is a type of multiple linear regression by which the equation of a parabola of 'best fit' is found for a set of data.
Draw a second degree polynomial with polynomial regression for the given data set.
x values | y values |
2 | 3 |
4 | 6 |
6 | 4 |
To find quadratic equation, coefficients of the quadratic equation
Count the given number of values (i.e), n = 3
Then find the following values
Σ x | Σ y | Σ x 2 | Σ x 3 | Σ x 4 | Σ xy | Σ x2y |
12 | 13 | 56 | 288 | 1568 | 54 | 252 |
Substitute the given values in the formula
Σ x x = [ Σ x 2 ] - [ ( Σ x )2 / n ]
Σ x x = [ 56 ] - [ 12 * 12 / 3 ]
Σ x x = 8
Σ x y = [ Σ x y ] - [ ( Σ x * Σ y ) / n ]
Σ x y = [ 54 ] - [ ( 12 * 13 ) / 3 ]
Σ x y = 2
Σ x x2 = [ Σ x 3 ] - [ ( Σ x 2 * Σ x ) / n ]
Σ x x2 = [ 288 ] - [ ( 56 * 12 ) / 3 ]
Σ x x2 = 64
Σ x2 y = [ Σ x 2 y] - [ ( Σ x 2 * Σ y ) / n ]
Σ x2 y = [ 252 ] - [ ( 56 * 13 ) / 3 ]
Σ x2 y = 9.333
Σ x2 x2 = [ Σ x 4 ] - [ ( Σ x 2 )2 / n ]
Σ x2 x2 = [ 1568 ] - [ 56 * 56 / 3 ]
Σ x2 x2 = 522.6666
Step 4:
Calculate the value of a
a = { [ Σ x2 y * Σ xx ] - [Σ xy * Σ xx2 ] } / { [ Σ xx * Σ x2x 2] - [Σ xx2 ]2 } a = { [ 9.333 * 8 ] - [ 2 * 64 ] } / { [ 8 * 522.6666 ] - [64 * 64 ]} a = { 74.664 - 128 }/{4181.33 - 4096 } a = - 53.36 / 85.33 a = - 0.625
Calculate the value of b
b = { [ Σ xy * Σ x2x2 ] - [Σ x2y * Σ xx2 ] } / { [ Σ xx * Σ x2x 2] - [Σ xx2 ]2 } b = { [ 2 * 522.6666 ] - [ 9.333 * 64 ] } / { [ 8 * 522.6666 ] - [ 64 * 64 ] } b = { 1045.333 - 597.312 } / { 4181.33 - 4096 } b = 448.012 / 85.33 b = 5.25
Calculate the value of c
c = [ Σ y / n ] - { b * [ Σ x / n ] } - { a * [ Σ x 2 / n ] } c = [ 13 / 3 ] - { 5.25 * [ 12 / 3 ] } - { - 0.625 * [ 56 / 3 ] } c = 4.333 - 21 + 11.66 c = - 5.0003
Substitute the value of a,b and c in the Quadratic Regression Equation,
y = a x^2 + b x + c y = - 0.625 x^2 + 5.25 x - 5.0003