A point M is thrown at random into a right triangle ABC with…
A point $M$ is thrown at random into a right triangle $ABC$ with legs $AB=l$ and $BC=k$. Determine the joint distribution of the length $h$ of the perpendicular dropped from $M$ to $AB$ and the angle $\alpha=\angle MAB$, i.e. for all $x$ and $y$ find the probability that the events $(h\lt x)$ and $(\alpha\lt y)$ occur simultaneously.
Explanation of Method
Place $A$ at the origin, $B=(l,0)$ and $C=(l,k)$, so the right angle is at $B$. The point $M=(u,v)$ is uniform in the triangle (area $\frac{lk}{2}$), $h=v$ and $\tan\alpha = v/u$. The event $\{h\lt x,\ \alpha\lt y\}$ is the part of the triangle lying below the horizontal line $v=x$ and below the ray from $A$ at angle $y$. We compute its area, which is a triangle with its top cut off, and divide by $\frac{lk}{2}$. Different formulas apply depending on whether the horizontal line cuts the small triangle.
Step 1: Coordinates and ranges
With $A=(0,0)$, $B=(l,0)$, $C=(l,k)$ the triangle is $\{0\le u\le l,\ 0\le v\le \tfrac kl u\}$ with area $\frac{lk}2$. For $M=(u,v)$:
\[ h = v\in[0,k], \qquad \alpha = \arctan\frac vu\in[0,\beta], \qquad \tan\beta = \frac kl \ \ (\beta=\angle CAB). \]
Step 2: The region for $0\lt y\le\beta$
$\{\alpha\lt y\}$ is the part of the triangle below the ray $v=u\tan y$ from $A$: a smaller triangle with vertices $A$, $B$, $(l,\,l\tan y)$, of area $\frac12 l^2\tan y$. Intersecting with $\{h\lt x\}$ cuts it at height $x$:
- the event $\{h\lt x,\ \alpha\lt y\}$
- ray from $A$ at angle $y$
- height $x$
- If $x\ge l\tan y$, the line $v=x$ passes above the small triangle; the region is the whole small triangle, area $\frac12l^2\tan y$.
- If $x\lt l\tan y$, we remove the top triangle with vertices $(x\cot y,\,x)$, $(l,x)$, $(l,\,l\tan y)$; its legs are $l-x\cot y$ and $l\tan y-x$, so its area is $\dfrac{(l\tan y-x)^2}{2\tan y}$. What remains has area \[ \frac{l^2\tan y}{2}-\frac{(l\tan y-x)^2}{2\tan y} = lx-\frac{x^2}{2}\cot y. \]
Step 3: The joint distribution function
Dividing by the area $\frac{lk}2$ of $ABC$:
\[ \boxed{F(x,y)=P(h\lt x,\ \alpha\lt y) = \begin{cases} 0, & x\le0 \text{ or } y\le0,\\[4pt] \dfrac{2lx - x^2\cot y}{lk}, & 0\lt y\le\beta,\ \ 0\lt x\lt l\tan y,\\[8pt] \dfrac{l\tan y}{k}, & 0\lt y\le\beta,\ \ x\ge l\tan y,\\[8pt] F(x,\beta), & y\gt\beta. \end{cases}} \]
For $y\gt\beta$ the angle condition is automatically satisfied. Since $l\tan\beta=k$, this gives $F(x,y)=\dfrac{2x}{k}-\dfrac{x^2}{k^2}$ for $0\lt x\lt k$ and $F=1$ for $x\ge k$.
Step 4: Checks — the marginal distributions
- Let $x\to\infty$ (no restriction on $h$): $P(\alpha\lt y) = \dfrac{l\tan y}{k} = \dfrac{\tan y}{\tan\beta}$ for $0\le y\le\beta$. At $y=\beta$ it equals $1$ ✓.
- Let $y\ge\beta$ (no restriction on $\alpha$): $P(h\lt x) = 1-\left(1-\dfrac xk\right)^2$ — the part of the triangle below height $x$; the part above is a similar triangle scaled by $1-\frac xk$ ✓.
- The two formulas of Step 3 agree on the boundary $x=l\tan y$: $\dfrac{2l\cdot l\tan y-l^2\tan^2y\cot y}{lk} = \dfrac{l\tan y}{k}$ ✓.
Step 5: $h$ and $\alpha$ are not independent
For example $P(h\lt x,\alpha\lt y)\ne P(h\lt x)P(\alpha\lt y)$ in general: a small angle $\alpha$ forces a small height $h$ near $A$. Only the product of the marginals would give independence, which is not the case here.
Result
| Region | $F(x,y)=P(h\lt x,\ \alpha\lt y)$ |
|---|---|
| $0\lt y\le\beta$, $0\lt x\lt l\tan y$ | $(2lx-x^2\cot y)/(lk)$ |
| $0\lt y\le\beta$, $x\ge l\tan y$ | $l\tan y/k$ |
| $y\gt\beta$ ($\tan\beta=k/l$) | $2x/k-x^2/k^2$ for $x\lt k$; $1$ for $x\ge k$ |
| $x\le0$ or $y\le0$ | $0$ |