Find Log equation from data points
$begingroup$
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
functions polynomials logarithms exponential-function
$endgroup$
add a comment |
$begingroup$
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
functions polynomials logarithms exponential-function
$endgroup$
$begingroup$
Do I understand the question correctly? You want to fit the data to a function of the form: $$y = alpha log(beta x)^gamma$$ -- is that correct?
$endgroup$
– Brad S.
Mar 13 '14 at 23:06
$begingroup$
Sorry I explained badly. I dont want to try and fit the function. I want to find the function that describes the curve in the data set.
$endgroup$
– Ke.
Mar 14 '14 at 1:25
$begingroup$
@ Ke; : your equation 20*(log(x*127/108))*6/3.241 is not convenient. If $x=0$ you don't obtain $0$ as it is written on your data table : your formula gives -infinity. If you want to use a function of this kind, try $y(x)=a+b*ln(x+c)$ where the parametres $a, b, c$ have to be optimized. I gave you an example in response to your other question "5th order polynomial not accurate enough , "
$endgroup$
– JJacquelin
Apr 6 '14 at 18:05
add a comment |
$begingroup$
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
functions polynomials logarithms exponential-function
$endgroup$
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
functions polynomials logarithms exponential-function
functions polynomials logarithms exponential-function
asked Mar 13 '14 at 22:59
Ke.Ke.
12218
12218
$begingroup$
Do I understand the question correctly? You want to fit the data to a function of the form: $$y = alpha log(beta x)^gamma$$ -- is that correct?
$endgroup$
– Brad S.
Mar 13 '14 at 23:06
$begingroup$
Sorry I explained badly. I dont want to try and fit the function. I want to find the function that describes the curve in the data set.
$endgroup$
– Ke.
Mar 14 '14 at 1:25
$begingroup$
@ Ke; : your equation 20*(log(x*127/108))*6/3.241 is not convenient. If $x=0$ you don't obtain $0$ as it is written on your data table : your formula gives -infinity. If you want to use a function of this kind, try $y(x)=a+b*ln(x+c)$ where the parametres $a, b, c$ have to be optimized. I gave you an example in response to your other question "5th order polynomial not accurate enough , "
$endgroup$
– JJacquelin
Apr 6 '14 at 18:05
add a comment |
$begingroup$
Do I understand the question correctly? You want to fit the data to a function of the form: $$y = alpha log(beta x)^gamma$$ -- is that correct?
$endgroup$
– Brad S.
Mar 13 '14 at 23:06
$begingroup$
Sorry I explained badly. I dont want to try and fit the function. I want to find the function that describes the curve in the data set.
$endgroup$
– Ke.
Mar 14 '14 at 1:25
$begingroup$
@ Ke; : your equation 20*(log(x*127/108))*6/3.241 is not convenient. If $x=0$ you don't obtain $0$ as it is written on your data table : your formula gives -infinity. If you want to use a function of this kind, try $y(x)=a+b*ln(x+c)$ where the parametres $a, b, c$ have to be optimized. I gave you an example in response to your other question "5th order polynomial not accurate enough , "
$endgroup$
– JJacquelin
Apr 6 '14 at 18:05
$begingroup$
Do I understand the question correctly? You want to fit the data to a function of the form: $$y = alpha log(beta x)^gamma$$ -- is that correct?
$endgroup$
– Brad S.
Mar 13 '14 at 23:06
$begingroup$
Do I understand the question correctly? You want to fit the data to a function of the form: $$y = alpha log(beta x)^gamma$$ -- is that correct?
$endgroup$
– Brad S.
Mar 13 '14 at 23:06
$begingroup$
Sorry I explained badly. I dont want to try and fit the function. I want to find the function that describes the curve in the data set.
$endgroup$
– Ke.
Mar 14 '14 at 1:25
$begingroup$
Sorry I explained badly. I dont want to try and fit the function. I want to find the function that describes the curve in the data set.
$endgroup$
– Ke.
Mar 14 '14 at 1:25
$begingroup$
@ Ke; : your equation 20*(log(x*127/108))*6/3.241 is not convenient. If $x=0$ you don't obtain $0$ as it is written on your data table : your formula gives -infinity. If you want to use a function of this kind, try $y(x)=a+b*ln(x+c)$ where the parametres $a, b, c$ have to be optimized. I gave you an example in response to your other question "5th order polynomial not accurate enough , "
$endgroup$
– JJacquelin
Apr 6 '14 at 18:05
$begingroup$
@ Ke; : your equation 20*(log(x*127/108))*6/3.241 is not convenient. If $x=0$ you don't obtain $0$ as it is written on your data table : your formula gives -infinity. If you want to use a function of this kind, try $y(x)=a+b*ln(x+c)$ where the parametres $a, b, c$ have to be optimized. I gave you an example in response to your other question "5th order polynomial not accurate enough , "
$endgroup$
– JJacquelin
Apr 6 '14 at 18:05
add a comment |
2 Answers
2
active
oldest
votes
$begingroup$
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.
$endgroup$
$begingroup$
sorry for being a bit obtuse, but im wondering how to do this linear fit? Id be really grateful for some pointers, (x is my changing data from 0-127 (which will be a float)), so Im trying to find a function that will fit that curve. Is there some tool where I can plot it? some tutorial I can follow?
$endgroup$
– Ke.
Mar 13 '14 at 23:16
1
$begingroup$
You try taking the logarithm of every $x$ or $y$ data point, and see if a good linear relationship appears. In excel and R this can be done with functions (for R just type log(x)). A good fit can be judged with an $r$ value or a residual graph.
$endgroup$
– qwr
Mar 13 '14 at 23:26
$begingroup$
Ive managed to get the exponential for each different x data point, but im stuck on how to turn that into a function I can use. Is there any way I can turn these data points into a function?
$endgroup$
– Ke.
Mar 14 '14 at 1:13
add a comment |
$begingroup$
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.
$endgroup$
$begingroup$
Yes, the data does definitely fit a logarithmic plot. I am trying to convert, a linear dial into hz, which follows a logarithm. Im trying to reverse engineer the logarithm. What Im finding difficult is how to do the exponential of each data point and then how to use the least-squares regression. Im a bit limited in these areas so would be hugely grateful for some pointers into how to do these things.
$endgroup$
– Ke.
Mar 13 '14 at 23:59
$begingroup$
I see. You can either use R or excel as qwr suggests, but if you're familiar with Python, then I would recommend tossing the dataset into Sage (which is essentially Python + data structures and methods for math things, and is free). This link is a reasonable reference for your project. Even if you're not familiar with Python, the relevant material shouldn't take you too long to cover. The most obnoxious part will be the actual data entry.
$endgroup$
– Nick
Mar 14 '14 at 0:08
$begingroup$
I see, ive never hear of R before, so will give that a try and python as well as I have that set up. I tried this tool and put my numbers in alcula.com/calculators/statistics/linear-regression and it gave me " Regression line equation: y=111.48692089361x-3690.7944767442 " so I put the equation in "111 * x - 3690 " but it gives me really wrong numbers "between 3000-3500" when it should be between 30 - 20000 hz . really confused still :/ hopefully will get there eventually.
$endgroup$
– Ke.
Mar 14 '14 at 0:33
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f711477%2ffind-log-equation-from-data-points%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
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.
$endgroup$
$begingroup$
sorry for being a bit obtuse, but im wondering how to do this linear fit? Id be really grateful for some pointers, (x is my changing data from 0-127 (which will be a float)), so Im trying to find a function that will fit that curve. Is there some tool where I can plot it? some tutorial I can follow?
$endgroup$
– Ke.
Mar 13 '14 at 23:16
1
$begingroup$
You try taking the logarithm of every $x$ or $y$ data point, and see if a good linear relationship appears. In excel and R this can be done with functions (for R just type log(x)). A good fit can be judged with an $r$ value or a residual graph.
$endgroup$
– qwr
Mar 13 '14 at 23:26
$begingroup$
Ive managed to get the exponential for each different x data point, but im stuck on how to turn that into a function I can use. Is there any way I can turn these data points into a function?
$endgroup$
– Ke.
Mar 14 '14 at 1:13
add a comment |
$begingroup$
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.
$endgroup$
$begingroup$
sorry for being a bit obtuse, but im wondering how to do this linear fit? Id be really grateful for some pointers, (x is my changing data from 0-127 (which will be a float)), so Im trying to find a function that will fit that curve. Is there some tool where I can plot it? some tutorial I can follow?
$endgroup$
– Ke.
Mar 13 '14 at 23:16
1
$begingroup$
You try taking the logarithm of every $x$ or $y$ data point, and see if a good linear relationship appears. In excel and R this can be done with functions (for R just type log(x)). A good fit can be judged with an $r$ value or a residual graph.
$endgroup$
– qwr
Mar 13 '14 at 23:26
$begingroup$
Ive managed to get the exponential for each different x data point, but im stuck on how to turn that into a function I can use. Is there any way I can turn these data points into a function?
$endgroup$
– Ke.
Mar 14 '14 at 1:13
add a comment |
$begingroup$
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.
$endgroup$
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.
answered Mar 13 '14 at 23:05
qwrqwr
6,62942755
6,62942755
$begingroup$
sorry for being a bit obtuse, but im wondering how to do this linear fit? Id be really grateful for some pointers, (x is my changing data from 0-127 (which will be a float)), so Im trying to find a function that will fit that curve. Is there some tool where I can plot it? some tutorial I can follow?
$endgroup$
– Ke.
Mar 13 '14 at 23:16
1
$begingroup$
You try taking the logarithm of every $x$ or $y$ data point, and see if a good linear relationship appears. In excel and R this can be done with functions (for R just type log(x)). A good fit can be judged with an $r$ value or a residual graph.
$endgroup$
– qwr
Mar 13 '14 at 23:26
$begingroup$
Ive managed to get the exponential for each different x data point, but im stuck on how to turn that into a function I can use. Is there any way I can turn these data points into a function?
$endgroup$
– Ke.
Mar 14 '14 at 1:13
add a comment |
$begingroup$
sorry for being a bit obtuse, but im wondering how to do this linear fit? Id be really grateful for some pointers, (x is my changing data from 0-127 (which will be a float)), so Im trying to find a function that will fit that curve. Is there some tool where I can plot it? some tutorial I can follow?
$endgroup$
– Ke.
Mar 13 '14 at 23:16
1
$begingroup$
You try taking the logarithm of every $x$ or $y$ data point, and see if a good linear relationship appears. In excel and R this can be done with functions (for R just type log(x)). A good fit can be judged with an $r$ value or a residual graph.
$endgroup$
– qwr
Mar 13 '14 at 23:26
$begingroup$
Ive managed to get the exponential for each different x data point, but im stuck on how to turn that into a function I can use. Is there any way I can turn these data points into a function?
$endgroup$
– Ke.
Mar 14 '14 at 1:13
$begingroup$
sorry for being a bit obtuse, but im wondering how to do this linear fit? Id be really grateful for some pointers, (x is my changing data from 0-127 (which will be a float)), so Im trying to find a function that will fit that curve. Is there some tool where I can plot it? some tutorial I can follow?
$endgroup$
– Ke.
Mar 13 '14 at 23:16
$begingroup$
sorry for being a bit obtuse, but im wondering how to do this linear fit? Id be really grateful for some pointers, (x is my changing data from 0-127 (which will be a float)), so Im trying to find a function that will fit that curve. Is there some tool where I can plot it? some tutorial I can follow?
$endgroup$
– Ke.
Mar 13 '14 at 23:16
1
1
$begingroup$
You try taking the logarithm of every $x$ or $y$ data point, and see if a good linear relationship appears. In excel and R this can be done with functions (for R just type log(x)). A good fit can be judged with an $r$ value or a residual graph.
$endgroup$
– qwr
Mar 13 '14 at 23:26
$begingroup$
You try taking the logarithm of every $x$ or $y$ data point, and see if a good linear relationship appears. In excel and R this can be done with functions (for R just type log(x)). A good fit can be judged with an $r$ value or a residual graph.
$endgroup$
– qwr
Mar 13 '14 at 23:26
$begingroup$
Ive managed to get the exponential for each different x data point, but im stuck on how to turn that into a function I can use. Is there any way I can turn these data points into a function?
$endgroup$
– Ke.
Mar 14 '14 at 1:13
$begingroup$
Ive managed to get the exponential for each different x data point, but im stuck on how to turn that into a function I can use. Is there any way I can turn these data points into a function?
$endgroup$
– Ke.
Mar 14 '14 at 1:13
add a comment |
$begingroup$
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.
$endgroup$
$begingroup$
Yes, the data does definitely fit a logarithmic plot. I am trying to convert, a linear dial into hz, which follows a logarithm. Im trying to reverse engineer the logarithm. What Im finding difficult is how to do the exponential of each data point and then how to use the least-squares regression. Im a bit limited in these areas so would be hugely grateful for some pointers into how to do these things.
$endgroup$
– Ke.
Mar 13 '14 at 23:59
$begingroup$
I see. You can either use R or excel as qwr suggests, but if you're familiar with Python, then I would recommend tossing the dataset into Sage (which is essentially Python + data structures and methods for math things, and is free). This link is a reasonable reference for your project. Even if you're not familiar with Python, the relevant material shouldn't take you too long to cover. The most obnoxious part will be the actual data entry.
$endgroup$
– Nick
Mar 14 '14 at 0:08
$begingroup$
I see, ive never hear of R before, so will give that a try and python as well as I have that set up. I tried this tool and put my numbers in alcula.com/calculators/statistics/linear-regression and it gave me " Regression line equation: y=111.48692089361x-3690.7944767442 " so I put the equation in "111 * x - 3690 " but it gives me really wrong numbers "between 3000-3500" when it should be between 30 - 20000 hz . really confused still :/ hopefully will get there eventually.
$endgroup$
– Ke.
Mar 14 '14 at 0:33
add a comment |
$begingroup$
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.
$endgroup$
$begingroup$
Yes, the data does definitely fit a logarithmic plot. I am trying to convert, a linear dial into hz, which follows a logarithm. Im trying to reverse engineer the logarithm. What Im finding difficult is how to do the exponential of each data point and then how to use the least-squares regression. Im a bit limited in these areas so would be hugely grateful for some pointers into how to do these things.
$endgroup$
– Ke.
Mar 13 '14 at 23:59
$begingroup$
I see. You can either use R or excel as qwr suggests, but if you're familiar with Python, then I would recommend tossing the dataset into Sage (which is essentially Python + data structures and methods for math things, and is free). This link is a reasonable reference for your project. Even if you're not familiar with Python, the relevant material shouldn't take you too long to cover. The most obnoxious part will be the actual data entry.
$endgroup$
– Nick
Mar 14 '14 at 0:08
$begingroup$
I see, ive never hear of R before, so will give that a try and python as well as I have that set up. I tried this tool and put my numbers in alcula.com/calculators/statistics/linear-regression and it gave me " Regression line equation: y=111.48692089361x-3690.7944767442 " so I put the equation in "111 * x - 3690 " but it gives me really wrong numbers "between 3000-3500" when it should be between 30 - 20000 hz . really confused still :/ hopefully will get there eventually.
$endgroup$
– Ke.
Mar 14 '14 at 0:33
add a comment |
$begingroup$
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.
$endgroup$
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.
answered Mar 13 '14 at 23:31
NickNick
1,485819
1,485819
$begingroup$
Yes, the data does definitely fit a logarithmic plot. I am trying to convert, a linear dial into hz, which follows a logarithm. Im trying to reverse engineer the logarithm. What Im finding difficult is how to do the exponential of each data point and then how to use the least-squares regression. Im a bit limited in these areas so would be hugely grateful for some pointers into how to do these things.
$endgroup$
– Ke.
Mar 13 '14 at 23:59
$begingroup$
I see. You can either use R or excel as qwr suggests, but if you're familiar with Python, then I would recommend tossing the dataset into Sage (which is essentially Python + data structures and methods for math things, and is free). This link is a reasonable reference for your project. Even if you're not familiar with Python, the relevant material shouldn't take you too long to cover. The most obnoxious part will be the actual data entry.
$endgroup$
– Nick
Mar 14 '14 at 0:08
$begingroup$
I see, ive never hear of R before, so will give that a try and python as well as I have that set up. I tried this tool and put my numbers in alcula.com/calculators/statistics/linear-regression and it gave me " Regression line equation: y=111.48692089361x-3690.7944767442 " so I put the equation in "111 * x - 3690 " but it gives me really wrong numbers "between 3000-3500" when it should be between 30 - 20000 hz . really confused still :/ hopefully will get there eventually.
$endgroup$
– Ke.
Mar 14 '14 at 0:33
add a comment |
$begingroup$
Yes, the data does definitely fit a logarithmic plot. I am trying to convert, a linear dial into hz, which follows a logarithm. Im trying to reverse engineer the logarithm. What Im finding difficult is how to do the exponential of each data point and then how to use the least-squares regression. Im a bit limited in these areas so would be hugely grateful for some pointers into how to do these things.
$endgroup$
– Ke.
Mar 13 '14 at 23:59
$begingroup$
I see. You can either use R or excel as qwr suggests, but if you're familiar with Python, then I would recommend tossing the dataset into Sage (which is essentially Python + data structures and methods for math things, and is free). This link is a reasonable reference for your project. Even if you're not familiar with Python, the relevant material shouldn't take you too long to cover. The most obnoxious part will be the actual data entry.
$endgroup$
– Nick
Mar 14 '14 at 0:08
$begingroup$
I see, ive never hear of R before, so will give that a try and python as well as I have that set up. I tried this tool and put my numbers in alcula.com/calculators/statistics/linear-regression and it gave me " Regression line equation: y=111.48692089361x-3690.7944767442 " so I put the equation in "111 * x - 3690 " but it gives me really wrong numbers "between 3000-3500" when it should be between 30 - 20000 hz . really confused still :/ hopefully will get there eventually.
$endgroup$
– Ke.
Mar 14 '14 at 0:33
$begingroup$
Yes, the data does definitely fit a logarithmic plot. I am trying to convert, a linear dial into hz, which follows a logarithm. Im trying to reverse engineer the logarithm. What Im finding difficult is how to do the exponential of each data point and then how to use the least-squares regression. Im a bit limited in these areas so would be hugely grateful for some pointers into how to do these things.
$endgroup$
– Ke.
Mar 13 '14 at 23:59
$begingroup$
Yes, the data does definitely fit a logarithmic plot. I am trying to convert, a linear dial into hz, which follows a logarithm. Im trying to reverse engineer the logarithm. What Im finding difficult is how to do the exponential of each data point and then how to use the least-squares regression. Im a bit limited in these areas so would be hugely grateful for some pointers into how to do these things.
$endgroup$
– Ke.
Mar 13 '14 at 23:59
$begingroup$
I see. You can either use R or excel as qwr suggests, but if you're familiar with Python, then I would recommend tossing the dataset into Sage (which is essentially Python + data structures and methods for math things, and is free). This link is a reasonable reference for your project. Even if you're not familiar with Python, the relevant material shouldn't take you too long to cover. The most obnoxious part will be the actual data entry.
$endgroup$
– Nick
Mar 14 '14 at 0:08
$begingroup$
I see. You can either use R or excel as qwr suggests, but if you're familiar with Python, then I would recommend tossing the dataset into Sage (which is essentially Python + data structures and methods for math things, and is free). This link is a reasonable reference for your project. Even if you're not familiar with Python, the relevant material shouldn't take you too long to cover. The most obnoxious part will be the actual data entry.
$endgroup$
– Nick
Mar 14 '14 at 0:08
$begingroup$
I see, ive never hear of R before, so will give that a try and python as well as I have that set up. I tried this tool and put my numbers in alcula.com/calculators/statistics/linear-regression and it gave me " Regression line equation: y=111.48692089361x-3690.7944767442 " so I put the equation in "111 * x - 3690 " but it gives me really wrong numbers "between 3000-3500" when it should be between 30 - 20000 hz . really confused still :/ hopefully will get there eventually.
$endgroup$
– Ke.
Mar 14 '14 at 0:33
$begingroup$
I see, ive never hear of R before, so will give that a try and python as well as I have that set up. I tried this tool and put my numbers in alcula.com/calculators/statistics/linear-regression and it gave me " Regression line equation: y=111.48692089361x-3690.7944767442 " so I put the equation in "111 * x - 3690 " but it gives me really wrong numbers "between 3000-3500" when it should be between 30 - 20000 hz . really confused still :/ hopefully will get there eventually.
$endgroup$
– Ke.
Mar 14 '14 at 0:33
add a comment |
Thanks for contributing an answer to Mathematics Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f711477%2ffind-log-equation-from-data-points%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
$begingroup$
Do I understand the question correctly? You want to fit the data to a function of the form: $$y = alpha log(beta x)^gamma$$ -- is that correct?
$endgroup$
– Brad S.
Mar 13 '14 at 23:06
$begingroup$
Sorry I explained badly. I dont want to try and fit the function. I want to find the function that describes the curve in the data set.
$endgroup$
– Ke.
Mar 14 '14 at 1:25
$begingroup$
@ Ke; : your equation 20*(log(x*127/108))*6/3.241 is not convenient. If $x=0$ you don't obtain $0$ as it is written on your data table : your formula gives -infinity. If you want to use a function of this kind, try $y(x)=a+b*ln(x+c)$ where the parametres $a, b, c$ have to be optimized. I gave you an example in response to your other question "5th order polynomial not accurate enough , "
$endgroup$
– JJacquelin
Apr 6 '14 at 18:05