⭐Rejection sampling is a method that randomly selects points inside a circle by rejecting points that fall outside the circle.
🔑Inverse transform sampling is another method that transforms a uniform distribution to achieve a desired distribution, such as a linear distribution inside a circle.
📐A circle can be thought of as a collection of infinitely thin isosceles triangles. By selecting a random triangle and point inside the triangle, a uniform random point inside the circle can be obtained.
🧮The probability of selecting a point inside a circle using rejection sampling is equal to the area of the circle divided by the area of the square that bounds the circle.
🎲Python code examples are provided to implement the rejection sampling and inverse transform sampling methods.