Back To Course

Big Ideas Math Common Core 8th Grade: Online Textbook Help10 chapters | 63 lessons

Instructor:
*David Broy*

Dave has taught college-level math, physics, computer, and electronics courses and has a Master's Degree in Electrical Engineering.

In this lesson, learn the definition of the line of best fit and how to calculate it for your data in a scatter plot. We'll cover slope and y-intercept formula, and go through an example to see it all in action.

One of the more challenging steps in the scientific method is the analysis. It's relatively straightforward to collect data, but then you have to answer the question, ''Now what do I do with it?''

One way to observe trends in collected data is to create a **scatter plot**, a two-dimensional graph of *y* versus *x*, where *x* and *y* are two of the quantities in your data set.

What you hope to see in a scatter plot is the relationship between *x* and *y*, in which the value of quantity *y* (the dependent variable) in some way depends on the value of quantity *x* (the independent variable). Let's take a look at an example plot where there is a visible, underlying relationship:

In Example Plot 2, it appears that *x* and *y* are not related to each other:

When there is a relationship between two variables, quite often it's a **linear relationship**, and your scatter plot will be similar to Example Plot 1, where it appears the underlying trend in the data is a straight line.

You could eyeball the graph and, with a pencil and a straightedge, sketch in the line where it appears to fit the data, estimate its slope and *y*-intercept, and be satisfied that your estimate is close enough to meet your needs. But if you are looking for something better, it is worth the extra effort to obtain the mathematical definition of the line that most accurately represents the data, the line of best fit.

Also referred to as 'trend line', the **line of best fit** is the line for which the sum of the squares of the residual errors between the individual data values and the line is at its minimum—which is just a fancy way of saying it is the best possible straight line that fits your data.

Slope and *y*-intercept are the two numbers needed to define the equation of a line in slope-intercept form, *y* = *mx* + *b*.

So there are two formulas needed to define the line of best fit, one for the **slope**:

and one for the ** y-intercept**:

where:

*m*is the slope*b*is the*y*-intercept*n*is the number of points in the scatter plot*x*is the set of*x*-values of the points*y*is the set of*y*-values of the points

Note there are four distinct summations which must be calculated:

- Σ
*x*(adding up the*x*-values) - Σ
*y*(adding up the*y*-values) - Σ
*x*2 (squaring each*x*-value and then adding up the*x*2 values) - Σ
*xy*(multiplying each*x*-value by its corresponding*y*-value and then adding up the*xy*values).

Also note the difference between (Σ*x*)2 (taking the already calculated Σ*x* and squaring it) and the previously defined Σ*x*2.

This might seem like a lot of number crunching to you, and it really is, especially for larger data sets. So there are, of course, calculators, both handheld and online, which will do the number crunching for you. However, it is probably worth the extra effort to walk through these calculations yourself on a couple smaller data sets just to get that deeper understanding and appreciation of it all. (Just like baking a cake from scratch as opposed to using a box mix or just picking one up at your local bakery.)

Suppose you want to know the relationship between the amount of time a student spends studying for a test, and the grade he or she receives on that test. You are granted permission from a local high school to access Mr. Mann's Tenth Grade History Class in order to obtain the information you need. By the end of the day, you have the number of hours spent studying and the exam score for each of the 30 students:

The first thing you are going to do with the data is create a scatter plot, to see if any trends appear visually. Because you assume that the exam scores will depend on the study time, you decide that the dependent variable *y* should represent the exam scores and the independent variable *x* should represent the number of hours spent studying, so the table of data can be annotated as follows:

Plotting the (*x*,*y*) pairs in the table yields the following scatter plot:

As expected, the scatter plot shows that there is a relationship, and the data appears to follow a straight line path from one side of the graph to the other. So you are in luck, my friend—you get to try out those best fit formulas!

Because there are four summations to calculate, add the *x*2 and *xy* columns you need to your table, then add up the values in each column and show the resulting summations underneath:

Substituting the value of *n* = 30 and the summations at the bottom of the table into the formula for the slope of the line *m*, you get:

And then substituting into the formula for the *y*-intercept *b*:

