On 08/26/2013 06:22 AM, Yud wrote:
Hello guys i need your help for a quadratic function assignment. the question
reads as follow:
the sales figures for a business are as follow for the first six months of
the year:
40,000$, 44000$, 52000$, 64000$, 80000$, 84000$. the owner beleives that
the sales curve can be approximated by a quadratic function. find the best
quadratic fit to the data, and use it to estimate the projected sales for
the rest of the year.
If it was a quadratic function, its second derivative would be
constant. You can use octave to test that hypothesis:
a=[40000, 44000, 52000, 64000, 80000, 84000]
diff(diff(a)) returns 4000 4000 4000 -12000 so it's not
quite quadratic. You can fit the data using polyfit() but you should
think about the behavior of the data as seen from either the above
result or the fit plot: how valid is the estimate given that the
quadratic behavior seems to break down just as you are entering the
area you want to estimate in.
|