What is Fitting: Definition and 242 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. L

    Weighted least squares fitting

    Hello y'all, If I have n data points (xi, yi) each with error bars in both x and y (xi_err, yi_err), should I use 1/(xi_err^2+yi_err^2) as the weight in a weighted least squares linear fit, or should the weight be a different value that has nothing to do with error bars? I've never used WLS...
  2. S

    MATLAB Matlab Function Fitting: Tips & Tricks

    Hello all, How do people generally fit data in Matlab? I am trying to fit an exponential decay and it doesn't look straightforward. I am looking this up at the moment, but maybe people can give me good answers or starting points here. Thank you!
  3. nukeman

    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...
  4. P

    Calculating error in coefficients determined from fitting a curve to data?

    I have a set of data points (x0, y0), (x1, y1), ... (xi, yi) With each yi there is an associated error ei. The data is modeled by the function: y = a\exp(-bln^2(c/x)) I have determined values for the coefficients a, b, c and I know the residuals produced from the values of the...
  5. G

    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...
  6. fluidistic

    Least Squares Fitting for ax²+bx+c with Given Points: Homework Solution

    Homework Statement I must find the best fitting function of the form ax²+bx+c using least squares. The points are (-1,6.1), (0,2.8), (1,2.2), (3,6) and (6,26.9). 2. Homework Equations + attempt at a solution A\vec x= \vec b, I'm looking for \vec x =\begin {pmatrix} a \\ b \\ c \end {pmatrix}...
  7. S

    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...
  8. S

    HELP calculus optimization problem: fitting thin rod through corridor

    I am having trouble conceptualizing a calculus optimization problem. I can find the answer to the problem by using the procedure but i am quite uncertain of how the equations match up with what's actually going on in the situation! Problem: What is the max length of widthless rigid pole that...
  9. R

    Global fitting with shared parameters

    Homework Statement Hi I'm looking for an algorithm that can perform a fitting procedure on many curves simultaneously. Let's say, for example, that I have 3 exponential decay curves with 3 different decay times but they all share the same initial amplitude. So I have to find a fit for 4...
  10. G

    Fitting least square approximations

    Homework Statement Attached Homework Equations The Attempt at a Solution Thanks in advance for the help. The problem I'm having is not so much as to how to solve the problem, but how to proceed using MATLAB. I'm having trouble figuring out how to enter in the respective...
  11. B

    Fitting a graph to data points.

    Homework Statement I'm told that someone goes for a walk on some cliffs and given data for the total time of the trip and the distance traveled and the maximum height difference during the walk. I'm asked to find a function for T(d,h) i.e. time taken as a function of distance and max height...
  12. U

    Fitting an ellipse to a quadratic curve

    Hello. This is 2D with arbitrary orientations. I have a quadratic curve segment defined by 2 end points and another one in between. I can find lots of other points along this curve. I want to find a close-enough elliptic spline. It is defined by 2 end points and the point of intersection...
  13. M

    Program for Supernova Data Fitting

    Are there any programs which could be used to fit the Supernova data to constrain the cosmological models's parameter? thx
  14. F

    MATLAB MATLAB 3D Data Fitting: Find Center & Axes Directions

    Hi. I have a set of samples with small white gaussian noise that form a small part of an ellissoid in 3D space. I'm looking for a way to find the center and the axes directions of the ellipsoid that best fits these samples. This is an overdetermined problem with much more 3d points than...
  15. N

    Is Levenberg-Marquardt the Correct Method for Fitting Young's Equation?

    I was wondering if anyone could help me with this, I've been trying to curve fit Young's formula for double slit refraction: =Io*sinc(alpha)^2*cos(beta)^2 alpha=a*sin(theta)*Pi/wavelength beta=b*sin(theta)*Pi/wavelength with a and b as the parameters I'm trying to find. I've been...
  16. M

    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...
  17. S

    MATLAB Matlab: Fitting to two functions simultaneously

    Okay, here's a problem that I've been struggling with for a few weeks. I'm conducting a series of measurements, where I get two sets of data, i.e. one xdata value gives me two ydata values. I want to curve fit the two data sets to two different functions, F1 and F2, that depend on the same...
  18. B

    R-square value for model fitting

    hi, i make use of the r-square values quite extensively in my modeling work, mainly as an indicator of the 'goodness of fit' between data and linear/exponential models. however, i have often been told that r-squares are not rigorous indicators, especially so in cases where there exists...
  19. C

    Fitting a convex polytope into another convex polytope

    Hi, I am presently writing Python code to solve the following problem; fit the largest volume polytope (P1), with a given number of faces, into a known other polytope (P2) (with more faces than the one being fitted inside). Both polytopes are convex and are described by the feasible region of...
  20. A

    What is causing my 1/4 NPT fittings to not fit together properly?

    Ok, so here's a weird problem. I am trying to make a 1/4 npt fitting with two pieces of brass pipe. The tap says: Vermont 1/4 NPT 18 HSGG M21 The die says: 1/4 NPT Baystate -5 So I threaded the pieces of pipe, expecting them to fit together nicely... and they didn't - far from...
  21. P

    Fitting Spheres into Arbitrary Geometry

    Hello, I am constructing a MATLAB script to tightly pack an arbitrary given geometry with spheres of a predefined radius. Coordinates of the vertices of the geometry (a polyhedral model) are given; I am thereby developing an algorithm to plot/track all spheres that fit within the boundaries...
  22. S

    Im seeking for help about fitting data into a curve of sine formula

    [b]1. This is the given data table --------Jan----Feb----Mar---Apr----May----Jun----July----Aug----Sept----Otc----Nov----Dec Maximum:33.2--32.2--31.2--28.9----25.4----22.2--21.9----23.9----27---- 29.8----31.7----32.9 This is a temperature table and i need to find its sine equation.b3/ y=...
  23. L

    How Do You Fit a Distribution to Truncated Data for Extrapolation?

    Hi Math Experts, I have a two part question: Let's say I have a set of data and I want to fit a distribution to it, but I have to get rid of all the data below some threshold value, so that a large part of the left side of the histogram is cut off. How would I go about fitting a distribution...
  24. S

    Fitting the Potato Yield Model with Superphosphate Fertiliser

    Homework Statement Suppose (Y1, Y2, Y3, Y4) = (5.2, 6.8, 11.9, 17.0) are the average yields (in tonne/ha) of potato grown in soil with 4 different levels of superphosphate fertiliser, x1 = 1.20, x2 = 1.75, x3 = 2.30, x4 = 2.85. We want to fit the model E[Yi] = \beta1 + \beta2xi + \beta3zi...
  25. F

    Creating a User-Friendly D-Hole for Mounting a DC Motor Shaft

    Hi, I have a DC motor that have these dimensions: http://www.micromotorssrl.com/motor_l149/L149.pdf and the problem that i have is to make the "D-hole" in a solid 6mm steel shaft. At the bottom of the hole i was planing to put a neodymium magnet so that you easily could remove and put back...
  26. C

    Ventilation Fitting Pressure Loss Coefficients

    Good morning, I'm calculating the pressure loss of a ventilation system for pot-off gas of an aluminum smelter using ASHRAE tables for fitting loss coefficients. The problem is that for much of the ducting, the diameters and flowrate ratios I have do not exist in the tables. (We're talking...
  27. S

    Fitting a Function given 3 points

    Homework Statement Using a simple "trick," you can find a polynomial function whose graphi goes through any given set of points. For example, the graph of the following function goes through the points (1, 3), (2, 5), and (3, -1). f(x) = 3\;\frac{(x-2)(x-3)}{(1-2)(1-3)} \;+\...
  28. A

    Stats help - Linear Model fitting in R

    I have this residual vs fitted values plot in R, and it should show a scatter of points with constant variance and mean 0. The mean 0 part seems to hold, but there is quite a clear diamond shape for the variance... I have tried raising the response variable to a power <1 and a log...
  29. D

    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...
  30. L

    Fitting Fraunhofer Diffraction Data

    Homework Statement Is there a good way to do a fit. The fft looks simple: I am trying to fit data from my experiment to the very nonlinear nested sine function given as equation 3 here: http://www.physics.umd.edu/courses/Phys375/HillSpring10/Labs/Lab5Diffraction.pdf Homework...
  31. D

    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 ...
  32. N

    How can I estimate time constants in a Prony series without trial and error?

    Hi, I am trying to fit a prony series to set of data(modulus and time). I want to use curve fitting to fit the experimental data set. I am confused about the time constants. Is there a way I can find the time constants without having to do it by hit and trial method. Is there a way by which I...
  33. A

    Histogram fitting: fit parameter errors not corresponding with optimizer results

    Hi I'm having some big problems with some data! I will try to keep this as simple as possible... I have a random variable that admits a probability distribution that I have a fit function for. With a large enough number of samples I can get good estimates of the fit function parameters via...
  34. R

    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...
  35. 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`...
  36. N

    What is the best estimate for B in Least Squares Fitting?

    1. Homework Statement Suppose two variables x and y are known to satisfy a relation y=Bx. That is a graph of x vs. y is a line through the origin. Suppose further that you have N measurements (xi,yi)and that the uncertainties in x are negligible and those in y are equal. Prove the best...
  37. D

    Fitting Data to an Equation with a Series

    I = I_{L} - I_{0} \left\{\exp\left[\frac{q(V + I R_{S})}{nkT}\right] - 1\right\} - \frac{V + I R_{S}}{R_{SH}} The above equation represents the curve that I would like to fit my data to. However, 'I' is dependent on 'I', should I do this with a series?
  38. A

    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...
  39. deccard

    MATLAB Lorenzian and gaussian pdf-function fitting with Matlabs nlinfit, confidence interval

    I have data that I want to fit to both Gaussian and Lorentzian (Cauchy) distribution. I have been using Matlab's nlinfit as follows: gaus = @(p,xdata) (p(1)/(sqrt(2*pi*p(2)))*exp(-(xdata-p(3)).^2/(2*p(2)))+min).*weights; [g_pfit,g_residual,g_J]=nlinfit(data(:,1), data(:,2).*weights, gaus...
  40. D

    Fitting a quadric function to a set of points

    I have a set of points and I want to find a "best fit quardric surface" through the points. I did the following: 1) Assume the function is in the form: a x^2 + b y^2 + c xy + d x + e y + f = z 2) Make a nx6 matrix of the points put into (1), that is A=: x1^2 y1^2 x1y1 x1 y1 1 x2^2 y2^2...
  41. N

    MATLAB Gaussian Fitting: Finding Error with MATLAB Output

    Hi I have fitted Gaussian function to some data in matlab. Now MATLAB gives me this: General model Gauss1: f(x) = a1*exp(-((x-b1)/c1)^2) Coefficients (with 95% confidence bounds): a1 = 2633 (2628, 2637) b1 = 1824 (1824, 1824) c1 =...
  42. P

    Gaussian Fitting: Get Help Now!

    I have a set of data for an absorption spectra that I plot the firtst derivative of and it gives me a gaussianish plot, I then want to fit it with a gaussian and what I've been doing so far is calculating the mean and variace of the spread and then using them in the equation. Although this does...
  43. S

    Max Squares Fitting in a Circle: Proof & Formulas

    Hi, Given that the radius of a circle is X, and the side length of a square is Y, what is the maximum number of squares you can fill inside this circle, provided that the squares do not overlap? If you know of a general formula or something, can you please tell me the proof or give me a link...
  44. mnb96

    Plane Fitting with Linear Least Squares

    Hello, I am trying to figure out how to fit a plane passing through the origin in \mathbf{R}^3, given a cloud of N points. The points are vectors of the form (x_1^{(k)}, x_2^{(k)}, x_3^{(k)}) , where k stands for the k-th point. I want to minimize the sum of squared distances point-plane. What...
  45. K

    Solving the Tight Fitting Annulus Problem at Work

    I have a problem at work! We have a large annulus that we need to fit a shaft into. I have calculated the tonnage required and it is outside of our workshop facilities. Any ideas, Lub, etc?
  46. D

    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...
  47. W

    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...
  48. D

    Fitting Power Function to Graph Potential vs Distance: What is n?

    I am graphing Potential(Volts) y-axis vs distance (r) x axis. I am asked to fit a power function F(r)=Ar^n . Any ideas on how to do this? What is n supposed to represent?
  49. E

    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...
  50. S

    How were these line fitting equations derived?

    I've run into these formulas many times but I've never seen how they were derived. Say you want to fit a line to some data. Your data is a bunch of (xi,yi) pairs. Through some kind of magic, the slope m and the y-intercept b are given by these formulas...
Back
Top