6

The Happy Animals Kennel has 18 cages in a row. They allocate these cages at random to 6 dogs, 6 cats, and 6 pot-bellied pigs (with one animal per cage). All arrangements are equally likely.

Let A be the number of times in the row of cages that two animals of the same species are adjacent. For example, in the arrangement DCPCDPPPDCDPCDCCPD (where D=dog, C=cat, and P=pig), we have A=3.

What is the expected value of A?

(not sure if expectation is the correct tag here)

voldemort
  • 13,182
heyhuehei
  • 683

2 Answers2

6

The probability that Fido and Rover (two dogs) are in adjacent cages is $$\frac{17}{\binom{18}2}=\frac19,$$ because there are $\binom{18}2$ choices for the (unordered) pair of cages to put them in, and $17$ pairs of adjacent cages.

To get the expected value, multiply this probability by the number of same-species pairs of animals: $$\frac19\cdot3\cdot\binom62=5.$$ The expected value is $5$.

bof
  • 78,265
2

We use the method of indicator random variables.

For $i=1$ to $17$, let $X_i=1$ if Cages $i$ and $i+1$ are occupied by animals of the same species; let $X_i=0$ otherwise. We want $E(Y)$, where $Y=X_1+\cdots+X_{17}$.

By the linearity of expectation, $E(Y)=E(X_1)+\cdots+E(X_{17})$.

Note that $\Pr(X_i=1)=\frac{5}{17}$. For whatever animal is in Cage $i$, the probability an animal of the same species is in Cage $i+1$ is $\frac{5}{17}$.

It follows that $E(Y)=17\cdot \frac{5}{17}=5$.

André Nicolas
  • 507,029