Resources
A statistics student investigates the relationship between hours spent studying per week, , and score on a 100-point midterm exam, , for a sample of students. The summary statistics are: , , , , and . Determine: (a) the Pearson correlation coefficient , (b) the least-squares regression line in the form , and (c) the predicted exam score for a student who studies hours.
Answer and steps
Final answer
(a) ; (b) ; (c)
Steps
Compute the Sample Means and Sums of Squares
From the given summary statistics for students:
Calculate the sample means of and :
Next, determine the sum of squares and sum of products:
- Sum of squares for :
- Sum of squares for :
- Sum of cross-products:
(a) Determine the Pearson Correlation Coefficient
The Pearson correlation coefficient measures the strength and direction of the linear relationship between and :
Evaluating and rounding to three decimal places:
A correlation of indicates a strong, positive linear association between weekly study hours and exam scores.
(b) Find the Least-Squares Regression Line
The least-squares regression line has the equation:
- Slope ():
- -intercept ():
Thus, the regression line is:
Common Pitfall: Do not reverse the roles of and when computing the slope. The independent/predictor variable belongs in the denominator (), while the response variable does not divide the slope.
(c) Predict the Exam Score for Hours
Substitute into the regression model:
A student who studies for hours per week is predicted to score on the midterm exam.
Typical errors
01 The student forgets to divide the product of sums by n when calculating the sums of squares, causing incorrect values for SS_xy, SS_xx, and SS_yy.
Sample Student Work
Reviewed by ACEpath TeacherStep-by-Step Review
Walk Through It with Your Teacher- Step 1
SS_{xy} = \sum xy - (\sum x)(\sum y) = 3{,}672 - 48 432 = -17{,}064 SS_{xx} = \sum x^2 - (\sum x)^2 = 440 - 48^2 = -1{,}864 SS_{yy} = \sum y^2 - (\sum y)^2 = 31{,}800 - 432^2 = -154{,}824_
CorrectSS_{xy} = \sum xy - = 216 SS_{xx} = \sum x^2 - = 56 SS_{yy} = \sum y^2 - = 696_
You forgot to divide the product of sums by . The shortcut formulas are , , and . Because is a sum of squared real deviations, it must always be non-negative.
- Step 2
r = = -1.004
Correctr = = 0.900
You correctly applied the structure of the Pearson correlation formula , but your result was affected by the incorrect sum-of-squares values. Notice also that a value of is outside the valid range , which is an immediate indicator of an earlier error.
- Step 3
b_1 = = 9.15 = 8, ; = 72 b_0 = 72 - 9.15(8) = -1.2 = -1.2 + 9.15x
Correctb_1 = = 3.857 4.00 b_0 = - b_1 = 72 - 4.00(8) = 40.0 = 40.0 + 4.00x
You correctly found the sample means and and correctly used the formulas and , but the values were distorted by the earlier sums of squares.
- Step 4
= -1.2 + 9.15(10) = 90.3
Correct= 40.0 + 4.00(10) = 80.0
You correctly substituted into your regression line, but the result was propagated from the incorrect slope and intercept.
WHAT YOU DID WELL
Compliments from Your TeacherYou correctly calculated the sample means and .
You used the correct algebraic formulas relating , , and to , , and .
You accurately substituted into your linear model to make a prediction.
THE ERROR
Where Your ACEpath Teacher Spotted the Mistakenone
WHY IT HAPPENED
ACEpath Teacher's DiagnosisYou used rather than , omitting the correction term division by sample size . This led to negative sums of squares and an impossible correlation coefficient .
REASONING PATH
Your ACEpath teacher’s suggested approach- Check Non-Negativity of Sums of Squares
Because , it must be non-negative ( and ).
If your shortcut formula yields a negative number for or , verify that you divided and by .
- Validate Correlation Range
The Pearson correlation coefficient is strictly bounded: .
If , pause and re-check your calculations of , , and before moving on to the regression line.
CORRECTED PATH
ACEpath Teacher's Demonstration(a) ; (b) ; (c)
02 The student inverts the formula for the slope by dividing SS_xx by SS_xy instead of SS_xy by SS_xx, leading to an inverted regression equation.
Sample Student Work
Reviewed by ACEpath TeacherStep-by-Step Review
Walk Through It with Your Teacher- Step 1
- Step 2Correct
You set up the formula for Pearson's correlation coefficient correctly, but your numerical evaluation of resulted in instead of the target value .
- Step 3Correct
You inverted the slope formula. The slope represents the change in per unit change in , so the independent variable's sum of squares must be in the denominator: , not .
- Step 4Correct
You substituted correctly into your linear equation, but because your slope and intercept were incorrect from the previous step, your final predicted score was affected.
WHAT YOU DID WELL
Compliments from Your TeacherYou accurately computed the sums of squares , , and cross-product .
You correctly calculated the sample means and .
You correctly applied the intercept structure and substituted to find the predicted value.
THE ERROR
Where Your ACEpath Teacher Spotted the MistakeYou accidentally placed the predictor's sum of squares in the numerator rather than the denominator when calculating the slope .
WHY IT HAPPENED
ACEpath Teacher's DiagnosisConfusing the orientation of rate of change in regression: regression models as a function of (rise over run, or ), which means the numerator must carry the covariance term and the denominator must carry the variance of the predictor .
REASONING PATH
Your ACEpath teacher’s suggested approach- Check slope orientation
The slope of the line predicting from is .
Always remember that . The denominator must match the predictor variable .
- Verify units and magnitude
Slope units are always .
Midterm points per hour of study should scale exam scores () relative to hours (), confirming belongs in the denominator.
CORRECTED PATH
ACEpath Teacher's DemonstrationCalculate slope: .
Calculate intercept: .
Write the regression line: .
Evaluate at : .
(a) ; (b) ; (c)
03 The student swaps the roles of the independent and dependent variables when solving for the intercept, computing b_0 = x̄ - b_1(ȳ).
Sample Student Work
Reviewed by ACEpath TeacherStep-by-Step Review
Walk Through It with Your Teacher- Step 1
- Step 2Correct
You used the correct algebraic formula for the Pearson correlation coefficient, but your evaluated numerical value does not match the target value of .
- Step 3
- Step 4Correct
You reversed and ar{y} in the intercept formula. The regression line must pass through the centroid , meaning , which gives .
- Step 5Correct
You substituted into your model, but the resulting predicted score was incorrect due to the swapped variables in the intercept.
WHAT YOU DID WELL
Compliments from Your TeacherYou correctly calculated the summary statistics , , and .
You accurately found the sample means and .
You used the correct ratio to set up the regression slope.
THE ERROR
Where Your ACEpath Teacher Spotted the MistakeNo
WHY IT HAPPENED
ACEpath Teacher's DiagnosisYou swapped the independent variable () and the dependent response variable () when solving for the -intercept, writing instead of isolating from .
REASONING PATH
Your ACEpath teacher’s suggested approach- Regression Line Centroid Property
Every least-squares regression line must pass through the point of means .
Always substitute on the left and on the right to isolate .
- Sanity Check on Predictions
Predictions must fall within a reasonable real-world range for the response variable.
Check whether an exam score prediction like on a -point test is realistic; an extreme or negative value strongly signals a reversed intercept formula.
CORRECTED PATH
ACEpath Teacher's DemonstrationUse the centroid condition to solve for the intercept: .
Substitute the mean response , slope , and mean predictor : .
Write the regression line: .
Substitute into the corrected model: .
(a) ; (b) ; (c)
Lock it in
What is the shortcut formula for computing the sum of squared deviations from summary statistics?
. Remember to divide the square of the sum by the sample size .
Similar question
For a sample of observations, you are given , , and . Calculate the sum of products .
Answer
. Key steps: .
A dataset with has summary values , , , and . Find the slope of the least-squares regression line .
Answer
. Key steps: . . Then .
A researcher collects data for items with , , , , and . Calculate the Pearson correlation coefficient rounded to three decimal places.
Answer
. Key steps: . . . Then .