Pick two random numbers from the interval ; independent, uniformly distributed. Normalize them to have mean zero, which simply means subtracting their mean from each. Repeat many times. Plot the histogram of all numbers obtained in the process.
No surprise here. In effect this is the distribution of with independent and uniformly distributed over . The probability density function of is found via convolution, and the convolution of with itself is a triangular function.
Repeat the same with four numbers , again subtracting the mean. Now the distribution looks vaguely bell-shaped.
With ten numbers or more, the distribution is not so bell-shaped anymore: the top is too flat.
The mean now follows an approximately normal distribution, but the fact that it’s subtracted from uniformly distributed amounts to convolving the Gaussian with . Hence the flattened top.
What if we use the median instead of the mean? With two numbers there is no difference: the median is the same as the mean. With four there is.
That’s an odd-looking distribution, with convex curves on both sides of a pointy maximum. And with points it becomes even more strange.
k = 10 A = rand(200000,k) A = A - median(A,'c').*.ones(1,k) histplot(100,A(:))