ECN 652 Handout 9 Student
ECN 652 Handout 9 Student
ECN 652 Handout 9 Student
x
2 4 6
–2
–4
Dr. T. Vinayagathasan, Dept. of Econ. & Statistics, Univ. of Peradeniya 4
Direction of the Relationships
y As x increases, y y
tends to decrease. As x increases, y
tends to increase.
x x
Negative Linear Correlation Positive Linear Correlation
y y
x x
No Correlation Nonlinear Correlation
Dr. T. Vinayagathasan, Dept. of Econ. & Statistics, Univ. of Peradeniya 5
2. The Form of the Relationship
• Relationships tend to have a linear relationship. A line can be
drawn through the middle of the data points in each figure.
• The most common use of regression is to measure straight-line
relationships.
• Not always the case
• Example
Weight 67 69 85 83 74 81 97 92 114 85
(Kg)
SBP 120 125 140 160 130 180 150 140 200 130
(mHG)
200
180
160
140
120
100
80
Wt (kg)
60 70 80 90 100 110 120
• Measures how well the data fit the specific form being
considered.
• The degree of relationship is measured by the numerical value
of the correlation (0 to 1.00)
– A perfect correlation is always identified by a correlation of
1.00 and indicates a perfect fit.
– A correlation value of 0 indicates no fit or relationship at all.
indirect Direct
perfect perfect
correlation no relation correlation
n
𝑖=1[(X𝑖 −X)(Y𝑖 −Y)] 7
SXY = = = 1.75 → what does this
𝑛−1 4
number tells us
Dr. T. Vinayagathasan, Dept. of Econ. & Statistics, Univ. of Peradeniya 15
Variance vs Covariance
γXY =
r = 0.759
strong direct correlation
( x x)( y
n
( x x)( y
i i y) i i y)
cov(x, y ) i 1 rxy i 1
n 1 (n 1) s x s y
Z xi * Z yi
rxy i 1
n 1
In Words In Symbols
1. Determine the number of Determine n.
pairs of data in the sample.
2. Specify the level of Identify .
significance.
3. Find the critical value. Use Table given below.
4. Decide if the correlation is If |r| > critical value, the
significant. correlation is significant.
Otherwise, there is not enough
5. Interpret the decision in the
evidence to support that the
context of the original claim.
correlation is significant.
Hours, x 0 1 2 3 3 5 5 5 6 7 7 10
Test score, y 96 85 82 74 95 68 76 84 58 65 75 50
A Preparatory 25 5 3 2 4
6 𝑑𝑖 2 6 × 64
𝑟s = 1 − 2
=1− = −0.1
𝑛 𝑛 −1 7 49 − 1
• There is an indirect weak correlation between level of education
and income.
Dr. T. Vinayagathasan, Dept. of Econ. & Statistics, Univ. of Peradeniya 42
Hypothesis testing of Spearman Rank Correlation
– The hypotheses are:
H0: ρs = 0
H1: ρs ≠ 0
– The test statistic is: rs cov( a, b )
s a sb
a and b are the ranks of the data.
– For a large sample (n > 30) rs is approximately normally
distributed
z rs n 1
Conclusion:
• Do not reject the null hypothesis. At 5% significance
level there is insufficient evidence to infer that the two
variable are related to one another.
46
Dr. T. Vinayagathasan, Dept. of Econ. & Statistics, Univ. of Peradeniya