Average area of a rectangle inside the unit square

499 Views Asked by At

I recently came across this problem while toying with the problem of the average distance between 2 points in the unit square. These two points also define a rectangle, so I was wondering: What is the expected value of the area of that rectangle?

I took this problem to Python and it turns out to be somewhere around one-ninth. However, I have no idea where to start actually calculating the exact value. If someone could share how to get a more exact answer (more efficiently, obviously) via computer science, or how to get the precise answer with calculus, that would help out a bunch.

1

There are 1 best solutions below

0
On BEST ANSWER

The expected area is exactly $\frac19$.

In principle we could compute it via the integral $$ \int_0^1 \int_0^1 \int_0^1 \int_0^1 |x_1 - x_2| \cdot |y_1 - y_2| \,dx_1\,dy_1\,dx_2\,dy_2 $$ but there is an easier way. Given two points $(x_1,y_1)$ and $(x_2,y_2)$, the four lines $x=x_1, x=x_2, y=y_1, y=y_2$ divide the square into $9$ pieces, and we show that the expected areas of those pieces are all equal.

It's enough to show that the distances $\min\{x_1,x_2\}$, $|x_2 - x_1|$, and $1 - \max\{x_1,x_2\}$ are all equal in expectation (and so they are all $\frac13$). By symmetry, the same is true for the $y$-distances, and the areas are just products of independent variables, so the products will all be $\frac19$ in expectation.

To see that the distances are all equal, we show that:

  • Conditioned on $x_1 \le x_2$, the expected values of the last two distances $x_2 - x_1$ and $1-x_2$ are equal. Choose $x_1$ first; for any value of $x_1$, the choice of $x_2$ splits the segment from $x_1$ to $1$ somehow, and the two halves are equal in expectation. Since this is true for any choice of $x_1$, it's true in general.
  • Conditioned on $x_1 \le x_2$, the expected values of the first two distances $x_1$ and $x_2 - x_1$ are equal. Reason as above, but choose $x_2$ first.

By symmetry, it doesn't matter if we condition on $x_1 \le x_2$ or $x_1 > x_2$, and by transitivity we get that all three distances are equal in expectation for both cases.