数学关于least squares linear regression的题

来源:百度知道 编辑:UC知道 时间:2024/05/09 06:56:51
when purchased, an automobile is valued at $1500. Its value depreciates at the rate shown in the table below. Based on a least squares linear regression, what is the value , to the nearest hundred dollars, of the automobile when t=4?

time t 0 1 2 5
(years)

value v(t) 15000 13000 10900 3000
(dollars)
怎么算的怎么算的
大恩人快救救我~~

最小二乘法拟合数据:
我当时是是把你给的数据(年限和折旧价)输入绘图分析软件Origin,然后让它自动拟合的,所以很快得出结果了。
如果要自己算的话,也不难,公式是:
(t的各数值平方和)*a+(v的各数值平方和)*b=(各v*t数值积之和)
(t求和)*a+nb=(v求和) 其中n是数据量
对于本题,n=4
然后解上面这两式组成的一元二次方程组就行了,所得的a、b就是系数:
v=at+b

就是有点繁,所以我没手算。

算出来了 5600$
v=15332.14286-2428.57143t

当t=4时,有 v=5617.85714≈5600