0

I have a set of $5$ data points $(x, y)$. I need to find two constants ($a$ and $b$), so that the curve $x\cdot y^a=b$ fits my data set. The question states that I can find the constants from the fitting process. However, I'm not sure where to start. Which method do I use to do this?

Thanks for any help.

edc1591
  • 103
  • For some basic information about writing math at this site see e.g. here, here, here and here. – Julian Kuelshammer Nov 02 '12 at 00:10
  • Unless you are very lucky, you can't find two constants which make a curve fit five data points --- all you can do is choose the constants so the curve fits the data as closely as possible. How to do this depends on your notion of what makes one curve fit better than another. This vital information is probably hidden in what you are calling "the fitting process". So, if you don't tell us what "the fitting process" is, we are groping in the dark if we try to answer your question. You ask, "which methhod do I use to do this?" I ask, "which methods have you been given?" – Gerry Myerson Nov 02 '12 at 02:25
  • @GerryMyerson We are not told which method to use. I assume we are supposed to find a linear representation of this function, but all the examples of that that I can find are for when the equation is equal to y. The given equation is more complicated because y is raised to some constant. – edc1591 Nov 03 '12 at 21:31
  • Beware the dangers of linearization: https://math.stackexchange.com/questions/1488747/least-square-approximation-for-exponential-functions/2163333#2163333 – dantopa Mar 23 '17 at 01:39

1 Answers1

2

Applying the natural logarithm to your curve, we have $$ \ln x + a \ln y = \ln b.$$ This shows a linear relationship between $\ln x$ and $\ln y$.

Take your data points $(x,y)$ and convert them to new points $(\ln x, \ln y)$ by applying the natural logarithm. Take this set of converted data points and find the line of best fit. Apply the exponential function to your line to get the curve you seek.

  • When I find the line of best fit, does the slope = a and the intercept = b? I tried that and it doesn't seem to work out. The curve does not fit my data. – edc1591 Nov 03 '12 at 21:30
  • 1
    @edc1591 No. When you get a line of best fit, think of it as $\ln y =m \ln x + B$. Then $y = e^B x^m$. Take $m$-th roots, to get $y^{1/m} = e^{B/m} x$, so that $x y^{-1/m} = e^{-B/m}$. So for the curve form you seek, a would be -1/m and b would be -B/m. – Matthew Conroy Nov 03 '12 at 22:23
  • I think you meant $b = e^{-B/m}$. Thanks so much for the help! – edc1591 Nov 04 '12 at 18:42
  • Yup, I sure did. Cheers! – Matthew Conroy Nov 04 '12 at 23:17