Fitting Curves Using Linear Models

Paired data become a scatter plot, and a roughly linear pattern can be summarized by a model y = mx + b. Use correlation to describe direction and strength, interpret the model’s slope and intercept, and solve for either variable while distinguishing interpolation from extrapolation.

Course cover for Fitting Curves Using Linear Models

A Bill You Can Predict

Diego’s family wants to predict its next heating bill. His notebook records seven months of average temperatures and heating bills, with each temperature paired with the bill for the same month

MonthMean temperature (°F)Heating bill ($)
14062
24855
35548
45544
56836
67530
78522

The coldest months have the largest bills, while the warmest months have the smallest bills. The driving question is: What bill should Diego expect if a month averages 92 °F? To answer it, first organize the pairs, examine their pattern, and build a linear model

From Table to Scatter Plot

Bivariate data contain pairs of numbers. Each month in Diego’s table gives one temperature-and-bill pair. To choose the axes, ask which quantity drives the other: outdoor temperature drives how much heat the family uses, and the bill responds

Temperature is the independent variable and belongs on the horizontal x-axis. The heating bill is the dependent variable and belongs on the vertical y-axis. The course’s plotting grid uses Average Temperature (°F) from 30 to 90 in steps of 10 and Heating Bill ($) from 0 to 70 in steps of 10. Each axis needs both its quantity and its unit

From Table to Scatter Plot: 30 40 50 60 70 80 90 0 10 20 30 40 50 60 70 Average Temperature (°F) Heating Bill ($)

Plot each pair as one point: (40, 62), (48, 55), (55, 48), (55, 44), (68, 36), (75, 30), and (85, 22). For example, (40, 62) is located at x = 40 and y = 62. Both months with a temperature of 55 °F remain: they give two separate points, one at $48 and one at $44. From left to right, the seven points form a tight, falling pattern

From Table to Scatter Plot: 30 40 50 60 70 80 90 0 10 20 30 40 50 60 70 Average Temperature (°F) Heating Bill ($)

Practice 1: Choose the axes

A family records gallons of gasoline used and miles driven on each road-trip leg. A smoothie menu lists grams of sugar and calories for each smoothie. With gallons of gasoline already assigned to the x-axis as an example, which axes should contain Miles driven, Grams of sugar, and Calories in the smoothie?

The supplied classification places Miles driven on the y-axis (dependent), Grams of sugar on the x-axis (independent), and Calories in the smoothie on the y-axis (dependent). The course feedback emphasizes choosing by the driver-and-responder relationship, not by table order: the driver goes on x and the responder on y

Reading the Pattern

PatternWhat happens as x increases?Course exampleTrend-line slope
Positive correlationy tends to increase; points rise from left to right.Minutes practiced versus free throws madePositive
Negative correlationy tends to decrease; points fall from left to right.Temperature versus Diego’s heating billNegative
Relatively no correlationNo consistent direction appears.Shoe size versus quiz scoreNo consistent trend

Direction is not strength. Points that hug a line closely show a strong relationship; widely spread points show a weak relationship. Either an upward or a downward pattern can be strong or weak

For Practice 2, the tree-age-versus-height pattern rises from left to right, the day-of-month-versus-rainfall pattern is randomly scattered, and the car-age-versus-resale-value pattern falls from left to right

Tap the plot that shows negative correlation

A

Tree age vs height

B

Day of month vs rainfall

C

Car age vs resale value

The Correlation Coefficient r

The correlation coefficient r measures a linear pattern on a scale from −1 to 1. Its sign gives the direction, and its distance from zero gives the strength

Value of rMeaning
1Perfect positive correlation: every point lies exactly on an upward-sloping line.
−1Perfect negative correlation: every point lies exactly on a downward-sloping line.
0No linear relationship.

The course reports r ≈ −0.97 for Diego’s data, matching its tight downward pattern. The smoothie-shop comparison of sugar and calories has r = 0.58, an upward but more loosely spread pattern described as moderate. The relationship with r ≈ −0.97 is stronger because it is farther from zero: strength is compared using |r|, not by favoring a positive sign

The Correlation Coefficient r: r

Practice 3: A perfect downward fit

Every point lies exactly on one downward-sloping line. What is the value of r? In the course example, six points compare weeks since opening with items left in stock. The explicit answer is r = −1. The feedback explains that an exact downward fit is as strong and as negative as possible, not weak, moderate, or zero

Drawing the Line of Best Fit

