Linha do gráfico

Before this, knowPontos de um grafico

Interactive · 1 question

Trend Lines

A trend line is a line added to a scatter plot that shows the generalization of all the data. Let's look at the scatter plot used in this explanation to show a trend line.

Example: Trend Line on Scatter Plot

We ask our friends their height and shoe size. The data is recorded below.

Height and shoe size of all of our friends.

Image source: by Jonathan Heller

We're going to graph these points on a scatter plot.

Scatter plot of our friends' heights and shoe sizes.

Made using Desmos

This graph has a positive correlation. The yy-value of each point generally increases as the xx-value increases. We can add a trend line to this graph by adding a line that goes through the middle of the points.

Scatter plot with a trend line

Made using Desmos

Notice that the trend line has a positive slope. This matches the positive correlation of our scatter plot.

Line of Best Fit

The line of best fit is the trend line that fits the data the most closely. Take a look at this scatter plot with multiple trend lines:

Scatter plot from above with 3 different trend lines.

Made using Desmos

The dotted green and dotted red lines are also trend lines. They generally go through the middle of our data set, and they are both positively sloping to match the correlation of the data. However, the solid purple line is the line of best fit as it fits our data the best.

It can be very difficult to calculate the equation for the line of best fit, but it can be made easier using programs such as Microsoft Excel or Google Sheets.

Interpolation and Extrapolation

The line of best fit can be used for estimation. Interpolation is when we use the trend line to estimate a value that is already inside of our data set. Extrapolation is when we use a trend line to estimate a value that is outside of the range of our data set.

Scatter plot with trend line

Made using Desmos

Let's say we wanted to estimate the shoe size of someone that is 75 in75 \text{ in} tall. 75 in75 \text{ in} is within our data set, so we can follow our line of best fit to interpolate the shoe size. At 7575 on the xx-axis, the yy-value is about 1414, which means that we could estimate someone 75 in75 \text{ in} tall would wear size 1414 shoes.

Try one for yourself:

Extrapolate the shoe size of someone 60 in60 \text{ in} tall.

Choose one answer

Interactive · 6 questions

Adding Trend Lines to Graphs

A trend line (also called the line of best fit) is a line we add to a graph to show the general direction in which points seem to be going.

Think of a "trend" as a pattern in math. Whatever shape you see on a graph or among a group of data points is a trend. The trend line is something we add to our graph to make the pattern even clearer.

Scatter plot of education vs. income.

Image source: by Hannah Bonville

What variable is on the yy-axis?

Choose one answer

Video · + 2 min read

(Video) Scatter Plots and Trend Lines

by Matt Pacione

This video by Matt Pacione covers trend lines on scatter plots and will cover how to draw trend lines.

Summary\large{\text{Summary}}

Trend lines are lines used to approximate the general shape of a scatter plot. A positive trend line tells us the scatter plot has a positive correlation. A negative trend line tells us the scatter plot has a negative correlation.

The first example in the video is time studying and the grade you receive. You can expect that as you study more, your grades go up. This would be an example of a positive correlation.

Time vs grades scatter plot.

Made using Desmos

You can see the trend that as time increases, so does grades. To create a trend line, draw a line on the graph that matches the slope of the data.

Here's the scatter plot with a trend line drawn in.

Made using Desmos

Here's the scatter plot with a trend line drawn in to approximate the data.

We can use the trend line to approximate values, such as a period of time. If you study 5 hours5 \text{ hours}, you can look at the line and determine what grade you probably get. More scattered graphs will have a less accurate trend line.

The line of best fit is the trend line that is the closest approximation to all the data. The easiest way to find this is with programs like Excel or an online tool.

Scatter plot with line of best fit.

Made using Desmos

Here's the scatter plot with my guess of a trend line (dashed red). The blue line is the line of best fit. My guess was close.

Try drawing a scatter plot yourself using the data in the video. The xx-axis is the hour on the internet per day, and the yy-axis is the grade average in percentage. x121320420045y908795808396798693907050\begin{array}{|c|c|} \hline x&1&2&1&3&2&0&4&2&0&0&4&5\\ \hline y&90&87&95&80&83&96&79&86&93&90&70&50\\ \hline \end{array}

Let's see how you did!

Scatter plot of table above.

Made using Desmos

Which of the following lines would be a good trend line?

Choose one answer

Type a concept, like “slope” or “photosynthesis”.

↑ ↓ to choose · Enter to openSearch explanations and problems