Jump to content

Wikipedia:Reference desk/Archives/Mathematics/2023 January 5

From Wikipedia, the free encyclopedia
Mathematics desk
< January 4 << Dec | January | Feb >> January 6 >
Welcome to the Wikipedia Mathematics Reference Desk Archives
The page you are currently viewing is a transcluded archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


January 5[edit]

Random numbers[edit]

If you pick n random reals from the set x through y the smallest real will be a certain distance from the second smallest, the second smallest will be a certain distance from the third smallest and so on, n minus 1 of these gaps in all. How often is the skinniest of the n-1 gaps narrower than g? And how often is the most gaping of the n-1 gaps wider than G? Sagittarian Milky Way (talk) 00:31, 5 January 2023 (UTC)[reply]

One observation: assuming that the distribution of the gap sizes depends solely on the width of the interval Given the result for the unit interval the result for is obtained by replacing by
Let be the sequence obtained by sorting the outcomes of independent and identically distributed random variables drawn from the uniform distribution on the unit interval. As I understand the question, it is about the distribution of
and the same with replaced by
A related question that has been studied is when the endpoints and are included, setting and inquiring about
This problem is commonly referred to as "interval splitting". I suppose (but have not verified) that the techniques used can also be applied to the problem when the endpoints are not included. Having taken a glimpse of some of the papers, I think this will not be a simple exercise.  --Lambiam 19:53, 5 January 2023 (UTC)[reply]
Does anyone know the median or average result from splitting the unit interval into a thousand or hundred or 10,000 or 100,000 or million pieces? Or any of the x-sigma ranges i.e. if you split the unit interval to 1,000 pieces with 999 random numbers (or 1,001 pieces with 1,000 random numbers) there's a 2-sigma/~2.28% chance smallest gap is <a and a 2-sigma chance smallest gap is >b leaving a ~95.44% chance it's between a and b. Sagittarian Milky Way (talk) 21:08, 5 January 2023 (UTC)[reply]
If I'm not mistaken, the cumulative distribution function of the shortest gap, as gets large, will approximate for That puts the mean at about and the median at about  --Lambiam 22:43, 5 January 2023 (UTC)[reply]
This actually has an application to Wikipedia for when you pick a "Random article". Each article is assigned a random number, and when you press the Random article link another random number is selected and you're taken to the article with the next highest assigned number. Because the numbers assigned are random and not uniform, some articles have a much higher chance of being selected than others. I don't know if they do anything to ameliorate that issue; one way would be to periodically update each article's number. See Wikipedia:FAQ/Technical#Is the "random article" feature really random? for details. --RDBury (talk) 00:24, 6 January 2023 (UTC)[reply]
If you sort uniformly distributed random numbers and introduce und you obtain the sorted sequence with the gaps The expected values, variances and covariances are
(found by simulation),
for (found by simulation),
For large each seems to be nearly exponentially distributed with the cumulative distribution function Then the probability, that a is greater than is Ignoring the correlations the probability, that all are greater than is the -th power which leads to the cumulative distribution function for the smallest gap given above by Lambiam.
But the probability, that all are lower then cannot be calculated by This value is greater than 0 for But for the probability must be 0, because there must be at least one Ignoring the correlations does not seem to work in this case. .gs8 (talk) 15:16, 7 January 2023 (UTC)[reply]
The exact form of the distribution function for the largest gap is a piecewise polynomial function. This can be seen by considering the standard -simplex whose barycentric coordinates correspond to the gap lengths. The random point whose coordinates are those of a random sequence of gaps has a uniform distribution over the simplex. The different orderings by size of these gaps induce as many partitions (each a non-standard -simplex). In each partition, one coordinate dominates throughout. By symmetry, for each coordinate, the partitions in which it dominates (the number of which equals ) have the same shape, so it suffices to consider one. The value of the dominating coordinate is a linear function of the Cartesian coordinates, and an appropriate similarity-preserving transformation will make it equal to say the -coordinate. Then, the indefinite integral of the hypervolume of the -dimensional cross-section of the partition (after the transformation) with respect to , scaled in such a way that the value of the integral ranges from 0 to 1, gives the cumulative distribution function. Between vertices, the hypervolume of a cross-section varies polynomially, and then so does the integral. This does not immediately open a path to the asymptotics, but perhaps it is a step on the way.  --Lambiam 22:20, 8 January 2023 (UTC)[reply]