Solution
Like Next to Like
Show the problem again
Ten red balls and ten blue balls are arranged in a row of 20 positions, with all C(20,10) colour patterns equally likely. Of the 19 pairs of adjacent positions, what is the expected number of pairs in which both balls have the same colour? Give an exact number.
Worked solution
The answer is 9. Fix one adjacent pair of positions. The colours occupying it are those of two distinct balls drawn from the twenty, so the probability that they match is 2 × (10 × 9)/(20 × 19) = 9/19. There are 19 adjacent pairs, so by linearity the expected count is 19 × 9/19 = 9. Slightly fewer than half the pairs match, not exactly half: drawing without replacement makes the second ball of a pair a little more likely to be the opposite colour. Equivalently, the expected number of colour runs is 20 − 9 = 11.
Source: Standard indicator-variable exercise in wide circulation; no traceable original source. Statement written for AxiomIQ.