Lect12 13

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 28

LEC12

3 types of “ co-varying” :
3 types of “ co-varying” :
3 types of “ co-varying” :


Correlation
• Covariance is a measure to indicate the extent to which
two random variables change simultaneously.
• Correlation is a measure used to represent how strongly
two random variables are related to each other.
• Ultimately, correlation is the scaled form of covariance.
All the formulas of Correlation
coefficient
Covariance

Populatio
n
Covarian
ce
formula

Sample
Covarian
ce
formula
Problem. Compute correlation coefficient
between X and Y.
Solution.
X Y XY X2 Y2
4 2 8 16 4
4 1 4 16 1
6 3 18 36 9
5 2 10 25 4
4 1 4 16 1
ΣX = 23 ΣY = 9 ΣXY = 44 ΣX2 = 109 ΣY2 = 19
• Put all the values in the formula

•r =
•r =
•r =
•r = 0.87 (So, X and Y are positively correlated).
Example 1 Find the correlation
coefficient between Age and Weight.
Solution
Example-2 Find correlation coefficient between growth and
index.
Solution
Example 3

• Daily Return for Two


Stocks are given below

Find the covariance


between the two stocks (the
data is the sample data)
Solution-1
Sample Covariance formula

• For ABC, the mean would be (1.1 + 1.7 + 2.1 + 1.4 + 0.2) / 5 = 1.30.
• For XYZ, the mean would be (3 + 4.2 + 4.9 + 4.1 + 2.5) / 5 = 3.74.

Covariance = [(1.1 - 1.30) x (3 - 3.74)] + [(1.7 - 1.30) x (4.2 - 3.74)] + [(2.1 - 1.30) x
(4.9 - 3.74)] + …/(5-1)
• = ([0.148] + [0.184] + [0.928] + [0.036] + [1.364]) / (5-1)
• = 2.66 / (5 - 1)
• = 0.665
Relation between (PMF and CDF) and (PDF and CDF)
PMF – PROBABILITY MASS FUNCTION
PDF – PROBABILITY DENSITY FUNCTION
CDF – CUMULATIVE DISTRIBUTION FUNCTION
Problem 1

Solution. For cdf, we have integrated from 1 to
infinity.
Problem 2
Solution

You might also like