簡單線性回歸解答,答案 Y = a + bX
b = (10*546 - 52*39) / (10*696 - 52^2) = 1.95
a = -15.6
答案: Y = -15.6 + 1.95 * X
曲線線性回歸解答,答案 Y = AX^2 + BX + C
134688A + 9568B + 696C = 7796
9568A + 696B + 52C = 546
696A + 52B + 4C = 39
答案: Y = - 0.0625X^2 + 3.575X - 25.85
項次 | X | Y | X^2 | XY | Y^2 | X^2Y | X^3 | X^4 |
---|---|---|---|---|---|---|---|---|
1 | 10 | 3 | 100 | 30 | 9 | 300 | 1000 | 10000 |
2 | 12 | 10 | 144 | 120 | 100 | 1440 | 1728 | 20736 |
3 | 14 | 10 | 196 | 140 | 100 | 1960 | 2744 | 38416 |
4 | 16 | 16 | 256 | 256 | 256 | 4096 | 4096 | 65536 |
合計 | 52 | 39 | 696 | 546 | 465 | 7796 | 9568 | 134688 |