Generate random vectors from jont pdf

36 Views Asked by At

Given pdf $f(x,y)=x+y$, both $x$ and $y$ are in range $[0,1]$, we need to generate vectors $<x,y>$ from the distribution and verify.

I have found the CDF of the function and also the marginal pdf $fx$ and $fy$ for each case I tried taking the inverse transform of marginal pdfs but am not getting proper results using histogram analysis. Is there any other way?

1

There are 1 best solutions below

0
On BEST ANSWER

One way is to first find the conditional distribution of $y$ given $x$ (try to figure this out by yourself through the joint pdf) and then simulate as follows: first simulate $x$ from its marginal, then simulate $y$ from the conditional distribution given the value of $x$.