# Premutations and combinations - Mathematics
Data Science for Political and Social Phenomena
Author: Guillaume Redoulès

# Premutations and combinations

Finding patterns in the possible ways events can occur is very useful in helping us count the number of desirable events in our sample space. Two of the easiest methods for doing this are with permutations (when order matters) and combinations (when order doesn't matter).

## Permutations

An ordered arrangement r of objects from a set, A, of n objects (where \(0\lt r \leq n\)) is called an r-element permutation of A. You can also think of this as a permutation of A's elements taken r at a time. The number of r-element permutations of an n-object set is denoted by the following formula:

$$_{n}P_{r}=\frac{n!}{(n-r)!}$$

## Combinations

An unordered arrangement of r objects from a set, A, of n objects (where \(0\lt r \leq n\)) is called an r-element combination of A. You can also think of this as a combination of A's elements taken r at a time.

Because the only difference between permutations and combinations is that combinations are unordered, we can easily find the number of r-element combinations by dividing out the permutations (r!):

$$_{n}C_{r}=\frac{_{n}P_{r}}{r!}=\frac{n!}{r!(n-r)!}$$

When we talk about combinations, we're talking about the number of subsets of size r that can be made from a set of size n. In fact, \(_{n}C_{r}\) is often referred to as "n choose r", because it's counting the number of r-element combinations that can be chosen from a set of n elements.

### Find an error or bug? Have a suggestion?

Everything on this site is avaliable on GitHub. Head on over and submit an issue. You can also message me directly by email.