Question:
Can I fit a curve without having any formulae?
Sinead
2014-04-10 04:41:04 UTC
I have a set of data points that resemble a curve but they arise from a complex situation so I do not know what sort of formula could describe the curve. It is possible to find a formula that at least roughly fits this curve without using expensive software? Could I perhaps work it out using excel or by hand?
Six answers:
Ecko
2014-04-10 07:03:46 UTC
It is possible to fit curves to a specific formula if you know something about it. For example if you have a resistor charging a capacitor from a DC voltage source the voltage rises in a specified way, an exponential curve, so you could use this known formula and find the coefficients.



There is often an iterative process (repeated, in a software loop perhaps) that can find coefficients by closing on a result if you can work out a formula. This uses a purpose built program. It just tries different values logically till the answer is found. Successive approximation. Works for those like me that are not mathematically inclined. Some expert might sniff at this, but whatever works.



There are also more general formulas.

The most basic is a linear regression for Y = slope + offset which fits a straight line to your X, Y data.

There are also polynomial regressions that fit a type of curve according to the order.

You can find an order blindly, but going to a higher order means the fitted curve will follow bumps and wriggles that are perhaps not reasonable. Basically plot the curve with points shown, and use your eyeball to estimate or count the bumps, and add one. Thus first order is constant, second order is a single curve (a hump or hollow), third order is S shaped, 4th order M or W shaped etc. These shapes can be sloped or inverted.



Excel can do polynomial and linear regressions, as well as match curves to a range of more specific formulas. This lets you calibrate a sensor for example with real values, then fit a curve so you can interpolate data points properly, for example when reading the sensor, convert the voltage readings to calibrated readings of sensor input. Often the sensor is a second or third order curve, and you can be reasonably sure outliers or sudden steps in the curve are not realistic, so it means a better calibration technique is needed. More data points gives greater confidence.



What to do with points that are outliers on your plot of the data? If you are sure that it is a measurement error, delete it. See the link on outliers below. This requires some understanding and judgement. You might be making an assumption the noise (outlier point) is a normal distribution when it isn't.



http://www.tushar-mehta.com/publish_train/data_analysis/16.htm

http://stackoverflow.com/questions/10857252/quadratic-and-cubic-regression-in-excel

http://en.wikipedia.org/wiki/Degree_of_a_polynomial

http://en.wikipedia.org/wiki/Outlier
anonymous
2014-04-10 04:45:05 UTC
You can get Excel to work out a formula for you. Create a line graph and then there is an option to display the corresponding formula.



I don't have Excel on this computer, otherwise I'd give you step-by-step instructions. If you search the help in Excel, you should be able to find what I mean.
Gary H
2014-04-10 05:07:35 UTC
It is possible to do this "long hand" but there are many statistical software packages that do this (and much more) for you. My favorite is Minitab.

With two columns of numbers (x-y pairs), regression analysis, you select what you want to try: linear (Y=mX+b) or squared (Y = Ax^2 + Bx + C) or cubic. And the software calculates the "goodness of fit". A little more sophisticated... you can do mathematical modeling of surfaces (x,y,z coordinates) and higher dimensional stuff. As with all computational models... garbage in - garbage out applies.



As a wise man (and expert in modeling) said: All mathematical models are wrong, some models are useful.
Artur
2014-04-10 08:20:19 UTC
On the source page you can download free programs for curve fitting. You have the options of CurveSnap and DatPlot. Just select the one that will fits better your needs.
oil field trash
2014-04-10 08:18:45 UTC
A rather basic curve it is the least squares method. You can do it with Excel. See the link below
Ms Clever
2014-04-10 04:41:58 UTC
You should work back to the formula


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...