This is my way of thinking of the formula for "expected"
Lets say you just have a single C in a 200 long nucleotide chain. The probability that the next nucleotide is G (and thus, the probability that you have a single CpG island) is #G/200. The probability in this case is the expected number of CpG repeats. So if 50 of the nucleotides are G, the chances of getting 1 CpG islands is 0.25, and on average you'd expect 0.25 CpG islands.
However, usually there is more than 1 C in a nucleotide chain. Every C you have is another shot at having a CpG island, so since every C gives you another chance, you multiply the above calculated probability by the C. This gives you #G/200 * #C