Looking at this question I. i. d distributions as best car offers I wonder about the following one:
Can we find the distribution function of $X_N$ where,
$$ N= \min \{ n \geq 1 \mid X_n > X_0 \} $$
where the $X_i$ are independent identically distributed random variables with say, density function $f$ and distribution function $F$ ?
Any ideas will be appreciated!
edit: I have edit the question. I forgot to type the $X_N$.
In the answer in the link there is the probability $ P[N=n]$ expressed with respect to the expectation. How can we derive a formula with involving the expectation and depends only on $f$ and $F$ ?
P.S. I sorry if I write something silly, I have just start studying these things.
Thank you!
This might be one of the rare cases I know where the CDF is the most convenient approach... For every $n\geqslant0$, let $M_n=\max_{0\leqslant k\leqslant n}X_k$, then, for every $x$, $$ [X_N\leqslant x]=\bigcup_{n\geqslant1}[x\geqslant X_n\gt X_0\geqslant M_{n-1}]=\bigcup_{n\geqslant1}[x\geqslant M_n,A_n], $$ where $$ A_n=[X_n\gt X_0\geqslant M_{n-1}]. $$ The event $A_n$ is concerned with the ordering of the random variables $(X_k)_{0\leqslant k\leqslant n}$ and $M_n$ is their maximum hence $M_n$ and $A_n$ are independent. And $A_n$ is realized when the two largest values in an i.i.d. sample of size $n+1$ are obtained at times $n$ and $0$, hence, assuming from now on that the CDF $F$ is continuous, $$ P(A_n)=\frac1{n(n+1)}. $$ Thus, $$ P(X_N\leqslant x)=\sum_{n\geqslant1}P(M_n\leqslant x)P(A_n)=\sum_{n\geqslant1}\frac{F(x)^{n+1}}{n(n+1)}. $$ Differentiating both sides yields the PDF $g$ of $X_N$ as $$ g(x)=\sum_{n\geqslant1}f(x)\frac{F(x)^{n}}{n}=-f(x)\log(1-F(x)). $$ Finally, the CDF $G$ of $X_N$ is such that $$ G(x)=F(x)+(1-F(x))\log(1-F(x)). $$