Consider the random vector (X,Y,Z) with joint density proportional to
g(x,y,z)=4xz+6xy2+8yz3
when 0<x,y,z<1, 0 otherwise. Generate data from this rv
Verify that your methods work by drawing the histogram of marginals and their densities.