TITLE: Probability that rectangle is inside a circle
QUESTION [14 upvotes]: We randomly uniformly pick point $x$ on a unit circumference $\{x^2 + y^2 = 1\}$. Then we randomly uniformly pick point $y$ on a unit circle $\{x^2 + y^2 \leq 1\}$. Let $R$ be a rectangle with diagonal $xy$, which sides are parallel to coordinate axes. What is the probability that $R$ lies completely inside the unit circle?

We see, that after $x$ is chosen we have a rectangle $A$, within which our point $y$ should fall to satisfy the condition of the task.

The area of the rectangle $A$ equals $S_A(x) = 4 \sin{(2x)}$ and the probability $P(\{y \in A\}) = \frac{S_A}{S_{circle}} = \frac{S_A}{\pi}.$ How can I find this probability?
The problem for me is that $S_A(x)$ is the transformation of random variable $x \sim unif(0, \frac{\pi}{2})$. For some reason I think that the answer is $\frac{\mathbb{E}[S_A(x)]}{\pi} = \frac{1}{\pi} \cdot \frac{1}{\pi/2 - 0} \cdot \int_0^{\pi/2}S_A(x)dx$, but I do not know why I think so.

REPLY [2 votes]: Due to symmetry, without loss of generality the point on circumference is uniformly selected to by in the first quadrant, that is it makes an angle $\theta$, uniform in $(0,\pi/2)$. 
The $x$-component of this point is then $X_0= \cos \theta$ and the $y$-component is $Y_0=\sin \theta$. 
As for the second point, write $X$ and $Y$ for its $x$- and $y$- components, respectively. In order for the rectangle to be contained in the circle, we must have $ (X,Y) \in [-X_0,X_0]\times [-Y_0,Y_0]$.
Because $(X,Y)$ is uniform in the disk, and is independent of $\theta$,  conditioning  on $\theta$, the probability of $(X,Y)$ landing in this rectangle is the area of this rectangle divided by $\pi$. That is, 
$$ \frac{ 2 \cos \theta \times 2 \sin \theta}{\pi}  = \frac{ 2 \sin (2\theta) }{\pi}.$$ 
Integrate with respect to $\theta$ to get the answer: 
$$p= \frac{2}{\pi} \int_0^{\pi/2} \frac{ 2\sin (2\theta)}{\pi}d\theta= \frac 2{\pi^2} \int_0^{\pi}\sin(u)du =\frac{4}{\pi^2}. $$