# Find $E[N]$, where $N = \min\{n>0: X_n = X_0\}$

Let $X_i$, $i\geq 0$ be independent and identically distributed random variables with probability mass function $$p(j) = P\{X_i=j\},\; j=1,...,m,\;\sum^{m}_{j=1}P(j)=1$$ Find $E[N]$, where $N=\min\{n>0:X_n=X_0\}$.

I am totally confused by this question. What does $N=\min\{n>0:X_n=X_0\}$ even mean? Any help would be greatly appreciated.

• $\{n : n> 0, X_n=X_0\}$ is the set of indices of random values which are equal to $X_0$ (and not including $0$). The min is the least such index; the first in the list. – Graham Kemp Sep 18 '14 at 6:03

$\{n:n>0,X_n=X_0\}$ is the set of non-zero indices ($n$) of random values ($X_n$) which are equal to $X_0$. The minimum value is the least such index; the first in the list.
\begin{align} \mathsf E[N] & = \mathsf E[\min\{n:n>0, X_n=X_0\}] \\ & = \sum_{n=1}^\infty n \mathsf P(n=\min\{n:n>0, X_n=X_0\}) \\ & = \sum_{n=1}^\infty n \mathsf P(X_n=X_0\bigcap_{k=1}^{n-1}X_k\neq X_0) \\ & \ddots \end{align}
What does $N=\min\{n>0:X_n=X_0\}$ even mean?
The set $S=\{n\gt0:X_n=X_0\}\subseteq\mathbb N$ is random, its minimum $N$ is a random variable.
For example, if $(X_0(\omega),X_1(\omega),X_2(\omega),X_3(\omega),X_4(\omega))=(7,2,42,7,13)$ then $N(\omega)=3$.