Example given in the Lecture on Jan. 19th.​Let X and Y be two N(0,1) random variables. The Covarance of X and Y is given by​E[X Y] = Sin[π/2 E[Sign[X] Sign[Y]]]​The proof relies on the following integral​∫_0^2π Sign[Cos[θ]] Sign[Sin[θ+θ_0]] d θ​​By Le Chen.Crated on Thu Jan 19 08:45:16 PM EST 2023

​​
θ
0
takestherange
-π
2
,
π
2


In[]:=
Plot​​NIntegrate[Sign[Cos[θ]]Sign[Sin[θ+
θ
0
]],{θ,0,2π}],​​
θ
0
,
-π
2
,
π
2
,​​Ticks
-π
2
,0,
π
2
,{-2π,-π,0,π,2π}​​
Out[]=
​​Plotof
θ
0
onalargerrange[-2π,2π]
In[]:=
Plot​​NIntegrate[Sign[Cos[θ]]Sign[Sin[θ+
θ
0
]],{θ,0,2π}],​​{
θ
0
,-2π,2π},​​Ticks-2π,-
3π
2
,-π,
-π
2
,0,
π
2
,π,
3π
2
,2π,{-2π,-π,0,π,2π}​​
Out[]=