2 ms·
It's not neglible at all. I generated 10 million uniform numbers and made a histogram of the log10(probability) - there are dramatic differences in probability
by im3w1l 6y ago
It's not neglible at all. I generated 10 million uniform numbers and made a histogram of the log10(probability) - there are dramatic differences in probability for different pages. Now, since the random page is just for fun, that may be considered acceptable.
import numpy as np
import matplotlib.pyplot as plt
n = 10_000_000
np.random.seed(0)
a = np.random.random([n])
a.sort()
b = np.append(a[1:] - a[:-1], 1 + a[0] - a[-1])
plt.hist(np.log10(b), bins=100)
plt.show()
Some highlights: The lowest probability page had a mere 1e-14 chance, while the highest had a 1e-6. The 90th percintile was 20 times more likely than the 10th.
https://imgur.com/a/WBLh3kQ https://imgur.com/a/WBLh3kQ
- mormegil 6y agoYeah, right, that’s what I considered “acceptable” for such a fun-only functionality, I guess. Not that it would be too surprising, since the behavior is a general property of the (ermph… Laplace? Poisson? oh, whatever) distribution, right? Still, I made this histogram for the real probabilities of Wikipedia articles (for enwiki and my home cswiki) and it turned out to look the same (meaning the random number generator is not obviously superbad), see https://gist.github.com/mormegil-cz/84d0cc34eb5f1234be8966f7c5498d9c https://gist.github.com/mormegil-cz/84d0cc34eb5f1234be8966f7...