Rectangle

AverageRectangle1What is the average area of a rectangle inside the unit square if the edges of the rectangle are parallel to the coordinate axes. Here is a picture of 10 trials:

Think of x and y as lengths of average intervals in the unit interval and think of two opposite vertices of a rectangle with sides x and y.

AverageRectangle2

The average value of x should
be 1/3, and the average value of y should be 1/3, so the average area
of a rectangle should be about \left( 1/3\right) ^{2}= 1/9.

Do an experiment by picking two points \left( x,y\right) and \left( u,v\right) in the unit square and take those two points to be opposite
vertices of a rectangle. The area of such a rectangle is \left\vert x-u\right\vert \cdot \left\vert y-v\right\vert. Repeat this experiment % 1000000 times, add together all of the areas and divide by 1000000. A
typical average is 0.11115225. Repeat this 10 times and record the
results. The numbers

    \begin{equation*} \begin{array}{ccccc} 0.11115225 & 0.11126830 & 0.11112782 & 0.11134207 & 0.11097905 \\ 0.11100242 & 0.11139935 & 0.11119080 & 0.11091334 & 0.11110394% \end{array}% \end{equation*}

are all very close to our guess of 1/9.

To find a calculus solution to this problem, consider a rectangle with edges
x and y. Such a rectangle can be moved rigidly anywhere so long as the
upper right corner lies within a rectangle with edges 1-x and 1-y. The
probability of picking a rectangle with edges x and y should be
proportional to the area \left( 1-x\right) \left( 1-y\right) of the blue
rectangle.

AverageRectangle3

The average area of a rectangle in the unit square is

    \begin{equation*} \frac{\int_{0}^{1}\int_{0}^{1}xy\left( 1-x\right) \left( 1-y\right) \,dx\,dy }{\int_{0}^{1}\int_{0}^{1}\left( 1-x\right) \left( 1-y\right) \,dx\,dy}= \frac{\frac{1}{36}}{\frac{1}{4}}=\frac{1}{9} \end{equation*}

where the numerator represents the areas xy together with their
frequencies and the denominator represents the total frequencies. This
answer is not a surprise since

    \begin{equation*} \int_{0}^{1}\int_{0}^{1}xy\left( 1-x\right) \left( 1-y\right) \,dx\,dy=\left( \int_{0}^{1}x\left( 1-x\right) \,dx\right) \left( \int_{0}^{1}\,y\left( 1-y\right) \,dy\right) \end{equation*}

and hence the problem reduces completely to two instances of the
one-dimensional problem.

Alternatively, the average area is given by the integral

    \begin{eqnarray*} \frac{\int_{0}^{1}\int_{0}^{1}\int_{0}^{1}\int_{0}^{1}\left\vert \left( x-u\right) \left( y-v\right) \right\vert \,dx\,dy\,du\,dv}{% \int_{0}^{1}\int_{0}^{1}\int_{0}^{1}\int_{0}^{1}dx\,dy\,du\,dv} &=&4\int_{0}^{1}\int_{0}^{1}\int_{v}^{1}\int_{u}^{1}\left( x-u\right) \left( y-v\right) \,dx\,dy\,du\,dv \\ &=&4\left( \int_{0}^{1}\int_{u}^{1}\left( x-u\right) \,dx\,\,du\,\right) \left( \int_{0}^{1}\int_{v}^{1}\left( y-v\right) \,dy\,dv\right) \\ &=&\frac{1}{9} \end{eqnarray*}

where \left\vert \left( x-u\right) \left( y-v\right) \right\vert is the
area of a rectangle with opposite corners \left( u,v\right) and \left( x,y\right). The answer 1/9 is looking good.