A second data set compares average low temperatures in Riverton and Summit Falls over seven winter days. Riverton is x, Summit Falls is y, and both temperatures are in degrees Fahrenheit. The course uses axes from 0 to 80 in steps of 10 for both towns

DayRiverton (°F)Summit Falls (°F)
12530
23535
34042
45048
56055
66862
77566

The points rise from lower left to upper right, showing positive correlation; the course connects this pattern to cold snaps affecting both towns together. The exploration asks: What slope makes y = mx + 10 follow the trend? Its trial line starts with m = 0.25 and always passes through (0, 10). The slope exploration runs from 0.25 to 1.5 in steps of 0.05, with a trend-match interval of 0.65 to 0.85. The worked example then uses m = 0.75

Drawing the Line of Best Fit: 0 10 20 30 40 50 60 70 80 10 20 30 40 50 60 70 80 Riverton (°F) Summit Falls (°F)

What makes a good fit?

A line of best fit follows the cloud’s trend. It does not have to pass through every point and may miss most of them. It should balance the cloud, with roughly as many points above as below, rather than being too steep, too flat, too high, or too low. By-eye lines can vary a little between careful students

Drawing the Line of Best Fit: 0 10 20 30 40 50 60 70 80 10 20 30 40 50 60 70 80 Riverton (°F) Summit Falls (°F) on the line

For its line through (0, 10) with slope 0.75, the course’s worked presentation identifies four points above—(25, 30), (40, 42), (50, 48), and (68, 62)—two below—(35, 35) and (75, 66)—and one on the line, (60, 55)

Drawing the Line of Best Fit: 0 10 20 30 40 50 60 70 80 10 20 30 40 50 60 70 80 Riverton (°F) Summit Falls (°F) (0, 10) (60, 55)

From the line to its equation

Given the fitted line, find its equation y = mx + b. The line crosses the y-axis at (0, 10), so b = 10. Choose a second point exactly on the fitted line, not merely any point in the data cloud. The worked example uses (64, 58)

Compute rise over run: m = (58 − 10)/(64 − 0) = 48/64. Dividing numerator and denominator by 16 gives m = 3/4. Thus y = (3/4)x + 10, where x is Riverton’s average low and y is the predicted average low for Summit Falls, both in °F

Practice 4: Complete a fitted-line equation

A gardener’s software fits a line predicting sprout height in millimeters from days since planting. Use the two marked points, (0, 30) and (50, 70), to complete y =

$$m$$

x +

$$b$$

. The supplied choices are 4/5, 5/4, −4/5, 30, and 70

The explicit answer assigns m = 4/5 and b = 30, giving y = (4/5)x + 30. Following the course’s rise-over-run method, m = (70 − 30)/(50 − 0) = 40/50 = 4/5; the point (0, 30) supplies the intercept. The feedback warns against reversing the fraction to 5/4: the change in height belongs on top, and the horizontal change belongs below

What Slope and Intercept Mean

Diego’s heating-bill model

The course reports the technology-fitted model y = −0.9x + 98 for Diego’s seven months, where x is average temperature in °F and y is the predicted heating bill in dollars

The slope −0.9 means that for each additional 1 °F of average temperature, the predicted bill drops by about $0.90 on average. The intercept 98 means a predicted bill of about $98 when the temperature is 0 °F. The course judges this plausible because the heater would run hard during a zero-degree month

What Slope and Intercept Mean: 30 40 50 60 70 80 90 0 10 20 30 40 50 60 70 Average Temperature (°F) Heating Bill ($)

A smoothie-shop model

The smoothie-shop model is y = 15x + 320, with x = sugar in grams, y = predicted calories, and r = 0.58. The slope 15 means each additional gram of sugar adds about 15 calories on average. The intercept 320 predicts about 320 calories at 0 grams of sugar

What Slope and Intercept Mean: 0 10 20 30 40 0 200 400 600 800 1000 Sugar (g) Calories

Is that intercept meaningful? The narration answers yes, explaining that fruit, milk, and yogurt carry calories even without added sugar. The model’s variable label is sugar in grams, while this explanation refers to no added sugar. With the moderate r = 0.58 and widely spread points, the course treats predictions as estimates, not promises

Practice 5: Match a model to its meanings

For the delivery-pay model y = 2.5x + 40, x is deliveries in a day and y is predicted pay in dollars. Match each part of the model to its meaning: Slope 2.5; y-intercept 40; Prediction for x = 10. The supplied possible meanings are “Pay rises about $2.50 per extra delivery,” “Predicted pay of $40 on a day with zero deliveries,” “$65,” and “The largest pay ever observed in the data.”

