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. A

    Fitting a Cosine Function to Inflection & Known Derivative Point

    I am trying to fit a cosine function to two points knowing that the first is an inflection point (e.g. a trough) and also knowing the gradient at the second. I have a gut feeling this has a unique solution it just needs the right identities and massaging but as of yet I haven't found the way...
  2. S

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

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

    Mathematica Fitting Data Imported into Mathematica from Excel

    Can you fit data that is imported into Mathematica 8? I am just using the Import command, and I cannot figure out how to work with this data. I would really like to fit my curve. This is the code I used to import the data: Import[datafile.xlsx"]
  5. D

    Mathematica Fitting Curve to Data Points using Mathematica

    I am trying to use Mathematica to fit a curve to these data points ListPlot[{{2*Pi/(1 - 0^2/16), 5 (3 - Log[2])}, {2*Pi/(1 - .05^2/16), 10 (3 - Log[2])}, {2*Pi/(1 - .1^2/16), 15 (3 - Log[2])}, {2*Pi/(1 - .15^2/16), 20 (3 - Log[2])}, {2*Pi/(1 - .2^2/16), 25 (3 - Log[2])}...
  6. T

    Can RANSAC be used for fitting splines to noisy 3D point clouds?

    I am wondering if there is any way to create a model that can be used in a RANSAC method where a spline could be determined from a noisy 3d point cloud. What i have is a volume containing a set of points in each xy-plane, having say 400 of these in the z direction and a spline shape emerges...
  7. M

    Determine dispersion from fitting equation

    1. Homework Statement Determine the dispersion (dn/d lambda) at a wavelength of 800 nm from fitting equation. 2. Homework Equations Fitting equation from graph of n vs 1/lambda^2 y = 7e-15 x + 1.60 3. The Attempt at a Solution Since it is a plot of n vs 1/lambda^2 I...
  8. M

    Determine dispersion from fitting equation

    Homework Statement Determine the dispersion (dn/d lambda) at a wavelength of 800 nm from fitting equation. Homework Equations Fitting equation from graph of n vs 1/lambda^2 y = 7e-15 x + 1.60 The Attempt at a Solution Since it is a plot of n vs 1/lambda^2 I thought that...
  9. V

    Looking for help Retro Fitting a computer keyboard

    Long story short I want to Mount a Computer inside an Antique typewriter maintaining the look and feel of the antique. My initial plan is to dissasemble a Toshiba Satellite and disgard any thing I don't need (plastic housing, Maybe the speakers, and any chassis' I can do without) I have so far...
  10. O

    Confidence interval from least squares fitting?

    Hello, Let me get right to my problem. I have an experimental distribution and a single-parameter theoretical distribution. I want to find the value for the best fit theoretical distribution that agrees with my experimental data for the bulk of the distributions (the tails of my...
  11. G

    How did you fit a line to a curve?

    never mind i figured it out.
  12. S

    Fitting points to skewed sinusoids

    Fitting points to "skewed" sinusoids Hello, I have a problem related to least square fit of data. Let me start from a step back. I have a set of points, given as x-y coordinates. x represents an angle and y the corresponding value of a function. I am fitting sinusoids to those data points...
  13. M

    Fitting a geometric distribution to data

    Let's say I have a series of 100 coin tosses, heads or tails. In fact (for my actual data) I don't know if subsequent trials are correlated or what the actual probabilities of getting heads or tails are. Nevertheless, I want to fit a geometric distribution, which gives me the distribution of the...
  14. N

    MATLAB How to Resolve Vector Size Mismatch Error in MATLAB Convolution Fitting?

    Hi I have the following piece of code: dataX = -4:1:4; dataY = [0 -1 -10 -40 -55 10 40 10 1]; figure(1) plot(dataX, dataY, '*'); x = -2:0.01:2; plot(-4:0.01:4, 1*conv(exp(-x).*heaviside(x),sin(x)), dataX, dataY, '*') mdl = @(a, x)(a(1)*conv(exp(-x).*heaviside(x),sin(x)))...
  15. E

    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...
  16. E

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

    GARCH fitting to binary data / latent data

    Dear all I am trying to fit a simple ARCH(1)/GARCH(1,1) model to a set of binary data, i.e. I assume a latent GARCH process that is only observed at the values a and b, say (whenever it crosses or hits those thresholds). I found some ideas on fitting a censored GARCH (by SX Wei, for example...
  18. R

    Convergence of Circle Areas in a Boundary Defined by y=1/x and x=0, y=0

    I thought of a problem a few days ago and I have no idea as to its solution. I posted this on Reddit and xkcd forums earlier but not much has been solved apart from the area of one circle. Suppose you have a boundary formed by the curve y=e^(-x), and the lines x=0 and y=0. In this boundary you...
  19. E

    Fitting a function in mathematica

    Say I have a function: f(x,y) I have values for f and y such that I can make a plot of f vs y... however, from the values of f and y, I am interested in finding what x is. The x value should be a constant that is optimized to fit the f vs y graph. Is there a way I can do this in...
  20. V

    Mathematica Mathematica: Listplot & Non linear fitting

    Good day, I am relatively new to mathematica, and I am using it to fit a formula to a dataset that I have. To begin with, I am having issues with a very simple part, namely with a ListPlot. I have an xls file with 2 columns and 26 rows, corresponding to an x and a y value. Using import, I...
  21. M

    Fitting 4 parameter distributions in S-Plus (or R)

    Hi, I am trying to fit sample data to a Johnson SU distribution in S-Plus. It seems not many people use S-Plus, so if you are familiar with R then you could help as well. The code that I have is: f.Jsu.fun.takeslist(x,g,l,r,e) which is a function I have made that calculates the PDF of...
  22. sunrah

    Fitting a Gauss curve to lab data

    I have 100 data points that I want to fit in Excel I can do this with NORMDIST no problem but I'm also trying to do it without it to no avail! I'v tried plotting the data using the Gauss function: y(x) = \frac{1}{\sqrt{\pi \sigma^{2}}}e^{\frac{-(x - x_{0})^2}{2\sigma^{2}}} where x is a data...
  23. J

    MATLAB How can I overlay a GPS track on a city map using GIS software?

    I have a GPS track I'd like to plop on top of a map. The region of the track is very small, no bigger than the area of a city. I also have a bunch of shape files to build up a map of the city with all the buildings, roads, etc. in separate shp files. Although the shape files actually contain...
  24. J

    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...
  25. J

    Matlab - Normal equation for linear least squares model fitting

    Homework Statement Im trying to construct a function in MATLAB that models linear least squares model fitting through the use of normal equations. Homework Equations Normal equation (A'*A*c)=(A'*y) A= [column vector of all x ; column vector of all 1] y= [column vector of all y] c = [b;a]...
  26. S

    Optimizing Bi-Linear Objective Function for Vector Fitting in Flat Space

    I have two matrices, A and D, with same numbers of rows and different numbers of columns (A has many more columns than D), I want to find x and y such that ||Ax-Dy||_2 is minimized. I.e., I want to find the closest vectors in span{A} and span{D}. Seems like a simple problem, but couldn't figure...
  27. R

    How to Calculate Error in Slope and Intercept for Least Squares Fit?

    I have some data to calculate the photoelectric effect, and with my measurements I have made a graph using the least square fitting for voltage vs. frequencies. If I have an error of x for all voltages (V) and y for all frequencies f. How do I calculate the error of the values m and a if my...
  28. C

    Least squares fitting by a constant

    say we have data set {y(t sub i), t sub i} Where i=1 2 3...m. I know how to fit these into a line of the form ax+b, but how about fitting into a constant??
  29. S

    Synthetic Data Fitting- Goodness of Fit

    Hi folks, I am currently working on a project involving an unknown crystal sample. I have now identified the sample but I would like to quantify my findings by considering how well the structure I have determined fits other known structures. I have already ruled out fitting atomic positions...
  30. H

    What Alternatives Exist for Fitting Models to Erratic Data in Excel?

    Homework Statement I need to fit a model to some data, where y = systolic blood pressure and x = time in weeks. The problem is, all of the 'usua' trendline options on Excel produce awful R squared values. Is there some other method I can do to fit a different sort of model that would be...
  31. D

    Is there a Quick connect to VCR fitting rated for UHV as well as cryo temps?

    Cannot seem to find such a connection. The UHV vacuum sits around 1x10-8. The fitting needs to be rated for cryo temps. Thanks
  32. M

    Errors in fitting to data, relationship to residue

    Hi, I'd like to fit a straight line to some data which is noisey with gaussian noise with some st dev. Using least squares, I can estimate the slope and intercept. I'd like to know the uncertainty in these numbers. I can find the residue, I believe this is a measure of the variance of the...
  33. L

    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...
  34. C

    Inverse Laplacetransform, can't find fitting formula

    Homework Statement Inverse Laplacetransform (3s+7)/(s^2+2s-2) Homework Equations (3s+7)/(s^2+2s-2) The Attempt at a Solution Split into 3s/(s^2+2s-2) and 7/(s^2+2s-2). I can't find a fitting transformpair(I use tables/formulas).
  35. M

    Distribution Fitting for Bus Arrival Times

    Hi I am stucked on a problem of distribution fitting. I have collected data about bus arrivals on field in a week time and now I want to fit a statistical distribution to these data. I know that theoretically should be Poisson or smthg but to make a correct step by step observation I need to...
  36. K

    Interpolation help fitting curve to three points

    Hello, I have the following points that need to be fitted with a curve: (1,20);(2,4);(5,3) I'm wondering how to use the http://en.wikipedia.org/wiki/Lagrange_polynomial to do this. If possible, can these points be fitted with a cubic function? I tried to fit a cubic to this, but...
  37. B

    Fitting distributions that have a singular component

    For example, suppose you have some data where each point takes its value from U(0,1) with probability p and the Cantor distribution with probability (1-p) where p is fixed but unknown. Here the standard MLE approach falls over, so how would you go about estimating p?
  38. M

    Fitting a curve in log-linear plot.

    Hi all, I want to fit a curve through 6 points (please see figure attached, the curve in the picture is a drawn one not a fitted one. That is just to give a feel how the fitted curve would look like.) in a log-linear plot. Is there any way I can do it? Thanks.
  39. matt_crouch

    Matlab code fitting a line to a histogram

    Im analyzing some data from a previous student I am trying to plot a line of best fit over the histogram and hense find the value of the coefficiants the files had to be loaded as -ascii so this is the code i have typed so far x=load('filename.mat','-ascii'); mean(x); hist(x,300) this...
  40. M

    Air line gauge in a T fitting, error vs flow

    Professor forgive me it has been many years since my last physics problem, but I was looking at the pressure gauge mounted in a T fitting on our shop compressed air line, and how the reading dropped when various high cfm tools were in use. As I understand it the indicated pressure reflects two...
  41. L

    Flow rate through a tee fitting

    i have a piping system and i know the initial flow rate into the system. the the piping system steps down several times through tee fittings on its way to a final nozzle in which i have required minimum flow rate. i know the flow rate going into the tee but i can't find any information about the...
  42. P

    An ellipse fitting into a notch problem.

    Homework Statement I did this one before a few weeks ago but now I can't seem to get the right answer: An elliptical disk is to fit snuggly and squarely into a notch cut into a rectangular plate. The notch is 180 mm wide. If the disk's major axis is 280 mm long and is parallel to the long...
  43. D

    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...
  44. G

    Negative duct fitting coeffecient

    In the ASHRAE fitting database, there are negative duct fitting coefficients. I assume this means that that particular fitting will produce a pressure regain. However, I am unsure that it would be a static regain because: the formula is P(total)=C*P(velocity), and P(total) only can only drop...
  45. T

    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"...
  46. S

    Fitting a Second Order Polynomial to Data Points

    Homework Statement Suppose that you are given a set of observations (tk,yk), k = 1,...,M. You plot these points on a sheet & it seems that the relationship between (t,y) could be approximated with a second order polynomial. a) Write down the model in the form y = Ax + c. Specify the vectors...
  47. M

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

    Question about Least Squares Fitting

    Hey, I have a graph for which I am supposed to fit two linear least squares line and minimize the combined residuals (the lines intersect)... I would really appreciate some info about how to do this or what this type of data analysis is called so i can google the step-by-step method. Thanks!
  49. B

    Question about Least Squares Fitting

    Hey, Not sure if this is the right section to post this but ... I have a graph for which I am supposed to fit two linear least squares line and minimize the combined residuals (the lines intersect)... I would really appreciate some info about how to do this or what this type of data analysis...
  50. L

    How Do You Fit 3D Coordinate Data to a Parabola?

    Homework Statement I'm trying to go about fitting some (x,y,z) coordinate data that I got out of a simulation to a parabola, but I'm not entirely sure how. Is there a general equation for a parabola that instead of having usual (x,y) coordinates has (x,y,z) coordinates? Homework Equations...
Back
Top