Median-of-Three Quick Sort

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 tex:$$ \int_0^{\frac{1}{2}} 6x(x - 1)dx = \frac{5}{16}$$ for average value of the median of three objects selected uniformly from an interval tex:$$[0, 1]$$.

The approximation found using the seed 2009 was tex:$$0.31249975 \pm 0.00000122$$ and the standard deviation of the ratio was approximately 0.122.