In the source directory, you will find a program which tests the claim
that the median-of-three algorithm breaks the interval in two subintervals
of width 5/16 and 11/16, on average. It does so by randomly selecting
While Monte Carlo methods are not a replacement for statistics,
it is reassuring to observe that statistics can accurately predict
the distribution of the 1st, 2nd, and 3rd objects selected from a
uniform distribution (in fact, any distribution) and that the expected
value of the second matches experimental efforts. ECE students do not
see statistics until the 3A Academic Term. Consequently, it is
difficult to justify, for example, distributions and integrals
for average value of the median of three objects selected uniformly from
an interval
.
The approximation found using the seed 2009 was
and the
standard deviation of the ratio was approximately
0.122.