1
$\begingroup$

How can I sample from a normal copula with a given correlation in python?

I know how to sample from a multivariate normal distribution with a given covariance matrix using numpy and scipy, but I don't know how to generate and sample from a copula with a given correlation.

$\endgroup$
3
  • $\begingroup$ look up the Cholesky inversion method. extending it to copulas just needs the usual uniform marginal transformations of copulas $\endgroup$
    – develarist
    Aug 26 '20 at 17:03
  • 1
    $\begingroup$ Note that questions about code are off topic. If you need guidance on that, you'll need to ask on stackoverflow $\endgroup$
    – mkt
    May 1 at 18:12
  • 1
    $\begingroup$ I actually think there’s a statistics question hidden in here, chiefly the relationship between the parameters of a Gaussian copula and correlation between the marginal distributions. $\endgroup$
    – Dave
    May 1 at 18:20
0
$\begingroup$

It's actually straight forward then:

If you have simulated some random variables $(X_1,X_2)$ which are normally distributed with $\sigma_1=\sigma_2=1$ and correlation $\rho$ then $(F(X_1),F(X_2))$ are observations from the gauss copula. $F(\cdot)$ is this case the univariate standard normal cdf.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.