# How to build a simple model with copula

I am trying to build the following model:
For 1\leq i \leq k
p_i \sim Beta(\alpha_i, \beta_i)
Where the \{ p_i\} are correlated through a gaussian copula with a given covariance \Sigma
B_i \sim Bernoulli(p_i)
Q=\prod_i p_i

I have observations of \{B_i\} with some missing data.
How do i sample from the posterior distribution of Q?
Also, how do i do it with a custom distribution instead of beta?

Hi @begelfor. There is actually a copula-based example notebook in the works, but it has sat idle for some time. This reminds me to move it forward. In the mean time, I’d recommend An intuitive, visual guide to copulas by @twiecki.