THE VR SCHOOL
  • Schools & Districts
    • License the academy
    • Free program for your students
    • Request a demo
  • Catalog
    • AI & Data
    • Cybersecurity & Web
    • Programming
    • Health Science
    • All Guilds
    • All courses
  • Families
  • Accreditation
  • Log In
  • Request a demo
  • Home
  • Courses

RLP Statistics A — Exploring Data, Study Design and Probability

Curriculum

  • 4 Sections
  • 20 Lessons
  • 10 Weeks
Expand all sectionsCollapse all sections
  • Unit 1: Exploring One-Variable Data
    5
    • 1.1
      Distributions and the Statistical Process
      50 mins
    • 1.2
      Measuring Center and Spread
      50 mins
    • 1.3
      Comparing Distributions Across Missouri
      50 mins
    • 1.4
      Standardizing, Transforming and Reporting
      50 mins
    • 1.5
      Performance Task — Climate Station Profile
      150 mins
  • Unit 2: Two-Variable Data and Regression
    5
    • 2.1
      Scatterplots and Correlation
      50 mins
    • 2.2
      Least-Squares Regression
      50 mins
    • 2.3
      Residuals, Influence and Causation
      50 mins
    • 2.4
      Exponential Models and the Limits of Extrapolation
      50 mins
    • 2.5
      Performance Task — Bivariate Investigation Report
      150 mins
  • Unit 3: Designing Studies: Samples and Experiments
    5
    • 3.1
      Populations, Samples and Bias
      50 mins
    • 3.2
      Simulating Sampling Variability and the Margin of Error
      50 mins
    • 3.3
      Experiments, Observational Studies and Confounding
      50 mins
    • 3.4
      Comparing Treatments with a Randomization Test
      50 mins
    • 3.5
      Performance Task — Design, Run and Report a Study
      150 mins
  • Unit 4: Probability, Random Variables and the Binomial Model
    5
    • 4.1
      Probability Rules and Two-Way Tables
      50 mins
    • 4.2
      The Multiplication Rule, Trees and Counting
      50 mins
    • 4.3
      Random Variables, Expected Value and Variance
      50 mins
    • 4.4
      The Binomial Model
      50 mins
    • 4.5
      Performance Task — Expected-Value Decision Analysis
      150 mins

Least-Squares Regression

Unit 2  ·  Data Investigation Lab  ·  Lesson 7 of 20

Least-Squares Regression

PS.12RLP-STATSA
Unlabeled declining scatterplot with a best-fit line and vertical residuals, viewed beside a pointing hand.
By the end of this lesson I can…

compute the least-squares regression line from summary statistics and with technology, and interpret its slope, intercept and r-squared in context.

Instruction

The data. The CDC’s National Center for Health Statistics publishes age-adjusted death rates by cause and state. For heart disease in Missouri, the rate fell from 300.5 deaths per 100,000 people in 1999 to 191.1 in 2017. (Age adjustment removes the effect of the population getting older, so rates from different years can be compared.) Let x = years since 1999 (0 to 18) and y = the rate.

What “least squares” means. For any line ŷ = a + bx, each point has a residual, y − ŷ: observed minus predicted. The least-squares regression line (LSRL) is the one line that makes the sum of the squared residuals as small as possible. Squaring keeps positive and negative misses from canceling and penalizes big misses heavily.

The formulas. Minimizing that sum (a calculus or algebra exercise, done in OpenStax Statistics chapter 12) gives:

b = r · sy / sx   and   a = ȳ − b x̄

The second formula says the line always passes through the point of means (x̄, ȳ). The first says: a change of one SD in x predicts a change of r SDs in y. Because |r| ≤ 1, predictions are pulled toward the mean. This is regression to the mean, the origin of the word.

Worked computation. For the 19 years: x̄ = 9, sx = 5.627; ȳ = 227.34, sy = 36.33; r = −0.9481.

b = −0.9481 × 36.33 / 5.627 ≈ −6.12    a = 227.34 − (−6.12)(9) ≈ 282.43

predicted rate = 282.43 − 6.12 × (years since 1999)

A spreadsheet (=SLOPE, =INTERCEPT, or a chart trendline) gives the same line.

