Professional Documents
Culture Documents
RST 7
RST 7
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
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
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
q=0.99
xq=quantile(X,q)
yq=quantile(Y,q)
(sum(X>xq & Y>yq)/10000)/(1-q)
plot(X,Y,pch=19)
u=rank(X)/10000
v=rank(Y)/10000
plot(u,v,pch=19)