3
$\begingroup$

I have a joint distribution $p(a,b)$ that I obtained through numerical integration- that is, I don't have a formula for $p(a,b)$ but a bunch of samples drawn from this joint distribution. I would like to obtain samples from the marginal distribution, $p(a)$.
If I had the formula for the joint distribution I could just integrate with respect to $b$, and get $p(a)$. But alas, I don’t have that. What I have is the marginal distribution $p(b)$ (and random samples from that distribution). Can I generate or otherwise obtain samples from the marginal $p(a)$ distribution with what I have?

$\endgroup$
  • $\begingroup$ See stats.stackexchange.com/questions/134027 (though if you are asking whether knowledge of $p(b)$ may be used to improve upon just taking the samples of $a$, then this is not exactly duplicate). $\endgroup$ – Juho Kokkala Dec 9 '15 at 18:42
3
$\begingroup$

This is immediate: given a sample $$(a_1,b_1),\ldots,(a_n,b_n)$$ from $p(a,b)$, the extracted first component sample $$a_1,\ldots,a_n$$ is distributed from $$\int p(a,b)\,\text{d}b=p(a)$$ Hence you have nothing to do!

$\endgroup$
  • $\begingroup$ Thanks, I think I dont have a handle on what the output of my computer program is giving me! But that is for a different question! $\endgroup$ – TheBean Dec 9 '15 at 19:36

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.