help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: am stuck with quadratic function


From: Przemek Klosowski
Subject: Re: am stuck with quadratic function
Date: Tue, 27 Aug 2013 10:44:02 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8

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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]