Fit and interpret data models

Lesson progressPractice problems 0/4
Difficulty
Intermediate
Estimated time
35 minutes
Techniques
Fitted-modelsRegressionPredictionResidualsModel-comparison

What you’ll learn

  1. Tell a measured data point apart from a value the model predicts.
  2. Explain what the slope, intercept and other parameters of a fitted model mean.
  3. Find a residual and say what it tells you.
  4. Pick a linear, quadratic or exponential model that matches the data.
  5. Fit a model in Desmos when a table of data makes that the quickest way.

Why this matters on the SAT

Read the model, not a nearby dot

A line or curve of best fit shows the overall trend in paired data. The SAT may ask you to read one of its numbers, make a prediction from it, or compare a prediction with what really happened.

Solution to the example

Find 66 hours on the horizontal axis and go straight up to the line. The line is at about 3838 there, so choice B is correct.

The trap is the dot at about (6,41)(6,41). That’s one student’s actual score, and it’s where choice C comes from. The question asks what the line predicts, so read the line, not the dot.

SAT example

A prediction comes from the fitted line, even when an observed point has the same input.

The scatterplot shows practice time and quiz score for several students. A line of best fit is also shown.

According to the line of best fit, which choice is closest to the predicted quiz score for a student who practices for 66 hours?

  1. A

    3535

  2. B

    3838

  3. C

    4141

  4. D

    4444

Separate observations from predictions

Each dot on a scatterplot is an observed pair: something that was actually measured. The fitted line or curve gives a predicted output for each input, often written y^\widehat y and read “yy-hat.”

A best-fit line or curve isn’t meant to pass through every dot. It follows the overall pattern, so most dots sit a little above or below it. That means one input can have two outputs on the same graph:

  • the dot’s yy-coordinate is the observed output;
  • the model’s y^\widehat y-value is the predicted output.

The gap between them is the residual:

residual=y−y^=observed−predicted.\text{residual}=y-\widehat y =\text{observed}-\text{predicted}.

To keep the order straight, think real minus model.

The residual runs straight up and down, because the model predicts an output for one fixed input.

The sign tells you where the point sits:

  • A positive residual means the point is above the model.
  • A negative residual means the point is below the model.
  • A residual of 00 means the point is right on the model.
  • The bigger the residual’s absolute value, the farther the point is above or below the model.
Check your understanding:

In the opening scatterplot, the observed score at x=6x=6 is about 4141 and the model predicts about 3838. What is the residual, and what does its sign mean?

Common mistake:

Predicted minus observed gives the right size but the wrong sign. Write observed minus predicted before you plug in any numbers. Then check it against the graph: a point above the model must have a positive residual.

What the parameters tell you

A model’s parameters are the numbers that set its shape, like the slope and intercept of a line. For a fitted line

y^=mx+b,\widehat y=mx+b,

the slope mm is the predicted change in yy each time xx goes up by 11. Its units are output units per input unit, like miles per hour. The intercept bb is the prediction when x=0x=0.

Say a fitted line for distance dd, in miles, after tt hours is

d^=42t+3.\widehat d=42t+3.

The model predicts 4242 more miles for each extra hour, and 33 miles at t=0t=0. Is that 33 useful? Only if t=0t=0 makes sense in the story and falls inside the range of data that was studied.

Curved models have parameters too, each with its own job:

  • In y^=ax2+bx+c\widehat y=ax^2+bx+c, the coefficients set how the parabola bends and where it sits. The value cc is the prediction at x=0x=0.
  • In y^=a(b)x\widehat y=a(b)^x, the value aa is the prediction at x=0x=0, and bb is what the output gets multiplied by each time xx goes up by 11.
Check your understanding:

A fitted line has slope −2.4-2.4 liters per minute. What change does the model predict over an additional 55 minutes?

Choose the model family

Start with the shape of the scatterplot. If you have a table, compare outputs at equal input steps, like x=0,1,2,3x=0,1,2,3.

Pick the model that matches the shape of the data and the way it changes.

Here’s what that looks like with real numbers. At inputs 0,1,2,3,40,1,2,3,4, the outputs are

12, 17, 26, 39, 56.12,\ 17,\ 26,\ 39,\ 56.

Subtract each output from the one after it. These are the first differences:

5, 9, 13, 17.5,\ 9,\ 13,\ 17.

