Free ACT Math Statistics and Probability

ACT Math · Statistics and Probability · free lesson

Scatterplots and Lines of Fit

The idea, then worked examples solved step by step, then practice questions whose numbers change every time you try them.

The topic in one minute

Press Play: the idea and a worked example, explained aloud (about 1:15).

Scatterplots and Lines of Fit

Eight summer days: temperature and iced drinks sold.

1 / 7
Read what is said
  1. A scatterplot shows two measurements of the same things at once, one dot for each pair. The ACT asks about the pattern, the line through it, and what the numbers mean.
  2. The dots do not sit on one line, but they have a direction. Here they rise, so the association is positive. A strong one gives an r near one. Do not say that one thing causes the other.
  3. A line of fit runs through the middle of the dots, with about as many above as below. It does not have to touch any dot. Here is the line the engine found.
  4. Each number has a meaning in context. The slope is the predicted change in y for each one more of x. The intercept is the prediction at zero, and here that is far outside the data.
  5. To predict, put the x value into the line. For an eighty-eight degree day, the prediction is eighty-five point six. That sits inside the range of the data, so it is a fair prediction.
  6. A residual is how far a dot is from the line, actual minus predicted. The line predicts forty centimeters on day eight, but the plant measured thirty-seven. Watch the sign.
  7. Remember: a scatterplot shows direction, not cause. Plug x into the line to predict, and take actual minus predicted for a residual. Now practice it with new numbers.

The idea

One dot for each pair

A scatterplot shows two measurements of the same things at once. Each dot is one pair: how far across it sits is the first measurement, and how high it sits is the second. A café owner wrote down the high temperature, in degrees Fahrenheit, on eight summer days and the number of iced drinks sold on each:

Temperature (°F)60606565707075758080858590909595
Iced drinks sold49495757656572727878878786869090

Watch the days go onto the plot one at a time. When all eight are there, a straight line is drawn through the middle of them.

The dots do not lie on one line, but they have a direction: hotter days go with more drinks sold. That direction is the association between the two quantities.

  • Positive association: the dots rise from left to right. As one quantity grows, so does the other.
  • Negative association: the dots fall from left to right. As one grows, the other shrinks.
  • No association: the dots make a shapeless cloud with no direction.

The closer the dots hug a line, the stronger the association. The correlation coefficient rr, a number from −1-1 to 11, measures this for a straight-line pattern: its sign is the direction, and it is near 11 or −1-1 when the dots lie close to a line and near 0 when they show no line. For the café the engine finds rr to be about 0.980.98, a strong positive association.

Warning.

An association does not show that one quantity causes the other. Ice cream sales and sunburns rise together, but both are caused by sunny weather. The ACT offers "causes" as a wrong option.

The line of fit

A line of fit (or line of best fit) runs through the middle of the dots, with about as many above it as below. It need not pass through any dot. The engine finds the best one from the data, its slope mm and its yy-intercept bb:

fit=least-squares line of n against t=the line y=−20.00+1.200xm=slope of fit=1.2b=intercept of fit=−20\begin{aligned} fit &= \text{least-squares line of }n\text{ against }t \\ &= \text{the line }y = -20.00 + 1.200x \\ m &= \text{slope of }fit \\ &= 1.2 \\ b &= \text{intercept of }fit \\ &= -20 \end{aligned}

The line is y=1.2x−20y = 1.2x - 20, where xx is the temperature and yy the predicted number of drinks. Each number has a meaning in context.

  • The slope, 1.21.2, is the predicted change in yy for each 1 more of xx: about 1.21.2 more drinks for each degree warmer.
  • The yy-intercept, −20-20, is the prediction when x=0x = 0. A 0 °F day is far outside the data, so here it means nothing: nobody sells −20-20 drinks.

Predicting, and the residual

To predict, put the xx into the line. For a day of 88 °F the prediction is pp:

p=m×88+b=1.2×88+(−20)=85.6\begin{aligned} p &= m \times 88 + b \\ &= 1.2 \times 88 + (-20) \\ &= 85.6 \end{aligned}

Drag the slider to choose a temperature. The green point walks along the line and the title reads its prediction. Predictions inside the range of the data (60 °F to 95 °F) are fair; far outside it, the pattern may not hold.

A residual is how far a dot is from the line, measured straight up or down: the actual value minus the predicted value. On the 85 °F day the café sold 87 drinks. The line predicts qq, so the residual is ee:

q=m×85+b=1.2×85+(−20)=82e=87−q=87−82=5\begin{aligned} q &= m \times 85 + b \\ &= 1.2 \times 85 + (-20) \\ &= 82 \\ e &= 87 - q \\ &= 87 - 82 \\ &= 5 \end{aligned}

A positive residual means the dot is above the line (more sold than predicted); a negative one means it is below. In the picture each dashed segment is a residual. A line that fits well has small residuals, with the positive and negative ones balancing.

Note.

On the ACT this topic asks: the kind of association a plot shows; what the slope or intercept of a line of fit means in context; a prediction from the line; a residual (actual minus predicted, not the other way round); which of two lines fits better; and whether a line or a curve suits the data. Read the scales of the axes before reading a slope off a picture.

Worked examples

Worked examples

Each example is one of the kinds of question the ACT asks about scatterplots. The numbers in the working are found by the engine.

Example.

1. Naming the association. A school nurse asked ten students how many hours they spent on screens after 9 p.m. and how many hours they slept that night. The scatterplot shows the answers. Describe the association, and say whether the plot shows that screen time causes less sleep.

