Correlation and Regression

Download as pdf or txt
Download as pdf or txt
You are on page 1of 42

Date: September 21,23,24, 25,28,30, 2020

MA 2302: Introduction to Probability and Statistics

Correlation and Regression

Instructor
Prof. Gopal Krishna Panda
Department of Mathematics
NIT Rourkela
Correlation and Regression
Correlation

In the last chapter, we discussed about the joint distribution of two random variables 𝑋 and 𝑌. We
come across random variables 𝑋 and 𝑌 that are independent and dependent. 𝑋 and 𝑌 that
dependent means, there exists some sort of relation between them. Correlation deals with the
amount of dependence between 𝑋 and 𝑌. In our discussion, we only discussion about the extent of
linearity between 𝑋 and 𝑌. It is measured by the correlation coefficient 𝒓 defined by
𝑪𝒐𝒗 𝑿, 𝒀
𝒓=
𝝈𝑿 ⋅ 𝝈𝒀

where 𝜎𝑋 and 𝜎𝑌 are standard deviations of 𝑋 and 𝑌 and 𝐶𝑜𝑣 𝑋, 𝑌 is the covariance between 𝑋
and 𝑌. We will see that 𝑟 measures the amount of linear dependence between 𝑋 and 𝑌. Recall that
𝝈𝟐𝑿 = 𝑬 𝑿 − 𝝁𝑿 𝟐 , 𝝈𝟐𝒀 = 𝑬 𝒀 − 𝝁𝒀 𝟐

and
𝑪𝒐𝒗 𝑿, 𝒀 = 𝑬 𝑿 − 𝝁𝑿 𝒀 − 𝝁𝒀 .
Example 1: Let 𝑋 and 𝑌 be random variables such that 𝑓 0,0 = 0.1, 𝑓 0,1 = 0.2, 𝑓 1,0 =
0.3 𝑎𝑛𝑑 𝑓 1,1 = 0.4. Find the correlation coefficient between 𝑋 and 𝑌.

Ans. To find the correlation coefficient 𝑟, we need to calculate the variances of 𝑋 and 𝑌 and the
covariance between 𝑋 and 𝑌. In tabular form, the joint distribution of 𝑋 and 𝑌 and the
marginal distributions of 𝑋 and 𝑌 are given in the following tables:

𝒙↓𝒚→ 0 1 𝒇𝟏 (𝒙) ↓

0 0.1 0.2 0.3


1 0.3 0.4 0.7
𝒇𝟐 (𝒚) → 0.4 0.6 1
Thus,

𝜇𝑋 = 𝐸 𝑋 = 0 × 0.3 + 1 × 0.7 = 0.7, 𝐸 𝑋 2 = 02 × 0.3 + 12 × 0.7 = 0.7,

𝜇𝑌 = 𝐸 𝑌 = 0 × 0.4 + 1 × 0.6 = 0.6, 𝐸 𝑌 2 = 02 × 0.4 + 12 × 0.6 = 0.6,


and

𝐸 𝑋𝑌 = ෍ ෍ 𝑥𝑦 𝑓(𝑥, 𝑦) = 0 × 0 × 0.1 + 0 × 1 × 0.2 + 1 × 0 × 0.3


𝑥 𝑦
+1 × 1 × 0.4 = 0.4.
Hence,
𝜎𝑋2 = 𝐸 𝑋 2 − 𝜇𝑋2 = 0.7 − 0.72 = 0.21,
𝜎𝑌2 = 𝐸 𝑌 2 − 𝜇𝑌2 = 0.6 − 0.62 = 0.24,
𝐶𝑜𝑣 𝑋, 𝑌 = 𝐸 𝑋𝑌 − 𝜇𝑋 𝜇𝑌 = 0.4 − 0.7 × 0.6 = −0.02.
Hence,

𝐶𝑜𝑣 𝑋, 𝑌 −0.02
𝑟= = = −0.0891.
𝜎𝑋 ⋅ 𝜎𝑌 0.21 × 0.24
1
Example 2: If (𝑋, 𝑌) has the pdf 𝑓 𝑥, 𝑦 = if 𝑥 ≥ 0, 𝑦 ≥ 0, 𝑥 + 𝑦 ≤ 8 and 𝑓 𝑥, 𝑦 = 0
32
otherwise, find 𝑟.
Ans. It is easy to see that the marginal densities of 𝑋 and 𝑌 are

8−𝑥
𝑓1 𝑥 = ቐ 32 if 0 ≤ 𝑥 ≤ 8
0 otherwise
and
8−𝑦
𝑓2 𝑦 = ቐ 32 if 0 ≤ 𝑦 ≤ 8
0 otherwise.
Hence,
∞ 8
8−𝑥 8 8
𝜇𝑋 = න 𝑥 𝑓1 𝑥 𝑑𝑥 = න 𝑥 ⋅ 𝑑𝑥 = , 𝜇𝑌 = .
−∞ 0 32 3 3

∞ 8 8−𝑥 32 32
𝐸 𝑋2 2
= න 𝑥 𝑓1 𝑥 𝑑𝑥 = න 𝑥 ⋅ 2
𝑑𝑥 = ,𝐸 𝑌 2
= .
−∞ 0 32 3 3
∞ ∞
1 8 8−𝑦
𝐸 𝑋𝑌 = න න 𝑥𝑦 𝑓(𝑥, 𝑦) 𝑑𝑥𝑑𝑦 = න න 𝑥𝑦 𝑑𝑥𝑑𝑦
−∞ −∞ 32 0 0

1 8 8−𝑦
1 8 2 𝑑𝑦
16
= න 𝑦 න 𝑥 𝑑𝑥 𝑑𝑦 = න 𝑦 8−𝑦 = .
32 0 0 64 0 3
Hence,
2
32 8 32 32
𝜎𝑋2 =𝐸 𝑋2 2
− 𝜇𝑋 = − = 2
, 𝜎𝑌 = .
3 3 9 9
16 8 8 16
𝐶𝑜𝑣 𝑋, 𝑌 = 𝐸 𝑋𝑌 − 𝜇𝑋 𝜇𝑌 = − × =− .
3 3 3 9
Hence,

16
𝐶𝑜𝑣 𝑋, 𝑌 − 1
𝑟= = 9 =− .
𝜎𝑋 ⋅ 𝜎𝑌 32 32 2
×
9 9
Limits of the correlation coefficient
Theorem 1: −1 ≤ 𝑟 ≤ 1.
Proof: If 𝑋 is any random variable, then 𝐸 𝑋 2 ≥ 0. In particular,

