Quadratic Regression Calculator
Find parabolas of best fit step by step
The calculator will find the quadratic of best fit for the given set of paired data using the least squares method, with steps shown.
Related calculator: Linear Regression Calculator
Your Input
Find the parabola of best fit for $$$\left\{\left(1, 0\right), \left(4, 5\right), \left(6, 2\right), \left(7, 1\right), \left(3, -3\right)\right\}$$$.
Solution
The number of observations is $$$n = 5$$$.
Generate the following table:
$$$x$$$ | $$$y$$$ | $$$x y$$$ | $$$x^{2}$$$ | $$$x^{2} y$$$ | $$$x^{3}$$$ | $$$x^{4}$$$ | $$$y^{2}$$$ | |
$$$1$$$ | $$$0$$$ | $$$0$$$ | $$$1$$$ | $$$0$$$ | $$$1$$$ | $$$1$$$ | $$$0$$$ | |
$$$4$$$ | $$$5$$$ | $$$20$$$ | $$$16$$$ | $$$80$$$ | $$$64$$$ | $$$256$$$ | $$$25$$$ | |
$$$6$$$ | $$$2$$$ | $$$12$$$ | $$$36$$$ | $$$72$$$ | $$$216$$$ | $$$1296$$$ | $$$4$$$ | |
$$$7$$$ | $$$1$$$ | $$$7$$$ | $$$49$$$ | $$$49$$$ | $$$343$$$ | $$$2401$$$ | $$$1$$$ | |
$$$3$$$ | $$$-3$$$ | $$$-9$$$ | $$$9$$$ | $$$-27$$$ | $$$27$$$ | $$$81$$$ | $$$9$$$ | |
$$$\sum$$$ | $$$21$$$ | $$$5$$$ | $$$30$$$ | $$$111$$$ | $$$174$$$ | $$$651$$$ | $$$4035$$$ | $$$39$$$ |
The parabola of best fit is $$$y = a x^{2} + b x + c$$$.
$$$a = \frac{(n(\sum x^2y)-(\sum x^2)(\sum y))(n(\sum x^2)-(\sum x)^2)-(n(\sum xy)-(\sum x)(\sum y))(n(\sum x^3)-(\sum x^2)(\sum x)))}{(n(\sum x^4)-(\sum x^2)^2)(n(\sum x^2)-(\sum x)^2)-(n(\sum x^3)-(\sum x^2)(\sum x))^2} = \frac{\left(5 \cdot 174 - \left(111\right)\cdot \left(5\right)\right)\cdot \left(5 \cdot 111 - 21^{2}\right) - \left(5 \cdot 30 - \left(21\right)\cdot \left(5\right)\right)\cdot \left(5 \cdot 651 - \left(111\right)\cdot \left(21\right)\right)}{\left(5 \cdot 4035 - 111^{2}\right)\cdot \left(5 \cdot 111 - 21^{2}\right) - \left(5 \cdot 651 - \left(111\right)\cdot \left(21\right)\right)^{2}} = - \frac{3}{22}$$$
$$$b = \frac{(n(\sum xy)-(\sum x)(\sum y))(n(\sum x^4)-(\sum x^2)^2)-(n(\sum x^2y)-(\sum x^2)(\sum y))(n(\sum x^3)-(\sum x^2)(\sum x)))}{(n(\sum x^4)-(\sum x^2)^2)(n(\sum x^2)-(\sum x)^2)-(n(\sum x^3)-(\sum x^2)(\sum x))^2} = \frac{\left(5 \cdot 30 - \left(21\right)\cdot \left(5\right)\right)\cdot \left(5 \cdot 4035 - 111^{2}\right) - \left(5 \cdot 174 - \left(111\right)\cdot \left(5\right)\right)\cdot \left(5 \cdot 651 - \left(111\right)\cdot \left(21\right)\right)}{\left(5 \cdot 4035 - 111^{2}\right)\cdot \left(5 \cdot 111 - 21^{2}\right) - \left(5 \cdot 651 - \left(111\right)\cdot \left(21\right)\right)^{2}} = \frac{3}{2}$$$
$$$c = \frac{(\sum y)-b(\sum x)-a(\sum x^2)}{n} = \frac{5 - \left(\frac{3}{2}\right)\cdot \left(21\right) - \left(- \frac{3}{22}\right)\cdot \left(111\right)}{5} = - \frac{25}{11}$$$
Thus, the parabola of best fit is $$$y = - \frac{3 x^{2}}{22} + \frac{3 x}{2} - \frac{25}{11}$$$.
Answer
The parabola of best fit is $$$y = - \frac{3 x^{2}}{22} + \frac{3 x}{2} - \frac{25}{11}\approx - 0.136363636363636 x^{2} + 1.5 x - 2.272727272727273.$$$A