Choose two numbers at random from $[0, 1]$. What is the chance they are within $\frac{1}{4}$ of each other? Such questions have a beautiful answer: the pair is a random point in a square, and the probability is an area. This lesson extends densities to two dimensions in the simplest case, a uniform point.
Key idea
Why it works
Worked examples
Worked example: Within a quarter
- The event is the band around the diagonal. Its complement is two corner triangles, each with legs $1 - \frac{1}{4} = \frac{3}{4}$.
- Their total area: $2 \cdot \frac{1}{2}\left(\frac{3}{4}\right)^{2} = \frac{9}{16}$.
- $P = 1 - \frac{9}{16} = \frac{7}{16}$.
Answer: $\frac{7}{16}$
Worked example: Meeting for coffee
- In hours, they meet when $\lvert X - Y \rvert \le \frac{1}{6}$.
- The two missing corners have legs $\frac{5}{6}$: area $\left(\frac{5}{6}\right)^{2} = \frac{25}{36}$.
- $P(\text{meet}) = 1 - \frac{25}{36} = \frac{11}{36} \approx 0.31$.
Answer: $\frac{11}{36}$
Worked example: Under a curve
- $x + y < \frac{1}{2}$ is a corner triangle with legs $\frac{1}{2}$: area $\frac{1}{8}$.
- $xy < \frac{1}{2}$: for $x \le \frac{1}{2}$ every $y$ works; for $x > \frac{1}{2}$, $y < \frac{1}{2x}$. Area $$= \frac{1}{2} + \int_{1/2}^{1} \frac{dx}{2x} = \frac{1}{2} + \frac{\ln 2}{2} \approx 0.847$$
Answer: $\frac{1}{8}$ and $\frac{1}{2} + \frac{\ln 2}{2}$
Common mistake