I would like to fit a copula to a dataframe with 2 columns: a
and b
. Then I have to calculate the conditional probability of a
< 0, when b
<-2 (i.e. P(a<0|b<-1).
I have tried the following code in python using the library copula
; I am able to fit the copula to the data but I am not sure about calculating cdf :
import copula
df = pandas.read_csv("filename")
cop = copulas.multivariate.GaussianMultivariate()
cop.fit(df)
I know the function cdf
can calculate the conditional probability but I am not fully sure how to use that here.