Suppose $X_0, X_1, ... $ is an infinite series of i.i.d. random variables $\sim U([1; n])$. $T = \min\{\tau \geq 1| Y_\tau \geq Y_0\}$. How can I calculate $E[T]$ and $\operatorname{Cov}(X_0,T)$?
If $X_0 = x$ were fixed, $T$ would have been geometrically distributed with parameter $\frac{n - x}{n - 1}$, and thus $E[T]$ would have been $\frac{n - 1}{n - x}$. But, unfortunately, it isn't.
Let's replace $X_n$ with $Y_n := \frac{X_n - 1}{n - 1}$. Then our problem will be the following one:
$P(Y_n > x| Y_0 = x) = 1 - x$ and $P(Y_n < x| Y_0 = x) = x$. Thus $P(T = k|X_0 = x) = x^{k-1}(1 - x)$. That results in $P(T = k) = \int_0^{1} x^{k-1}(1 - x)dx = \frac{1}{k(k + 1)}$. Thus $E[T] = \sum_{i = 1}^\infty kP(T = k) = \sum_{i = 2}^\infty \frac{1}{k + 1} = \infty$ as harmonic series. Thus $T$ doesn't have finite first moment.