I encountered some behavior that somehow makes sense to be but I don't exactly remember why, and I'll be glad to hear an explanation.
To simplify things up (it wasn't an intended experiment), I was drawing integers in the range [1, 10000], each number with the same probability (1/10000). I repeated this for like 200k times. For each number (from 1 to 10000), I wrote how many times it has been drawn. Then, I counted how many numbers appeared one time, how many numbers appeared 2 times, and so on. This gave me a normal distribution. Is that related to the original distribution being uniform? Or is it because of CLT? Should it happen in any kind of distribution?
Thanks.
Sampling from a continuous uniform distribution, you will find that the Central Limit Theorem begins to 'converge' to normal for surprisingly small $n.$
If I sum $n=12$ independent observations from $\mathsf{Unif}(0,1)$ and subtract $6,$ the resulting random variable will be very nearly standard normal: $Z = \sum_{1=1}^{12} U_i - 6 \stackrel{aprx}{\sim}\mathsf{Norm}(0,1).$ Demonstration of a thousand such values using R:
A Shapiro-Wilk tests doesn't detect a difference from normal.
And a Kolmogorov-Smirnov test doesn't detect a difference from standard normal.
A histogram of the 1000 values of $Z$ generated in this way shows a reasonably good fit to a standard normal density curve.
Finally, a normal quantile plot is very nearly linear:
This method of generating (nearly) a standard normal distribution isn't perfect (12 is a long way from infinity), but it was used to get approximately normal distributions in the early days of computation because it involves only simple arithmetic. Notice, however, that this method cannot give values outside the interval $[-6, 6],$ while the standard normal distribution theoretically takes values throughout the real line.