Finding the PMF of a discrete ordered statistic

Question

Let $$X_0,X_1,X_2 \dots$$ be independent and identically distributed continuous random variables with density $$f(x)$$. Let $$N$$ be the first index $$k$$ such that $$X_k > X_0$$. For example, $$N = 2$$ if $$X_2 > X_0$$ and $$X_1 \leq X_0$$. Determine the PMF of $$N$$ and its expectation. Also, explain how your answer would change if the random variables $$X_0,X_1,X_2 \dots$$ were discrete rather than continuous.

I came across this post, where the question is the same as mine except for the second part where the random variables $$X_0,X_1,X_2 \dots$$ change to discrete.

My thoughts for the second part

\begin{aligned} \mathbb{P}(N= n | X_0 = x) &= \mathbb{P}(X_1 \leq x,X_2 \leq x,\dots, X_{n-1}\leq x, X_n>x)\\ & = F(x)^{n-1}[1-F(x)]\\ \implies \mathbb{P}(N=n) & = \sum_{x}\mathbb{P}(N = n |X_0=x)\mathbb{P}(X_0 = x)\\ &= \sum_{x}F(x)^{n-1}[1-F(x)]p_X(x) \end{aligned}

Am I on the right track? Also, my professor said that he is looking more for a qualitative answer rather than a quantitative one for this part, but I am unable to come up with anything, so any intuitive explanation will be greatly appreciated!

• The expression you gave for $P(N=n)$ is okay. You could also write it as: $$\mathbb EU^{n-1}(1-U)=\mathbb EU^n-\mathbb EU^{n-1}$$where $U:=F(X_0)$ (maybe your professor is aiming on that). It is valid for the continuous case as well because in that situation $U$ has uniform distribution on $(0,1)$. Further we also find:$$\mathbb EN=\sum_{n=0}^{\infty}\mathbb EU^n$$The RHS of this is $\infty$ for the continous case and also for lots discrete cases. Maybe discrete cases exist with a finite $\mathbb EN$ but I am not sure on this. Commented Aug 20, 2023 at 12:18
• Correction: I wrote $\mathbb EU^n-\mathbb EU^{n-1}$ but meant to write $\mathbb EU^{n-1}-\mathbb EU^n$. Commented Aug 20, 2023 at 18:36