I am trying to learn some probability and the following problem summarises my current confusion quite well. Any help is gratefully received.
I have $n$ pebbles, some of which are black, some white and some neither black nor white. If I choose each one with probability $1/2$ independently, what is the probability that I get the same number of black and white pebbles?
Say there are $w$ white pebbles and $b$ black ones.
Let $W$ denote the number of white pebbles that are chosen and $B$ the number of black pebbles that are chosen. Then you are looking for:
$P\left\{ W=B\right\} =\sum_{k=0}^{n}P\left\{ W=B=k\right\} $
Here $P\left\{ W=B=k\right\} =P\left\{ W=k\wedge B=k\right\} =P\left\{ W=k\right\} P\left\{ B=k\right\} $ because of independence.
$W$ and $B$ are both binomially distributed. $W$ with parameters $w$ and $\frac{1}{2}$ and $B$ with parameters $b$ and $\frac{1}{2}$.