Docsity

business statistics 2, Lecture notes of Business Statistics

Toggle sidebar
bg1
THE INSTITUTE OF FINANCE MANAGEMENT (IFM)
Faculty of Computing and Mathematics
Department of Mathematics and Actuarial studies
MTU 07203, ACU 07210, TMU 07218, SPU 07210, BFU 07208, IRU 07209
Business statistics 1
Simple Linear Regression and Correlation
1. REGRESSION
1.1 Definition
Regression is a determination of statistical relationship between two or more variables Or
Regression is a technique for determining the statistical relationship between two or more
variables where a change in a dependent variable is associated with, and depends on, a change in
one or more independent variables.
Regression analysis is one of the most commonly used statistical techniques in social and
behavioral sciences as well as in physical sciences which involves identifying and evaluating the
relationship between a dependent variable and one or more independent variables, which are also
called predictor or explanatory variables. It is particularly useful for assess and adjusting for
confounding. Model of the relationship is hypothesized and estimates of the parameter values are
used to develop an estimated regression equation. Various tests are then employed to determine if
the model is satisfactory. If the model is deemed satisfactory, the estimated regression equation
can be used to predict the value of the dependent variable given values for the independent
variables.
Linear regression explores relationships that can be readily described by straight lines or their
generalization to many dimensions. A surprisingly large number of problems can be solved by
linear regression, and even more by means of transformation of the original variables that result in
linear relationships among the transformed variables
In regression analysis there are two types of variables.
i. Independent variable
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19

Partial preview of the text

Download business statistics 2 and more Lecture notes Business Statistics in PDF only on Docsity!

THE INSTITUTE OF FINANCE MANAGEMENT (IFM)

Faculty of Computing and Mathematics

Department of Mathematics and Actuarial studies

MTU 07203, ACU 07210, TMU 07218, SPU 07210, BFU 07208, IRU 07209

Business statistics 1

Simple Linear Regression and Correlation

1. REGRESSION

1.1 Definition

Regression is a determination of statistical relationship between two or more variables Or

Regression is a technique for determining the statistical relationship between two or more

variables where a change in a dependent variable is associated with, and depends on, a change in

one or more independent variables.

Regression analysis is one of the most commonly used statistical techniques in social and

behavioral sciences as well as in physical sciences which involves identifying and evaluating the

relationship between a dependent variable and one or more independent variables, which are also

called predictor or explanatory variables. It is particularly useful for assess and adjusting for

confounding. Model of the relationship is hypothesized and estimates of the parameter values are

used to develop an estimated regression equation. Various tests are then employed to determine if

the model is satisfactory. If the model is deemed satisfactory, the estimated regression equation

can be used to predict the value of the dependent variable given values for the independent

variables.

Linear regression explores relationships that can be readily described by straight lines or their

generalization to many dimensions. A surprisingly large number of problems can be solved by

linear regression, and even more by means of transformation of the original variables that result in

linear relationships among the transformed variables

In regression analysis there are two types of variables.

i. Independent variable

Is a variable that is manipulated to determine the value of a dependent

variables,not influenced or controlled by others in matters of opinion, conduct, etc.,

thinking or acting for oneself

Independent variables are characteristics that can be measured directly; these variables are also

called predictor or explanatory variables used to predict or to explain the behavior of the dependent

variable.

ii. Dependent variable

Is a factor or phenomenon that is changed by the effect of an associated factor or phenomenon

called the independent variable.

Dependent variable is a characteristic whose value depends on the values of independent variables.

In regression analysis independent variable is also known as repressor or predictor or

explanatory variable while the dependent variable is also known as regressed or explained

variable

1.2 Application

The purpose of linear regression is to develop a mathematical relationship (model) between

variables that can be used to predict the value of one variable if the value of another variable is

known

1.3 Assumption of Regression Analysis

The regression model is based on the following assumptions.

  • The relationship between independent variable and dependent is linear.
  • The expected value of the error term is zero
  • The variance of the error term is constant for all the values of the independent variable, the

assumption of homoscedasticity.

  • The independent variable is uncorrelated with the error term.
  • The error term is normally distributed.

Is the suitable way to represent the relationship pictorially. Data presented on graph so that one

can see at easier and each pair of numbers provides one point on the diagram.

By studying diagram, we can have a rough idea about the nature and degree of relationship between

two variables, i.e., whether the variables are correlated or not, e.g.,

if the points are very dense, or, very close to each other, we should expect a fairly good amount of

