Power law when x = 0, but actual y is greater than zero

33 Views Asked by At

I am trying to fit various equations to my data. It looks like the derivative of a power law model ($y=ax^b$) will work pretty well. So an equation of the form:

$$y=abx^{(b-1)}$$

However, I am unclear as to what happens when $x = 0$. From the equation, $y = 0$, but once $x>0$, by a reasonable amount, the equation works pretty well. The problem I am having is that at $x=0$, there is a value for y (it is not zero). How does one handle this situation? How can I fit a power law equation when the value for y is greater than zero when $x = 0$.

1

There are 1 best solutions below

1
On

I can think of two approaches: for one, model your data with a piecewise function

$$ f(x) = \begin{array}{cc} \Bigg\{ & \begin{array}{cc} abx^{b-1} & x> 0 \\ g(x) & x = 0\\ \end{array} \end{array} $$

where $g(x)$ is some other function.

Secondly, consider that fitting your data perfectly with some function is not usually the goal (depending on your application). Data is usually accompanied by error, natrual variation, and outliers can occur as well. Trying to fit each data point perfectly can lead to overfitting at which point your model is increasingly worthless. It may be worthwhile to explore, explain, and/or speculate as to why your data don't fit well instead of trying to force a model to fit it. It is hard to say anything more than generalities because you don't provide much detail on your situation.