# What is Curve fitting: Definition and 59 Discussions

Curve fitting is the process of constructing a curve, or mathematical function, that has the best fit to a series of data points, possibly subject to constraints. Curve fitting can involve either interpolation, where an exact fit to the data is required, or smoothing, in which a "smooth" function is constructed that approximately fits the data. A related topic is regression analysis, which focuses more on questions of statistical inference such as how much uncertainty is present in a curve that is fit to data observed with random errors. Fitted curves can be used as an aid for data visualization, to infer values of a function where no data are available, and to summarize the relationships among two or more variables. Extrapolation refers to the use of a fitted curve beyond the range of the observed data, and is subject to a degree of uncertainty since it may reflect the method used to construct the curve as much as it reflects the observed data.

View More On Wikipedia.org
1. ### Analyzing Hysteresis Curve Fitting: Overfitting or Not?

We recently did an experiment to generate the hysteresis curve of a certain material. The experiment involved switching the current in the wire looped around a ring of the material, and recording the first throw of the ballistic galvanometer. I am not going into the details of calculations...
2. ### MATLAB Curve Fitting in MATLAB: Error Diagnosis

I have two 1D matrices X(1,j) and Y(1,j) of equal length. To fit Y to a model asin(bx) I tried: fit = fittype(@(a,b,X), a*sin(b*X)); [fitted, gof] = fit(X, Y, fit) coefficients = coeffvalues(fitted) this gives the message: Error using fittype>iDeduceCoefficients The independent variable x does...
3. ### Binned Maximum Likelihood fit in python?

Hi, I have been using Python for a while now, but so far for Least-squares fits using curve_fit from Scipy. I would like to start using Likelihood method to fit binned and unbinned data. I found some documentation in Scipy of how to implement unbinned likelihood fit, but I have not managed to...
4. ### Can I improve the sinc interpolation?