Interpreting in context (A1.DS.A.6).

  • Slope: from 1999 to 2017, Missouri’s age-adjusted heart-disease death rate fell by about 6.1 deaths per 100,000 per year, on average. Say “predicted” or “on average”, because not every year fell by 6.1.
  • Intercept: the predicted rate for 1999 (x = 0) is 282.43 per 100,000. The actual 1999 rate was 300.5, so the line underestimates that year by 18.1. An intercept is meaningful only when x = 0 is inside or near the data, which is why we measured years from 1999 rather than from year 0.
  • r2 = 0.899: about 89.9% of the variation in the yearly death rates is accounted for by the linear trend over time. The remaining 10.1% is variation the line does not capture.

Predicting. For 2010 (x = 11): 282.43 − 6.121(11) = 215.10, against an actual 201.8, a residual of −13.3. Predicting inside the range of the data is interpolation. Predicting outside it is extrapolation, and the next lesson shows why that is risky even with r2 = 0.899.

Two lines, not one. Regressing x on y gives a different line. The LSRL of y on x minimizes vertical distances only, so decide which variable is the response before you fit.

📖 Read for this lesson

The reading opens over the lesson; close it to come back to exactly where you were. The checks below draw on it.

  • Missouri Death Rates, 1999-2017: The CDC Table the Regression Runs OnCDC/NCHS, NCHS – Leading Causes of Death: United States (data.cdc.gov dataset bi63-dtpu), Missouri rows, age-adjusted death rates per 100,000, 1999-2017; retrieved November 10, 2026 · about 3 min

    The CDC rows for Missouri heart disease, cancer and four other causes, with the means, SDs and r that b = r·s_y/s_x needs. The lesson’s line reproduces from this table.

Vocabulary in context

  • residual — Observed value minus predicted value (y − ŷ); positive when the point lies above the line.
  • least-squares regression line — The line that minimizes the sum of squared residuals; slope b = r·s_y/s_x, passing through (x̄, ȳ).
  • coefficient of determination (r²) — The fraction of the variation in y accounted for by the linear model in x.
  • extrapolation — Using a model to predict outside the range of the x-values used to fit it.
  • age-adjusted rate — A rate standardized to a fixed age distribution, so populations of different ages can be compared.

Formative check

Work through these before moving on. They are not graded — they tell you whether the standard below has landed yet.

Fill in the blank

With r = −0.9481, s_y = 36.33 and s_x = 5.627, the slope is about ; with x̄ = 9 and ȳ = 227.34, the intercept is about .

+50 XP

Which is the best interpretation of the slope −6.12?

Give the units of both variables and say ‘predicted’ or ‘on average’.

Simulation & tools

Find the least-squares line by hand, then check

Choose a dataset in the sim with a clear linear pattern. Turn on My Line and its Residuals and Squared Residuals.

  1. Drag your line until the total area of the squares is as small as you can make it. Record your slope, intercept and sum of squares.
  2. Turn on Best-Fit Line. Record its equation, r and sum of squares. How close did you get?
  3. Drag one point far above the line near the middle of the x-range, then near one end. Record how much the best-fit slope changes in each case.

Answer: why does the same outlier move the line more at the end of the x-range? No sim access: use a spreadsheet with the Missouri CDC table from this lesson’s reading, try three hand-chosen lines, compute the sum of squared residuals for each, then compare with =SLOPE and =INTERCEPT.

Open in a new tab ↗  ·  PhET Interactive Simulations, University of Colorado Boulder · CC BY 4.0

Enter the Missouri heart-disease rates from the table in this lesson’s reading (CDC/NCHS dataset bi63-dtpu, 1999-2017, retrieved 2026-11-10) into CODAP or a spreadsheet. Verify the line 282.43 − 6.12x. Then fit the same model to the cancer death rate (the Cancer column of the same table) and interpret its slope, intercept and r² in three sentences.

0 words
Quick self-check

How confident are you that you can compute a least-squares line and interpret its slope, intercept and r² in context?

Not yetVery confident

Practice

Work these on paper or in your notebook, then open Check your answer. Aim for all of Fluency and Application; try at least one Challenge.

Printable version: this unit’s practice workbook (PDF)

Fluency

