How to find the equation of a line which passes through 10 known points

450 Views Asked by At

I know how to find the equation of a line which passes through two known points. But here, I have 10 points $(x,y)$ through which my line passes through. I know I can draw a graph and find then find the equation of the line, but is there a better way or online tool to do the task? The values are given below

2

There are 2 best solutions below

1
On BEST ANSWER

If all 10 points lie along a line, then you can pick any two points, find the equation for the line through those, and that line will pass through the other eight points. This is because "two points determine a line."

You should know, though, that 10 arbitrarily chosen points don't necessarily all lie along a line. Indeed the points in your question do not lie along a line:

Noncollinear points

You can get a line that approximates the points as nearly as possible by "linear regression". In R, you can get the intercept and slope of the regression line with the lm function (for "linear model"):

> mydata = read.csv("~/tmp/known-points.csv")
> lm(mydata)

Call:
lm(formula = mydata)

Coefficients:
(Intercept)          ADC  
   17.29737      0.07425  
0
On

It's a simple Linear Regression problem, take a look here:

https://onlinecourses.science.psu.edu/stat501/node/250