Applied Time-Series Analysis
Week 2 - Assignment Solution
NPTEL
(NPTEL) ATSA 1 / 13
Mark Distribution
Question Marks
1 1
2 1
3 2
4 2
5 2
6 2
7 2
8 2
9 3
10 3
Total 20
(NPTEL) ATSA 2 / 13
Question 1
Answer: d
Solution: The following quantities can be calculated from fXY (x, y):
Z
fX (x) = fXY (x, y)dx
Z
fY (y) = fXY (x, y)dy
fXY (x, y)
fY |X=x (y) =
fX (x)
(NPTEL) ATSA 3 / 13
Question 2
Answer: b, c
Solution:
Z
fX (x) = fXY (x, y)dx
Z
= 2x10−6 e−0.001x−0.002y dx
= 0.001e−0.001x
Z
fY (y) = 2x10−6 e−0.001x−0.002y dy
= 0.002e−0.002
fX (x) ∗ fY (y) = 0.001e−0.001x ∗ 0.002e−0.002
= 2x10−6 e−0.001x−0.002y = fXY (x, y)
So, X, Y are independent RVs.
(NPTEL) ATSA 4 / 13
Question 3
Answer: c
Solution:
a The covariance matrix is always symmetric and positive
semi-definite.
b ρXY = 0 implies that X and Y do not have a linear relationship
c |ρXY | ≤ 1 is always true
d E[XY ] = E[X]E[Y ] if X and Y are not correlated. They may or
may not be independent RVs.
(NPTEL) ATSA 5 / 13
Question 4
Answer: 1.26
Solution: For the discrete random variables X and Y with the joint
distribution shown in the figure:
E(X, Y ) = 0 × 0 × 0.2 + 1 × 1 × 0.1 + 1 × 2 × 0.1 + 2 × 1 × 0.1
+ 2 × 2 × 0.1 + 3 × 3 × 0.4 = 4.5
E(X) = 0 × 0.2 + 1 × 0.2 + 2 × 0.2 + 3 × 0.4 = 1.8
E(Y ) = 0 × 0.2 + 1 × 0.2 + 2 × 0.2 + 3 × 0.4 = 1.8
σXY = E(XY ) − E(X)E(Y ) = 4.5 − (1.8)(1.8) = 1.26
(NPTEL) ATSA 6 / 13
Question 5
Answer: a, b, c, d
Solution : The following are properties of Gaussian distribution:
a X and Y are independent if σXY = 0
b E[X|Y ] i.e, conditional expectation is always linear
c fX (x) - marginal density of X is univariate Gaussian
d fY (y) - marginal density of Y is univariate Gaussian
(NPTEL) ATSA 7 / 13
Question 6-8
Given that X, Y, Z are random variables, answer questions 6 to 8 based on
the following random sample:
X Y Z
-24.25 122.33 -215.33
-10.35 59.33 -250.33
-3.85 1.33 -8.33
17.15 -79.67 134.67
7.15 -57.67 290.67
14.15 -45.67 48.67
(NPTEL) ATSA 8 / 13
Question 6
Answer: 23516
Solution: Covariance matrix (Σ̂) is:
251.095 -1202.12 2584.26
-1202.12 6049.0667 -14183.8667
2584.26 -14183.8667 42819.0667
sum(Σ̂) = 23515.775 ∼
= 23516 (Rounded to the closest integer)
(NPTEL) ATSA 9 / 13
Question 7
Answer: c
Solution: Ŷ = aX + bZ. The optimal estimate of ‘a’ such that it
minimizes the MSE is:
? σy ρyx − ρyz ρxz
a = = −3.638088
σx 1 − ρ2xz
(NPTEL) ATSA 10 / 13
Question 8
Answer: c
Solution: Let Ŷ = a1 X + b1 Z and X̂ = a2 Y + b2 Z.
a?1 = −3.638088
a?2 = −0.256234
ρ2XY.Z = a?1 ∗ a?2
= 0.932201
Where a?1 and a?2 are optimal (in MSE sense) estimates of a1 and a2
respectively.
(NPTEL) ATSA 11 / 13
Question 9
Answer:
a ρXY = 0.9996
b ρY Z = 0.9752
Solution:
load("Week2.RData")
corYZ = cov(Y,Z)/sqrt(var(Y)*var(Z))
corYX = cov(Y,X)/sqrt(var(Y)*var(X))
(NPTEL) ATSA 12 / 13
Question 10
Answer:
a ρY X.Z = 0.9918
b ρY Z.X = -0.0155
Solution: load("Week2.RData")
sx2 = var(X)
sy2 = var(Y)
sz2 = var(Z)
sxy = cov(X,Y)
sxz = cov(X,Z)
syz = cov(Y,Z)
sigma = matrix(c(sx2,sxy,sxz,sxy,sy2,syz,sxz,syz,sz2),3,3)
sigma inv = qr.solve(sigma)
par corr yx.z =
-sigma inv[1,2]/sqrt(sigma inv[1,1]*sigma inv[2,2])
par corr yz.x =
-sigma inv[2,3]/sqrt(sigma inv[3,3]*sigma inv[2,2])
(NPTEL) ATSA 13 / 13