correlation between the variables and if the points are widely scattered, a poor correlation is

expected

By studying diagram, we can have a rough idea about the nature and degree of relationship between

two variables,

Example 1 :

The following data relate to rainfall and subsequent crop yield over five years

Year 1 Year 2 Year 3 Year 4 Year 5

Rainfall in inch 4 2 5 7 8

Yields in tons 50 25 40 70 85

Yields in tons

Rainfall in Inch

Scatter Diagram

1.4.2 Types of Linear Regression

There two types of linear regression analysis are further classified into

1.4.2.1 Simple linear regression

Is the relationship developed between only one dependent variable against only one independent

variables (explanatory)?

1.4.2.2 Multiple Linear regression

Is the relationship developed between only one dependent variable against many independent

variables (more than one explanatory)?

1.5 Linear regression

Is the process of determining the statistical examination of the line of the best fit. Linear regression

is any line connecting a dependent variable (Y) and only one independent variable (x).

1.5.1 Simple Linear Regression Model

Simple linear regression is a statistical method that allows us to summarize and study relationships

between two continuous (quantitative) variables. In a cause and effect relationship, the

independent variable is the cause, and the dependent variable is the effect. Least squares linear

regression is a method for predicting the value of a dependent variable y, based on the value of an

independent variable x.

  • One variable, denoted (x), is regarded as the predictor, explanatory, or independent variable.
  • The other variable, denoted (y), is regarded as the response, outcome, or dependent variable,

that may be expressed as

y =β 1 +β 2 xi+ε, i= 1 ,...n

Where β 1 and β 2 are constant parameter

β 2 is the gradient or slope of the line

ε is called error term

Which line has the best “fit” to the data?

1.5.2 Estimation of least squares

 Using method of least squares we get 1 β 2

β and

as the estimates of β 1 andβ 2

9 , 18

0

2

4

6

8

10

12

14

16

18

20

0 2 4 6 8 10

Y

X

9 , 18

0

2

4

6

8

10

12

14

16

18

20

0 2 4 6 8 10

Y

X

Scatter Diagram

Least Squares Graphically

2 4

2 3

2 2

2 1

n

i 1

2 i ε

LS minimizesεˆ =εˆ +εˆ +εˆ +ˆ

=

 2

Y

X

 1  3

 4

^

^

^

^

a) ‘Best Fit’ Means Difference Between Actual Y Values & Predicted Y Values Are a

Minimum. But Positive Differences Off-Set Negative. So square errors!

 (^ ) 

= =

n

i 1

2 i

n

i 1

2 i Yi εˆ

Y

b) Least Square Minimizes the Sum of the Squared Differences (errors) (SSE)

We may define the difference between yi −yˆ=ei, ei is the residual

e (^) i =yi−yˆi=yi−βˆ 1 −βˆ 2 xi, i=1,...,n

The method of least squares suggest the values of βˆ 1 andβˆ 2 that minimizes the residual 

2 ei

where  = ( − ) =  ( − − )

2 i 1 2 i

2 i i

2 i β x

β

e y yˆ y

Let 

2 ei, then the method involving solving the following system

βˆ

q 0, βˆ

q

1 2

i 1 2 2 2

β X εˆ

Y = + +

i 1 2 i

β X

Y

a) Plot a scatter diagram and estimate the line of the best fit

b) Determine the linear regression model that exists between the two variables.

c) Project the monthly sales for 9 months experience on job

a). SOLUTION

0

5

10

15

20

0 5 10 15

Monthly Sales

Months on Jobs

Scatter Diagram

x y 𝑥𝑦 x 2 Y 2

 From the table we find that

2 = 460 , ∑ 𝑦 2 = 788. 76

1

𝑛

1

6

Sum 46 61.7 603.2 460 788.

( ) ( 46 ) 107. 3 6

x 460 n

S x

2 2 2 xx =^  −  = − =

( ) ( 61. 4 ) 160. 4 6

y 788. 76 n

S y

2 2 2 yy =^  −  = − =

xx

xy 2 S

S

β

ii. It is useful for economists to study the relationship between variables like price, quantity

etc. Businessmen estimates costs, sales, price etc. using correlation.

iii. It is helpful in measuring the degree of relationship between the variables like income and

expenditure, price and supply, supply and demand etc.

iv. Sampling error can be calculated.

v. It is the basis for the concept of regression

2.2 Coefficient of correlation

2.2.1 Karl Peason’s Moment of correlation Coefficient

