2

I need to calculate mean and variance of the random variable $X$ which can be defined as: let $N$ be number of people in a row. If a higher person stands in front of a lower person in a row, then the lower person is not seen. Let $X$ be the number of people that is seen if you look at the row (you stay in front of it).

I tried to calculate the probability of $k$-th person in a row to be seen by dividing number of variants where this person is seen by the number of all variants. But the expression I got were not very nice. Are there any other ways to solve the problem? Any tips would be highly appreciated!

Edit. I see in this question that the mean of such variable can be found pretty easy. But what about the variance? Since variance of the sum of dependent variables is not equal to sum of variances?

makar
  • 23
  • 3

1 Answers1

1

The events that person $i$ can been seen and that person $j\gt i$ can be seen are in fact independent: Whether $i$ can be seen only depends on the order of the first $i$ people, not on their heights, whereas whether $j$ can be seen past them depends only on their heights, not on their order. Thus $\mathsf E\left(X_iX_j\right)=\mathsf E\left(X_i\right)\mathsf E\left(X_j\right)$ (with $X_i$ the indicator variable for person $i$ being seen), and thus

\begin{eqnarray*} \mathsf E\left(X^2\right)-\mathsf E(X)^2 &=& \sum_i\left[\mathsf E\left(X_i^2\right)-\mathsf E\left(X_i\right)^2\right] \\ &=& \sum_i\left[\mathsf E\left(X_i\right)-\mathsf E\left(X_i\right)^2\right] \\ &=& \sum_i\left[\frac1i-\frac1{i^2}\right]\;. \end{eqnarray*}

joriki
  • 238,052