# Thread: sample an array form a distribution

1. ## sample an array form a distribution

Hello,

I have a somewhat basic question. Suppose I need to sample

$(\theta_1,\theta_2) \sim q(\theta_1,\theta_2)$.

Is this achieved if I first sample

$\theta_1 \sim q(\theta_1)$

and then sample

$\theta_2 \sim q(\theta_2|\theta_2)$, or does that correspond to something else?

2. Originally Posted by jackinthebox
Hello,

I have a somewhat basic question. Suppose I need to sample

$(\theta_1,\theta_2) \sim q(\theta_1,\theta_2)$.

Is this achieved if I first sample

$\theta_1 \sim q(\theta_1)$

and then sample

$\theta_2 \sim q(\theta_2|\theta_2)$, or does that correspond to something else?
That should be OK

CB