2
$\begingroup$

I am trying to generate random numbers in Wigner semi-circle distribution. Since this one does not have the analytical solution for the inverse function of the pdf. I wonder if anyone familiar with a standard way to generation random numbers (RNs) follow this distribution and what are the pros and cons for each method.

My initial guess from what I have researched is, I can use the rejection method or sample method on the uniform distributive random numbers to get the Wigner semi-circle one.

Previously, I have generated normally distributive RNs from uniformly distributive RNs using the Box-Muller transformation. Even I am not a statistics major, it was pretty straight forward process. However, I am having hard time grasp my head around other distributions, specifically this Wigner semi-circle.

Any instructions or source recommendations will be highly appreciated. Thank you.

$\endgroup$
3
  • 1
    $\begingroup$ This is a shifted, scaled Beta$(3/2,3/2)$ distribution. Its CDF does have an explicit analytic inverse called the inverse regularized incomplete beta function, but you scarcely need that to generate random values: just look at the graph of the PDF--what kind of geometric figure is it? Hint: the answer lies in the name of the distribution. $\endgroup$
    – whuber
    Commented Apr 15, 2019 at 20:24
  • $\begingroup$ @whuber thank you for your answer. The graph of the Wigner semi circle pdf is a semicircle or semi ellipse. Are you saying that I just need to use this pdf and sample the uniform random variables to get this Wigner dist? $\endgroup$
    – Lac
    Commented Apr 15, 2019 at 23:50
  • $\begingroup$ Given the shape of the subgraph of the density, there is no need for rejection. $\endgroup$
    – Xi'an
    Commented Apr 26, 2019 at 11:50

1 Answer 1

1
$\begingroup$

[Following whuber's comments:] Since $$f(x)=\frac{2}{\pi R^2}\sqrt{R^2-x^2}$$the sub-graph of $f$ $$\mathcal S_R=\{(x,y);0\le y\le f(x)\}$$ is the half-disk of radius $R$. Thus, by the fundamental lemma of simulation, simulating $X\sim f$ is equivalent to simulating $(X,Y)$ uniformly on $\mathcal S$, which corresponds in spherical coordinates to simulating $$(\rho,\theta)\sim \frac{2}{\pi R}\rho \Bbb I_{(0,R)}(\rho) \Bbb I_{(0,\pi)}(\theta)$$ which is obvious:

  1. simulate $U_r,U_a\sim\mathcal U(0,1)$
  2. compute $X=R\, \sqrt{U_r} \cos (\pi U_a)$ [and do not compute $Y=R\, \sqrt{U_r} \sin (\pi U_a)$!]
  3. return $X$

[and shows proximity with the Box-Mueller algorithm, although for the latter $\rho$ is distributed as an Exponential $\mathcal E(1/2)$].

$\endgroup$
2
  • 1
    $\begingroup$ It may be worth noting that $Y$ need not be calculated at all. This suggests rejection actually might be more efficient because it requires generating only $4/\pi$ URNs per realization rather than $2$ per realization. $\endgroup$
    – whuber
    Commented Apr 30, 2019 at 12:26
  • 1
    $\begingroup$ Yes, thank you, I repeatedly make this mistake...! $\endgroup$
    – Xi'an
    Commented Apr 30, 2019 at 13:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.