Regression (Manual)
Regression (Manual)
Types of relationships
ei Yi Ŷi
Example 1: The sales manager gathered information on the number of sales calls made and
the number of copiers sold for a random sample of 10 sales representatives.
a) Use the least squares method to determine a linear equation to express the relationship
between the two variables.
Or, Fit or develop a regression model or equation for x and y.
Or, estimate the regression model or equation.
b) What is the expected number of copiers sold by a representative who made 25 calls?
c) What is standard error of estimate? Find the standard error of estimate.
d) Find the 95% confidence interval of the estimate for b.
Solution:
a) Now, let us compute the table
Comp. X (Phone calls) Y ( Copier Sales) XY X2
20 30 600 400
40 60 2400 1600
20 40 800 400
30 60 1800 900
10 30 300 100
10 40 400 100
20 40 800 400
20 50 1000 400
20 30 600 400
30 70 2100 900
Total 220 450 10800 5600
At first, we have to calculate the regression coefficient i.e. b
We know the formula,
xy
x y
b n
x 2
x
2
n
450 220
10800
b 10
2202
5600
10
= 1.18
Now, Intercept a,
a y bx
45 1.18 22
= 19.04
The estimated regression model is,
ˆ a bxˆ
y
= 48.54
Comment: If 25 number of phone calls are made, then the total number of copier sales will be
48.54.
c) Standard error of estimate: The standard error of estimate measures the scatter, or
dispersion, of the observed values around the line of regression. We know the formula,
S( y , x )
y yˆ 2
n2
Now, at first we have to estimate ŷ for each y by using equation (1).
yˆ 19.04 1.18 xˆ...........(1)
Now for each x,
ˆ1 19.04 1.18 20 = 42.64
y
Similarly,
ˆ10 19.04 1.18 20 = 54.44
y
S( y , x )
y yˆ 2
n2
784.28
10 2
= 9.9
d. 95% confidence interval of estimate for b. The formula is,
ˆ 1 ( X x )2
Y t .S ( y , x ) . ...............(2)
2 n ( xi x ) 2
The required table is,
Comp. X (Phone calls) ( xi x ) ( xi x ) 2
20 -2 4
40 18 324
20 -2 4
30 8 64
10 -12 144
10 -12 144
20 -2 4
20 -2 4
20 -2 4
30 8 64
Total 220 760
Where, x 22 , (x i x ) 2 760 , X= 25. Then putting them in the equation (2)
ˆ 1 ( X x )2
Y t .S ( y , x ) . ...............( 2)
2 n ( xi x )
1 (25 22) 2
48.54 2.34 9.9
10 760
48.54 7.75
= (56.29, 40.79)
Comments: Thus, the 95 percent confidence interval for the average sales of all sales
representatives who make 25 calls is from 40.79 up to 56.29 copiers.