Which shape a sampled point belongs to?

22 Views Asked by At

Given a circle and an ellipse, both centered around the origin. The radius of the circle is a, and for the ellipse, the major radius is a (x-axis is the major axis) and the minor radius is a/2 (y-axis is the minor axis).

Given two lists of (x, y) points: One of those lists contains 25 points sampled from within the circle, while the other list contains 25 points sampled from within the ellipse. Sampling is uniform for both x and y. The question is:

  • Given a new point (x, y) sampled, how do you decide if the point came from the circle or the ellipse?
  • Given a list of 25 (x, y) points, sampled from only one of the shapes, but you don’t know which one, how would you decide which shape is that?

All sampling is done by picking a number uniformly at random along the x and y axis.

1

There are 1 best solutions below

0
On

The circle and ellipse intersect, so you cannot fully discern the sampling source of a point just from its coordinates $(x,y)$. You may be able to tell that the point must have come from sampling the circle, which is true if it is outside the ellipse, i.e $x^2+4y^2>a^2$. If this test fails, however, you can conclude nothing.

The same caveat applies for discerning the sampling source of a list of points. Run the test above for each point in the list, and if any point passes the test, the list is of samples from the circle. If every test fails, you also can conclude nothing.