In: Math
x | 1 | 2 | 3 | 4 | 5 | 6 |
---|---|---|---|---|---|---|
y | 608 | 619 | 674 | 672 | 676 | 721 |
Use exponential regression to find an exponential function that
best fits this data.
f(x) =
Use linear regression to find an linear function that best fits
this data.
g(x) =
a) Let the equation of the curve is : y = axb.
Taking log10 on both sides, we get, log10y = log10a + b*log10x
Let us set v = log10y and u = log10x and let the curve is transferred to v = A+Bu.
Therefore, S =
Thus the normal equations are :
6A+B =
A+B = ........................(i)
x | y | u | v | u2 | uv |
1 | 608 | 0 | 2.783903579 | 0 | 0 |
2 | 619 | 0.301029995 | 2.791690649 | 0.090619058 | 0.840382624 |
3 | 674 | 0.477121254 | 2.828659897 | 0.227644691 | 1.349613759 |
4 | 672 | 0.602059991 | 2.827369273 | 0.362476233 | 1.70224592 |
5 | 676 | 0.698970004 | 2.829946696 | 0.488559067 | 1.978047854 |
6 | 721 | 0.77815125 | 2.857935265 | 0.605519368 | 2.2239059 |
2.857332496 | 16.91950536 | 1.774818419 | 8.094196057 |
Thus, by equation (i), we have,
6A+(2.857332496)B = (16.91950536)
(2.857332496)A+(1.774818419)B = (8.094196057)
Solving we get, A = 2.777649203 and B = 0.088757657
Therefore, the curve is : v = (2.777649203) + (0.088757657)u
i.e., y = (599.3067967)*x(1.226754492)
i.e., f(x) = (599.3067967)*x(1.226754492)
b) Let the equation of the curve is : y = A+Bx
Then, S =
Thus the normal equations are :
6A+B =
A+B = ........................(i)
x | y | x2 | xy |
1 | 608 | 1 | 608 |
2 | 619 | 4 | 1238 |
3 | 674 | 9 | 2022 |
4 | 672 | 16 | 2688 |
5 | 676 | 25 | 3380 |
6 | 721 | 36 | 4326 |
21 | 3970 | 91 | 14262 |
Thus, by equation (i), we have,
6A+21B = 3970
21A+91B= 14262
Solving we get, A = 588.2666667 and B = 20.97142857
Therefore, the curve is : y = (588.2666667)+(20.97142857)x
i.e., g(x) = (588.2666667)+(20.97142857)x