Concerns about my solution to a probability problem.

25 Views Asked by At

The problem is formulated as follows:

There are $m$ objects in a row. $k$ objects are randomly selected, and $k < m$ . The random variable $X$ is equal to the number of such items $i$ that item $i$ is selected and all its neighbors are not selected. Find the expectation of $X$.

My solution:

Let $Y_i$ be an indicator random variable, equal to 1 if item $i$ is selected and its neighbours are not selected, and 0 otherwise. Then $X = \sum\limits_{i=1}^{m}Y_i$. The mathematical expectation of $X$ is equal to the sum of the mathematical expectations of all $Y_i$.

For $i = 1$ and $i = m$, the probability that $Y_i = 1$ is $\frac{{m-2}\choose{k-1}}{m\choose{k}}$, since there are $k-1$ more items to choose from the remaining $m-2$.

For $2 \leq i \leq m-1$, the probability that $Y_i = 1$ is $\frac{{m-3}\choose{k-1}}{m\choose{k}}$, since another $k-1$ item must be chosen from the remaining $m-3$ items.

Thus, the mathematical expectation of $X$ is equal to:

$E[X] = E[Y_1] + E[Y_2] + ... + E[Y_m] = 2 \cdot \frac{{{m-2}\choose{k-1}}}{m\choose{k}} + (m-2) \cdot \frac{{m-3}\choose{k-1}}{m\choose{k}}= \frac{2{{m-2}\choose{k-1}} + (m-2){{m-3}\choose{k-1}}}{m\choose{k}}$