They aren’t constant, so a line won’t fit. Now subtract again: 9−59-5, 13−913-9 and 17−1317-13. Every one of these second differences is 44, and that points to a quadratic model.

So at equal input steps, here’s what each family looks like:

  • Linear data change by about the same amount each step, so the first differences are roughly constant. The graph is a straight trend.
  • Quadratic data have first differences that change but second differences that stay roughly constant, like the 44s above. The graph bends like a parabola and may turn around.
  • Exponential data have each output about the same multiple of the one before, so the ratios are roughly constant. The graph changes by a common factor, not a common amount.
Try it yourself:

At equal input steps, the outputs are 90,72,57.6,46.0890,72,57.6,46.08. Is a linear, quadratic or exponential model the best match? Decide before you open the check.

Check your understanding:

Which family fits 90,72,57.6,46.0890,72,57.6,46.08, and what pattern supports it?

One trap: a model with more parameters can usually bend closer to a handful of points. Closer isn’t automatically better. Use the family the question names, or the one the overall pattern supports.

Example: Fit a linear model from a table

Now the question gives you a table of data and no model yet. Working out a best-fit line by hand takes a lot of arithmetic, so Desmos is usually faster and safer. Its regression tool finds the best-fit model for you.

Worked example

A coach records the number of weeks, xx, that five cyclists follow a training plan and their average distance, yy, in kilometers, on a fixed-time ride.

xx (weeks)1122334455
yy (kilometers)12121616191923232525

A linear model is used to predict average distance from weeks of training. According to the model, what is the predicted average distance after 77 weeks?

  1. A

    25.025.0 kilometers

  2. B

    29.729.7 kilometers

  3. C

    32.232.2 kilometers

  4. D

    36.436.4 kilometers

Step 1

Put the data in a table

The model predicts distance from weeks, so weeks go in x_1 and distance goes in y_1. Keep each row together: one cyclist’s weeks next to that cyclist’s distance.

Step 2

Fit a linear model

Select Add Regression beside the table and choose Linear, or type

y1∼mx1+b.y_1\sim mx_1+b.

The tilde, ∼\sim, tells Desmos to fit the model to the data. Desmos reports

m=3.3andb=9.1.m=3.3 \qquad\text{and}\qquad b=9.1.
Calculator loads as you approach
Change a value in the table to watch the fit and the prediction update, then reset.

Step 3

Plug in 7 with the stored parameters

Type

m∗7+b.\mathtt{m*7+b}.

Desmos uses the full stored values of mm and bb and returns 32.232.2. So the model predicts 32.232.2 kilometers, and choice C is correct.

Why not type 3.3(7)+9.13.3(7)+9.1 yourself? Here it gives the same answer. But when a coefficient is a long decimal, Desmos shows it rounded, and copying the rounded value into a new expression can shift your final decimal. Let Desmos use what it stored.

Check your understanding:

What does the fitted slope 3.33.3 mean in this context?

Common mistake:

Regression shows several numbers at once, and it’s easy to grab one of them, like m=3.3m=3.3. Reread the question after you fit. If it asks for the output at a given input, plug that input into the model and give the answer in the right unit.

Example: Fit a quadratic model from a table

A quadratic uses the same table steps. Only the model you type changes, because a quadratic has three parameters for Desmos to store instead of two.

Worked example

A researcher records a plant's height, yy, in centimeters, on several days xx.

xx (day)001122334455
yy (centimeters)66881515252540405959

A quadratic model is used for the data. According to the model, what is the predicted height, in centimeters, on day 66? Give your answer to the nearest tenth.

Step 1

Keep each pair together

Put the days in x_1 and the heights in y_1. Each row is one measurement: a day and the plant’s height on that day.

Step 2

Fit a quadratic model

Select Add Regression beside the table and choose Quadratic, or type

y1∼ax12+bx1+c.y_1\sim ax_1^2+bx_1+c.

Desmos stores the fitted values of aa, bb and cc and shows them as approximately

a=2.08929,b=0.153571,c=5.96429.a=2.08929,\qquad b=0.153571,\qquad c=5.96429.

These decimals describe a best fit, not an exact rule, and you don’t need to copy them.

Step 3

Plug in 6 without retyping

Type

a∗62+b∗6+c.\mathtt{a*6^2+b*6+c}.