The correct matches are: slope 2.5 → pay rises about $2.50 per extra delivery; y-intercept 40 → predicted pay of $40 with zero deliveries; prediction for x = 10 → $65, since 2.5(10) + 40 = 65. “The largest pay ever observed in the data” is unmatched. The feedback stresses that slope is a per-unit change and the intercept is the model’s prediction at x = 0, not a recorded maximum

Making Predictions

Predicting y from x: A 92 °F month

Return to Diego’s original question: What heating bill should he expect for a month averaging 92 °F? Use y = −0.9x + 98 with x = 92

Substitute: y = −0.9(92) + 98. Multiply first: y = −82.8 + 98. Combine: y = 15.2. The model therefore predicts a heating bill of about $15.20

The observed temperatures range from 40 to 85 °F, so 92 °F lies outside the data. This is extrapolation. The course considers this estimate reasonable because its reported r ≈ −0.97 is strong and 92 °F is only slightly outside the observed range, but warns that predictions become riskier farther beyond the data

Making Predictions: 40 85 observed: 40-85 °F 92 extrapolation

Predicting x from y: A 620-calorie smoothie

How many grams of sugar does the smoothie model predict for about 620 calories? Here y is given. Begin with y = 15x + 320 and replace y with 620: 620 = 15x + 320

Subtract 320 from both sides to obtain 300 = 15x. Divide both sides by 15 to obtain x = 20 grams of sugar. The course’s graph verification starts at 620 on the calories axis, moves horizontally to the model line at (20, 620), then vertically down to 20 on the sugar axis. With r = 0.58, report the result as an estimate: about 20 g of sugar

Making Predictions: 0 10 20 30 40 200 400 600 800 1000 Sugar (g) Calories 620 x = 20

Practice 6: Put the solution steps in order

A party venue’s cost model is y = 12x + 260, where x is the number of guests and y is total cost in dollars. The class budget is $500. How many guests can attend? Step 1 is supplied: replace y with 500 to get 500 = 12x + 260. What is the correct order of the remaining steps?

The supplied steps, initially unordered, are “Divide both sides by 12: x = 20,” “Report with units: about 20 guests,” and “Subtract 260 from both sides: 240 = 12x.” The correct order is: subtract 260 to obtain 240 = 12x; divide by 12 to obtain x = 20; report about 20 guests. The feedback emphasizes clearing the added constant before dividing by the multiplier, then reporting units

Summary

1. Set up the plot. Put the independent, driver variable on x and the dependent, responder variable on y. Each data pair becomes its own point

2. Read the pattern. Identify positive, negative, or relatively no correlation. The correlation coefficient r ranges from −1 to 1; its sign gives direction, and its distance from zero, |r|, gives linear strength

3. Fit the line. A fitted line follows the trend and balances points above and below. Write y = mx + b using the y-intercept and another point on the line, rather than an arbitrary data point

4. Interpret the numbers. Slope is the average change in y for each additional unit of x. The intercept is the predicted y when x = 0

5. Predict with care. Substitute a given x to predict y, or substitute a given y and solve for x. Interpolation stays inside the observed data range and is safer than extrapolation beyond it. Every prediction is an estimate

Quiz

Quiz 1: Compare linear strength

Three science-fair teams report correlation coefficients of −0.91, 0.62, and 0.15 for their data

Quiz: -1 -0.5 0 0.5 1 r -0.91 0.15 0.62

Which correlation coefficient shows the strongest linear relationship?

A

r = -0.91

B

r = 0.62

C

r = 0.15

Quiz 2: Use a prediction model

The cocoa stand’s model is y = −0.5x + 60, where x is the daily high temperature in °F and y is the predicted number of cups of hot cocoa sold

Use the model to predict the cups of hot cocoa sold on a day with a high of 70 °F

A

25 cups

B

95 cups

C

59.5 cups

Quiz 3: Interpolation or extrapolation?

A road-trip model predicts miles driven from gallons of gasoline used. Its observed data cover fill-ups between 8 and 13 gallons. Classify each prediction as Interpolation (inside the data) or Extrapolation (beyond the data): Prediction at 9 gallons; Prediction at 12.5 gallons; Prediction at 20 gallons

The explicit classification is: 9 gallons → interpolation; 12.5 gallons → interpolation; 20 gallons → extrapolation. The feedback directs comparison with the observed band from 8 to 13 gallons: values inside it interpolate, and values beyond either end extrapolate

Continue with the interactive lesson