A foundational element of probability and statistics is counting. How many ways could something occur? A simple example is a pass or fail criteria, thus when evaluating a product there are two possible outcomes.
Let’s consider a situation where you are testing the 25 possible accessories for a device; each is different and up to 3 can be attached to the product. Maybe the circuit permitting the connection has a possible conflict, and the sequence or order of attachment is important in finding the problems. The order matters as the accessories attach to each other in series. The first is attached to the product, then the second accessory is attached to the first, and the third is attached to the second. How many ways can we attach three accessories given that we have 25 different accessories available?
This is a counting problem. We could just start writing down all the possibilities or permutations. These are ordered lists much like a combination lock. The order or sequence matters. We could index the accessories with letters, a, b, c, … and start listing the possibilities. {A, B, C}, {A, B, D}, … {A, B, Y}, {A, C, B}, {A, C, D}, … which would take a while and would take some attention to detail to not miss any permutations.
Let’s consider this counting problem another way. The first accessory selected could be any of the 25. The second accessory could be any of the remaining 24, and the third would be any of the remaining 23. The product of 25, 24, and 23 is the number of permutations. We can write this as
$$ \large\displaystyle 25(25-1)(25-2)=\frac{25!}{(25-3)!}$$
Generalizing, we can define permutation as an ordered arrangement of n district objects. When counting, we say the number of ways of ordering n distinct objects taken r at a time. And it is written
$$ \large\displaystyle P_{r}^{n}=n(n-1)(n-2)…(n-r)=\frac{n!}{(n-r)!}$$
Back to our example, we find
$$ \large\displaystyle P_{3}^{25}=\frac{25!}{(25-3)!}=\frac{25!}{22!}=\frac{25\times 24\times 23\times 22!}{22!}=25\times 24\times 23=13,800$$
Using the write it all out and count process would take some patience. And, we find that testing every permutation is probably not going to feasible, especially before the product line starts shipping.
Now, let’s continue the example with a little more information included. After expressing our need for additional testing resources to manage the 13,800 separate tests, we learn that the order doesn’t matter. It is only the alignment of 3 units in any order that would show the conflict. Does that help reduce the testing?
One way to consider this problem is to recall that any three accessories may be ordered (permutations) 3! ways. As each group of 3 we draw from the 25 has these 3! permutations, we can divide the previously calculated permutations by 3!. The would be 13,800 / 3! = 2,300. While still a large task it may be possible to complete before product launch.
Combinations are the number of distinct groups of n distinct objects taken r at a time. We use combinations when the order does not matter. Mathematically we write combinations as
$$ \large\displaystyle C_{r}^{n}=\frac{n!}{r!(n-r)!}$$
The calculation for this example becomes
$$ \large\displaystyle C_{3}^{25}=\frac{25!}{3!(25-3)!}=\frac{25!}{3!22!}=\frac{25\times 24\times 23\times 22!}{3!22!}=\frac{25\times 24\times 23}{6}=2,300$$
Counting is often streamlined when using permutations or combinations which are useful for determining the number of possibilities. It is also used for many discrete distributions to determine the denominator and numerator values for a given situation. Keep in mind that permutation applies when the order matters, and combinations when it does not. I keep in mind permutations create more possibilities than the clustered count of combinations. No worries, this mnemonic doesn’t work for me, and I just have to look it up when I need to recall which is which.
Related:
Statistical Terms (article)
Central Limit Theorem (article)
Failure modes and mechanisms (article)
Leave a Reply