Simulation in R to check graphically that marginal distributions are correct The distribution on $R^2$ with joint density $h$ with respect to the Lebesgue measure is:
$$h(x,y)=\frac{3}{2}y 1_{A}(x,y), \ \  A=\{(x,y) \in R^2|0<y, x^2+y^2<1\}.$$
Then I have found the marginal density $f_X(x)=\frac{3}{4}(1-x^2)$
And therefore we get that the conditional distribution of Y given X is:
$$f(Y|X)=\frac{h(x,y)}{F_X(x)}=-\frac{2y}{x^2-1}$$
Now I have to use these results to simulate outcomes from the distribution of
$(X, Y)$, and check graphically that the marginal distributions are correct. I want to do that in R. But I'm not sure how to do that. I think I have to draw random outcomes $y_i$ from the marginal distribution of $X$. Then for each $x_i$, I think I have to draw an outcome from $P_{x_i}$ (the conditional distribution
of Y given X). But how can I do that simulation? I think simulation from a continuous distribution with CDF $F$ can be generated as $F^{-1}(U)$ where $U$ is uniform on $(0,1).$ Is that a correct understanding? Can anyone help me how to do that simulation in R?

Your value for the CDF of $X$ is incorrect, but perhaps this is just bad notation on your part.  What you have written is in fact the PDF of $X$.
Simulate $U_1$, a standard uniform random variable.  Plug this value into the inverse CDF $F^{-1}_X(U_1)$ of the marginal density of $X$.  (This inverse may not be tractable, although it exists, and the Acceptance-Rejection Algorithm may be better [Try Uniform(-1,1)]).  Save this value.  Next simulate another standard uniform random variable ($U_2$).  Plug this value and the saved $X$ value into the inverse CDF $F^{-1}_{Y|X} (U_2)$.  Now you have a random sample from the joint distribution $(X,Y)$.  Repeat however many times.
To do this in R, you just have to code the functions and use the ${\tt runif}$ function.
