# Rejection method for beta distribution?

I have the follow function, $$\frac{8}{\pi}(x(1-x))^{1/2} 0<x<1$$

I am asked to use $U(0,1)$ as an envelope to construct a rejection algorithm for simulation samples from $Beta(3/2,3/2)$ with density f.

Would i be correct in thinking that $u=\frac{f(x)}{mg(x)}=2(x(1-x))^{1/2}$.

It then asks let Z be the random variable which denotes the number of tries from $U(0,1)$ until we accept the first sample from $Beta(3/2,3/2$, describe the distribution of Z.

Would Z follow a geometric distribution?

Many thanks in advance any help most appreciated.

-

Since $f_X(x)\leqslant\frac4\pi f_U(x)$ uniformly, each try is accepted with probability $\frac\pi4$ and $Z$ is geometric with parameter $p=\frac\pi4$, that is, $\mathbb P(Z=n)=p(1-p)^{n-1}$ for every $n\geqslant1$.