You are on page 1of 2

MDM4U Linear Regression

Recall:
• Linear regression is the technique for finding the equation with the form 𝑦 = 𝑎𝑥 + 𝑏
that best figures the relationship between the 𝑥 (independent) and 𝑦 variables
(dependent).
• Correlation Coefficient is the measure of correlation between two variables, it
determines how well a regression line fits a set of data.

The linear regression, in the form 𝒚 = 𝒂𝒙 + 𝒃 can be calculated with the following equations
(also referred to as “least square formula”):

𝑛(∑ 𝑥𝑦)−(∑ 𝑥)(∑ 𝑦)


𝑎= 𝑏 = 𝑦̅ − 𝑎𝑥̅
𝑛(∑ 𝑥 2 )−(∑ 𝑥)2

Example 1 This table shows data for the full-time employees of a small company.

Age (years) Annual Income (in thousands of dollars)


33 33
25 31
19 18
44 52
50 56
54 60
38 44
29 35

a) Use a scatter plot to classify the correlation between age and income.
b) Find the equation of the line of best fit analytically.

Age, 𝒙 Income, 𝒚 𝒙𝟐 𝒙𝒚
33 33
25 31
19 18
44 52
50 56
54 60
38 44
29 35

c) Predict the income for a new employee who is 21 and an employee retiring at age 65.

You might also like