Desmos plugs in the full stored values and returns 82.182.1. The model predicts a height of 82.1\boxed{82.1} centimeters on day 66.

Check your understanding:

In the fitted model y^=ax2+bx+c\widehat y=ax^2+bx+c, which stored parameter gives the prediction at x=0x=0?

Calculator loads as you approach
The fitted curve and its day 6 prediction, worked out from the stored parameters.

Choose your method

Before you start, look at what the question gives you.

  • A model that’s already drawn or written. Read from it or plug in, as you did with the quiz-score line. Rebuilding the model would only add work. If you need the slope of a drawn line, use two easy-to-read points on the line, even where no dot sits. Most dots miss the line, so a slope through two dots isn’t the model’s slope.
  • A table of measured data. When the pairs are scattered, like the cyclists’ distances, fit them in Desmos with the family you picked. The table steps are the same for linear, quadratic and exponential regression. What you get is an estimate from the best fit, not an exact value.
  • A short table with an exact pattern. When the outputs follow an exact difference, second difference or ratio, like 3,6,12,243,6,12,24, where each output is double the one before, you can keep the pattern going by hand. That’s often quicker than regression. If you do fit a model to exact values like these, check that it hits every one: 3(2)x3(2)^x gives 33, 66, 1212 and 2424 at x=0,1,2,3x=0,1,2,3.

Often you’ll use a hybrid route. Desmos finds the parameters and the prediction. You decide which family to fit, which input to plug in, how to round, which unit to give and what a parameter means.

Practice problems

Give each one a real try before you open the hint.

Interpret a residual

Practice problem

A fitted model predicts a plant's height h^\widehat h, in centimeters, from the amount of fertilizer xx, in grams:

h^=2.4x+18.\widehat h=2.4x+18.

For a plant that received 77 grams of fertilizer, the observed height was 3232 centimeters. Which statement correctly describes the residual?

Answer choices
Calculator loads as you approach
Check your arithmetic here if it helps.

Fit a quadratic on your own

Practice problem

An engineer records a machine's response time, yy, in milliseconds, at several workload levels xx.

Workload level xx112244557788
Response time yy (milliseconds)121213132929383873739191

A quadratic model is used for the data. According to the model, what is the predicted response time, in milliseconds, at workload level 66? Give your answer to the nearest tenth.

Calculator loads as you approach
Same steps as the plant example: enter the table, fit a quadratic, then plug in 6.

Spot an exact ratio

Practice problem

A laboratory records the mass mm, in milligrams, of a culture after tt hours.

tt (hours)00112233
mm (milligrams)8080120120180180270270

The data are modeled by an exponential function. According to the model, what is the predicted mass, in milligrams, after 44 hours?

Calculator loads as you approach
Check the ratios first. You may only need the calculator for the final power.

Compare two fitted models

Practice problem

Two models, Q and E, are being compared with two observed data points.

Input xxObserved yyModel Q predictionModel E prediction
44868684849090
66158158160160151151

For each model, calculate the sum of the absolute values of its two residuals. By how much is the smaller sum less than the larger sum?

Calculator loads as you approach
Keep the four residuals straight: two for each model.

Finish the lesson

4 practice examples left

Finish the remaining questions correctly to complete this lesson.

Quick recap

  • A dot is observed. The fitted line or curve gives the prediction y^\widehat y.
  • A residual is real minus model. Positive means above the model, and negative means below.
  • Slope is the predicted change per input unit. The intercept is the prediction at x=0x=0.
  • At equal input steps, roughly constant first differences point to linear, second differences to quadratic, and ratios to exponential.
  • Use the family the question names or the data supports. A bendier curve isn’t automatically better.
  • Given a model, read from it or plug in. Given measured data, fit it in Desmos, where only the model you type changes from family to family. Given an exact pattern, keep it going when that’s quicker.
  • Plug in with the stored parameters, like m*7+b, and round only the final answer.
  • Compare fits by the sizes of their residuals, using absolute values so opposite misses don’t cancel.

Next lesson

Calculate probability and relative frequency

Use counts and observed frequencies to calculate and interpret probabilities.

Start next lesson

Practice

Practice this lesson

409 SAT questions use what this lesson teaches. Practice a few in a study session at the difficulty you choose.

Start practice