Uniform random distribution from Atan2(y , x) given y , x Gaussian


Atan2(y,x) converts from the Gaussian distribution to the uniform.






200,000 independent standard normal pairs (y,x) computed angles = atan2(y,x) and plotted a histogram. Results:

  • Sample mean of angles ≈ 0.000053 (expected 0).

  • Sample variance of angles ≈ 3.291177 (expected π2/33.289868\pi^2/3 \approx 3.289868).

  • The histogram is flat across (π,π].

These numerical checks match the theoretical result: because (y,x) is an isotropic 2D Gaussian, the radius and angle separate in polar coordinates and the angle is uniform.






Comments

Popular posts from this blog

Neon Bulb Oscillators

23 Circuits you can Build in an Hour - Free Book

Q Multiplier Circuits