Solved

Calculate spline using points, with error bars

Posted on 2007-11-15
12
903 Views
Last Modified: 2008-02-01
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?
0
Comment
Question by:allelopath
  • 5
  • 4
  • 3
12 Comments
 
LVL 27

Expert Comment

by:d-glitch
ID: 20290513
You should probably just plot the spline curve and include the error bars.
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?
0
 
LVL 1

Author Comment

by:allelopath
ID: 20290625
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?
0
 
LVL 27

Expert Comment

by:d-glitch
ID: 20291101
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.
0
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 
LVL 1

Author Comment

by:allelopath
ID: 20292039
>>A spline should actually go through what ever points you specify -- (3, 4) not (3, 4.5).
Oh, you're right. duh.
0
 
LVL 27

Accepted Solution

by:
d-glitch earned 450 total points
ID: 20292206
You might try to fit a line (or some other curve) to your data using a least squares regression.

In that case, it is possible for the curve to miss the data point and the error bar entirely.  

This would suggest

EITHER  
Your error bars are too small.  ==>  You don't understand the limits of your measurement.

OR
You have chose the wrong type of fit.  ==>  You don't understand the underlying process.
0
 
LVL 1

Author Comment

by:allelopath
ID: 20292228
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?
0
 
LVL 27

Expert Comment

by:d-glitch
ID: 20292366
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.
0
 
LVL 84

Assisted Solution

by:ozo
ozo earned 50 total points
ID: 20292646
0
 
LVL 1

Author Comment

by:allelopath
ID: 20293629
Another semantics/terminology question
Does 'spline' imply interpolation (curve hits all data points)
0
 
LVL 84

Expert Comment

by:ozo
ID: 20293752
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
0
 
LVL 84

Expert Comment

by:ozo
ID: 20293780
0
 
LVL 27

Expert Comment

by:d-glitch
ID: 20294020
>>  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
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
springs 17 52
Math home work questions 5 107
Triangle - computing angles 3 56
How to install SVN Command Line Client? 5 81
Foreword (May 2015) This web page has appeared at Google.  It's definitely worth considering! https://www.google.com/about/careers/students/guide-to-technical-development.html How to Know You are Making a Difference at EE In August, 2013, one …
This article provides a brief introduction to tissue engineering, the process by which organs can be grown artificially. It covers the problems with organ transplants, the tissue engineering process, and the current successes and problems of the tec…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question