Suppose you have a scatter plot of datapoints (x, y) from a simulation or experiment, and you want to either find out the underlying relationship between x and y, or perhaps, test to see if the data obeys a certain theoretically derived power-law relationship.
For concreteness, suppose theory suggests that \(y = bx^n\), with \(n=2\). You don't know the true \(b\) (which, let us suppose is 1), and you want to test whether the data obeys a quadratic power-law relation.
If this is what your raw data looks like:
The natural thing to do, of course, would be to look at the same data, through the lens of a log-log plot.When you do so, and compare the data with a line of slope 2 (to test \(n = 2\)?), you conclude that the data does indeed obey the theoretical power-law.
Why does this work? The slope,\[\frac{d \log y}{d \log x} = \frac{x}{y} \frac{dy}{dx} = \frac{x}{bx^n} n bx^{n-1} = n.\]
Now, suppose that the theoretical model had a perhaps undetermined additive constant, so that \(y = a + bx^n\), instead of \(y = bx^n\). Again, you are really interested in \(n\), and do not have a good idea about the true value of \(a\) or \(b\) (which, let us suppose, unbeknownst to you, are 0.01, and 1, respectively).
In this case a log-log plot is no longer a straight line. Indeed, at small values of x, the slope appears to be much smaller than 2. In fact, the slope appears to be zero.
If you only had data from the small-x regime, you may reject the theory (or the data).
Or, perhaps, as is likely, you are much smarter than me, and you may make a subtler claim.
In any case, It is easy to show that for \(y = a + bx^n\),\[\frac{d \log y}{d \log x} = n \left(\frac{1}{1 + \frac{a}{bx^n}} \right).\] For \(x < (a/b)^{1/n}\), the constant term, which may be thought of as \(a x^{0}\), dominates, and pulls the slope closer to zero.
For \(x \gg (a/b)^{1/n}\), the second term which contains the power-law dependence takes over. For sufficiently large \(x\), the same data (see plot below, which stretches out to 100x times the previous plot) are no longer as tainted by the signature of the pesky constant term.
A similar lesson holds for \(n < 0\). Suppose \(n = -2\) in the example above. The power-law is now clear for small x, and is corrupted by the constant term at large x, which pulls the slope upwards to zero.
No comments:
Post a Comment