how to find slope of discrete point?
$begingroup$
I am wondering if it is possible to find the slope at each point in the following dataset,
% X Y
%===================
0.7761 0.5715
0.794 0.5729
0.8117 0.5744
0.8292 0.5762
0.8465 0.5782
0.8637 0.5804
0.8807 0.5828
0.8977 0.5853
0.9144 0.5879
0.9311 0.5907
0.9477 0.5937
0.9641 0.5968
0.9805 0.6
0.9967 0.6033
1.0129 0.6067
I understand that the slope can be obtained using the difference of the two neighboring points by
$$m = frac{y_2-y_1}{x_2-x_1}$$
and, the angle that each point made with the $x$-axis is essentially the $atan$ of $m$
$$theta = tan^{-1}(m) $$
But, is it possible to calculate the slope without using the above formula? without trying to curve-fit the points.
vector-analysis angle slope
$endgroup$
add a comment |
$begingroup$
I am wondering if it is possible to find the slope at each point in the following dataset,
% X Y
%===================
0.7761 0.5715
0.794 0.5729
0.8117 0.5744
0.8292 0.5762
0.8465 0.5782
0.8637 0.5804
0.8807 0.5828
0.8977 0.5853
0.9144 0.5879
0.9311 0.5907
0.9477 0.5937
0.9641 0.5968
0.9805 0.6
0.9967 0.6033
1.0129 0.6067
I understand that the slope can be obtained using the difference of the two neighboring points by
$$m = frac{y_2-y_1}{x_2-x_1}$$
and, the angle that each point made with the $x$-axis is essentially the $atan$ of $m$
$$theta = tan^{-1}(m) $$
But, is it possible to calculate the slope without using the above formula? without trying to curve-fit the points.
vector-analysis angle slope
$endgroup$
$begingroup$
The formula that you're using for the slope $m$ assumes that the function $y=f(x)$ is linear between the points. There are other methods, too. It's possible to assume a quadratic relation, etc ... But why do you ask if it's possible to calculate without using the formula? What's wrong with using the formula?
$endgroup$
– Matti P.
Jan 8 at 13:54
$begingroup$
There's nothing wrong with the formula. The reason is that the method is heavily dependent on the sampling rate of the points. I am curious if there is any other method or approach that can be used.
$endgroup$
– BeeTiau
Jan 8 at 13:56
1
$begingroup$
@BeeTiau: I'd take Matti P's suggestion, and assume a reasonable polynomial shape (why polynomial? Because they're super-easy to differentiate), differentiate that, and get the derivative value at the desired points. This method has the advantage of smoothing out your data a bit (fitting a curve is a summation process, and hence smoothing, whereas raw differentiation like you did makes graphs more jagged and noisy). As for sampling rate, fitting a reasonable polynomial (you might look up cubic splines) will mitigate that.
$endgroup$
– Adrian Keister
Jan 8 at 14:06
add a comment |
$begingroup$
I am wondering if it is possible to find the slope at each point in the following dataset,
% X Y
%===================
0.7761 0.5715
0.794 0.5729
0.8117 0.5744
0.8292 0.5762
0.8465 0.5782
0.8637 0.5804
0.8807 0.5828
0.8977 0.5853
0.9144 0.5879
0.9311 0.5907
0.9477 0.5937
0.9641 0.5968
0.9805 0.6
0.9967 0.6033
1.0129 0.6067
I understand that the slope can be obtained using the difference of the two neighboring points by
$$m = frac{y_2-y_1}{x_2-x_1}$$
and, the angle that each point made with the $x$-axis is essentially the $atan$ of $m$
$$theta = tan^{-1}(m) $$
But, is it possible to calculate the slope without using the above formula? without trying to curve-fit the points.
vector-analysis angle slope
$endgroup$
I am wondering if it is possible to find the slope at each point in the following dataset,
% X Y
%===================
0.7761 0.5715
0.794 0.5729
0.8117 0.5744
0.8292 0.5762
0.8465 0.5782
0.8637 0.5804
0.8807 0.5828
0.8977 0.5853
0.9144 0.5879
0.9311 0.5907
0.9477 0.5937
0.9641 0.5968
0.9805 0.6
0.9967 0.6033
1.0129 0.6067
I understand that the slope can be obtained using the difference of the two neighboring points by
$$m = frac{y_2-y_1}{x_2-x_1}$$
and, the angle that each point made with the $x$-axis is essentially the $atan$ of $m$
$$theta = tan^{-1}(m) $$
But, is it possible to calculate the slope without using the above formula? without trying to curve-fit the points.
vector-analysis angle slope
vector-analysis angle slope
asked Jan 8 at 13:51
BeeTiauBeeTiau
588
588
$begingroup$
The formula that you're using for the slope $m$ assumes that the function $y=f(x)$ is linear between the points. There are other methods, too. It's possible to assume a quadratic relation, etc ... But why do you ask if it's possible to calculate without using the formula? What's wrong with using the formula?
$endgroup$
– Matti P.
Jan 8 at 13:54
$begingroup$
There's nothing wrong with the formula. The reason is that the method is heavily dependent on the sampling rate of the points. I am curious if there is any other method or approach that can be used.
$endgroup$
– BeeTiau
Jan 8 at 13:56
1
$begingroup$
@BeeTiau: I'd take Matti P's suggestion, and assume a reasonable polynomial shape (why polynomial? Because they're super-easy to differentiate), differentiate that, and get the derivative value at the desired points. This method has the advantage of smoothing out your data a bit (fitting a curve is a summation process, and hence smoothing, whereas raw differentiation like you did makes graphs more jagged and noisy). As for sampling rate, fitting a reasonable polynomial (you might look up cubic splines) will mitigate that.
$endgroup$
– Adrian Keister
Jan 8 at 14:06
add a comment |
$begingroup$
The formula that you're using for the slope $m$ assumes that the function $y=f(x)$ is linear between the points. There are other methods, too. It's possible to assume a quadratic relation, etc ... But why do you ask if it's possible to calculate without using the formula? What's wrong with using the formula?
$endgroup$
– Matti P.
Jan 8 at 13:54
$begingroup$
There's nothing wrong with the formula. The reason is that the method is heavily dependent on the sampling rate of the points. I am curious if there is any other method or approach that can be used.
$endgroup$
– BeeTiau
Jan 8 at 13:56
1
$begingroup$
@BeeTiau: I'd take Matti P's suggestion, and assume a reasonable polynomial shape (why polynomial? Because they're super-easy to differentiate), differentiate that, and get the derivative value at the desired points. This method has the advantage of smoothing out your data a bit (fitting a curve is a summation process, and hence smoothing, whereas raw differentiation like you did makes graphs more jagged and noisy). As for sampling rate, fitting a reasonable polynomial (you might look up cubic splines) will mitigate that.
$endgroup$
– Adrian Keister
Jan 8 at 14:06
$begingroup$
The formula that you're using for the slope $m$ assumes that the function $y=f(x)$ is linear between the points. There are other methods, too. It's possible to assume a quadratic relation, etc ... But why do you ask if it's possible to calculate without using the formula? What's wrong with using the formula?
$endgroup$
– Matti P.
Jan 8 at 13:54
$begingroup$
The formula that you're using for the slope $m$ assumes that the function $y=f(x)$ is linear between the points. There are other methods, too. It's possible to assume a quadratic relation, etc ... But why do you ask if it's possible to calculate without using the formula? What's wrong with using the formula?
$endgroup$
– Matti P.
Jan 8 at 13:54
$begingroup$
There's nothing wrong with the formula. The reason is that the method is heavily dependent on the sampling rate of the points. I am curious if there is any other method or approach that can be used.
$endgroup$
– BeeTiau
Jan 8 at 13:56
$begingroup$
There's nothing wrong with the formula. The reason is that the method is heavily dependent on the sampling rate of the points. I am curious if there is any other method or approach that can be used.
$endgroup$
– BeeTiau
Jan 8 at 13:56
1
1
$begingroup$
@BeeTiau: I'd take Matti P's suggestion, and assume a reasonable polynomial shape (why polynomial? Because they're super-easy to differentiate), differentiate that, and get the derivative value at the desired points. This method has the advantage of smoothing out your data a bit (fitting a curve is a summation process, and hence smoothing, whereas raw differentiation like you did makes graphs more jagged and noisy). As for sampling rate, fitting a reasonable polynomial (you might look up cubic splines) will mitigate that.
$endgroup$
– Adrian Keister
Jan 8 at 14:06
$begingroup$
@BeeTiau: I'd take Matti P's suggestion, and assume a reasonable polynomial shape (why polynomial? Because they're super-easy to differentiate), differentiate that, and get the derivative value at the desired points. This method has the advantage of smoothing out your data a bit (fitting a curve is a summation process, and hence smoothing, whereas raw differentiation like you did makes graphs more jagged and noisy). As for sampling rate, fitting a reasonable polynomial (you might look up cubic splines) will mitigate that.
$endgroup$
– Adrian Keister
Jan 8 at 14:06
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
In my experience,
when trying to estimate the slope at a point,
it is better to use the slope of the line
between the preceding and following point.
This is analogous to the fact that
$f'(x)$
is more accurately estimated by
$(f(x+h)-f(x-h))/(2h)$
(error of order $h^2$)
than by
$(f(x+h)-f(x))/(h)$
(error of order $h$).
$endgroup$
$begingroup$
Thanks. Meaning that there is no way we can estimate the slope without knowing the functions (or trend?) of the data?
$endgroup$
– BeeTiau
Jan 8 at 15:45
$begingroup$
All you need are a series of (x, y) values.
$endgroup$
– marty cohen
Jan 8 at 20:06
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%2f3066184%2fhow-to-find-slope-of-discrete-point%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
In my experience,
when trying to estimate the slope at a point,
it is better to use the slope of the line
between the preceding and following point.
This is analogous to the fact that
$f'(x)$
is more accurately estimated by
$(f(x+h)-f(x-h))/(2h)$
(error of order $h^2$)
than by
$(f(x+h)-f(x))/(h)$
(error of order $h$).
$endgroup$
$begingroup$
Thanks. Meaning that there is no way we can estimate the slope without knowing the functions (or trend?) of the data?
$endgroup$
– BeeTiau
Jan 8 at 15:45
$begingroup$
All you need are a series of (x, y) values.
$endgroup$
– marty cohen
Jan 8 at 20:06
add a comment |
$begingroup$
In my experience,
when trying to estimate the slope at a point,
it is better to use the slope of the line
between the preceding and following point.
This is analogous to the fact that
$f'(x)$
is more accurately estimated by
$(f(x+h)-f(x-h))/(2h)$
(error of order $h^2$)
than by
$(f(x+h)-f(x))/(h)$
(error of order $h$).
$endgroup$
$begingroup$
Thanks. Meaning that there is no way we can estimate the slope without knowing the functions (or trend?) of the data?
$endgroup$
– BeeTiau
Jan 8 at 15:45
$begingroup$
All you need are a series of (x, y) values.
$endgroup$
– marty cohen
Jan 8 at 20:06
add a comment |
$begingroup$
In my experience,
when trying to estimate the slope at a point,
it is better to use the slope of the line
between the preceding and following point.
This is analogous to the fact that
$f'(x)$
is more accurately estimated by
$(f(x+h)-f(x-h))/(2h)$
(error of order $h^2$)
than by
$(f(x+h)-f(x))/(h)$
(error of order $h$).
$endgroup$
In my experience,
when trying to estimate the slope at a point,
it is better to use the slope of the line
between the preceding and following point.
This is analogous to the fact that
$f'(x)$
is more accurately estimated by
$(f(x+h)-f(x-h))/(2h)$
(error of order $h^2$)
than by
$(f(x+h)-f(x))/(h)$
(error of order $h$).
answered Jan 8 at 15:26
marty cohenmarty cohen
73k549128
73k549128
$begingroup$
Thanks. Meaning that there is no way we can estimate the slope without knowing the functions (or trend?) of the data?
$endgroup$
– BeeTiau
Jan 8 at 15:45
$begingroup$
All you need are a series of (x, y) values.
$endgroup$
– marty cohen
Jan 8 at 20:06
add a comment |
$begingroup$
Thanks. Meaning that there is no way we can estimate the slope without knowing the functions (or trend?) of the data?
$endgroup$
– BeeTiau
Jan 8 at 15:45
$begingroup$
All you need are a series of (x, y) values.
$endgroup$
– marty cohen
Jan 8 at 20:06
$begingroup$
Thanks. Meaning that there is no way we can estimate the slope without knowing the functions (or trend?) of the data?
$endgroup$
– BeeTiau
Jan 8 at 15:45
$begingroup$
Thanks. Meaning that there is no way we can estimate the slope without knowing the functions (or trend?) of the data?
$endgroup$
– BeeTiau
Jan 8 at 15:45
$begingroup$
All you need are a series of (x, y) values.
$endgroup$
– marty cohen
Jan 8 at 20:06
$begingroup$
All you need are a series of (x, y) values.
$endgroup$
– marty cohen
Jan 8 at 20:06
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%2f3066184%2fhow-to-find-slope-of-discrete-point%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$
The formula that you're using for the slope $m$ assumes that the function $y=f(x)$ is linear between the points. There are other methods, too. It's possible to assume a quadratic relation, etc ... But why do you ask if it's possible to calculate without using the formula? What's wrong with using the formula?
$endgroup$
– Matti P.
Jan 8 at 13:54
$begingroup$
There's nothing wrong with the formula. The reason is that the method is heavily dependent on the sampling rate of the points. I am curious if there is any other method or approach that can be used.
$endgroup$
– BeeTiau
Jan 8 at 13:56
1
$begingroup$
@BeeTiau: I'd take Matti P's suggestion, and assume a reasonable polynomial shape (why polynomial? Because they're super-easy to differentiate), differentiate that, and get the derivative value at the desired points. This method has the advantage of smoothing out your data a bit (fitting a curve is a summation process, and hence smoothing, whereas raw differentiation like you did makes graphs more jagged and noisy). As for sampling rate, fitting a reasonable polynomial (you might look up cubic splines) will mitigate that.
$endgroup$
– Adrian Keister
Jan 8 at 14:06