2
𝑋 − 𝜇𝑋 𝑌 − 𝜇𝑌
𝐸 ± ≥ 0.
𝜎𝑋 𝜎𝑌

2 2
𝑋 − 𝜇𝑋 𝑌 − 𝜇𝑌 𝑋 − 𝜇𝑋 𝑌 − 𝜇𝑌
⇒𝐸 +𝐸 ± 2𝐸 ≥0
𝜎𝑋 𝜎𝑌 𝜎𝑋 𝜎𝑌

1 2
1 2
𝐸 𝑋 − 𝜇𝑋 𝑌 − 𝜇𝑌
⇒ 𝐸 𝑋 − 𝜇𝑋 + 𝐸 𝑌 − 𝜇𝑌 ±2⋅ ≥0
𝜎𝑋2 𝜎𝑌2 𝜎𝑋 ⋅ 𝜎𝑌

1 2
1 2
𝐶𝑜𝑣 𝑋, 𝑌
⇒ 2 × 𝜎𝑋 + 2 × 𝜎𝑌 ± 2 × ≥0
𝜎𝑋 𝜎𝑌 𝜎𝑋 ⋅ 𝜎𝑌
1 2
1 2
𝐶𝑜𝑣 𝑋, 𝑌
⇒ 2 × 𝜎𝑋 + 2 × 𝜎𝑌 ± 2 × ≥0
𝜎𝑋 𝜎𝑌 𝜎𝑋 ⋅ 𝜎𝑌
⇒ 1 + 1 ± 2𝑟 ≥ 0 ⇒ 1 + 𝑟 ≥ 0 and 1 − 𝑟 ≥ 0
Thus,
𝑟 ≥ −1 and 𝑟 ≤ 1 ⇒ −1 ≤ 𝑟 ≤ 1.
Observe that 𝒓 = 𝟏 or 𝒓 = −𝟏 according as
2 2
𝑋 − 𝜇𝑋 𝑌 − 𝜇𝑌 𝑋 − 𝜇𝑋 𝑌 − 𝜇𝑌
𝐸 − = 0 or 𝐸 + =0
𝜎𝑋 𝜎𝑌 𝜎𝑋 𝜎𝑌

𝑋−𝜇𝑋 𝑌−𝜇𝑌 2 𝑋−𝜇𝑋 𝑌−𝜇𝑌 2


which happens iff − = 0 or + =0 with probability 1, or
𝜎𝑋 𝜎𝑌 𝜎𝑋 𝜎𝑌
𝑋−𝜇𝑋 𝑌−𝜇𝑌 𝑋−𝜇𝑋 𝑌−𝜇𝑌
equivalently, − = 0 or + = 0 with probability 1, which is a clear
𝜎𝑋 𝜎𝑌 𝜎𝑋 𝜎𝑌
indication that 𝑿 and 𝒀 are linearly related with probability 1. Notice that if 𝑟 = 1, the slope
is positive and if 𝑟 = −1, the slope is negative.
Theorem 2: If 𝑋 and 𝑌 are linearly related, then 𝑟 = 1.
Proof: Assume that 𝑋 and 𝑌 are linearly related, say 𝑌 = 𝑚𝑋 + 𝑐. Then,
𝜇𝑌 = 𝐸 𝑚𝑋 + 𝑐 = 𝑚𝐸 𝑋 + 𝑐 = 𝑚𝜇𝑋 + 𝑐.

𝜎𝑌2 = 𝐸 𝑌 − 𝜇𝑌 2 = 𝐸 𝑚𝑋 + 𝑐 − 𝑚𝜇𝑋 + 𝑐 2

2
= 𝐸 𝑚𝑋 − 𝑚𝜇𝑋 = 𝐸 𝑚2 𝑋 − 𝜇𝑋 2

= 𝑚2 𝐸 𝑋 − 𝜇𝑋 2
= 𝑚2 𝜎𝑋2 ⇒ 𝜎𝑌 = 𝑚 𝜎𝑋 .

𝐶𝑜𝑣 𝑋, 𝑌 = 𝐸 𝑋 − 𝜇𝑋 𝑌 − 𝜇𝑌 = 𝐸 𝑋 − 𝜇𝑋 𝑚𝑋 − 𝑚𝜇𝑋

= 𝐸 𝑚 𝑋 − 𝜇𝑋 𝑋 − 𝜇𝑋 = 𝑚𝐸 𝑋 − 𝜇𝑋 2
= 𝑚𝜎𝑋2 .
Hence,

𝐶𝑜𝑣 𝑋, 𝑌 𝑚𝜎𝑋2 𝑚 1 if 𝑚 > 0,


𝑟= = = =ቊ
𝜎𝑋 ⋅ 𝜎𝑌 𝜎𝑋 ⋅ 𝑚 𝜎𝑋 𝑚 −1 if 𝑚 < 0.
• Thus, if 𝑋 and 𝑌 are linearly related with positive slope, then 𝑟 = 1.
• If if 𝑋 and 𝑌 are linearly related with negative slope, then 𝑟 = −1.
• Indeed, if an increase (decrease) in 𝑋, results in a corresponding increase (decrease) in 𝑌,
then 𝑟 is positive.
• If an increase (decrease) in 𝑋, results in a corresponding decrease (increase) in 𝑌, then 𝑟
is negative.
• The maximum correlation is 𝑟 = 1.
• No linearity means 𝑟 is close to zero.
• 𝑟 denotes the amount of linear dependence between 𝑋 and 𝑌.
• The sign of 𝑟 and 𝐶𝑜𝑣 𝑋, 𝑌 are same.
• 𝑋 and 𝑌 are uncorrelated (i.e. 𝑟 = 0) if and only if 𝐶𝑜𝑣 𝑋, 𝑌 = 0.
• 𝑟 = 0 does not mean that 𝑋 and 𝑌 are not related, this simply means that there is no
linearity between 𝑋 and 𝑌.
Theorem 3: The correlation coefficient 𝑟 has no unit and is independent of change of
origin and scale.
𝑋−𝑎
Proof: The first part follows from the definition. Now assume that 𝑈 = and 𝑉 =

𝑌−𝑏
where ℎ and 𝑘 are positive. We will prove that 𝑟 𝑋, 𝑌 = 𝑟(𝑈, 𝑉). Observe that
𝑘
𝑋 = 𝑎 + ℎ𝑈, 𝑌 = 𝑏 + 𝑘𝑉. Hence,
𝜇𝑋 = 𝐸 𝑎 + ℎ𝑈 = 𝑎 + ℎ𝐸 𝑈 = 𝑎 + ℎ𝜇𝑈 ,

