Arcs Of Best Fit For Large Nos. of X&Y

  • Thread starter tomtomtom1
  • Start date
  • Tags
    arcs Fit
In summary, the conversation was about finding a calculator or method to determine the arc of best fit for large amounts of X and Y data related to the edges of highways. One person suggested averaging the X and Y coordinates to find the center of the circle and then using least squares to determine the radius. Another person suggested a more complex method involving sorting the points and finding the largest gap to determine the center and using least squares to refine the estimate.
  • #1
tomtomtom1
160
8
Hi everyone

I was hoping someone could help with a problem I’m having.

I am often given large amounts of X & Y data which relate to the edges of highways.
Sometimes they are just a hand full approx 20 and other times there are approx 400.

I use the data to find arcs that best fit the x & y data which is then used to calculate various other aspects of the highway (which I won't bore you with).

My question is this; does anyone know of any calculators (online/excel/etc) that is available where by I can copy and paste in large rows of X&Y data and then the calculator then produces the arc of best fit i.e. the calculator should return the XY coordinates of the center of the circle and its radius.

I am not that fussed as to how the arc of best fit is calculated i.e. may or may not use least squares, I just need something that is able to handle large rows of XY data.

Can anyone help?
 
Mathematics news on Phys.org
  • #2
Well, if you just want a circle that makes sense you can do the following:

Average the X and Y coordinates independently to get the X and Y coordinates of the center of the circle, call these [itex] X_0[/itex] and [itex] Y_0[/itex]

For each (X,Y) data pair, calculate
[tex] \sqrt{ (X-X_0)^2 + (Y-Y_0)^2 } [/tex]
the distance from that point to the center of your circle. Average all of these distances, and that is the radius of your circle.

I make no claim that this is optimal in any way, but it's probably pretty close. You should be able to make a spreadsheet in excel to do the calculations upon copy/pasting of data (with maybe a single dragging when doing the distance/averaging calculation but there's probably an excel command to avoid that)
 
  • #3
There is a very simple method to compute the radius and the coordinates of an arc of circle fitting a data set of points (x,y), even if the measurements are scattered : see pages 12-13 in this paper :
http://fr.scribd.com/doc/14819165/Regressions-coniques-quadriques-circulaire-spherique
It is easy to write a computer program with a mathematical software such as Matlab, Mathematica, Mathcad, etc...
 
Last edited:
  • #4
Office_Shredder said:
Well, if you just want a circle that makes sense you can do the following:

Average the X and Y coordinates independently to get the X and Y coordinates of the center of the circle, call these [itex] X_0[/itex] and [itex] Y_0[/itex]

As I understand the situation, the X and Y coordinates are for a segment of a circular arc. There is no guarantee that they are uniformly separated. If you average the X and Y coordinates, this will not be a good estimate for the center of the circle. Nor will it be a particularly good estimate of the center of the arc.

One approach might be to assume that the points do not define more than about 3/4 of a circle. Start as you have outlined to determine the centroid of the sampled points. Compute the angle that each of the points make with the computed centroid, sort them and find the largest gap (modulo 360 degrees).

Split the points at the gap and sort by angle. At this point you could assume that the center lies on the perpendicular bisector of the line connecting the two extreme points and use least squares (or similar) to determine a radius. Given a radius, you could then try to refine the estimate of the center line.

This is all off the top of my head and may be hideously clumsy.
 
  • #5
I misunderstood the question, I thought it was for a full circle as opposed to just a partial arc. The question makes a lot more sense now.
 

1. What is an "arc of best fit" for a large number of X and Y values?

An "arc of best fit" is a statistical method used to determine the relationship between two variables, typically denoted as X and Y. It involves plotting the data points on a graph and drawing a curved line that best represents the overall trend of the data.

2. How is an arc of best fit different from a linear regression line?

An arc of best fit is different from a linear regression line in that it allows for a more flexible curve to be fitted to the data, rather than a straight line. This can be useful when the relationship between the variables is not strictly linear.

3. What is the purpose of using an arc of best fit for large numbers of X and Y values?

The purpose of using an arc of best fit is to visually represent the overall trend of the data and to determine the strength and direction of the relationship between the variables. It can also be used to make predictions about future values based on the pattern of the data.

4. How is the arc of best fit calculated?

The arc of best fit is calculated by using a mathematical formula that minimizes the distance between the curve and the data points. This is usually done using a computer program or statistical software.

5. What are the limitations of using an arc of best fit for large numbers of X and Y values?

One limitation is that it may not accurately represent the relationship between the variables if the data points are clustered in certain areas of the graph. Additionally, it may not be appropriate for data sets with a small number of data points or when the relationship between the variables is not well-defined.

Similar threads

  • General Math
Replies
2
Views
727
Replies
16
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
11
Views
767
Replies
2
Views
940
  • Set Theory, Logic, Probability, Statistics
Replies
4
Views
900
  • General Math
Replies
19
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
500
Replies
2
Views
1K
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
9
Views
1K
Back
Top