Statistics – Combinations (Selections)

In my last post, I described how you can find all the ways to arrange x things from a group of n things. Here, order matters, and the equation to calculate this is

\[P\left(n,x\right)=\frac{n!}{\left(n-x\right)!}\]

If this looks strange, please read my last post. Now let’s talk about counting things where order does not matter, for example, picking a team of players.

The math term for this is combinations. Let’s introduce this with an example. How may ways can you arrange the letters A, B, and C? From my last post, you know that this is 3! = 6. ABC and CBA are two different arrangements. Now how many ways can you select all 3 letters? Well, there is only one way that can be done. ABC and CBA are the same selection so are only counted once. Notice that for a given n and x, there are fewer selections than arrangements. In this example, there are 3! = 6 times more arrangements than selections.

Now let’s modify this example. Suppose we want to select 3 letters from ABCDE. For any 3 of the letters chosen, there will be 3! times more arrangements than selections, which means that if we use the permutation formula above to answer this question, the answer would be 3! times too large. Generalising this, there are x! times more arrangements than selections for a given n and x. This allows us to modify the formula above by dividing it by x! to get the combinations formula

\[C\left(n,x\right)=nCx=\left(\begin{matrix}n\\x\\\end{matrix}\right)=\frac{n!}{x!\left(n-x\right)!}\]

The left side are some of the different notations used and the right side is the actual formula. As with permutations, you can use a CAS calculator to do this calculation with the nCr function. Selecting 3 letters from 5, there are

\[C\left(5,\ 3\right)=\frac{5!}{3!\left(5-3\right)!}=10\]

ways to do that. This would also answer the questions: how many ways can you select a team of 3 people from 5 people or how many 3-card hands can be dealt from a deck of 5 cards?

Speaking of cards, how many 5-card poker hands can be dealt from a standard deck of 52 cards?

\[C\left(52,\ 5\right)=\frac{52!}{5!\left(52-5\right)!}=2,598,960\]

Now let’s put this in practice. There are many lotto games around based on picking 6 numbers out of 45. Let’s first calculate how many ways you can select 6 numbers out of 45:

\[C\left(45,\ 6\right)=\frac{45!}{6!\left(45-6\right)!}=8,145,060\]

From my post on basic probability, the probability of your lotto ticket with a single set of 6 numbers winning is

\[\text{probabilty of winning}=\frac{1}{8145060}=0.000000123=0.0000123\text{%}\]

Now if you buy a block of 50 numbers, how much does that improve your chances of winning? This is a binomial distribution problem which is beyond the scope of this post, but to calculate that, it uses the probability calculated above to get 0.000614% chance that at least one of the numbers wins. That’s a 1 out of 162,902 chances to win with a 50 pick lotto card. In Australia, there is a 1 in 12,000 chance of being hit by lightning. Just make sure you’re not standing outside when you buy your ticket.