TITLE: Expected value of a variable related to uniform r.v.
QUESTION [5 upvotes]: Let $X_i$ be i.i.d. uniform random variable on $[0,1]$.
Let $N=\inf(n \colon \prod_{k=1}^n X_k < 10^{-3})$.
What is $\mathbb{E}(N)$?
I am trying to solve this but I am totally confused. How do I find an expected value for an infimum?

REPLY [3 votes]: For every $a$ in $(0,1]$, let $N_a=\inf\{n\geqslant1\mid X_1X_2\cdots X_{n}\lt a\}$. 
Assume that $X_1=x$ with $x$ in $(0,1)$. If $x\lt a$, then $N_a=1$. If $x\geqslant a$, then $N_a=1+N'$ where $N'=\inf\{n\geqslant1\mid X_2\cdots X_{n+1}\lt a/x\}$ is independent of $X_1$ and distributed like $N_{a/x}$. 
Thus, $m(a)=\mathbb E(N_a)$ solves the equation
$$
m(a)=1+\int_a^1m\left(\frac{a}x\right)\mathrm dx\ \stackrel{(s=a/x)}{=}\ 1+a\int_a^1m(s)\frac{\mathrm ds}{s^2}.
$$
Differentiating this, one sees that
$$
m'(a)=a^{-1}(m(a)-1)-m(a)a^{-2}=-a^{-1}.
$$
Since $N_1=1$ almost surely, this yields, for every $a$ in $(0,1]$, 
$$
\mathbb E(N_a)=1-\log a.
$$
Edit: Another approach is to consider $Y_n=-\log X_n$ and to note that $N_a$ is $1$ plus the number of points in the interval $(0,-\log a)$ for the process with increments $(Y_n)_{n\geqslant1}$. This is a homogeneous Poisson process with intensity $1$, thus the mean number of points in an interval $I$ is the Lebesgue measure of $I$. For $I=(0,-\log a)$, this is the result above.