It is a mathematical method for measuring the intensity or the magnitude of linear relationship

between two variables as suggested by Karl Pearson (1867-1936), a great British Biometrician and

Statistician. It is by far the most widely used method in practice. It is denoted by 𝑟

The coefficient r is evaluated as

 ^ (  )  ^ (  )

  

2 2 2 2

n x x n y y

n xy x y

r

 Also we use

, 1 r 1

S S

S

r

xx yy

xy

 It can take a value from - 1< r < 1

Uses of correlation:

a) It is used in physical and social sciences.

b) It is useful for economists to study the relationship between variables like price, quantity

etc. Businessmen estimates costs, sales, price etc. using correlation.

c) It is helpful in measuring the degree of relationship between the variables like income and

expenditure, price and supply, supply and demand etc.

d) Sampling error can be calculated.

e) It is the basis for the concept of regression

2.3 Types of correlation

2.3.1 Perfect Positive correlation

 All points lie on the straight line in the direction

 Correlation coefficient = +

 Called perfect positive linear relationship

2.3.2 Higher Positive correlation

0

2

4

6

8

10

12

0 2 4 6 8 10 12

Y

X

Scatter Diagram

2.3.4 Higher negative correlation

 Many points lie on the straight line in the direction

 Correlation coefficient, - 1< r < 0

 Called higher (weak, moderate, strong) negative relationship

2.3.5 No correlation

 Points are haphazard located with no particular direction

 Correlation coefficient, r = 0

0

2

4

6

8

10

12

0 2 4 6 8 10 12

Y

X

Scatter Diagram

0

2

4

6

8

10

0 2 4 6

Y

X

Scatter Diagram

a b c d e

If the points plotted were all on a straight line we would have perfect correlation, but it could be

positive or negative as shown in the diagrams above,

a) Strong positive correlation between x and y. The points lie close to a straight line with y

increasing as x increases.

b) Weak, positive correlation between x and y. The trend shown is that y increases as x

increases but the points are not close to a straight line

c) No correlation between x and y; the points are distributed randomly on the graph.

d) Weak, negative correlation between x and y. The trend shown is that y decreases as x

increases but the points do not lie close to a straight line

e) Strong, negative correlation. The points lie close to a straight line, with y decreasing as x

increases

2.4 Assumption of Correlation

Employing of correlation rely on some underlying assumptions. The variables are assumed to be

independent, assume that they have been randomly selected from the population; the two variables

are normal distribution; association of data is homoscedastic (homogeneous), homoscedastic data

have the same standard deviation in different groups where data are heteroscedastic have different

standard deviations in different groups and assumes that the relationship between the two variables

is linear. The correlation coefficient is not satisfactory and difficult to interpret the associations

between the variables in case if data have outliers.

 From the table we find that

2 = 460 , ∑ 𝑦 2 = 788. 76

 Refer the data

S S

S

r

xx yy

x

y

r = 0.99 show strong positive linear relationship

2.6 Coefficient of Determination

Is the percentage of the independent explanatory variables has explained all variations/factors of

the dependent variable.

The coefficient of determination for a simple regression model 𝑟

2 (or 𝑅

2 for a multiple regression

model) is another measure of how well the least squares equation 𝑌̂𝑖 = 𝑎 + 𝑏𝑥𝑖 performs as a

predictor of y.

Sum 46 61.7 603.2 460 788.

The square of Pearson’s correlation coefficient is known as the coefficient of determination.

Thus, the coefficient of determination measures the proportion or percentage that the variation

of the dependent variable is explained by the independent variable(s).

Example 4 :

 Recall the previous example 3.

Determine the coefficient of Determination

Solution:

 Coefficient of determination is

r

2 %= (0.99)

2 x100= 98%

indicate that an explanatory variables (x) has explain 98% of all linear variation of the dependent

variable (y) and 02% can be explained by another variable, not considered in this case

2.7 Spearman Rank Correlation

Spearman Rank Correlation measures the degree of association between the two variables.

Spearman rank correlation is a non-parametric test that is used to measure the degree of association

between two variables. It was developed by Spearman; thus it is called the Spearman rank

correlation. Spearman rank correlation test does not assume any assumptions about the distribution

of the data and is the appropriate correlation analysis when the variables are measured on a scale

that is at least ordinal.

The following formula is used to calculate the Spearman rank correlation coefficient

 It finds out if the variables concerned do have some association

 Spearman Rank Correlation, r

1 r 1

n(n 1)

6 d

r 1

2

2