You are here:

- Home
- Science
- Mathematics
- Advanced Math
- linearity of a scatter plot

Advertisement

Hello Scott,

I am working with a data set and I have produced a scatter plot with x and y paired data. I used the Excel trendline analysis to develop the equation for the best fit line through these data points.

When I compared the slope of my line to what the customer has provided they are different. Since we are using the same set of data, how this possible? Shouldn't our slope, intercept for this linear equation be the same? Is there more than one technique/method for finding the equation of a line?

Without looking like and idiot to my customer, I would like to better understand how my customer could arrive at a different linear model than what I came up with.

Thanks,

Allen

The only way I know to fit a straight line is usinig Linear Regression (LR).

That is, construct the matrix

As + Bt = D

Bs + Ct = E

where A is the number of points, B is the sum of the x values,

C is the sum of the values squared, D is the sum of the y values,

and E is the sum of the xy values.

If we have the points (1,1), (2,4), and (3,5), we get

A = 3, for there being 3 points. This gives B = 1+2+3 = 6, C = 1²+2²+3² = 1+4+9 = 14,

D = 1+4+5 = 10, and E = 1*1 + 2*4 + 3*5 = 1 + 8 + 15 = 24.

This gives the matrix

3 6 10

6 14 24.

Solving gives s = -2/3 and t = 2.

This means the equation would be y = 2x - 2/3.

The approximate values would be 1 1/3, 3 1/3, 5 1/3.

The errors of approximation are then +1/3, -2/3, and +1/3.

The sum of errors is 0 and the line can be seen to be

high at either end and low in the middle.

According to http://mathworld.wolfram.com/LinearRegression.html

this is the most common form to fit a line.

As can be seen in the paper, this form of approximation is also referred to as

Least Squares Fitting, Multiple Regression, Regression, and other terms.

- Add to this Answer
- Ask a Question

Rating(1-10) | Knowledgeability = 10 | Clarity of Response = 10 | Politeness = 10 |

Comment | Thanks for your help, I really appreciate it. |

Advanced Math

Answers by Expert:

I can answer any question in general math, arithetic, discret math, algebra, box problems, geometry, filling a tank with water, trigonometry, pre-calculus, linear algebra, complex mathematics, probability, statistics, and most of anything else that relates to math. I can also say that I broke 5 minutes for a mile, which is over 12 mph, but is that relevant?

Experience in the area; I have tutored people in the above areas of mathematics for over two years in AllExperts.com. I have tutored people here and there in mathematics since before I received a BS degree back in 1984. In just two more years, I received an MS degree as well, but more on that later.
I tutored at OSU in the math center for all six years I was there. Most students offering assistance were juniors, seniors, or graduate students. I was allowed to tutor as a freshman.
I tutored at Mathnasium for well over a year.
I worked at The Boeing Company for over 5 years.
I received an MS degreee in Mathematics from Oregon State Univeristy.
The classes I took were over 100 hours of upper division credits in mathematical courses such as
calculus, statistics, probabilty, linear algrebra, powers, linear regression, matrices, and more.
I graduated with honors in both my BS and MS degrees.
Past/Present Clients: College Students at Oregon State University, various math people since college,
over 7,500 people on the PC from the US and rest the world.
**Publications**

My master's paper was published in the OSU journal.
The subject of it was Numerical Analysis used in shock waves and rarefaction fans.
It dealt with discontinuities that arose over time.
They were solved using the Leap Frog method.
That method was used and improvements of it were shown.
The improvements were by Enquist-Osher, Godunov, and Lax-Wendroff.
**Education/Credentials**

Master of Science at OSU with high honors in mathematics.
Bachelor of Science at OSU with high honors in mathematical sciences.
This degree involved mathematics, statistics, and computer science.
I also took sophmore level physics and chemistry while I was attending college.
On the side I took raquetball, but that's still not relevant.
**Awards and Honors**

I earned high honors in both my BS degree and MS degree from Oregon State.
I was in near the top in most of my classes. In several classes in mathematics, I was first.
In a class of over 100 students, I was always one of the first ones to complete the test.
I graduated with well over 50 credits in upper division mathematics.
**Past/Present Clients**

My clients have been students at OSU, people who live nearby, friends with math questions,
and several people every day on the PC. I would guess that you are probably going to be one more.