What is the simplest curve that fits this data?

  • Context: Undergrad 
  • Thread starter Thread starter gnome
  • Start date Start date
  • Tags Tags
    Curve Data Fitting
Click For Summary

Discussion Overview

The discussion revolves around finding the simplest curve that fits a set of data points relating the width of an object in an image to its distance from the camera. Participants explore various methods and models for curve fitting, including hyperbolic relationships and logarithmic transformations.

Discussion Character

  • Exploratory
  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant suggests that a hyperbola may be a good fit for the data and inquires about iterative methods for finding an equation.
  • Another participant asserts that generating a functional relationship requires guessing a relationship and finding parameters.
  • A suggestion is made to take the reciprocal of the second data column to potentially linearize the relationship.
  • Log-log plots are mentioned as a method for analyzing the data, with references to historical teaching practices.
  • One participant proposes a specific model, y = 957.83 x^{-0.9057}, as a fitting equation.
  • Another participant presents an alternative model, y = 1000/(0.63 x + 3.65), indicating that the choice of model affects the fit.
  • A participant emphasizes the importance of considering physical relationships, referencing the thin lens formula as a potential guiding principle for fitting the data.
  • Log-log plots are reiterated as a useful tool, with a participant noting their recent use in a physics course to illustrate Kepler's 3rd law.

Areas of Agreement / Disagreement

Participants express a range of views on the appropriate models and methods for fitting the data, with no consensus reached on a single approach or model. Multiple competing views remain regarding the best way to analyze the data.

Contextual Notes

Participants mention various assumptions about the relationships between the variables, including potential physical meanings and the limitations of purely fitting data without theoretical backing.

gnome
Messages
1,031
Reaction score
1
I have a set of data points relating the width of an object in an image to its distance from the camera. I'd like to find the simplest curve that fits "pretty well". When I graph the points, it looks like a hyperbola would be a good fit. Is there a simple iterative method to find an equation?

The data:
(20, 59)
(30, 44)
(40, 34)
(50, 28)
(60, 24)
(70, 21)
(80, 19)
(90, 17)
(100, 15)
(125, 12)
(150, 10)
(175, 9)
(200, 8)
(225, 7)
(250, 6)
I suppose I could add (0,infinity) to that list. Nothing above x=250 is relevant.
 
Mathematics news on Phys.org
There is no way to generate the functional relationship. You need to "guess" a relationship then attempt to find the characteristic parameters.
 
gnome said:
I have a set of data points relating the width of an object in an image to its distance from the camera. I'd like to find the simplest curve that fits "pretty well". When I graph the points, it looks like a hyperbola would be a good fit. Is there a simple iterative method to find an equation?

Yes theoretically it should be a hyperbola. So take the reciprocal of the second data column and then it should be a straight line.
 
log log plots. as were taught decades ago, but seemingly not anymore...
 
Thanks, uart, that was very helpful.

Matt: I'll put that on my to-do list. ;)
 
It's quite a simple device, really.If you believe that data x_i and y_i are related by something like x^n=k*y^m, then taking logs nlog(x)=log(k)+mlog(y), i.e. their logs should form a straight line graph. You can also try variations if you thought that y^n=k*exp(x), or something similar. You used to be able to buy log-log graph paper to do this. So I'm told - I'm too young to have used this.
 
I quite like [itex]y = 957.83 x^{-0.9057}[/itex] thank you very much :)
 
Gib Z said:
I quite like [itex]y = 957.83 x^{-0.9057}[/itex] thank you very much :)
Or

[tex]y = \frac{1000}{0.63 x + 3.65}[/tex]

It depends on what model you choose to fit.
 
If you wanted something of physical interest you would attempt to find a f such that:

[tex]\frac 1 x + \frac 1 y = \frac 1 f[/tex]

I would guess this relationship since I know about the thin lens formula. That is the trouble with simply fitting data with no thought of the known physical relationships. You can get perfectly good fits which have no physical meaning.
 
  • #10
matt grime said:
log log plots. as were taught decades ago, but seemingly not anymore...

Actually we just did them in my physics I high school course to show Kepler's 3rd using the orbital radius and period of the planets :smile:

But yeah the slope of the log-log graph is the power of the function.

Edit: I got:
[tex]y=\frac{957.83}{x^{.90499}}[/tex]
 
Last edited:

Similar threads

  • · Replies 22 ·
Replies
22
Views
4K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 9 ·
Replies
9
Views
6K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 2 ·
Replies
2
Views
9K
Replies
1
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 18 ·
Replies
18
Views
15K