Let X1,X2,X3... be an endless sequence of random variables, uniformly distributed on the set {1,2,3....10}. Index i will be called "King" if X_i is greater than all of the numbers before it in the sequence. Calculate the expected value of the number of indices that are to be crowned Kings.
please help.
This problem can be modeled using an absorbing Markov chain. Let $\{Y_n:n\geqslant 1\}$ be defined by $Y_1$ uniformly distributed over $\{1,\ldots,10\}$ and for $n\geqslant 1$: $$ \mathbb P(Y_{n+1}=j\mid Y_n=i)=\begin{cases} \frac1{10-i},& i<j\leqslant 10\\ 1,& i=j=10. \end{cases} $$ Let $P$ be the transition matrix of this Markov chain, then $$P=\pmatrix{Q&R\\0&I} $$ where $Q$ is the substochastic matrix corresponding to transitions between transient states, $R$ that corresponding to transitions from a transient state to an absorbing state, and $I$ that corresponding to transitions between absorbing states. (Here we have only one absorbing state.) For pair of transient states $i,j$ the probability of transitioning from $i$ to $j$ in exactly $k$ steps is the $(i,j)$ entry of $Q^k$. Summing for all $k$ yields the fundamental matrix $$ N = \sum_{k=0}Q^k. $$ Since the rows of $Q$ sum to strictly less than one, the Neumann series converges and we have $N=(I-Q)^{-1}$, with $I$ the identity matrix. The expected number of transitions until being absorbed starting in transient state $i$ is the $i^{\mathsf{th}}$ entry of the vector $t=N\cdot\mathbf 1$, where $\mathbf 1$ is a column vector whose entries are all one. Here $$ t=\left( \begin{array}{c} \frac{9649}{2520} \\ \frac{1041}{280} \\ \frac{503}{140} \\ \frac{69}{20} \\ \frac{197}{60} \\ \frac{37}{12} \\ \frac{17}{6} \\ \frac{5}{2} \\ 2 \\ \end{array} \right), $$ and since the initial distribution was uniform over $\{1,\ldots,10\}$, we weight each of these entries, along with $1$ (for the case when $X_1=10$), by $\frac1{10}$ and sum to obtain $$\frac{7381}{2520}. $$