Is this business graph an exponential or polynomial function?

  • #1
Summary:
exponential or polynomial function
GRAPH WITH VALUES:
Sorry I have a small dilema, I don't know if this is a exponential or polynomial function. I'd think its exponential but it doesn't have same change of factors.
 

Answers and Replies

  • #2
15,565
13,677
It looks exponential, but with only finitely many points given, you can always find a polynomial through those points. Such a polynomial would be of degree nine in your case.
 
  • Like
Likes docnet and jorgevf200002
  • #3
docnet
Gold Member
394
181
It looks exponential, but with only finitely many points given, you can always find a polynomial through those points. Such a polynomial would be of degree nine in your case.
May I ask how in the world you knew the polynomial would be of degree nine?
 
  • #4
15,565
13,677
May I ask how in the world you knew the polynomial would be of degree nine?
We have ten points ##(x_0,y_0)##. Each gives a linear equation ##y_0=a_0+a_1x_0+a_2x_0^2+\ldots+a_nx_0^n##. Thus I have ##10## linear equations in the unknowns ##a_0,a_1,\ldots,a_n##. With ##n=9## we get ##10## equations and ##10## variables in a linear system. The chances that the coefficient matrix is not regular are practically zero.
 
  • #5
35,302
7,173
To elaborate on what @fresh_42 said, if you have two points, a linear polynomial (degree 1) can be fitted; with three points, a quadratic polynomial (degree 2) can be fitted. In general, if there are N points, a polynomial of degree N - 1 can be fitted.
 
  • #6
Svein
Science Advisor
Insights Author
2,191
731
A standard way of testing if the graph is more or less exponential:
  1. Take the logs of all the values
  2. Find the best least-squares line through the logs
  3. (Check the "goodness of fit", r2)
  4. Calculate a new set of values from the least-square formula
  5. Take exponentials of the new values
  6. Plot the originals and the calculated new values in the same graph
  7. See if it looks promising
Remember: All measured data contain noise - even if you suspect a perfect fit, you will not get it.
 
  • Like
  • Informative
Likes DaveE, hutchphd, berkeman and 2 others
  • #7
Office_Shredder
Staff Emeritus
Science Advisor
Gold Member
4,699
685
The data is obviously a little noisy - we wouldn't require an exponential curve to literally pass through all the points, so we shouldn't require a polynomial to do so either. A degree four or five polynomial might fit it really well.

That said, you almost certainly want the exponential fit. The polynomial you fit is going to do pretty random stuff to the left and right of your data, the exponential will keep growing in an increasingly steep curve which is probably correct. Since the graph is in excel, I think you can just get it to graph best fit polynomials and exponentials for you to see what they look like.

That said, the slope looks like it might hit zero at 0, so maybe this is really just a quadratic polynomial (which should have better extrapolation properties).
 
  • #8
berkeman
Mentor
60,601
10,916
Summary:: exponential or polynomial function

GRAPH WITH VALUES:
Sorry I have a small dilema, I don't know if this is a exponential or polynomial function. I'd think its exponential but it doesn't have same change of factors.
BTW @jorgevf200002 -- Is this a schoolwork question? Your "Sales vs. Year" graph looks like it's from a course, not from your business...
 
  • #9
15,565
13,677
BTW @jorgevf200002 -- Is this a schoolwork question? Your "Sales vs. Year" graph looks like it's from a course, not from your business...
I think neither. My guess is, that it is either a wet dream or a business plan for the bankers.
 
  • Like
Likes SammyS and berkeman
  • #10
BWV
1,018
1,066
Exponential growth is the standard model for this sort of stuff, have never seen a polynomial sales projection
 
  • #11
OmCheeto
Gold Member
2,191
2,644
I'm not really sure why it can't be both, as when I find the log values as recommended by Svein in post #6, I get a curve.
The R2 values are interesting in that it appears to be better fit by a quadratic curve than a system generated exponential curve.
type of curve
exponential
0.8018​
quadratic
0.9941​
quadratic exponential
0.9966​
 
Last edited:
  • #12
jrmichler
Mentor
1,630
1,872
When curve fitting, I normally use a spreadsheet to find the mathematical curve. Excel has a good solver, but LibreOffice does not, so I use a manual gradient search to minimize the sum squared error. I also like to plot the mathematical curve on top of the experimental data. An example quadratic fit for the data in the OP:
Quadratic.jpg


I next tried an equation of the form ##Y = A*X^n##, where both A and n are variables. This one has two variables, so it took about ten minutes to iterate both A and n. The optimal approach is to choose a value for n, then iterate A for minimum sum square error (SSErr in spreadsheet). Choose a new n, repeat. The results:
Polynomial.jpg


