Login
📚 Python for Introductory Statistics
Chapters ▾

Predictions

Suppose you want to estimate, or predict, the final exam score of a student with midterm exam score of 70. The midterm exam scores (x-values) range from 65 to 75. Since 70 is inside this range, we can substitute x = 70 into the regression equation to find the predicted y value.

y ^ = a + b x

from the results (see above)

y ^ = 282.5556792873052 + 6.364142538975502 x

y ^ = 282.5556792873052 + 6.364142538975502 × 70

-282.5556792873052 + 6.364142538975502*70
Show expected output
162.9342984409799

A student with a midterm exam score of 70 is predicted to score 162.9 on the final exam.

Adapted from Python for Introductory Statistics, by Simon Aman (Truman College, City Colleges of Chicago), licensed under CC BY 4.0. Changes were made: reformatted as an accessible XYZ web edition with live in-browser code cells. License: CC-BY-4.0.