The sequence consists of 19 ones and 49 zeros, arranged in a random order. Let's call a group the maximal subsequence of identical characters. For example, in the sequence 110001001111 there are five groups: two ones, then three zeros, then one one, then two zeros, and finally four ones. Find the expected value of the length of the first group.

#
We will number the ones from 1 to 19 and the zeros from 1 to 49 separately. Let $I_{k}$ be the indicator of the event "there are no zeros before the $k$-th one" and $J_{m}$ be the indicator of the event "there are no ones before the $m$-th zero," where $1 \leq k \leq 19$ and $1 \leq m \leq 49$. If at least one of the indicators $I_{k}$ is equal to one, then the first group consists of ones, and therefore all indicators $J_{m}$ are equal to zero. Conversely, if at least one of the indicators $J_{m}$ is equal to one, then all $I_{k}$ are equal to zero. The desired quantity $X$ "the length of the first group" is equal to $I_{1}+I_{2}+\ldots+I_{19}+J_{1}+J_{2}+\ldots+J_{49}$.

The probability of the event "Ik $=1$ " is ${ }^{1 / 50}$, since this event occurs only when in a randomly shuffled sequence consisting of the $k$-th one and all 49 zeros, the one is in the first position. Therefore, $\mathrm{EI} I_{k}=\mathrm{P}\left(I_{k}=1\right)=0.02$. Similarly,

$\mathrm{E} J_{m}=\mathrm{P}\left(J_{m}=1\right)=1 / 20=0.05$. Therefore, $\mathrm{E} X=19 \cdot 0.02+49 \cdot 0.05=2.823$.

## Answer

2.83 .

Submit a comment