Question is incomplete.
Let us take an example related to given problem.
Referring to the random variables whose joint probability density function of 𝑋 and 𝑌 is given by
𝑓(𝑥, 𝑦) = {
𝑥 + 𝑦
3
0 ≤ 𝑥 ≤ 1, 0 ≤ 𝑦 ≤ 2
0 𝑒𝑙𝑠𝑒𝑤ℎ𝑒𝑟𝑒
Find the two lines of regression.
Solution:
lines of regression:
y=a1x+b1
a1=σXY/σX2,b1=μY−a1μX
x=a2y+b2
a2=σXY/σY2,b2=μX−a2μY
covariance:
σXY=∬(x−μX)(y−μY)f(x,y)dydx
fX(x)=∫02f(x,y)dy=31∫02(x+y)dy=31(2x+1)
fY(y)=∫01f(x,y)dx=31∫01(x+y)dx=31(1/2+y)
μX=∫01xfX(x)dx=31∫01x(2x+1)dx=31(2/3+1/2)=7/18
μY=∫02yfY(y)dy=31∫02y(1/2+y)dy=31(1+8/3)=11/9
σX=E(X2)−μX2
E(X2)=∫01x2fX(x)dx=31∫01x2(2x+1)dx=31(1/2+1/3)=5/18
σX=5/18−(7/18)2=41/18=0.356
σY=E(Y2)−μY2
E(Y2)=∫02x2fY(y)dy=31∫02y2(1/2+y)dy=31(4/3+4)=16/9
σY=16/9−(11/9)2=23/9=0.533
σXY=31∫01∫02(x−7/18)(y−11/9)(x+y)dydx=
=31∫01(x−7/18)(xy2/2−11xy/9+y3/3−11y2/18)∣02dx=
=31∫01(x−7/18)(2x−22x/9+8/3−44/18)dx=
=31∫01(x−0.39)(−0.44x+0.22)dx=31(−0.15+0.11+0.09−0.09)=−0.013
a1=−0.013/0.3562=−0.1
b1=11/9+0.1⋅7/18=1.26
y=−0.1x+1.26
a2=−0.013/0.5332=−0.05
b1=7/18+0.05⋅11/9=0.45
x=−0.05y+0.45
Comments