Rectangular solid

Average volume of a rectangular solid, expected volume of a rectangular solid. Random rectangular solids

Here the problem is to find the average volume of a rectangular solid inside a unit cube if all the faces are parallel to the coordinate planes. Here are four trials:

The average length of each edge
should be about 1/3, so the average volume should be about \left( 1/3\right) ^{2}=1/27.

Results of an experiment with 1000\,000 trials repeated 10 times:

    \begin{equation*} \begin{array}{ccccc} 0.037111492 & 0.037092355 & 0.037009396 & 0.036972987 & 0.037126451 \\ 0.037004654 & 0.037057379 & 0.037084117 & 0.036973223 & 0.037104600% \end{array} \end{equation*}

Observe that

    \begin{equation*} \frac{1}{27}\approx 0.03\,703\,703\,704 \end{equation*}

Let \left( r,s,t\right) and \left( x,y,z\right) be opposite vertices
of a rectangular solid. The volume is

    \begin{equation*} \left\vert \left( x-r\right) \left( y-s\right) \left( z-t\right) \right\vert \end{equation*}

and hence the expected volume is given by

    \begin{eqnarray*} &&\frac{\int_{0}^{1}\int_{0}^{1}\int_{0}^{1}\int_{0}^{1}\int_{0}^{1}% \int_{0}^{1}\left\vert \left( x-r\right) \left( y-s\right) \left( z-t\right) \right\vert \,dx\,dy\,dz\,dr\,ds\,dt}{\int_{0}^{1}\int_{0}^{1}\int_{0}^{1}% \int_{0}^{1}\int_{0}^{1}\int_{0}^{1}\,dx\,dy\,dz\,dr\,ds\,dt} \\ &=&8\int_{0}^{1}\int_{0}^{1}\int_{0}^{1}\int_{t}^{1}\int_{s}^{1}\int_{r}^{1}% \left( x-r\right) \left( y-s\right) \left( z-t\right) \,dx\,dy\,dz\,dr\,ds\,dt \\ &=&\left( 2\int_{0}^{1}\int_{r}^{1}\left( x-r\right) \,dx\,dr\right) \left( 2\int_{0}^{1}\int_{s}^{1}\left( y-s\right) \,dy\,ds\right) \left( 2\int_{0}^{1}\int_{t}^{1}\left( z-c\right) \,dz\,dt\right) \\ &=&\left( \frac{2}{6}\right) \left( \frac{2}{6}\right) \left( \frac{2}{6} \right) =\frac{1}{27}\approx 0.03\,703\,703\,704 \end{eqnarray*}

Notice that the solution reduced to three instances of the one-dimensional
case based on the average distance between two points.

Alternatively, consider a rectangular solid of dimensions x\times y\times z. The probability of picking such a rectangular solid should be proportional to the volume \left( 1-x\right) \left( 1-y\right) \left( 1-z\right) of the blue rectangular solid. The average volume is

    \begin{equation*} \frac{\int_{0}^{1}\int_{0}^{1}\int_{0}^{1}xyz\left( 1-x\right) \left( 1-y\right) \left( 1-z\right) \,dx\,dy\,dz}{\int_{0}^{1}\int_{0}^{1} \int_{0}^{1}\left( 1-x\right) \left( 1-y\right) \left( 1-z\right) \,dx\,dy\,dz}=\frac{\frac{1}{216}}{\frac{1}{8}}= \frac{1}{27} \end{equation*}