I recently had an exam in Probability and there is one question in the exam I still have no clue for how to solve it.
The question is as follows:
Given $n \ge 10$ people numbered from 1 to n by height. the $i$th person is with height $i$.
The people are shuffled randomly. Person $i$ is blocking the view of person $j$ if $i>j$ and i is positioned before $j$.
Let us mark $Y_i$ as a number of people that are blocking the view for the person numbered $i$.
For a given $1\le i\lt n$. what is $cov(Y_i,Y_{i+1})$
Note: $cov$ is the covariance
Any kind of help is appreciated, Thank you!
I believe I might have found a solution.
First, let us define $cov(Y_{i,j})$ - an indicator for the event "$j$ is blocking the view for $i$".
We will define $Y_{i,j}$ only for $j>i$ where it makes sense. (Otherwise, $j$ never blocks the view).
Given the assumption $j>i$, with probability $\frac{1}{2}$ from symmetry. In the shuffled row of people, $i$ has the same chance to be positioned before $j$, as $j$ has to be position before $i$.
Therefore, $Y_{i,j} = 1$ $ w.p.\frac{1}{2}$, Otherwise $Y_{i,j} = 0$ $ w.p.\frac{1}{2}$ .
We will notice that $Y_{i} = \sum_{j=i+1}^{n}Y_{i,j} \implies cov(Y_{i},Y_{i+1}) = cov(\sum_{j=i+1}^{n}Y_{i,j},\sum_{j=i+2}^{n}Y_{i+1,j})$
From bilinearity of the covariance.
$=\sum_{k=i+1}^{n}\sum_{l=i+2}^{n}cov(Y_{i,k},Y_{i+1,l})$
Let us observe $cov(Y_{i,k},Y_{i+1,l}) = \mathop{\mathbb{E}}[Y_{i,k}*Y_{i+1,l}] - \mathop{\mathbb{E}}[Y_{i,l}]*\mathop{\mathbb{E}}[Y_{i+1,l}]$
From properties of indicators $\mathop{\mathbb{E}}[Y_{i,k}]*\mathop{\mathbb{E}}[Y_{i+1,l}] = \frac{1}{2}*\frac{1}{2} = \frac{1}{4}$
For $Y_{i,k}*Y_{i+1,l}=1 \iff$ $i$ is poistioned before $k$ and $i+1$ is positioned before $l$.
that happens with probability $\frac{1}{2}*\frac{1}{2}$ = $\frac{1}{4}$.
Hence, $cov(Y_{i,k},Y_{i+1,l}) = 0 \implies \sum_{k=i+1}^{n}\sum_{l=i+2}^{n}cov(Y_{i,k},Y_{i+1,l}) = 0 \implies cov(Y_{i},Y_{i+1}) = 0$