𝜇𝑌 = 𝐸 𝑏 + 𝑘𝑉 = 𝑏 + 𝑘𝐸 𝑉 = 𝑏 + 𝑘𝜇𝑉 ,

𝜎𝑋2 = 𝐸 𝑋 − 𝜇𝑋 2 = 𝐸 𝑎 + ℎ𝑈 − 𝑎 + ℎ𝜇𝑈 2 = 𝐸 ℎ𝑈 − ℎ𝜇𝑈 2

= 𝐸 ℎ 2 𝑈 − 𝜇𝑈 2 = ℎ 2 𝐸 𝑈 − 𝜇𝑈 2 = ℎ2 𝜎𝑈2 ⇒ 𝜎𝑋 = ℎ𝜎𝑈 .
Similarly,
𝜎𝑌2 = 𝐸 𝑌 − 𝜇𝑌 2 = 𝐸 𝑏 + 𝑘𝑉 − 𝑏 + 𝑘𝜇𝑉 2 = 𝐸 𝑘𝑉 − 𝑘𝜇𝑉 2

= 𝐸 𝑘 2 𝑉 − 𝜇𝑉 2 = 𝑘 2 𝐸 𝑉 − 𝜇𝑉 2 = 𝑘 2 𝜎𝑉2 ⇒ 𝜎𝑌 = 𝑘𝜎𝑉 .
Now,
𝐶𝑜𝑣 𝑋, 𝑌 = 𝐸 𝑋 − 𝜇𝑋 𝑌 − 𝜇𝑌 = 𝐸 ℎ 𝑈 − 𝜇𝑈 𝑘 𝑉 − 𝜇𝑉
= ℎ𝑘𝐸 𝑈 − 𝜇𝑈 𝑉 − 𝜇𝑉 = ℎ𝑘 𝐶𝑜𝑣 𝑈, 𝑉 .
Hence,

𝐶𝑜𝑣 𝑋, 𝑌 ℎ𝑘 𝐶𝑜𝑣 𝑈, 𝑉 𝐶𝑜𝑣 𝑈, 𝑉


𝑟 𝑋, 𝑌 = = = = 𝑟 𝑈, 𝑉 .
𝜎𝑋 ⋅ 𝜎𝑌 ℎ𝜎𝑈 ⋅ 𝑘𝜎𝑉 𝜎𝑈 ⋅ 𝜎𝑉

Hence, the correlation coefficient is independent of change of origin and scale.


Theorem 4: If 𝑋 and 𝑌 are independent, then 𝑟 = 0. The converse is not true.
Proof: If 𝑋 and 𝑌 are independent, then
𝐶𝑜𝑣 𝑋, 𝑌 = 𝐸 𝑋𝑌 − 𝐸 𝑋 𝐸 𝑌 = 0.
Hence,
𝐶𝑜𝑣 𝑋, 𝑌
𝑟= = 0.
𝜎𝑋 ⋅ 𝜎𝑌
Moreover, let 𝑋 be uniformly distributed in the interval [−1,1] and 𝑌 = 𝑋 2 . Hence
1
𝑓 𝑥 = ቐ 2 if − 1 ≤ 𝑥 ≤ 1
0 otherwise.
Then,
1

1
𝜇2𝑟−1 = 𝐸 𝑋 2𝑟−1 = න 𝑥 2𝑟−1 𝑑𝑥 = 0, 𝑟 = 1,2,3, …
2 −1

In particular, 𝜇 = 𝐸 𝑋 = 0. Hence, 𝐸 𝑋 2𝑟−1 = 𝜇2𝑟−1 = 𝜇2𝑟−1 = 0, 𝑟 = 1,2,3 …. Now,
𝐶𝑜𝑣 𝑋, 𝑌 = 𝐸 𝑋𝑌 − 𝐸 𝑋 𝐸 𝑌 = 𝐸 𝑋 3 − 𝐸 𝑋 𝐸 𝑋 2 = 0 ⇒ 𝑟 = 0.
However, 𝑋 and 𝑌 are not independent since 𝑌 = 𝑋 2 .
Example 3: If 𝑋 and 𝑌 are independent random variables with variances 𝜎𝑋2 and 𝜎𝑌2 , 𝑈 = 𝑋 + 𝑌
and 𝑉 = 𝑋 − 𝑘𝑌, then find 𝑘 such that 𝑈 and 𝑉 are uncorrelated.
Ans. If 𝑋 and 𝑌 are independent, then 𝑟 𝑋, 𝑌 = 0 and hence 𝐶𝑜𝑣 𝑋, 𝑌 = 0. 𝑈 and 𝑉 will be
uncorrelated if and only if 𝐶𝑜𝑣 𝑈, 𝑉 = 0. But,
𝐶𝑜𝑣 𝑈, 𝑉 = 𝐶𝑜𝑣 𝑋 + 𝑌, 𝑋 − 𝑘𝑌
=𝐸 𝑋 + 𝑌 − 𝜇𝑋 + 𝜇𝑌 𝑋 − 𝑘𝑌 − 𝜇𝑋 − 𝑘𝜇𝑌
=𝐸 𝑋 − 𝜇𝑋 + 𝑌 − 𝜇𝑌 𝑋 − 𝜇𝑋 − 𝑘 𝑌 − 𝜇𝑌
2
= 𝐸 𝑋 − 𝜇𝑋 − 𝑘𝐸 𝑋 − 𝜇𝑋 𝑌 − 𝜇𝑌
2
+𝐸 𝑋 − 𝜇𝑋 𝑌 − 𝜇𝑌 − 𝑘𝐸 𝑌 − 𝜇𝑌
= 𝜎𝑋2 − 𝑘𝐶𝑜𝑣 𝑋, 𝑌 + 𝐶𝑜𝑣 𝑋, 𝑌 − 𝑘𝜎𝑌2 = 𝜎𝑋2 − 𝑘𝜎𝑌2 .
Thus, 𝑈 and 𝑉 are uncorrelated if
2
𝜎𝑋
𝜎𝑋2 − 𝑘𝜎𝑌2 = 0 ⇒ 𝑘 = 2 .
𝜎𝑌
Example 4: If 𝑋~𝑁(0,1) find the correlation between 𝑋 and 𝑌 = 𝑋 3 .
Ans. If 𝑋~𝑁(0,1), then 𝐸 𝑋 = 0, hence the moments about origin are the central moments.
In particular,
𝜇2𝑟−1 = 𝐸 𝑋 2𝑟−1 = 0,
2𝑟 !
𝜇2𝑟 = 𝐸 𝑋 2𝑟 = 1 ⋅ 3 ⋅ ⋯ ⋅ 2𝑟 − 1 = 𝑟 , 𝑟 = 1,2, …
2 𝑟!
Hence,
𝜇𝑌 = 𝐸 𝑌 = 𝐸 𝑋 3 = 0, 𝜎𝑋2 = 1.
𝜎𝑌2 = 𝐸 𝑌 2 − 𝐸 2 𝑌 = 𝐸 𝑋 6 − 𝐸 2 𝑋 3 = 𝐸 𝑋 6 = 1 ⋅ 3 ⋅ 5 = 15.
𝐶𝑜𝑣 𝑋, 𝑌 = 𝐸 𝑋𝑌 − 𝐸 𝑋 𝐸 𝑌 = 𝐸 𝑋 4 = 1 ⋅ 3 = 3.
Hence,
𝐶𝑜𝑣 𝑋, 𝑌 3
𝑟= = = 3/5 = 0.7746.
𝜎𝑋 ⋅ 𝜎𝑌 1 ⋅ 15
Correlation coefficient for a sample
If a sample of a bivariate distribution is given, then the sample correlation coefficient can be calculated by a
similar formula. Assume that the marks of a group of 𝑛 students in two tests are as follows: (𝑋 → mark in
first test, 𝑌 → mark in second test)

