Professional Documents
Culture Documents
net/publication/341774602
CITATIONS READS
0 1,912
1 author:
Anusha Illukkumbura
University of Moratuwa
3 PUBLICATIONS 0 CITATIONS
SEE PROFILE
Some of the authors of this publication are also working on these related projects:
All content following this page was uploaded by Anusha Illukkumbura on 31 May 2020.
i
Acknowledgement
ii
Introduction to Regression Analysis
(Using Manual Calculations, MINITAB and R)
Anusha Illukkumbura
MSc. Business Statistics (University of Moratuwa, Sri Lanka)
B.A. Social Statistics (University of Kelaniya, Sri Lanka)
iii
Preface
Anusha Illukkumbura.
May 2020
iv
Table of Content
v
CHAPTER FOUR: NON LINEAR REGRESSIONError! Bookmark not
defined.
vi
EXAMPLES
Example 1.1: .................................................................................................. 5
viii
CHAPTER ONE : CORRELATION
1.1 Introduction
Correlation is used to measure the mutual relationship between
two or more variables. Correlation coefficient is the numerical
measure of the relationship between two variables. Correlation
shows the presence of a relationship between variables, strength
of the relationship and its direction. It can be illustrated in graphs
which simplify the interpretation. Correlation demonstrates the
relationship between the measurable variables, but it doesn’t
identify the cause of the relationship. Therefore there can be
underlying variables which affects the relationship.
Scatter diagrams, Karl Pearson’s correlation coefficient and
Spearsman’s Rank correlation are few methods which used
measure the correlation. Correlation coefficient of sample is
represented by “r”, Correlation coefficient of population is
represented by “ρ”. Correlation Coefficient ranges from +1 to -1. If
the correlation coefficient is +1, there is a perfect positive
correlation between two variables. When correlation coefficient is
-1 there is a perfect negative correlation between two variables.
When there is no correlation at all the correlation coefficient is 0.
When it is below + 0.5 relationship considered to be not strong. On
the other hand when it is above + 0.75 relationship considered to
be strong. Between + 0.5 to + 0.75 it is considered to have a
moderate correlation between variables.
1
Figure 1.1 : Perfect Positive Correlation
Scatterplot of y vs x
16
14
12
10
y
2
2 4 6 8 10 12 14 16
x
15
10
y
0
0 5 10 15 20
x
15.0
12.5
10.0
y
7.5
5.0
2 4 6 8 10 12 14 16
x
2
Figure 1.4: Strong Negative Correlation
Scatterplot of ln y vs x
6.0
5.5
5.0
4.5
ln y
4.0
3.5
3.0
2.5
0 2 4 6 8 10 12 14 16
x
0.46
0.44
0.42
Y
0.40
0.38
0.36
11 12 13 14 15 16 17
X
16
14
12
10
8
Y
0
0 5 10 15 20
X
3
Scatterplot of Y vs X
30
25
20
Y
15
10
1 2 3 4 5 6 7
X
50
40
30
20
y
10
-10
-20
0 2 4 6 8 10 12 14 16 18
x
When there is more than one independent variable used in a regression, relationship
among independent variables; relationship between independent variables and dependent
variable should be analyzed using a correlation matrix.
Karl Pearson’s correlation coefficient measures both strength and direction of the
relationship. The coefficient gives a measurable value to the strength of relationship. Karl
Pearson’s coefficient is calculated assuming there are no other factors influencing the
dependent variable other than one dependent variable.
Covariance of (x,y) or Cov(x,y) is equal to E[(x- x)- (y-y)], on assumption of variances are
𝑐𝑜𝑣 (𝑥,𝑦 )
positive, correlation of (x,y) = , where sd is standard deviation
𝑠𝑑 𝑥 𝑠𝑑 (𝑦 )
Below equations which can be used to calculate the correlation are based on the covariance
of relationship.
4
xy − n ∗ x ∗ y
r=
(x 2 − nx 2̅ )(y 2 − y 2̅ )
[ x − x (y − y)]
r=
(x − x)2 (y − y)2
nxy − xy
r=
nx 2 − (x)2 ny 2 − (y)2
Example 1.1:
Given below is the data set of marks scored for the year end mathematics examination
and hours spent for mathematic homework per week. Find out if there is a relationship
between these variables and describe the nature of the relationship.
x 1 2 3 4 5
y 35 60 75 85 95
x- hours spent for mathematic homework per day
y- marks scored for the year end mathematics examination
Answer
Calculate ∑x , ∑y, ∑xy, ∑x2 , ∑y2 as explained in table 1.1.