Linear regression and modelling problems are presented along with their solutions at the bottom of the page. Also a linear regression calculator and grapher may be used to check answers and create more opportunities for practice.

Review

If the plot of n pairs of data (x , y) for an experiment appear to indicate a "linear relationship" between y and x, then the method of least squares may be used to write a linear relationship between x and y.
The least squares regression line is the line that minimizes the sum of the squares (d1 + d2 + d3 + d4) of the vertical deviation from each data point to the line (see figure below as an example of 4 points).
The least square regression line for the set of n data points is given by the equation of a line in slope intercept form:

y = a x + b

where a and b are given by

Problem 1

Consider the following set of points: {(-2 , -1) , (1 , 1) , (3 , 2)}
a) Find the least square regression line for the given data points.
b) Plot the given points and the regression line in the same rectangular system of axes.

Problem 2

a) Find the least square regression line for the following set of data

{(-1 , 0),(0 , 2),(1 , 4),(2 , 5)}

b) Plot the given points and the regression line in the same rectangular system of axes.

Problem 3

The values of y and their corresponding values of y are shown in the table below

x

0

1

2

3

4

y

2

3

5

4

6

a) Find the least square regression line y = a x + b.
b) Estimate the value of y when x = 10.

Problem 4

The sales of a company (in million dollars) for each year are shown in the table below.

x (year)

2005

2006

2007

2008

2009

y (sales)

12

19

29

37

45

a) Find the least square regression line y = a x + b.
b) Use the least squares regression line as a model to estimate the sales of the company in 2012.