Consider a random straight line $L$ passing through the origin with equation $y=Mx$ Consider a random straight line $L$ passing through the origin with equation $y=Mx$. Suppose that the angle $\theta$ that it makes with the positive $x$-axis is uniformly distributed in $(0,\pi/2)$.

*

*Find the density of $M$, the slope of the line $L$. (Hint: Express the slope $M$ in terms of the angle.)

*Let $(X,Y)$ be the coordinates of the point where the line $L$ intersects the unit circle $\{(u,v):u^2+v^2=1\}$. Find the expected value of $Y$.

*The line $L$ divides the unit square, with corners $(0,0),(1,0),(0,1),(1,1)$, in two pieces. Find the expectation of the area of the smaller piece.


My thinking:

*

*For this one, is it saying that the density of $M$ is the same as the slope of the line $L$? If so, does this mean that the slope of the line is simply $M=\tan(\theta)$?

*If I think of the unit circle as a function $f(x)=\sqrt{1-x^2}$ for $x>0$. Then the expectation of Y is $\mathbb{E}[Y]=\int_{-\infty}^\infty xf(x)dx$? I am not too sure about this one because I don't see a relation to line L.

*I am not sure how to find this one, but my thinking so far is to find an expression for the area of, which represents probability. Then similarly to part (2), I can use $\mathbb{E}[X]=\int_{-\infty}^\infty xf(x)dx$.

 A: *

*The random variable $M$ is indeed related to the random variable $\theta$ by $M = \tan \theta$.  But the density of $M$ requires a little work: Either apply a general result you may have seen, or work from scratch by calculating $F_M(m) = \mathbb{P}(M\le m) = \mathbb{P}(\tan \theta \le m) = \mathbb{P}(\theta \le \arctan m)$ and applying the uniform distribution $\mathbb{P}(\theta \le \theta_0) = \frac{2}{\pi} \theta_0$ for any $\theta_0 \in [0,\pi/2]$.  This gives you the cumulative distribution function $F_M$, from which you find the density $f_M$ by taking the derivative.


*You could find $\mathbb{E}[Y]$ with an approach like the one you give, but $f(x) = \sqrt{1-x^2}$ is not the density of $Y$: You would have to find it using the relation $Y = g(\theta) = \sin \theta$ first, as in (1).  Instead, it's easier to remember $\mathbb{E}[g(X)] = \int g(x) f_X(x) \, dx$ and calculate $\mathbb{E}[Y] = \mathbb{E}[\sin \theta] = \int_0^{\pi/2} \sin \theta \cdot \frac{2}{\pi} \, d\theta$


*Express the area $A$ as a function of $\theta$, which is easy if you consider the cases $\theta \le \frac{\pi}{4}$ and $\theta > \frac{\pi}{4}$ separately.  Then proceed as in (2).