Build speed and accuracy with the core skill.

  1. Use technology to find the least-squares line and the correlation coefficient for (1, 7), (2, 11), (7, 12), (11, 16), (12, 18), (13, 16), (14, 17).
    Check your answer
    Answer: ŷ = 7.818 + 0.705x; r = 0.942
    Interpret the slope in context: the predicted change in y for each one-unit increase in x.
  2. Use technology to find the least-squares line and the correlation coefficient for (1, 6), (2, 10), (3, 12), (4, 12), (5, 12), (9, 21), (10, 23).
    Check your answer
    Answer: ŷ = 5.302 + 1.732x; r = 0.980
    Interpret the slope in context: the predicted change in y for each one-unit increase in x.
  3. Use technology to find the least-squares line and the correlation coefficient for (1, 11), (3, 13), (6, 20), (7, 24), (9, 25), (12, 31), (14, 33).
    Check your answer
    Answer: ŷ = 9.216 + 1.779x; r = 0.989
    Interpret the slope in context: the predicted change in y for each one-unit increase in x.
  4. Use technology to find the least-squares line and the correlation coefficient for (4, 22), (8, 32), (9, 39), (10, 40), (11, 44), (12, 44), (13, 51).
    Check your answer
    Answer: ŷ = 9.176 + 3.101x; r = 0.985
    Interpret the slope in context: the predicted change in y for each one-unit increase in x.
  5. For Missouri’s age-adjusted cancer death rate, 1999-2017 (CDC), with x = years since 1999: r = −0.9897, s_x = 5.627, s_y = 13.376, x̄ = 9, ȳ = 189.484. Find the slope and intercept of the least-squares line.
    Check your answer
    Answer: b ≈ −2.353; a ≈ 210.66; predicted rate = 210.66 − 2.353x.
    b = r·s_y/s_x; a = ȳ − b·x̄.
  6. Which point does every least-squares line pass through?
    Check your answer
    Answer: (x̄, ȳ), the point of means.
  7. A line has r² = 0.64. What is r if the slope is negative?
    Check your answer
    Answer: r = −0.8.
    r has the sign of the slope.

Application

Use the skill in context. Show your reasoning.

  1. Interpret the slope (−2.353) and intercept (210.66) of the cancer model in context.
    Check your answer
    Answer: Slope: from 1999 to 2017 the model predicts Missouri’s age-adjusted cancer death rate fell by about 2.35 deaths per 100,000 per year, on average. Intercept: the predicted rate in 1999 (x = 0) is 210.66 per 100,000.
    Units of both variables, and ‘predicted’ or ‘on average’.
  2. Use the cancer model to predict the 2010 rate and find the residual (the actual 2010 rate was 185.6).
    Check your answer
    Answer: Predicted ≈ 184.78; residual ≈ 0.82 per 100,000.
    x = 11; residual = actual − predicted.
  3. Regressing Columbia’s annual precipitation on St. Louis’s (1973-2024) gives predicted COU = 9.897 + 0.766 × STL, with r = 0.777. Predict Columbia’s total in a year when St. Louis gets 50 inches, and interpret r².
    Check your answer
    Answer: Predicted ≈ 48.19 in. r² ≈ 0.604: about 60% of the year-to-year variation in Columbia’s totals is accounted for by the linear relationship with St. Louis’s.

Challenge

Stretch problems. Expect to think before you write.

  1. Regressing St. Louis on Columbia instead gives slope 0.789. Show that this is not 1/0.766, and explain why the two lines differ.
    Check your answer
    Answer: 1/0.766 ≈ 1.306, not 0.789. Each least-squares line minimizes vertical distances for its own response; both slopes equal r times a ratio of SDs, and since |r| < 1 neither is the reciprocal of the other.
    b(COU on STL) · b(STL on COU) = r² ≈ 0.604.

Review

Keep earlier skills sharp.

  1. (Unit 1) For the data 12, 15, 15, 18, 30, find Q1, Q3 and the upper 1.5 × IQR fence. Is 30 an outlier?
    Check your answer
    Answer: Q1 = 13.5, Q3 = 24, IQR = 10.5; upper fence 39.75, so 30 is not an outlier.
    Halves: 12, 15 and 18, 30.
  2. (Unit 1) Which is more resistant to an outlier, the mean or the median?
    Check your answer
    Answer: The median.

Missouri Learning Standards — Mathematics (data and probability) addressed: A1.DS.A.5a, A1.DS.A.6, A1.DS.A.5, MP.5, MP.4

Instructional focus: Derivation, computation and interpretation of the least-squares line

Reading

Missouri Death Rates, 1999-2017: The CDC Table the Regression Runs On

CDC/NCHS, NCHS – Leading Causes of Death: United States (data.cdc.gov dataset bi63-dtpu), Missouri rows, age-adjusted death rates per 100,000, 1999-2017; retrieved November 10, 2026 · Public domain (works of the United States government)