The table in rows 18 to 21 shows the effect of iterating the exponent. It would be easy to get another decimal place of accuracy in the exponent, but the resulting decrease in error would be minimal. I also see no need to add additional terms to this equation.

The same approach is easily adaptable to exponential, trigonometric, or other forms. Although more than two variables can be challenging to curve fit by manual methods. I like this method because I have direct visual evidence of the quality of the curve fit, it can be done with any spreadsheet, and it's easy.
 
  • Like
Likes OmCheeto and berkeman
  • #13
BWV
1,018
1,066
However this is a ‘business graph’ so if the number is, say, revenue you trivially know what the function is - sum(all sales in the business for the year). Sales then is a result of all the business operations - marketing, ops etc. Its trivial, but important to remember the reality behind the numbers and how crude an approximation will be by any simple equation

given that sales, or any other metric measuring growth in dollars is going to be heteroskedastic, a good first step is to take differences, maybe regressing on the log change - you then have linearized the data and OLS works fine. You can then add other explanatory variables if needed

Logically, it has to be some sort of logistic function - exponential in the early growth stages then flattening out as the business matures
 
Last edited:
  • #14
FactChecker
Science Advisor
Gold Member
6,577
2,644
The rate of growth increases like an exponential function. You can graph the logarithm of the Y values. If they lie on a straight line, then the original data are exponential.
 
  • #15
jrmichler
Mentor
1,630
1,872
I tried an exponential function on the data in the OP, ##Y = Ae^{X/B}##. That did not fit well, so I subtracted the A value: ##Y = -A + Ae^{X/B}## to force the equation to start at 0, 0. The optimized results of both of these equations are plotted below.
Exponential.jpg

Summarizing the equations and sum of square errors for the above curve fits:
Equation ................ SSError
##Y = X^2## ... ....... 10,522,000
## Y = AX^n## ... .......... 512,000
##Y = Ae^{X/B}##......... 2,191,000
##Y = -A + Ae^{X/B}##... 1,427,000

It looks like the polynomial of degree 3.2 is by far the best fit.

But simple curve fitting is (usually) not the best way to fit curves to data. The best way is to start by looking for the math underlying the original data. If the original data is from population growth with exponential basis, then the curve fit should be exponential, even if a polynomial would better fit the data.
 
Last edited:
  • #16
21,493
4,875
Have Excel plot the data using a log scale for the ordinate and see what you get.
 
  • Like
Likes FactChecker
  • #17
FactChecker
Science Advisor
Gold Member
6,577
2,644
Have Excel plot the data using a log scale for the ordinate and see what you get.
I agree. That would be my first recommendation.
Here is what I got from an R program:
plotOfLogYasFunctionOfX.png


Residuals:
Min 1Q Median 3Q Max
-0.39081 -0.11329 0.07758 0.14110 0.26229

Coefficients:
Estimate Std. Error t value
(Intercept) 4.06994 0.16508 24.65
x 0.56936 0.02661 21.40
Pr(>|t|)
(Intercept) 7.83e-09 ***
x 2.39e-08 ***
---
Signif. codes:
0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.2417 on 8 degrees of freedom
Multiple R-squared: 0.9828, Adjusted R-squared: 0.9807
F-statistic: 458 on 1 and 8 DF, p-value: 2.392e-08
 
  • #18
21,493
4,875
I agree. That would be my first recommendation.
Here is what I got from an R program:
View attachment 288734

Residuals:
Min 1Q Median 3Q Max
-0.39081 -0.11329 0.07758 0.14110 0.26229

Coefficients:
Estimate Std. Error t value
(Intercept) 4.06994 0.16508 24.65
x 0.56936 0.02661 21.40
Pr(>|t|)
(Intercept) 7.83e-09 ***
x 2.39e-08 ***
---
Signif. codes:
0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.2417 on 8 degrees of freedom
Multiple R-squared: 0.9828, Adjusted R-squared: 0.9807
F-statistic: 458 on 1 and 8 DF, p-value: 2.392e-08
Excel will do it automatically for you. All that needs to be done is to switch the vertical axis to a logarithmic scale with a single click.
 
  • Like
Likes FactChecker

Related Threads on Is this business graph an exponential or polynomial function?

Replies
4
Views
13K
Replies
1
Views
1K
Replies
3
Views
1K
Replies
4
Views
20K
  • Last Post
Replies
5
Views
2K
Replies
3
Views
2K
Replies
1
Views
5K
  • Last Post
Replies
3
Views
1K
  • Last Post
Replies
6
Views
2K
Replies
4
Views
2K
Top