𝑿 𝒙𝟏 𝒙𝟐 𝒙𝟑 ⋯ 𝒙𝒏
𝒀 𝒚𝟏 𝒚𝟐 𝒚𝟑 ⋯ 𝒚𝒏
Then,
𝑛 𝑛 𝑛 𝑛
1 1 1 1
𝜎𝑋2 = ෍ 𝑥𝑖 − 𝑥ҧ 2 = ෍ 𝑥𝑖2 − 𝑥ҧ 2 , 𝜎𝑌2 = ෍ 𝑦𝑖 − 𝑦ത 2 = ෍ 𝑦𝑖2 − 𝑦ത 2
𝑛 𝑛 𝑛 𝑛
𝑖=1 𝑖=1 𝑖=1 𝑖=1
𝑛 𝑛
1 1
𝐶𝑜𝑣 𝑋, 𝑌 = ෍ 𝑥𝑖 − 𝑥ҧ 𝑦𝑖 − 𝑦ത = ෍ 𝑥𝑖 𝑦𝑖 − 𝑥ҧ 𝑦ത
𝑛 𝑛
𝑖=1 𝑖=1
and
𝐶𝑜𝑣 𝑋, 𝑌
𝑟= .
𝜎𝑋 ⋅ 𝜎𝑌
Correlation coefficient for a sample
In some texts, the sample correlation coefficient is calculated slightly differently. It is defined as
𝑆𝑋,𝑌
𝑟=
𝑆𝑋 ⋅ 𝑆𝑌
where,
𝑛 𝑛 𝑛 𝑛
1 1 2 1 1
𝑆𝑋2 = ෍ 𝑥𝑖 − 𝑥ҧ 2
= 2 2
෍ 𝑥𝑖 − 𝑛𝑥ҧ , 𝑆𝑌 = ෍ 𝑦𝑖 − 𝑦ത 2
= ෍ 𝑥𝑖2 − 𝑛𝑥ҧ 2
𝑛−1 𝑛−1 𝑛 𝑛−1
𝑖=1 𝑖=1 𝑖=1 𝑖=1
𝑛 𝑛
1 1
𝑆𝑋,𝑌 = ෍ 𝑥𝑖 − 𝑥ҧ 𝑦𝑖 − 𝑦ത = ෍ 𝑥𝑖 𝑦𝑖 − 𝑛𝑥ҧ 𝑦ത
𝑛−1 𝑛−1
𝑖=1 𝑖=1
Here, 𝑆𝑋2 , 𝑆𝑌2 and 𝑆𝑋,𝑌 are respectively called the sample variance of 𝑋, the sample variance of 𝑌
and the sample covariance of 𝑋 and 𝑌. Actually, 𝑆𝑋2 , 𝑆𝑌2 and 𝑆𝑋,𝑌 are the unbiased estimate of their
corresponding population parameters. However, the sample correlation coefficient calculated by
either formula gives the same value. Hence, we follow the former formula.
Example 5: The following table gives the marks of 5 students in two tests out of 20 (X →
mark in first test, Y → mark in second test). Find the correlation coefficient.
𝑿 𝟕 𝟏𝟓 𝟏𝟐 𝟏𝟏 𝟗
𝒀 𝟏𝟎 𝟏𝟒 𝟖 𝟏𝟓 𝟏𝟑
𝑿𝟐 49 225 144 121 81
𝒀𝟐 100 196 64 225 169
𝑿𝒀 70 210 96 165 117

෍ 𝑥𝑖 = 54, ෍ 𝑦𝑖 = 60, ෍ 𝑥𝑖2 = 620, ෍ 𝑦𝑖2 = 754, ෍ 𝑥𝑖 𝑦𝑖 = 658

1 1
𝑥ҧ = ෍ 𝑥𝑖 = 10.8, 𝑦ത = ෍ 𝑦𝑖 = 12,
5 5
From the table,
෍ 𝑥𝑖 = 54, ෍ 𝑦𝑖 = 60, ෍ 𝑥𝑖2 = 620, ෍ 𝑦𝑖2 = 754, ෍ 𝑥𝑖 𝑦𝑖 = 658.

Hence,
1 1
𝑥ҧ = ෍ 𝑥𝑖 = 10.8, 𝑦ത = ෍ 𝑦𝑖 = 12,
5 5
2
1 2 1
𝜎𝑋 = ෍ 𝑥𝑖 − 𝑥ҧ = × 620 − 10.82 = 7.36,
2
5 5
2
1 2 1
𝜎𝑌 = ෍ 𝑦𝑖 − 𝑦ത = × 754 − 122 = 6.8,
2
5 5
1 1
𝐶𝑜𝑣 𝑋, 𝑌 = ෍ 𝑥𝑖 𝑦𝑖 − 𝑥ҧ 𝑦ത = × 658 − 10.8 × 12 = 2.
5 5
Hence,