The dots fall from left to right and lie close to a line, so the association is negative, linear and strong. The engine's correlation coefficient rr agrees: it is about −0.98-0.98, close to −1-1.

The plot does not show that screens cause less sleep. The students who stay on screens late may also go to bed late for other reasons, such as homework or a job. A scatterplot shows that two things go together, not why.

Example.

2. Slope and intercept in context. For used cars of one model, a line of fit for the price yy, in dollars, against the age xx, in years, is y=−1450x+21800y = -1450x + 21800. What do −1450-1450 and 2180021800 mean, and what price does the line predict for a car 6 years old?

The slope is the change in predicted price for each 1 more year: the price is predicted to drop $1,450 for each year of age. The yy-intercept is the predicted price at age 0: a new car is predicted to cost about $21,800. The prediction at x=6x = 6 is pp:

p=−1450×6+21800=13100\begin{aligned} p &= -1450 \times 6 + 21800 \\ &= 13100 \end{aligned}

The line predicts $1310013100. A common slip is to read the slope as a price: $1,450 is not what any car costs, it is a yearly drop.

The green point is the prediction for 6 years: it sits on the line.

Example.

3. A residual. The line of fit y=3.5x+12y = 3.5x + 12 predicts the height yy, in centimeters, of a bean plant xx days after it sprouts. On day 8 a plant was 37 cm tall. What is the residual for that plant?

A residual is the actual value minus the predicted value. First the prediction PP, then the residual ee:

P=3.5×8+12=40e=37−P=37−40=−3\begin{aligned} P &= 3.5 \times 8 + 12 \\ &= 40 \\ e &= 37 - P \\ &= 37 - 40 \\ &= -3 \end{aligned}

The residual is −3-3: the plant is 33 cm shorter than the line predicts, so its dot lies below the line. Taking predicted minus actual gives 33, the wrong sign; it would put the dot above the line.

Example.

4. A line read from a graph. The graph shows the number of visitors yy to a museum's website, in hundreds, against the number xx of social-media posts the museum made that week, with a line of fit. Find the equation of the line, and use it to find how many posts the line says are needed for 10,000 visitors.

Two points where the line crosses grid corners are marked in black: (2,30)(2, 30) and (10,70)(10, 70). Read them from the axes, not by counting squares (one square up is 10). The slope mm is rise over run, and then the intercept bb comes from either point:

m=70−3010−2=530=m×2+b30=5×2+bb=20\begin{aligned} m &= \frac{70 - 30}{10 - 2} \\ &= 5 \\ 30 &= m \times 2 + b \\ 30 &= 5 \times 2 + b \\ b &= 20 \end{aligned}

The line is y=5x+20y = {5}x + {20}. 10,000 visitors is 100 hundreds, so set y=100y = 100 and solve for the number of posts xx:

100=mx+b100=5x+20x=16\begin{aligned} 100 &= mx + b \\ 100 &= 5x + 20 \\ x &= 16 \end{aligned}

The line says 1616 posts. Two traps: putting 10,000 in for yy forgets that yy counts hundreds, and putting 100 in for xx answers a different question.

Example.

5. Which line fits better? Two students drew lines of fit for the five points in the table. Line A is y=2x+1y = 2x + 1 and line B is y=1.5x+3y = 1.5x + 3. Which fits the points better?

xx1122334455
yy336677991010

Work out every residual for each line, then compare their sizes. A fair measure is the sum of the squared residuals: the smaller it is, the closer the line runs to the points. uu and vv are the residuals of lines A and B, and UU and VV the sums of their squares:

u=y−(2x+1)=[0,1,0,0,−1]v=y−(1.5x+3)=[−32,0,−12,0,−12]U=sum⁡(u2)=2V=sum⁡(v2)=114\begin{aligned} u &= y - (2x + 1) \\ &= [0, 1, 0, 0, -1] \\ v &= y - (1.5x + 3) \\ &= [-\frac{3}{2}, 0, -\frac{1}{2}, 0, -\frac{1}{2}] \\ U &= \operatorname{sum}(u^{2}) \\ &= 2 \\ V &= \operatorname{sum}(v^{2}) \\ &= \frac{11}{4} \end{aligned}

Line A's sum, 22, is smaller than line B's, 114\frac{11}{4}, so line A fits better. Look at the signs too: every residual of line B is 0 or negative, so line B runs above the points all the way along. A good line has residuals of both signs.

Example.

6. A line or a curve? A lab counts the bacteria in a dish, in thousands, every hour. Should a line be fitted to these data?

Hour001122334455
Thousands of bacteria33661212242448489696

Data on a line grow by the same amount each step. Look at the changes from hour to hour, and at the ratios of each count to the one before, worked out by the engine.

The changes are [3,6,12,24,48][3, 6, 12, 24, 48]; the ratios are [2,2,2,2,2][2, 2, 2, 2, 2]. The changes grow, but the ratio is the same each hour: the count is multiplied by 22 each hour. That is exponential growth, so a curve of the form y=a⋅bxy = a \cdot b^x fits, not a line. In the picture the best line is too high in the middle and too low at both ends.

Practice

Answer ACT-style questions on scatterplots and lines of fit. Each answer is checked, with the full solution, and every try brings new numbers. Practice needs a free account: it keeps your progress.

Practise scatterplots and lines of fit with new numbers