Suppose that a book has $N$ pages, and we read through the book as follows. We start from page 0, and if we're on page $i$, we randomly flip to a page $i + 1, i + 2, ..., N$ with equal probability.
- What is the expected value of number of flips we need to finish the book?
Intuition tells me that we can, on average, expect to halve the number of pages remaining. This yields $\log_2(N)$, but I'm having trouble formalizing it.
- If $N = 26$, what is the probability we flip to page 13 at some point? Assume we start at page 0.
I let $P_i$ be the probability we land on page 13 eventually, starting from page $i$. Then, $P_{13} = 1$, and in general, $$P_{i} = \frac{1}{26 - i}\sum_{k = i + 1}^{13}P_k$$
Evaluating terms like $P_{12}, P_{11}, P_{10}$, I see that all of these values are $\frac{1}{14}$, including $P_0$. Is there a more intuitive reason for such a simple answer?
Let's consider the equivalent problem in which we start at page $n$ and flip backwards through the book, going to each of the pages $0, 1, ..., n - 1$ with equal probability. Let $E_n$ be the expected number of flips. Then we have $E_0 = 0$ and
$E_n = 1 + \frac{1}{n} \sum\limits_{i = 0}^{n - 1} E_i$
Then in particular we have
\begin{equation} \begin{split} E_{n + 1} &= 1 + \frac{1}{n + 1} \sum\limits_{i = 0}^{n} E_i \\ &= 1 + \frac{E_n}{n + 1} + \frac{n}{n + 1} \frac{1}{n} \sum\limits_{i = 0}^{n - 1} E_i \\ &= 1 + \frac{E_n}{n + 1} + \frac{n}{n + 1} (1 + \frac{1}{n} \sum\limits_{i = 0}^{n - 1} E_i) - \frac{n}{n + 1} \\ &= 1 - \frac{n}{n + 1} + \frac{1}{n + 1} E_n + \frac{n}{n + 1} E_n \\ &= \frac{1}{n + 1} + E_n \end{split} \end{equation}
whenever $n \geq 1$ (and the identity is easily verified when $n = 0$ as well).
Then by induction, we have $E_n = \sum\limits_{j = 1}^n \frac{1}{j}$, the $n$th harmonic number. This will be asymptotically very close to $\log_e(n)$.