# What is this bivariate distribution called and how to make it posterior?

I am trying to make this bivariate density function as posterior

 f(x,y) = k x^2 exp( - x y^2 - y^2 + 2y - 4x)


and try jags instead of implementing in R as in the link below.

https://darrenjw.wordpress.com/2011/07/16/gibbs-sampler-in-various-languages-revisited/

the problem is it doesn't look like any standard distribution offered by BUGS.

My initial plan was to make likelihood as unif(0,1) or something and

one observed variable is 1/2 or something and let f(x,y) be f(x)*f(y)

(f(x) and f(y) be priors) or let f(x,y) be multivariate priors

Any idea on what the distribution is called and how to make it posterior?

• It would be helpful to understand how you came with the density. May 10, 2015 at 18:59

This is a joint density: from $$f(x,y) \propto x^2 \exp\left( - x y^2 - y^2 + 2y - 4x\right)$$you can derive that \begin{align*}f(y|x)&\propto\exp\left( - x y^2 - y^2 + 2y\right)\\ &\propto\exp\left(-(1+x)[y^2-2y/(1+x)]\right)\\ &\propto\exp\left(-(1+x)[y-1/(1+x)]^2\right)\end{align*} Therefore you can deduce that$$Y|X=x\sim\mathcal{N}\left(\frac{1}{1+x},\frac{1}{2(1+x)}\right)$$ The marginal distribution of $X$ is given by \begin{align*}f(x) &\propto x^2\exp\{-4x\}\int_{-\infty}^{\infty} e^{-(1+x)y^2+2y}\,\text{d}y\\ &\propto x^2\exp\{-4x\}\int_{-\infty}^{\infty}e^{-(1+x)[y-1/(1+x)]^2+1/(1+x)}\,\text{d}y\\ &\propto x^2\exp\{-4x+1/(1+x)\}\,\frac{1}{\sqrt{1+x}}\end{align*} which does not look like a standard distribution.
However, the conditional distribution of $X$ given $Y$ is also standard: \begin{align*}f(x|y) &\propto x^2\exp\{-4x -xy^2\}\\ &\propto x^{3-1} \exp\{-(4+y^2)x\}\\\end{align*}which implies that $$X|Y=y\sim Ga(3,(4+y^2))$$ This implies you can use Gibbs sampling.