This is a program to generate samples from a bivariate distribution defined only by the conditional distributions:

f_{1}(x | y)=(1-y)^{-1}

f_{2}(y | x)=(3y^{2})/x^{3}

Using Gibbs sampling, we sample repeatedly from the conditional distributions. At each iteration, one component is chosen at random for updating. f_{1} is sampled directly as a UNIF(y,1) random variable, and f_{2} is sampled using rejection sampling with 3*UNIF(0,x) as the enveloping function

You can specify the desired number of bivariate samples, and starting values for X and Y satisfying

If you submit invalid values, or leave the boxes blank, the program will choose the default sample size of 100 and randomly generate valid starting values for X and Y.

View page source

recta@stat.psu.edu