Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

Lower tail correlation is given by

Pr ( X ≤ x q ) =q  x q is the qth percentile of X

Pr ( Y ≤ y q ) =q  y q is the qth percentile of Y

λ L =lim Pr ( X ≤ x q|Y ≤ y q ) =lim Pr ( Y ≤ y q| X ≤ x q )


q→0 q→0

Pr ( X ≤ x q , Y ≤ y q ) Pr ( X ≤ x q , Y ≤ y q )
¿ lim ¿ lim
q→0 Pr ( Y ≤ y q ) q→0 Pr ( X ≤ x q )

Pr ( X ≤ x q , Y ≤ y q ) Pr ( X ≤ x q , Y ≤ y q )
¿ lim ¿ lim
q→0 q q→0 q

Upper tail correlation is given by

Pr ( X > x q , Y > y q )
λ U =lim Pr ( X > x q|Y > y q )=lim Pr ( Y > y q| X > x q ) =lim
q →1 q→1 q →1 1−q
1 1 Pr ( X ≤ x q , Y ≤ y q )
Pr ( X ≤ 10 ) = Pr (Y ≤ 10 )= λ L =lim
10 10 q→0 q
2 2
Pr ( X ≤ 15 ) = Pr (Y ≤ 12 )=
10 10
3 3
Pr ( X ≤ 17 )= Pr (Y ≤ 14 ) = x 0.3=17 y 0.3 =14
10 10
2
4 4
Pr ( X ≤ 20 ) = Pr (Y ≤ 19 )= Pr ( X ≤17 ,Y ≤ 14 ) 10 2
10 10 λ L= = =
0.3 0.3 3

… …
10 10
Pr ( X ≤ 37 )= Pr (Y ≤ 37 )=
10 10
Lower tail between X and Y is strong.
Upper tail between X and Y is weak.
library(copula)
copula = claytonCopula(2.5, dim = 2)
data = rCopula(10000, copula)

data

Find the lower tail correlation at:


q=0.3
q=0.2
q=0.1
q=0.05
q=0.01

head(data)
X=data[,1]
Y=data[,2]

q=0.01
xq=quantile(X,q)
yq=quantile(Y,q)
(sum(X<=xq & Y<=yq)/10000)/q

Find the upper tail correlation at:


q=0.7
q=0.8
q=0.9
q=0.95
q=0.99

q=0.99
xq=quantile(X,q)
yq=quantile(Y,q)
(sum(X>xq & Y>yq)/10000)/(1-q)

Lower tail between X and Y is strong.


Upper tail between X and Y is weak.

plot(X,Y,pch=19)

u=rank(X)/10000
v=rank(Y)/10000
plot(u,v,pch=19)

You might also like