𝐶𝑜𝑣 𝑋, 𝑌 2
𝑟= = = 𝟎. 𝟐𝟖𝟐𝟕.
𝜎𝑋 ⋅ 𝜎𝑌 7.36 × 6.8
Example 6: Find 𝑟 and verify that in the former case, 𝑟 is positive and in the later case 𝑟
is negative.

𝑿 1 2 3 4 5 6 7 8 9 10
𝒀 1 4 9 16 25 36 49 64 81 100

Verify that for the above data 𝑟 = 0.9746. For the second data 𝑟 = −0.9746.

𝑿 1 2 3 4 5 6 7 8 9 10
𝑌 100 81 64 49 36 25 16 9 4 1

For the following data prove that 𝑟 = 0.


𝑿 -4 -3 -2 -1 0 1 2 3 4
𝒀 16 9 4 1 0 1 4 9 16
Assignment: From 𝑆 = 1,2,3,4,5 consider all possible samples of size 3. They are
5
3
= 10 in number. List all of them. Then calculate 𝑥,ҧ 𝑆 2 and 𝜎 2 for all the samples. Do
the same thing for 𝑆. Then take arithmetic means of all the sample values, compare with
corresponding population values. Give your conclusion.
Rank correlation:
We know that for the data
𝑿 𝒙𝟏 𝒙𝟐 𝒙𝟑 ⋯ 𝒙𝒏
𝒀 𝒚𝟏 𝒚𝟐 𝒚𝟑 ⋯ 𝒚𝒏

the correlation coefficient is given by


𝐶𝑜𝑣 𝑋,𝑌
𝑟=
𝜎𝑋 ⋅𝜎𝑌
where
𝑛 𝑛 𝑛 𝑛
1 1 2 1 1
𝜎𝑋2 = ෍ 𝑥𝑖 − 𝑥ҧ 2 2 2
= ෍ 𝑥𝑖 − 𝑥ҧ , 𝜎𝑌 = ෍ 𝑦𝑖 − 𝑦ത 2 = ෍ 𝑦𝑖2 − 𝑦ത 2
𝑛 𝑛 𝑛 𝑛
𝑖=1 𝑖=1 𝑖=1 𝑖=1
𝑛 𝑛
1 1
𝐶𝑜𝑣 𝑋, 𝑌 = ෍ 𝑥𝑖 − 𝑥ҧ 𝑦𝑖 − 𝑦ത = ෍ 𝑥𝑖 𝑦𝑖 − 𝑥ҧ 𝑦.

𝑛 𝑛
𝑖=1 𝑖=1
Now, consider the situation where in a class of size 𝑛, the students are arranged
according to their SGPA in first semester and accordingly, ranks are assigned, Rank 1
being assigned to the student with highest SGPA, Rank 2 to the next highest SGPA and so
on. The same thing is also done in the second semester, i.e. the students are again ranked
according to their SGPA in second semester. It may so happen that a student who secures
highest SGPA need not do so in the second semester or a student whose rank is 5 in first
semester, may remain fixed, may improve or may go down. Sometimes, it is necessary to
know if there is any correlation between these ranks. It can be done by calculating the
correlation coefficient between ranks of SGPA of first and second semester. We denote by
𝑋, the rank in first semester and 𝑌, the rank in second semester. Thus, the possible values
of both 𝑋 and 𝑌 are 1,2, … , 𝑛 but need not in the same order. We first calculate the
correlation coefficient between 𝑋 and 𝑌 assuming that there are no repeated ranks using
the usual formula for correlation.
Observe that

𝑛 𝑛+1 𝑛+1
෍ 𝑥𝑖 = ෍ 𝑦𝑖 = ⇒ 𝑥ഥ = 𝑦ത = ,
2 2

𝑛 𝑛 + 1 (2𝑛 + 1) 𝑛 2−1
෍ 𝑥𝑖2 = ෍ 𝑦𝑖2 = ⇒ 𝜎𝑋2 = 𝜎𝑌2 =
6 12
Let 𝑑𝑖 = 𝑥𝑖 − 𝑦𝑖 , 𝑖 = 1,2, … , 𝑛. Then

1 2 1 2
1 2
෍ 𝑑𝑖 = ෍ 𝑥𝑖 − 𝑦𝑖 = ෍ 𝑥𝑖 − 𝑥ҧ − 𝑦𝑖 − 𝑦ത
𝑛 𝑛 𝑛

1 2
1 2
1
= ෍ 𝑥𝑖 − 𝑥ҧ + ෍ 𝑦𝑖 − 𝑦ത − 2 × ෍ 𝑥𝑖 − 𝑥ҧ 𝑦𝑖 − 𝑦ത
𝑛 𝑛 𝑛
= 𝜎𝑋2 + 𝜎𝑌2 − 2𝐶𝑜𝑣 𝑋, 𝑌 = 𝜎𝑋2 + 𝜎𝑌2 − 2𝑟𝜎𝑋 𝜎𝑌 .
Since
𝑛 2−1
𝜎𝑋2 = 𝜎𝑌2 = ,
12
it follows that
1 𝑛 2−1 𝑛 2−1
෍ 𝑑𝑖2 = 𝜎𝑋2 + 𝜎𝑌2 − 2𝑟𝜎𝑋 𝜎𝑌 = 2 × − 2𝑟 ×
𝑛 12 12
𝑛2 − 1
= 1−𝑟 × .
6
6 σ 𝑑𝑖2
⇒1−𝑟 = 2
.
𝑛 𝑛 −1
Hence,

𝟔 σ 𝒅𝟐𝒊
𝒓=𝟏− 𝟐
.
𝒏 𝒏 −𝟏
Example 7: The following table gives the marks of 10 students in two tests out of 100 (X → mark
in first test, Y → mark in second test). Find the rank correlation coefficient.
Test I 45 87 55 67 97 25 75 48 52 17
Marks
Test II 65 70 78 82 81 32 67 55 60 37
Marks

Ans. To calculate the rank correlation coefficient, we proceed as follows:

Rank of Test I (𝒙) 8 2 5 4 1 9 3 7 6 10


Rank of Test II (𝒚) 6 4 3 1 2 10 5 8 7 9
𝒅=𝒙−𝒚 2 −𝟐 2 3 −𝟏 −𝟏 −𝟐 −𝟏 −𝟏 1
𝒅𝟐 4 4 4 9 1 1 4 1 1 1

