Rekenmachine voor kwadratische regressie
Vind stap voor stap de best passende parabolen
De rekenmachine vindt de best passende kwadratische functie voor de gegeven set gepaarde gegevens met behulp van de methode van de kleinste kwadraten, waarbij de stappen worden getoond.
Gerelateerde rekenmachines: Rekenmachine voor lineaire regressie, Kubische regressierekenmachine
Uw invoer
Bepaal de best passende parabool voor $$$\left\{\left(1, 0\right), \left(4, 5\right), \left(6, 2\right), \left(7, 1\right), \left(3, -3\right)\right\}$$$.
Oplossing
Het aantal waarnemingen is $$$n = 5$$$.
Genereer de volgende tabel:
| $$$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$$$ |
$$$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}$$$
De best passende parabool is $$$y = a x^{2} + b x + c$$$.
Dus is de best passende parabool $$$y = - \frac{3 x^{2}}{22} + \frac{3 x}{2} - \frac{25}{11}$$$.
Antwoord
De best passende parabool 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