The equation of the line of best fit becomes *y* = 5.9925*x* + 48.011 and can be added to the scatter plot to observe how well it fits the points!

The **line of best fit** is the best possible straight line that fits the data on a **scatter plot**, a two-dimensional graph of *y* versus *x*. Because linear relationships are so common, it is important to be able to determine the line that best fits your data. There are two formulas needed to define the line of best fit. First, the **slope** formula:

Then the ** y-intercept** formula:

If your data follows a well-behaved curve, it can really simplify your analysis and give you the ability to forecast results beyond the range of the data you collected.

To unlock this lesson you must be a Study.com Member.

Create your account

Are you a student or a teacher?

Already a member? Log In

BackWhat teachers are saying about Study.com

Already registered? Login here for access

Did you know… We have over 160 college courses that prepare you to earn credit by exam that is accepted by over 1,500 colleges and universities. You can test out of the first two years of college and save thousands off your degree. Anyone can earn credit-by-exam regardless of age or education level.

To learn more, visit our Earning Credit Page

Not sure what college you want to attend yet? Study.com has thousands of articles about every imaginable degree, area of study and career path that can help you find the school that's right for you.

You are viewing lesson
Lesson
2 in chapter 9 of the course:

Back To Course

Big Ideas Math Common Core 8th Grade: Online Textbook Help10 chapters | 63 lessons

- AFOQT Information Guide
- ACT Information Guide
- Computer Science 335: Mobile Forensics
- Electricity, Physics & Engineering Lesson Plans
- Teaching Economics Lesson Plans
- FTCE Middle Grades Math: Connecting Math Concepts
- Social Justice Goals in Social Work
- Developmental Abnormalities
- Overview of Human Growth & Development
- ACT Informational Resources
- AFOQT Prep Product Comparison
- ACT Prep Product Comparison
- CGAP Prep Product Comparison
- CPCE Prep Product Comparison
- CCXP Prep Product Comparison
- CNE Prep Product Comparison
- IAAP CAP Prep Product Comparison

- How to Write a Newspaper Article
- Anthem by Ayn Rand: Book Summary
- Field Hockey: Techniques, Rules & Skills
- What's the Difference Between Polytheism and Monotheism?
- Homeless Bird Discussion Questions
- The Tiny Seed by Eric Carle Activities
- Mending Wall Discussion Questions
- Quiz & Worksheet - Kinds of Color Wheels
- Quiz & Worksheet - Who, What, When, Where & Why
- Quiz & Worksheet - American Ethnic Groups
- Quiz & Worksheet - Phenol Reactions
- Analytical & Non-Euclidean Geometry Flashcards
- Flashcards - Measurement & Experimental Design
- What is Project-Based Learning? | PBL Ideas & Lesson Plans
- Classroom Management Strategies | Classroom Rules & Procedures

- Remedial Earth Science
- Fundamentals of Nursing Syllabus Resource & Lesson Plans
- Holt McDougal Modern Chemistry: Online Textbook Help
- Physical Geology Textbook
- College Preparatory Mathematics: Help and Review
- Writing & Structuring an Essay in AP English: Homework Help
- NY Regents - Measurement for Algebra Students: Help and Review
- Quiz & Worksheet - Eruption of the Thera Volcano
- Quiz & Worksheet - Roman Aqueducts
- Quiz & Worksheet - Spinal Ganglion Facts
- Quiz & Worksheet - Protein Synthesis
- Quiz & Worksheet - Odynophagia

- Selective Perception: Theory & Examples
- How to Make Elephant Toothpaste in the Classroom
- Water Cycle for Kids: Activities & Games
- Sounds Experiments Lesson for Kids
- LSAT Writing Sample: Purpose, Timing & Scoring
- Nervous System Experiments for Kids
- Shape Games for Kids
- DNA Replication Lesson Plan & Activity
- Dinosaur Activities for Kids
- Top 30 High School STEM Programs
- Sequencing Activities for First Grade
- 4th Grade Science Projects

- Tech and Engineering - Videos
- Tech and Engineering - Quizzes
- Tech and Engineering - Questions & Answers

Browse by subject