Thus, 𝑛 = 10, σ 𝑑𝑖2 = 30. Hence, the rank correlation coefficient is given by
6 σ 𝑑𝑖2 6 × 30 9
𝑟 =1− 2
= 1 − = .
𝑛 𝑛 −1 10 100 − 1 11
Repeated ranks
When two or more 𝑋 or 𝑌 values are same, the rank assigned to these values are the
average values in the case they are different. For each such repeated ranks, the factor
𝑚 𝑚2 − 1
12
is to be added to σ 𝑑𝑖2 . The following example illustrates this correction.

Example 7: The following table gives the marks of 10 students in two tests out of 100
(X → mark in first test, Y → mark in second test). Find the rank correlation coefficient.
Test I 45 87 55 61 97 25 75 48 61 17
Marks
Test II 65 65 78 82 81 32 65 55 60 37
Marks

Ans. To calculate the rank correlation coefficient, we proceed as follows:


Rank of Test I (𝒙) 8 2 6 4.5 1 9 3 7 4.5 10
Rank of Test II (𝒚) 5 5 3 1 2 10 5 8 7 9
𝒅=𝒙−𝒚 3 −𝟑 3 −𝟑. 𝟓 −𝟏 −𝟏 −𝟐 −𝟏 −𝟐. 𝟓 1
𝒅𝟐 9 9 9 12.25 1 1 4 1 6.25 1

Thus, 𝑛 = 10, σ 𝑑𝑖2 = 53.5. There are 2 repeated 𝑥-rank and 3 𝑦-rank. Hence, the factor
to be added to σ 𝑑𝑖2 is
2(22 − 1) 3(32 − 1) 30
+ = = 2.5.
12 12 12
Hence, the rank correlation coefficient is given by

𝑚 𝑚2 − 1
6 σ 𝑑𝑖2 +σ 6 53.5 + 2.5 56 109
12
𝑟 =1− =1− =1− = .
𝑛 𝑛2 − 1 10 100 − 1 165 165
Regression

As we have discussed, the correlation coefficient between 𝑋 and 𝑌 expresses the amount
of linearity between 𝑋 and 𝑌 numrically. The purpose of regression is to approximate the
relationship between 𝑋 and 𝑌 by linearity. This is achieved in two ways: estimating 𝑌
without disturbing 𝑋 such that the points 𝑋, 𝑒𝑠𝑡(𝑌) are on a straight line and estimating
𝑋 without disturbing 𝑌 such that 𝑒𝑠𝑡 𝑌 , 𝑌 are on a straight line.

Assume that we are given with 𝑛 pairs of values of 𝑋, 𝑌 say


𝑥1 , 𝑦1 , 𝑥2 , 𝑦2 , … , 𝑥𝑛 , 𝑦𝑛 which are not on a straight line and we want to find a line
which passes as close as possible to these points. Let the line be of the form 𝑌 = 𝑎 + 𝑏𝑋
which means that we want to replace 𝑦𝑖 by est 𝑦𝑖 = 𝑎 + 𝑏𝑥𝑖 , 𝑖 = 1,2, … , 𝑛 such that
𝑥𝑖 , est 𝑦𝑖 is on 𝑌 = 𝑎 + 𝑏𝑋.
In the following figure, the error 𝑬𝒊 = 𝒚𝒊 − 𝐞𝐬𝐭 𝒚𝒊 = 𝒚𝒊 − 𝒂 − 𝒃𝒙𝒊 that occurs

𝒙 𝒊 , 𝒚𝒊

𝒚𝒊 − 𝐞𝐬𝐭(𝒚𝒊 )

𝒙𝒊 , 𝒂 + 𝒃𝒙𝒊

𝒙𝒊
due to the replacement of 𝒙𝒊 , 𝒚𝒊 by means of 𝒙𝒊 , 𝒂 + 𝒃𝒙𝒊 is shown. There are 𝑛 such
errors which need to be minimized in some way for the best possible line.
It is clear from the figure that the error in replacing the point 𝑥𝑖 , 𝑦𝑖 by 𝑥𝑖 , est 𝑦𝑖 =
𝑥𝑖 , 𝑎 + 𝑏𝑥𝑖 is equal to 𝐸𝑖 = 𝑦𝑖 − 𝑎 − 𝑏𝑥𝑖 , 𝑖 = 1,2, … , 𝑛. We need to minimize these
errors in some way. We can’t make all errors zero since the points are not on a line. Since
positive and negative errors of equal magnitude are equally important, we need to
consider some function of the absolute error to be minimized. Since it is difficult to
minimize sum of absolute errors we consider minimizing the sum of squares of the errors
𝑛
2
𝑆 = ෍ 𝑦𝑖 − 𝑎 − 𝑏𝑥𝑖
𝑖=1

with respect to 𝑎 and 𝑏 such that the points 𝑥1 , 𝑦1 , 𝑥2 , 𝑦2 , … , 𝑥𝑛 , 𝑦𝑛 lie as close as


possible to the line 𝑌 = 𝑎 + 𝑏𝑋. This minimization is know as the principle of least
squares which requires the calculus of functions of two variables. Since 𝑆 has no
maximum (e.g., 𝑆 → ∞ if 𝑏 = 0 and 𝑎 → ∞), the minimum of 𝑆 corresponds to the
values of 𝑎 and 𝑏 satisfying
𝜕𝑆 𝜕𝑆
= 0, = 0.
𝜕𝑎 𝜕𝑏
Thus,
𝑛 𝑛

෍ 2 𝑦𝑖 − 𝑎 − 𝑏𝑥𝑖 (−1) = 0, ෍ 2 𝑦𝑖 − 𝑎 − 𝑏𝑥𝑖 (−𝑥𝑖 ) = 0.


𝑖=1 𝑖=1

The above equations are known as normal equations and can be simplified as
𝑛 𝑛

෍ 𝑦𝑖 − 𝑎 − 𝑏𝑥𝑖 = 0, ෍ 𝑥𝑖 𝑦𝑖 − 𝑎𝑥𝑖 − 𝑏𝑥𝑖2 = 0.


𝑖=1 𝑖=1

On rearrangement, we get
𝑛 𝑛 𝑛 𝑛 𝑛

෍ 𝑦𝑖 = 𝑛𝑎 + 𝑏 ෍ 𝑥𝑖 , ෍ 𝑥𝑖 𝑦𝑖 = 𝑎 ෍ 𝑥𝑖 + 𝑏 ෍ 𝑥𝑖2 .
𝑖=1 𝑖=1 𝑖=1 𝑖=1 𝑖=1

Dividing both the equations by 𝑛, we get