Hello everyone. I am working with mathematica, where I have developed a two-dimensional shannon interplation, just as can be seen in the slides 15 to 18 of this presentation. The code is as follows: savedX = Table[XposX = mat[[All, 1]]; YposX = mat[[All, 2]]; windXVal = mat[[All, i]]...
5. ### Cramer's rule and first degree polynomial curve fitting

Hi, I did the first degree curve fitting in MATLAB. Please see below which also shows the output for each code line. But I wasn't able to get the same answer using Cramer's rule method presented below. I'm sure MATLAB answer is correct so where am I going wrong with the Cramer's rule method...
6. ### Lotka Volterra estimate parameters from experimental data

Namely, in the system, I have obtained the value of parameters L, M, A and D, because I treat the other organism as equal to zero, i.e., it doesn't exist, but I am struggling about the values of B and C, that are coupled with the product of x and y. Can anyone help me how to obtain those values...
7. ### B What is the true way to determine time parameters from semilog graph?

Hi all, I have experimental nuclear magnetic resonance data that describe T2-relaxation of the nuclei in the sample of interest. The experimental points obey bi-exponential dependence: I = I1*exp(-t/T2_1) + I2*exp(-t/T2_2), where I is current intensity, I1 and I2 are intensities which represent...
8. ### I Central Limit Theorem and fitting data

I am working with a simulation which generates an arbitrary number ##n## of identical curves with different phases and calculates their (normalized) sum. As expected, the fluctuation depth of the curves decreases as we increase ##n##. Here is an example of my simulation (when ##n>1##, the...
9. ### I Curve fitting the luminosity distance and redshift data

Can anyone recommend papers that directly curve-fit redshift as a function of luminosity distance for type Ia supernova and gamma ray bursts? I am looking for papers that do not curve-fit the data via an assumed model, even one as simple as Friedmann–Lemaître–Robertson–Walker (FLRW) metric. I...
10. ### I Finding the Right Curve Fit: A Question About Curve Fitting

Hello everyone, A question about curve fitting. Hope you can share some helpful hints. Given some data we plot a graph y versus x. How do we approach the problem from a curve fitting standpoint? For example, using Excel, if the data "looks" linear from the graph, we choose a linear fit and...
11. ### MATLAB Weighting data points with fitted curve in Matlab

Hi all, I'm currently in the middle of performing an experiment for the final project of my MSc, and I have a question about how I should go about weighting the data when fitting a curve to it using the MATLAB fitting tool. Firstly, a bit of background about the problem. I am seeing how low...
12. ### Exponential curve fit using Apache Commons Math

Homework Statement I have the following data which I would like to model using an exponential function of the form y = A + Becx. Using wolfram mathematica, solving for these coefficients was computed easily using the findfit function. I was tasked however to implement this using java and have...
13. ### A Curve Fitting Data: Gamma Spectroscopy Lab Results

Hi I have some data from a gamma spectroscopy lab and using a series of known radioactive sources I obtain a calibration curve. The equipment is a scintillation crystal coupled to a photo-multiplier tube connected to a multi-channel analyser to obtain an energy spectrum. Using Excel I add a...
14. ### Curve fitting for Gravity/Conservation of Energy Lab

Homework Statement [/B] The problem has to do with sig figs going down to 1. I've checked them multiple times by hand and with sigfig calculators but it is all the same. With 1 sig fig my standard deviation ends up being 0 which I am not sure that is acceptable. It makes sense as the points are...
15. ### Calculating errors after curve fitting (linearizing) graphs

Homework Statement I did a lab this week measuring periods of swings of a simple pendulum. We need to curve fit the equation T=k*l^n and we got ln(T)=n*ln(l)+ln(k), and we need to plot the data we collected into the linear graph, meaning out y axes is ln(T) and our x axes is ln(l). So far all...
16. ### Curve fitting (Linearization) of functions (and thus graphs)

Ok, first week of first year of undergraduate physics lab and they explain that we want all our graphs to be linear, and in order to do that we can change our x and y axes to be log(x) or y^2 or whatever. They did some simple examples such as y=(k/x)+c and explained that if the x axes is 1/x we...
17. ### How to calculate the deviation of points from a curve?

Hi, I'm working on some coursework for which I have been modelling a curve to a set of points, and for the final section I am wanting to calculate how close each point is to the curve as a method of comparison between the curves I have calculated. Some of the curves are quadratic, and others are...
18. ### MATLAB DSP: Best curve fitting approach via MATLAB?

I am doing an experiment that generates data in three 1-hour-blocks. Each block has a different number and timing for acquisitions. (The first hour is more frequent and numerous, while the last hour is only 6 acquisitions) The reason for breaking it up into 3 hours is to give the subjects a...
19. ### How Do I Use Functions for Curve Fitting in Origin Software?

I plotted a graph on Origin software and need to do curve fitting to get accurate results. From my understanding, I need to provide a function for the fitting. So how do I derive the function? I am actually provided with the function I(x)=I0-I1cos(x-x0) and this function will fit the lowest...
20. ### Nonlinear Regression Curve Fitting

This isn't a precise homework question, but this seemed like the most reasonable place to post. If not, please feel free to move it. I have a large set of data points that should fit to a known equation (the Drude-Smith model for conductivity) The equation the data should fit to is: σ(ω) =...
21. ### Python 2.7: Fit a model to data

Hi, I'm trying to get how well a known function fits to a set of data. I'm not interested in the data's line of best fit or anything, I just want to know how close it is to my model. I've tried using curve_fit and linregress but neither really give me what I'm after. My data follows a...
22. ### Calculating log liklihood: Zero value of likelihood function

Hello, I am analysing hydrology data and curve fitting to check the best probability distribution among 8 candidate distribution. (2 and 3 parameter distributions) The selection is based on the lowest AIC value. While doing my calculation in excel, how is it suggested to treat very low (approx...
23. ### Fitting distribution to histogram with low number of counts

I have one dimensional binned data that has a peak to which I need to fit a distribution, such as Gaussian or Lorentzian, that is described with four parameters, height, width, centroid position and the background. The problem is that the counts per bin are low and the peak is only 5-6 bins wide...
24. ### Integral curve fitting in origin

Dear users, I deal with following problem. I've got a data of Intenzity of chemiluminezcence as a function of temperature. The data should be fitted by following equation: I found that in origin one can fit also data with integral function, with fittin parameters P, A, i, E. The beta and...
25. ### Curve Matching Techniques for Rotated Curves in Geometric Analysis

I need to perform geometry matching of curves (see http://www.tiikoni.com/tis/view/?id=c54d9b8 ). As it can be seen, the big problem is that curves might be rotated, though they have similar shape. Do I need to make curve fitting and look at the parameters of analytical models? But, I guess...
26. ### MATLAB [Matlab] Which is the good solution My vs. School - curve fitting?

Hy, I wonder which is the good solution for this problem: Nonlinear least square problem: function: y = x / (a + b.x) linearization: 1/y = a/x + b substitution: v = 1/y , u = 1/x >> model v = b + a.u What we did in school: x = [1 2 4 7]; y = [2 1 0.4 0.1]; v=1./y; u=1./x; n = length(x)...
27. ### Free Curve Fitting Software for 4 Parameter Equation

Is there a software(preferably free) that can fit data into a 4 parameter equation? like the generalised logistic function
28. ### Curve fitting with errors-in-variables

Hi, I need some directions to target a problem that is bothering me quite a lot, even some links or small explanation if possible, thank you in advance! I have a huge dataset Ω (unknown) of experimental values {e_i} that should approximate (with noise both in the value and in the...
29. ### How to do circular curve fitting?

If I was given some n(very large) points, and if I want to fit a curve circularly, I think I should go for least squares method. What is the optimal way to do it? can someone explain me clearly how to proceed using least squares method? I don't how to proceed. But I know I should do least...
30. ### Mathematica Curve Fitting With Uncertainties

I have a set of data points \{\{x_1, y_1\}, \{x_2, y_2\} ... \} each with an uncertainty \{\{dx_1, dy_1,\}, \{dx_2, dy_2\} ...\}. Is there any way of fitting a nonlinear model to the data that incorporates the uncertainties on both x and y? I know that you can use the Weights command to...
31. ### Von Karman curve fitting to field measured spectrum

Hello everybody, So for this wind monitoring project I'm getting data from a couple of 3d sonic anemometers, specifically 2 R.M.Young 81000. The data output is made digitally with a sampling frequency of 10Hz for periods of 10min. After all the pre-processing (coordinate rotation, trend...
32. ### Curve fitting and Plane fitting

If I have a set of n numbers, (n=0,1,2, ... n-1), what is the maximum number coefficients in a series I would need in order to find y=f(n) true on the integers up to n-1? Or is that something I just have to check after fitting it? ( does it need an nth degree polynomial?) Another question...
33. ### Curve fitting of summed normal distributions

Hi, I have a dataset of a random variable whose probability density function can be fitted/modelled as a sum of N probability density functions of normal distributions: F_X(x) = p(\mu_1,\sigma_1^2)+p(\mu_2,\sigma_2^2)+\ldots+p({\mu}_x,\sigma_x^2) I am interested in a fitting method can...
34. ### Curve Fitting Data: Motion Analysis, Bouncing Ball, Excel Graph

Homework Statement This is not homework, just a personal project. I do not know if this is the correct section to post, sorry if it's not. I'm using a motion analysis software to track the position of a bouncing ball (y vs t). I imported the data into Excel and the graph is attached. What type...
35. ### Curve fitting of a damped harmonic oscillator

Homework Statement I was wondering if there was a general method for finding a function that fits a set of data for a damped harmonic oscillator I'm currently writing up a presentation on the experiment for the gravitational constant and the way i did the experiment was to use a torsion...
36. ### Curve fitting piecewise function

I have a piecewise function described by g_1(x) as shown in the figure below. I wish to make a smooth curve, g_2(x), to fit (but not necessarily exactly) g_1(x). The only conditions are: Both curves must start at (0,0) and end at (a,0). The area of both curves must be the same. How do...
37. ### MATLAB Uncertainty in values from Matlab Curve Fitting

Hi- I apologize if this has been covered elsewhere, but after much searching with no luck... I am taking a lab class, the first in a while, and am using Matlab's Curve Fitting tool to fit data to exponential curves. My question is how to translate (if possible) the "goodness of fit"...
38. ### What are some recommended textbooks for learning non-analytic curve fitting?

Hi, what are some good textbooks dedicated to this subject? I have a short time to learn everything about this subject (upto a certain level). I'm trying to fit a non-analytic curve (whose form I know) to some data. edit- sorry, I don't only mean non-linear, I mean non-analytic. The curve is...
39. ### Phase shift and sinusoidal curve fitting - Finding .

Phase shift and sinusoidal curve fitting - Finding... Homework Statement "Find the period, amplitude, and phase shift of each function. Graph each function. Be sure to label key points" y = 4sin(2x - pi) Homework Equations The Attempt at a Solution So, I got...
40. ### Mathematica Curve fitting in Mathematica with FindMinimum function

Hello, I attempt to fit experimental data using FindMinimum function with Levenberg-Marquardt (LM) method. I know that the problem can be solved with FindFit function (or other methods of finding minimum), but I really have to use FindMinimum function and LM method. Therefore, I would...
41. ### Curve fitting for two functions

Homework Statement This is for a project in String Theory, but it's actually a curve fitting question. I've derived the two equations given below, for the energy E and angular momentum J of a meson as a function of some quantities \omega, T, x. Now, I have experimental data for E as a...
42. ### MATLAB Curve fitting to diffusion equation(Matlab)

We have been trying to fit experimental diffusion results to the diffusion equation using Matlab to evaluate the Diffusion coefficient. The equation we used: y=C*erfc(x/(2*sqrt(D*t))) Experimental values [x],[y] and t are given. C and D are to be evaluated from the curve fit. We used cftool of...
43. ### Hyperbolic Cosine curve fitting

Homework Statement I need to fit a curve using cosh to a hyperbola with a vertex of (0,0) and a point at (4,7). The scanned worksheet can be found here http://img519.imageshack.us/i/scan0001gu.jpg/" http://img192.imageshack.us/i/scan0002uz.jpg/" Homework Equations y=a cosh...
44. ### Fitting Nonlinear Data to a Linear Equation: Manual Calculation Process

Hey guys I'm completing an experiment and I'm required to extrapolate data by performing nonlinear curve fitting. I have 3 sets of data: (x1, y1); (x2, y2); (x3, y3). I'm required to fit the above mentioned sets of data to the following equation ...
45. ### Curve Fitting Software for Linux: Free Options Available?

hello, is there any curve fitting software for free for linux user?? I know only gnuplot..is there some more software..? something similar to igor or origin or sigmaplot... Or these scientific fitting software are only available for windows?? please reply me about your free software, which you...
46. G

### Mathematica Resonance curve fitting with Mathematica

I have to fit a resonance curve to my data points, where the equation for the curve and the data points are: model = a/Sqrt[4 k w^2 + (v^2 - w^2)^2] data = {{242, 7/10}, {244.3, 1}, {245.33, 3/2}, {245.54, 2}, {248.63, 4}, {249.6, 5}, {250.48, 34/5}, {250.91, 8}, {251.18...
47. ### Non linear curve fitting

so i have the equation attached which i want to solve for a,b and Co. Tk is a time, and k is a whole number above 0. Using an iterative non linear method i need to solve for a,b and Co. I have heard of the Levenberg-Marquardt method, but it is quite complicated, and I wondered whether there...
48. ### Problem of nonlinear curve fitting

helo, I am dealing with a problem of nonlinear curve fitting. I have estimted samples of a continuous Fourier transform function, and my goal is to reach from Fourier to laplace transform using the known equality: F(S=jw)=laplace{h(t)}. i want to represnet the laplace trnsform in the...
49. ### Curve Fitting Analysis: Finding Uncertainty in Delta I

Homework Statement I had to do a curve fit on some data and got an equation to the form:Homework Equations F(t) = a_0 + a_1 t + a_2 t^2The Attempt at a Solution Each parameter has an associated uncertainty. I need to integrate F(t) over a range to get I. How do I find the the uncertainty in...
50. ### Minimizing square of deviation / curve fitting

Homework Statement Given some data set, (x,y), fit to the the curve y=bx^2+a by minimizing the square of the deviation. Preferred to use matrices. Homework Equations The deviation for the ith data point is simply: d_i^2=(y_i-y)^2=(y-bx_i^2-a)^2 The Attempt at a Solution If I understand...