How to Make a Scatter Plot and Find the Line of Best Fit

A scatter plot shows the relationship between two sets of numbers, like height and shoe size, or hours studied and test scores. Each point on the plot is one pair of values, and the pattern of the points tells you whether the two things are related, and how strongly. The line of best fit is the straight line that goes through the middle of those points, and it lets you predict one value from the other. Your TI-84 can make a scatter plot and find the line of best fit in a few minutes, and this guide shows you how.

What a scatter plot shows you

A scatter plot has one variable on the x-axis and another on the y-axis, and each point is a pair of values. If the points go up from left to right, the two variables have a positive relationship: as one goes up, the other goes up too. If they go down, the relationship is negative. If they are scattered all over the place with no pattern, there is no clear relationship. The line of best fit, also called the regression line, is the line that best describes that pattern, and its equation lets you predict y for any x.

Scatter plots show up in statistics class, in science labs, and in any problem where you have two sets of measurements and you want to know if they are related. Learning to make one on the calculator is a skill you will use again and again, and it is much faster than drawing it by hand.

Step 1: enter your data in two lists

Press [STAT] and choose 1: Edit. Put your x values in L1 and your y values in L2. For our example, use hours studied and test scores: hours 1, 2, 3, 4, 5, 6 and scores 55, 62, 68, 75, 82, 88. Type 1, 2, 3, 4, 5, 6 into L1, pressing [ENTER] after each one, and type 55, 62, 68, 75, 82, 88 into L2. Make sure both lists have the same number of values, and that the values line up: the first x goes with the first y, the second x with the second y, and so on. If they do not line up, your plot will be wrong.

Clear both lists before you start, by moving to the top of each one, pressing [CLEAR], and pressing [ENTER]. Check your data after you type it in, because a single typing error will move a point to the wrong place and change the line of best fit.

Step 2: set up the scatter plot

Press [2ND] then [Y=] to open the Stat Plot menu. Choose 1: Plot1 and press [ENTER] to turn it on. Set the type to the scatter plot, which is the first icon, a set of dots. Set Xlist to L1 and Ylist to L2. To type L1, press [2ND] then [1]. To type L2, press [2ND] then [2]. Set the mark to the small square or dot, whichever you prefer. Press [2ND] then [MODE] to quit.

Before you graph it, turn off any functions in Y=. Press [Y=] and make sure all the equals signs are turned off, so no function graphs will get in the way of your scatter plot. If a function is turned on, move to its equals sign and press [ENTER] to turn it off.

Step 3: graph the scatter plot

Press [ZOOM] and choose 9: ZoomStat. That sets the window to fit your data, which is much easier than setting it by hand. Press [GRAPH] and you should see your scatter plot, with the points going up from left to right. If you see nothing, go back to Stat Plot and check that Plot1 is on, that the type is the scatter plot, and that Xlist and Ylist are L1 and L2. If the points are there but the window is wrong, use ZoomStat again, or press [WINDOW] and set the ranges by hand.

Look at the pattern. For our data, the points go up steadily, which means more hours studied is related to higher test scores. That is a positive relationship, and it is what you would expect. If the points went down, or were scattered with no pattern, that would tell you something different, and you should write down what you see.

Step 4: find the line of best fit

Press [STAT], press the right arrow to move to CALC, and choose 4: LinReg(ax+b). The calculator will ask you for the Xlist and Ylist. Type L1, L2 and press [ENTER]. To type L1, press [2ND] then [1]. To type the comma, press the comma key. To type L2, press [2ND] then [2]. Press [ENTER] and the calculator will show you the regression results: a is the slope, b is the y-intercept, and r is the correlation coefficient, which tells you how strong the relationship is.

For our data, a should be about 6.57 and b should be about 48.67, so the line of best fit is y = 6.57x + 48.67. That means for each extra hour studied, the test score goes up by about 6.57 points, and the predicted score for 0 hours studied is about 48.67. The r value should be about 0.998, which is very close to 1, and means the points are very close to a straight line. An r close to 1 or -1 means a strong relationship, and an r close to 0 means a weak one.

To graph the line of best fit on top of your scatter plot, run LinReg again, but this time store the equation in Y1. Press [STAT], go to CALC, choose 4: LinReg(ax+b), type L1, L2, Y1, and press [ENTER]. To type Y1, press [VARS], choose Y-VARS, choose 1: Function, and choose 1: Y1. Press [GRAPH] and you should see the line going through the middle of your points.

Using the line to predict

Once you have the equation of the line of best fit, you can use it to predict. For our data, the line is y = 6.57x + 48.67. To predict the score for 7 hours of study, type 6.57 x 7 + 48.67 and press [ENTER] to get about 94.66. That is the predicted score, and it is a reasonable prediction, because 7 hours is close to the data you have. To predict for 20 hours would be less reliable, because it is far outside the range of your data, and the relationship might not hold that far out. That is called extrapolation, and your teacher will warn you about it.

You can also use the line to find x for a given y. If you want to know how many hours you need to study to get a score of 90, solve 90 = 6.57x + 48.67 for x. That gives you x = (90 – 48.67) / 6.57, which is about 6.29 hours. Type that into the calculator to check it.

Common mistakes

The most common mistake is putting the x and y values in the wrong lists, or in the wrong order, so the points do not line up. Always check that L1 and L2 have the same number of values, and that the pairs match. The second most common mistake is forgetting to turn Plot1 on, or forgetting to turn off the functions in Y=, so the scatter plot does not show, or a function graph gets in the way. The third mistake is using ZoomStat before you have set up the plot, so the window is wrong. Set up the plot first, then use ZoomStat.

Another mistake is forgetting to store the regression equation in Y1, so you run LinReg but the line does not appear on the graph. If you want to see the line, you need to tell the calculator to put it in Y1. A fifth mistake is reading r as the slope, or a as the correlation. A is the slope, b is the y-intercept, and r is the correlation. Read the labels carefully.

Try it yourself

Try this data on your calculator: x values 2, 4, 6, 8, 10 and y values 3, 5, 7, 9, 11. Make a scatter plot and find the line of best fit. It should be y = x + 1, with r = 1, because the points are exactly on a straight line. Try another set: x values 1, 2, 3, 4, 5 and y values 10, 8, 6, 4, 2. The line should be y = -2x + 12, with r = -1, because the points go down in a straight line. If you can do both, including graphing the line on top of the points, you have the scatter plot skill down.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top