Find Log equation from data points

9.3k Views Asked by At

I have the following data points, (left hand column goes from 0-127, right hand column goes from 30-22000 hz. Is there any calculator I can use to find a "log" function of this data, so that it comes out in this format? e.g. " 20*(log(x*127/108))*6/3.241 "

0, 0
1, 31.6
2, 33.3
3, 35.1
4, 36.9
5, 38.9
etc.

Essentially, I'm trying to convert data points, to a logarithmic function (a polynomial one, I think :/). I know wolfram alpha has one, but it doesnt seem to offer me the right format for the equation and it also costs premium for any large amount of data points.

Cheers

K

2

There are 2 best solutions below

3
On

I think the best method to fit this data is to re-express $x$ and/or $y$ so that a linear relationship can be found. Then almost every popular data tool has linear fit, like Excel, R, or wolfram alpha.

3
On

If I'm understanding correctly, your hypothesis is that the data fit a logarithmic plot. So, take the exponential of each data point, to produce a dataset that hypothetically fits a linear plot. Use least-squares regression to find the model and see if it's a nice fit. Finally, if the linear model works well, take its logarithm to produce a logarithmic model of your original dataset.

You can generalize this to the situation where the exponential of the dataset is a polynomial function, of course.