Essays24.com - Term Papers and Free Essays
Search

Linear Regression

Essay by   •  November 28, 2016  •  Course Note  •  468 Words (2 Pages)  •  1,204 Views

Essay Preview: Linear Regression

Report this essay
Page 1 of 2

Simple Linear Regression

Reression 
Problems with Solutions

Linear regression and modeling problems are presented. The soluti ons to these problems are at the bottom of the page. 

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 of the vertical deviation from each data point to the line (see figure below). 

The least square regression line for the set of n data points is given by 

y = ax + b



where a and b are given by 

[pic 1]

Q1. 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 = ax + b. 

b) Estimate the value of y when x = 10.

Answer:

a) We use a table to calculate a and b. 

x

y

x y

x 2

0

2

0

0

1

3

3

1

2

5

10

4

3

4

12

9

4

6

24

16

Σx = 10

Σy = 20

Σx y = 49

Σx2 = 30



We now calculate a and b using the least square regression formulas for a and b. 

a = (nΣx y - ΣxΣy) / (nΣx2 - (Σx)2) = (5*49 - 10*20) / (5*30 - 102) = 0.9 

b = (1/n)(Σy - a Σx) = (1/5)(20 - 0.9*10) = 2.2 

b) Now that we have the least square regression line y = 0.9 x + 2.2, substitute x by 10 to find the value of the corresponding y. 

y = 0.9 * 10 + 2.2 = 11.2 

Q2. 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 = ax + b. 

b) Use the least squares regression line as a model to estimate the sales of the company in 2012.

Answer:

a) We first change the variable x into t such that t = x - 2005 and therefore t represents the number of years after 2005. Using t instead of x makes the numbers smaller and therefore managable. The table of values becomes. 

...

...

Download as:   txt (2.9 Kb)   pdf (109.7 Kb)   docx (14.4 Kb)  
Continue for 1 more page »
Only available on Essays24.com