Python for Introductory StatisticsXYZ Homework Edition

⇩ Download ▾

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 \hat y= a+bx

from the results (see above)

y ^ = 282.5556792873052 + 6.364142538975502 x \hat y=-282.5556792873052 + 6.364142538975502x

y ^ = 282.5556792873052 + 6.364142538975502 × 70 \hat y=-282.5556792873052 + 6.364142538975502\times 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.

These eBooks are a prerelease and are not yet certified conformant with WCAG 2.1 AA or ADA Title II. Every page is built against an automated accessibility gate, and the published editions will meet ADA Title II requirements when they release in late September 2026. If something is unusable, please tell us.