Probability – World Record for Lowest Number in Random Selection

approximationcombinatoricsexpected valueprobability

I have a random number generator that generates a random real number between $0$ and $1$ at the press of a button. All 8 billion people in the world line up for a try. Occasionally a world record for lowest number is set. (The first person automatically sets the first world record.) Approximately how many times will a world record be set?

Let $n=8\times 10^9$, the world's population.

Approach 1

Let $f(n,k)=$ the number of permutations of the first $n$ positive integers with exactly $k$ numbers that are less than all previous numbers. The first number in any permutation is considered to be less than all previous numbers (in the sense that it sets a new low).

The probability that exactly $k$ world records will be set, is $\frac{f(n,k)}{n!}$.

Then the expected number of world records is $\sum\limits_{k=1}^n k\left(\frac{f(n,k)}{n!}\right)$.

But I do not know how to express $f(n,k)$ so that I can calculate the expectation. Maybe there is a smart way to express $f(n,k)$, like stars and bars.

Approach 2

If I roll a six-sided die $m$ times, the expectation for the number of sixes is $m\times \text{(probability that the $k$th throw is a six)}=\frac{m}{6}$.

Similarly, perhaps the expectation for the number of world records can be approximated as $n\times \text{(probability that the $k$th person sets a world record)}=n\times\frac1k$.

But the problem is that $\frac1k$ is not a constant. However, suppose we use the average value of $\frac1k$, which is $\frac1n \sum\limits_{k=1}^n \frac1k \approx \frac1n \int_0^n \frac1x dx=\frac{\ln{n}}{n}$. Then the expectation would be $n\times \frac{\ln{n}}{n}=\ln{n}\approx 22.8$.

I tested this approach on excel, and it seems to yield reasonable results. But it seems rather hand-wavy.

Context

This question was inspired by a question about the sine of integers.

Best Answer

We invoke the indicator function trick. Let $X_k$ denote the random number generated for the $k$th person. Then we observe:

The $k$th person sets a the world record if and only if $X_k$ is the smallest among the first $k$ numbers $X_1, \ldots, X_k$.

Consequently, the number $N$ of times world record is set can be written as the sum

\begin{align*} N &= \sum_{k=1}^{n} \mathbf{1}\{\text{$k$th person sets a world record}\} \\ &= \sum_{k=1}^{n} \mathbf{1}\{\min\{X_1, \ldots, X_k\} = X_k\} \end{align*}

Then by the linearity of expectation, we have

\begin{align*} \mathbf{E}[N] &= \sum_{k=1}^{n} \mathbf{E}[\mathbf{1}\{\min\{X_1, \ldots, X_k\} = X_k\}] \\ &= \sum_{k=1}^{n} \mathbf{P}(\min\{X_1, \ldots, X_k\} = X_k) \\ &= \sum_{k=1}^{n} \frac{1}{k} = H_n, \end{align*}

where $H_n$ denotes the $n$th harmonic number.

Related Question