𝑛 𝑛
1 1
𝑦ത = 𝑎 + 𝑏𝑥,ҧ ෍ 𝑥𝑖 𝑦𝑖 = 𝑎𝑥ҧ + 𝑏 ⋅ ෍ 𝑥𝑖2 .
𝑛 𝑛
𝑖=1 𝑖=1
𝑛 𝑛
1 1
𝑦ത = 𝑎 + 𝑏𝑥,ҧ ෍ 𝑥𝑖 𝑦𝑖 = 𝑎𝑥ҧ + 𝑏 ⋅ ෍ 𝑥𝑖2 .
𝑛 𝑛
𝑖=1 𝑖=1
Eliminating 𝑎 from the first equation and substituting in the second equation, we get
1 𝑛
σ𝑖=1 𝑥𝑖 𝑦𝑖 − 𝑥ҧ 𝑦ത 𝐶𝑜𝑣 𝑋, 𝑌 𝜎𝑌
𝑎 = 𝑦ത − 𝑏𝑥,ҧ 𝑏 = 𝑛 = =𝑟 .
1 𝑛 2 𝜎𝑋
σ𝑖=1 𝑥𝑖2 − 𝑥ҧ 2 𝜎𝑋
𝑛
The value of 𝑏 so obtained is denoted by
𝐶𝑜𝑣 𝑋, 𝑌 𝜎𝑌
𝑏𝑌𝑋 = 2 =𝑟
𝜎𝑋 𝜎𝑋
and is known as the regression coefficient of 𝑌 on 𝑋. Now, 𝑎 = 𝑦ത − 𝑏𝑌𝑋 𝑥ҧ and the line of
the form 𝑌 = 𝑎 + 𝑏𝑋 with minimum mean square error is
𝑌 = 𝑎 + 𝑏𝑋 = 𝑦ത − 𝑏𝑌𝑋 𝑥ҧ + 𝑏𝑌𝑋 𝑋
and can be written as a more convenient form as
and can be written as a more convenient form as
𝒀−𝒚 ഥ = 𝒃𝒀𝑿 𝑿 − 𝒙

and is known as the line of regression of 𝑌 on 𝑋, or simply LR of 𝑌 on 𝑋.

The line of regression of 𝑌 on 𝑋 , that is 𝑌 = 𝑎 + 𝑏𝑋, has been obtained keeping 𝑋 fixed
and estimating 𝑌 such that the values of 𝑋, 𝑒𝑠𝑡(𝑌) are on a straight line. We can
similarly consider the problem of finding a line of the form 𝑋 = 𝑎 + 𝑏𝑌, where we keep
𝑌 fixed and estimate 𝑋 such that the values of 𝑒𝑠𝑡 𝑋 , 𝑌 lie on a straight line. For this
we have to repeat the entire calculation we have done for fitting the line 𝑌 = 𝑎 + 𝑏𝑋.
However, the can also be obtained from fitting we have already done just by
interchanging 𝑋 and 𝑌. In doing so, we obtain the line
𝑿−𝒙 ഥ = 𝒃𝑿𝒀 𝒀 − 𝒚 ഥ
which is known as the line of regression of 𝑋 on 𝑌, or simply LR of 𝑋 on 𝑌.
The multiplier 𝑏𝑋𝑌 of
ഥ = 𝒃𝑿𝒀 𝒀 − 𝒚
𝑿−𝒙 ഥ
is known as the regression coefficient of 𝑋 on 𝑌and is equal to
𝐶𝑜𝑣 𝑋, 𝑌 𝜎𝑋
𝑏𝑋𝑌 = 2 =𝑟 .
𝜎𝑌 𝜎𝑌
• In LR of 𝑌 on 𝑋, 𝑋 is fixed, 𝑌 is estimated so that 𝑋, 𝑒𝑠𝑡(𝑌) are on a straight line.
• In LR of 𝑋 on 𝑌, 𝑌 is fixed, 𝑋 is estimated so that 𝑒𝑠𝑡 𝑋 , 𝑌 are on a straight line.
• The LR of 𝑌 on 𝑋 and LR of 𝑋 on 𝑌 can also be written as
𝟏
ഥ = 𝒃𝒀𝑿 𝑿 − 𝒙
𝒀−𝒚 ഥ , ഥ=
𝒀−𝒚 ഥ .
𝑿−𝒙
𝒃𝑿𝒀
• The slope of LR of 𝑌 on 𝑋 is 𝑏𝑌𝑋 , the regression coefficient of 𝑋 on 𝑌 while the slope
of LR of 𝑋 on 𝑌 is 1/𝑏𝑋𝑌 the reciprocal of the regression coefficient.
• Since the signs of 𝑏𝑌𝑋 , 𝑏𝑋𝑌 and 𝑟 are same as the sign of 𝐶𝑜𝑣(𝑋, 𝑌), hence both the
regression coefficients and the correlation coefficient are of the same sign.
• Hence, the slopes of both regression coefficients are of the same sign. Thus, either both
the slopes are the same sign.
• The two regression lines are either both inclined towards the positive 𝑥-axis or both are
inclines towards the negative 𝑥-axis (if they are not perpendicular to each other).
𝜎𝑌 𝜎𝑋
• 𝑏𝑌𝑋 ⋅ 𝑏𝑋𝑌 = 𝑟 ⋅𝑟 = 𝑟 2 . Hence, the correlation coefficient is the geometric mean
𝜎𝑋 𝜎𝑌
of the regression coefficients. However, mind the signs of the 𝑏𝑌𝑋 , 𝑏𝑋𝑌 and 𝑟.
• The point 𝑥,ҧ 𝑦ത is common to both the regression lines. Hence, the point of
intersection of the two regression lines is 𝑥,ҧ 𝑦ത .
• The two regression lines 𝑌 − 𝑦ത = 𝑏𝑌𝑋 𝑋 − 𝑥ҧ , 𝑌 − 𝑦ത = 1/𝑏𝑋𝑌 𝑋 − 𝑥ҧ coincide if
only if 𝑏𝑌𝑋 = 1/𝑏𝑋𝑌 which is equivalent to 𝑟 2 = 1 and 𝑟 = ±1. Thus, when the 𝑛
points are on a straight line, there is just one regression line.
• Angle of intersection of the two regression line:

𝜃2 𝜃1

