0
$\begingroup$

A quantity $X$ is compute by the following method:

a.) Generate two independent uniform random variables $u$, $v$.

b.) If $u^2 + v^2 \geq 1$, return to step $1$. Otherwise set $X = u$.

Find the c.d.f $F(x)$ for $X$. How many times will step $1$ be performed.

Hint: Draw a quarter of a unit circle, inside a unit circle. Pick an arbitrary $x$ on the $x$-axis. Find the probability that $\mathbb{P}\{X\leq x\}$ using geometric arguments via areas.

THoughts: drawing a quarter of a unit circle inside a unit circle then picking an arbitrary $x$ then $$P\{X\leq x\} = \frac{x}{\pi}$$ But I don't think that is right I am a bit lost on this problem. Any suggestions are greatly appreciated.

1 Answers 1

2

You are rejection sampling from the uniform distribution on the unit square to get the uniform distribution on the quarter unit circle, and then taking $X$ coordinate. So you need the probability that $X

As for how many times the step is going to be performed, that depends on how many samples you take. Your acceptance probability is $\pi/4 $ so on average it will take $4/\pi$ repetitions of step one per sample.