allelopath
asked on
Calculate spline using points, with error bars
I have a set of points and I want to draw a curve through it.
I can use a spline (y = ax^3 + by^2 + cx + d) to do that.
Each point has a error bar associated with it (+/- some value).
Can this (or should this) be used in calculation of the spline?
I can use a spline (y = ax^3 + by^2 + cx + d) to do that.
Each point has a error bar associated with it (+/- some value).
Can this (or should this) be used in calculation of the spline?
ASKER
A question about including the error bar with the spline.
Suppose a data point of (3,4) with error of +/- 1
(so a valid point is anywhere from (3,3) to (3,5) )
Then the spline is estimated and at that point the curve goes through (3,4.5)
So then (3,4.5) +/- 1 is between (3,3.5) and (3,5.5)
This doesn't seem right in that the 5.5 is beyond the 5
or is this just the way it works?
Suppose a data point of (3,4) with error of +/- 1
(so a valid point is anywhere from (3,3) to (3,5) )
Then the spline is estimated and at that point the curve goes through (3,4.5)
So then (3,4.5) +/- 1 is between (3,3.5) and (3,5.5)
This doesn't seem right in that the 5.5 is beyond the 5
or is this just the way it works?
What is your data? Not the numbers, but the meaning of the numbers.
Where do the error bars come from?
Do you really have the same +/- 1 errors on both the x- and y-axis??
That is a little unusual.
Wouldn't that give you a unit circle around (3, 4) rather than a square?
A spline should actually go through what ever points you specify -- (3, 4) not (3, 4.5).
Your error bars (or circle) should apply to the original data, not the fitted curve.
Where do the error bars come from?
Do you really have the same +/- 1 errors on both the x- and y-axis??
That is a little unusual.
Wouldn't that give you a unit circle around (3, 4) rather than a square?
A spline should actually go through what ever points you specify -- (3, 4) not (3, 4.5).
Your error bars (or circle) should apply to the original data, not the fitted curve.
ASKER
>>A spline should actually go through what ever points you specify -- (3, 4) not (3, 4.5).
Oh, you're right. duh.
Oh, you're right. duh.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Ok, so I think there is smoothing and there is interpolation. With interpolation (as in a cubic spline) the curve will go through the data points, with smoothing, the curve may miss the data point. Correct?
Smoothing implies some sort of fitting or averaging of the data.
And yes, the resultant curve may not hit any of the data points.
Curve fitting implies something else. Perhaps assuming some kind of relationship among the data points.
And a fitted curve need not pass though any of the data either.
With interpolation (linear or cubic), the curve hits all the data points and you make assumptions between points.
And yes, the resultant curve may not hit any of the data points.
Curve fitting implies something else. Perhaps assuming some kind of relationship among the data points.
And a fitted curve need not pass though any of the data either.
With interpolation (linear or cubic), the curve hits all the data points and you make assumptions between points.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Another semantics/terminology question
Does 'spline' imply interpolation (curve hits all data points)
Does 'spline' imply interpolation (curve hits all data points)
this is what I understand "spline" to mean
http://en.wikipedia.org/wiki/Spline_(mathematics)
for
y = ax^3 + by^2 + cx + d
I would use
http://mathworld.wolfram.com/LeastSquaresFittingPolynomial.html
http://en.wikipedia.org/wiki/Spline_(mathematics)
for
y = ax^3 + by^2 + cx + d
I would use
http://mathworld.wolfram.com/LeastSquaresFittingPolynomial.html
>> Another semantics/terminology question
>> Does 'spline' imply interpolation (curve hits all data points)
A cubic spline hits all the data points AND matches the slopes between segments.
http://www.physics.utah.edu/~detar/phys6720/handouts/cubic_spline/cubic_spline/node1.html
>> Does 'spline' imply interpolation (curve hits all data points)
A cubic spline hits all the data points AND matches the slopes between segments.
http://www.physics.utah.edu/~detar/phys6720/handouts/cubic_spline/cubic_spline/node1.html
This is pretty standard practice.
You might plot three curves: nominal, max, and min.
This is not standard.
What is your data? And what are you trying to prove?