Why this reading. The lab fits a line to Missouri’s heart-disease death rates and then asks you to import the CDC file and fit the same model to cancer. The rows are here, for heart disease and five other causes, with the summary statistics that b = r·sy/sx needs for each. The lesson’s line reproduces from this table to the last digit.

What the numbers are

The CDC’s National Center for Health Statistics publishes NCHS – Leading Causes of Death: United States on data.cdc.gov (dataset id bi63-dtpu), with one row per year, state and cause, 1999-2017. The rate is the age-adjusted death rate per 100,000 population, standardized to the 2000 U.S. standard population, so that a state whose population is getting older does not show a rising rate for that reason alone. The deaths column is the raw count; it is given here for heart disease only. Rows for Missouri retrieved November 10, 2026. x is years since 1999.

YearxHeart disease rateHeart disease deathsCancerStrokeAlzheimer’sUnintentional injuriesChronic lower respiratory
19990300.517,974207.965.615.043.251.7
20001286.017,235205.965.117.841.946.9
20012273.416,633207.162.017.842.547.8
20023272.716,708204.163.119.045.647.2
20034264.916,410202.157.720.647.647.9
20045248.515,500201.156.121.946.444.1
20056236.814,974198.052.925.647.849.2
20067228.814,749195.850.525.150.147.4
20078218.914,338190.949.425.548.847.6
20089219.814,644189.549.230.048.957.4
200910206.113,916185.744.925.547.551.9
201011201.813,840185.644.028.847.952.6
201112197.413,810179.443.427.450.550.5
201213193.413,742182.342.225.947.851.7
201314194.714,095179.440.627.547.052.9
201415194.714,338177.741.027.448.751.4
201516197.914,808173.440.828.750.952.8
201617192.114,579167.040.430.057.052.1
201718191.114,820167.341.032.358.850.7

Summary statistics for the regression formulas

For every cause, x̄ = 9 and sx = 5.627 (the 19 values 0 to 18). The table gives ȳ, sy, r, and the line they produce.

Causeȳsyrslope bintercept ar²
Heart disease227.3436.33−0.9481−6.121282.430.899
Cancer189.4813.38−0.9897−2.353210.660.980
Stroke49.999.09−0.9637−1.55664.000.929
Alzheimer’s disease24.834.820.90710.77817.830.823
Unintentional injuries48.364.190.80900.60342.940.654
CLRD50.203.060.53870.29347.570.290

Heart disease, worked. b = −0.9481 × 36.33 / 5.627 = −6.121, and a = 227.34 − (−6.121)(9) = 282.43: the lesson’s 282.43 − 6.12x. Cancer, for you to verify. b = −0.9897 × 13.38 / 5.627 = −2.353 and a = 210.66, with r² = 0.980. The cancer rate fell more slowly than the heart-disease rate (about 2.4 per 100,000 per year against 6.1) but far more steadily: its largest residual is 3.7 (2016), against 18.8 for heart disease. Check that before you interpret r².

Rates and counts move differently. Heart-disease deaths fell from 17,974 in 1999 to 14,095 in 2013 and then rose to 14,820 in 2017, while the age-adjusted rate went from 194.7 to 191.1 over the same four years. A count depends on how many people there are and how old they are, and the age-adjusted rate is built to remove the second of those. A report must say which one it is modeling.

What to do

  1. Enter x and the heart-disease rate. Confirm =SLOPE, =INTERCEPT and =RSQ give −6.12, 282.43 and 0.899.
  2. Fit the cancer rate. Interpret the slope, the intercept and r² in three sentences with units, saying “predicted” or “on average”.
  3. Choose one more cause. Predict from the scatterplot whether a line will fit well, then compute r² and see whether you were right. Unintentional injuries is the honest test.

Sources: CDC/NCHS, NCHS – Leading Causes of Death: United States, dataset bi63-dtpu (data.cdc.gov); Query used for the Missouri rows (state=Missouri) (data.cdc.gov)

Up NextComplete & Continue →

Leave a Reply Cancel reply

Scatterplots and Correlation
Prev
Residuals, Influence and Causation
Next

© 2026 The VR School | Career content by Wiley | Powered by Sejal Learning Systems.

Join free · Accreditation · Privacy Policy · Terms of Service

Modal title

Main Content