# Combinatorics/Probability Example

I am working through the example problem the author of my statistics book provides:

A particular iPod playlist contains 100 songs, 10 of which are by the Beatles. Suppose the shuffle feature is used to play the songs in random order. What is the probability that the first Beatles song heard is the fifth song played?

First they give you a solution that requires the use of permutations; then they give you a solution involving combinations, which is the one I am slightly confused about.

Here it is:

Here is an alternative line of reasoning involving combinations. Rather than focusing on selecting just the first five songs, think of playing all 100 songs in random order. The number of ways of choosing 10 of these songs to be the Bs (without regard to the order in which they are then played) is ${{100}\choose{10}}$ . Now if we choose 9 of the last 95 songs to be Bs, which can be done in ${{95}\choose{9}}$ ways, that leaves four NBs and one B for the first five songs. There is only one further way for these five to start with four NBs and then follow with a B (remember that we are considering unordered subsets). Thus

$P(1^{st}~B~is~the~5th~song~played) = \LARGE \frac{{{95}\choose{9}}}{{{100}\choose{10}}} \large= .0679$

I am having difficulty understanding what ${{100}\choose{10}}$ and ${{95}\choose{9}}$ mean.

-

Imagine that even though you listen to just the first $10$ songs, the iPod has actually generated a random ordering of the entire set of $100$ songs. We’re going to count the ways to distribute the $10$ Beatles songs in this list so that the first Beatles song is the fifth song overall.

In order for this to happen, one Beatles song must go into the fifth slot in the order, and the other $9$ must go into the last $95$ slots. We don’t care which Beatles song is which $-$ they could be $10$ copies of the same song, for all we care $-$ so all that matters is the positions, not which Beatles song goes into which of the $10$ positions chosen for Beatles songs. We have no choice about one Beatles song: it must go into the fifth slot overall. The other $9$ must go into $9$ of the last $95$ slots, and there are $\binom{95}9$ ways to pick those $9$ slots. Thus, there are altogether $1\cdot\binom{95}9=\binom{95}9$ ways to pick $10$ slots for the Beatles songs so that the first Beatles song is the fifth song in the whole list.

There are $\binom{100}{10}$ ways to pick $10$ positions in this ordering, so there are $\binom{100}{10}$ different sets of $10$ positions in which the $10$ Beatles songs could occur. $\binom{95}9$ of these $\binom{100}{10}$ do what we want: they put the first Beatles song in the fifth position overall. The $\binom{100}{10}$ possibilities for the positions of the $10$ Beatles songs are all equally likely, and $\binom{95}9$ yield the desired outcome, so the probability of that outcome is

$$\frac{\binom{95}9}{\binom{100}{10}}\;.$$

-
If we didn't use ${{95}\choose{9}}$ in the calculation, why did we have to find it? – Mack Feb 2 '13 at 14:48
@Eli: Those $\binom{95}5$’s were typos; they were all supposed to be $\binom{95}9$ (and are now). – Brian M. Scott Feb 2 '13 at 18:30

If you think about playing every song then there are ten spots to choose out of 100 to play the beatles songs in. So there are ${{100} \choose {10}}$ possible ways for this to happen.

But we are interested in just a few of these ways as we want the first beatles song to occur on the fifth song. This fact decides the first four songs aren't beatles songs and the fifth song is; meaning that we can now only chose 9 spots out of 95 to play the remaining beatles songs whilst having the first beatles tune to be played in the fifth position, giving ${{95} \choose {9}}$

Then our probability $p$ as every outcome is equally likely is $$p = \frac{\text{number of ways can have beatles playing fifth}}{\text{total number of ways can play ten beatles songs in 100} }=\frac{ {{95} \choose {5}} }{ {{100} \choose {10}} }$$

-

To have the first B come in position 5, you need four non-B's in the first four positions and a B in the fifth. The number of combinations that satisfy that is the number of ways to choose the position of the other 9 B's out of the remaining 95 postions. The denominator is the number of ways to select the position of all 10 B's out of all 100 positions, which is the universe under consideration.

-