𝜎 1 𝜎
Observe that 𝜃 = 𝜃1 − 𝜃2 , 0 ≤ 𝜃 ≤ 𝜋/2 , tan 𝜃1 = 𝑏𝑌𝑋 = 𝑟 𝑌 and tan 𝜃2 = 𝑏𝑋𝑌 = ⋅ 𝑌 .
𝜎𝑋 𝑟 𝜎𝑋
Hence,
tan 𝜃1 − tan 𝜃2
tan 𝜃 = tan 𝜃1 − 𝜃2 =
1 + tan 𝜃1 ⋅ tan 𝜃2
1 𝜎
𝑟− ⋅ 𝑌 𝜎𝑋 𝜎𝑌 1
𝑟 𝜎𝑋
= 2 = 2 2⋅ 𝑟−𝑟 .
𝜎𝑌 𝜎𝑋 + 𝜎𝑌
1+ 2
𝜎𝑋
Hence, the angle of intersection of the two regression lines is
−1
𝜎𝑋 𝜎𝑌 1
𝜃 = tan 2 2⋅ 𝑟−𝑟 .
𝜎𝑋 + 𝜎𝑌
• Case I: 𝜃 = 0 iff tan 𝜃 = 0 (since 0 ≤ 𝜃 ≤ 𝜋/2) and hence
𝜎𝑋 𝜎𝑌 1 1
2 2 ⋅ 𝑟 − 𝑟 = 0 ⇒ 𝑟 − 𝑟 = 0 ⇒ 𝑟 = ±1.
𝜎𝑋 + 𝜎𝑌
Thus, 𝜃 = 0 iff 𝑋 and 𝑌 are linearly related.
• 𝜃 = 𝜋/2 iff tan 𝜃 = ∞ which is possible iff 𝑟 = 0. Thus, 𝜃 = 𝜋/2 iff 𝑋 and 𝑌 are
uncorrelated.
Example 8: The following table gives the marks of 5 students in two tests out of 20 (X →
mark in first test, 𝑌 → mark in second test). Find the two lines of regression. Estimate the
mark of a student in the second test if his mark in the first test is 10 and the also estimate
the mark of a student in the first test if his mark in the second test is 12
𝑿 𝟕 𝟏𝟓 𝟏𝟐 𝟏𝟏 𝟗
𝒀 𝟏𝟎 𝟏𝟒 𝟖 𝟏𝟓 𝟏𝟑
Ans: Referring to Example 5, one can see that
𝑥ҧ = 10.8, 𝑦ത = 12, 𝜎𝑋2 = 7.36, 𝜎𝑌2 = 6.8, 𝐶𝑜𝑣 𝑋, 𝑌 = 2.
Hence,
𝐶𝑜𝑣 𝑋, 𝑌 2
𝑏𝑌𝑋 = 2 = = 0.2717
𝜎𝑋 7.36
𝐶𝑜𝑣 𝑋, 𝑌 2
𝑏𝑋𝑌 = 2 = = 0.2941
𝜎𝑌 6.8
Now, the LR of 𝑌 on 𝑋 is given by
𝑌 − 𝑦ത = 𝑏𝑌𝑋 𝑋 − 𝑥ҧ
⇒ 𝑌 − 12 = 0.2717 𝑋 − 10.8
⇒ 0.2717𝑋 − 𝑌 = −9.0656
and the LR of 𝑋 on 𝑌 is given by
𝑋 − 𝑥ҧ = 𝑏𝑋𝑌 𝑌 − 𝑦ത
⇒ 𝑋 − 10.8 = 0.2941 𝑌 − 12
⇒ 𝑋 − 0.2941𝑌 = 7.2708

Estimated mark of a student in the second test if his mark in the first test is 10 is to be
obtained from LR of 𝑌 on 𝑋. Hence, when 𝑋 = 10, 𝑌 = 0.2717 × 10 + 9.0656 = 11.78.
Estimated mark of a student in the first test if his mark in the second test is 12 is to be
obtained from LR of 𝑋 on 𝑌. Hence, if 𝑌 = 12, then 𝑋 = 0.2941 × 12 + 7.2708 = 10.8.
Example 9: The two lines of regression are given by 3.40𝑋 − 𝑌 = 24.72 and
𝑋 − 3.68𝑌 = −33.37. Find the means of 𝑋 and 𝑌, the two regression coefficients, the
correlation coefficient and the ratio of variances of 𝑋 and 𝑌.
Ans. The two regression lines intersects at 𝑥,ҧ 𝑦ത . Hence, 3.40𝑥ҧ − 𝑦ത = 24.72 and
𝑥ҧ − 3.68𝑦ത = −33.37. On solving, we get 𝑥ҧ = 10.8 𝑦
ത = 12.

To identify which line is LR of 𝑌 on 𝑋 and which is LR of 𝑋 on 𝑌, we have to notice that the


slope of one line is the regression coefficient of 𝑌 on 𝑋 and reciprocal of slope of other line is
regression coefficient of 𝑋 on 𝑌. Further, the product of regression coefficients is equal to
𝑟 2 ≤ 1. Hence, if 𝑚1 and 𝑚2 are slope of the two lines respectively, then
1 1
𝑚1 × ≤ 1 𝑜𝑟 𝑚2 × ≤1 (But both are not ≤ 1.)
𝑚2 𝑚1
1 1 1
If 𝑚1 × ≤ 1, then 𝑚1 = 𝑏𝑌𝑋 and = 𝑏𝑋𝑌 , and if 𝑚2 × ≤ 1, then 𝑚2 = 𝑏𝑌𝑋 and
𝑚2 𝑚2 𝑚1
1
= 𝑏𝑋𝑌 .
𝑚1
The two lines are of regression are
3.40𝑋 − 𝑌 = 24.72, 𝑋 − 3.68𝑌 = −33.37.
𝑚2
Hence, 𝑚1 = 3.40 and 𝑚2 = 0.272. Observe that ≤ 1. Thus,
𝑚1

1
𝑚2 = 0.272 = 𝑏𝑌𝑋 , 𝑚1 = 3.40 = ⇒ 𝑏𝑋𝑌 = 0.294.
𝑏𝑋𝑌
𝑟2 = 𝑏𝑋𝑌 ⋅ 𝑏𝑌𝑋 = 0.08 ⇒ 𝑟 = 0.283.
Observe that 𝑟 is positive since both 𝑏𝑋𝑌 and 𝑏𝑌𝑋 are positive. Since
𝜎𝑋𝜎𝑋 𝑏𝑋𝑌 0.294
𝑏𝑋𝑌 =𝑟⋅ ⇒ = = = 1.039.
𝜎𝑌 𝜎𝑌 𝑟 0.283
Hence

𝜎𝑋2
2 = 1.08.
𝜎𝑌

You might also like