0% found this document useful (0 votes)
13 views7 pages

Regression (Manual)

Uploaded by

statistics.cou
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views7 pages

Regression (Manual)

Uploaded by

statistics.cou
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Table of Contents

Regression Analysis. ............................................................................................................ 2


Types of relationships ......................................................................................................... 2
Simple linear regression Model. ......................................................................................... 2
The Predicted Linear Regression Model ............................................................................ 3
What is Ordinary Least Square Method (OLS)? ............................................................... 3
Assumptions of Simple Linear Regression Model. ............................................................ 3
Example 1: ....................................................................................................................... 4
a) Use the least squares method to determine a linear equation to express the
relationship between the two variables. .......................................................................... 4
b) What is the expected number of copiers sold by a representative who made 25
calls?.................... .......................................................................................................... 4
c) What is standard error of estimate? Find the standard error of estimate. ............... 4
d) Find the 95% confidence interval of the estimate for b. ........................................ 4
Regression Analysis.
Regression analysis is used to predict the value of a dependent variable based on the value of
at least one independent variable. It explains the impact of changes in an independent variable
on the dependent variable. Where the dependent variable is the variable we wish to predict or
explain and the independent variable he variable used to explain the dependent variable.

Types of relationships

Simple linear regression Model.


Simple linear regression is a regression model that estimates the relationship between one
independent variable and one dependent variable using a straight line. Changes in Y are
assumed to be caused by changes in X. Here is a simple linear regression model,
The Predicted Linear Regression Model
The simple linear regression equation provides an estimate of the population regression line

The individual random error terms ei have a mean of zero

What is Ordinary Least Square Method (OLS)?


OLS is a method of estimating the parameters (b0, b1) of the regression model. (OLS) is a type
of linear least squares method for choosing the unknown parameters in a linear regression
model parameter are estimated by minimizing the error sum of square. We minimize error by
differentiating error sum of square with respect to corresponding unknown parameters. Here is
the equation.

ei  Yi  Ŷi

min  (Yi Ŷi ) 2  min  (Yi  (b 0  b1X i )) 2

Assumptions of Simple Linear Regression Model.


Linear regression is a useful statistical method we can use to understand the relationship
between two variables, x and y. However, before we conduct linear regression, we must first
make sure that four assumptions are met:
1. Linear relationship: There exists a linear relationship between the independent
variable, x, and the dependent variable, y.
2. Independence: The residuals are independent. In particular, there is no correlation
between consecutive residuals in time series data.
3. Homoscedasticity: The residuals have constant variance at every level of x.
4. Normality: The residuals of the model are normally distributed.

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
 2202 
5600  
 10 

= 1.18
Now, Intercept a,
a  y  bx

Here, y  45 , x  22 . Putting them in the above equation,

 45  1.18  22
= 19.04
The estimated regression model is,
ˆ  a  bxˆ
y

or, yˆ  19.04  1.18 xˆ...........(1)

b) If the number of phone calls X = 25, then


yˆ  19.04  1.18  25

= 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

n2
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

ˆ 2  19.04  1.18  40 = 66.24


y
ˆ 3  19.04  1.18  20 = 42.64
y

ˆ 4  19.04  1.18  30 = 54.44


y

Similarly,
ˆ10  19.04  1.18  20 = 54.44
y

The required table,


Comp. X (Phone calls) Y ( Copier Sales) Yˆ (Y  Yˆ ) (Y  Yˆ ) 2
20 30 42.64 -12.64 159.7696
40 60 66.24 -6.24 38.9376
20 40 42.64 -2.64 6.9696
30 60 54.44 5.56 30.9136
10 30 30.84 -0.84 0.7056
10 40 30.84 9.16 83.9056
20 40 42.64 -2.64 6.9696
20 50 42.64 7.36 54.1696
20 30 42.64 -12.64 159.7696
30 70 54.44 15.56 242.1136
Total 220 450 784.224

Then, Standard Error of estimate,

S( y , x ) 
  y  yˆ  2

n2

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.

You might also like