Oftentimes when we’re finding the probability of an event A, especially when the event we’re
trying to describe is best addressed with the classical probability view, we have to
count the number of ways that event A can occur and divide that by the total number
of ways that any event in the sample space can occur. Sometimes counting these events
can be a little tricky, so much so that there’s an area of mathematics called combinatorics
that deals with counting. In this video, we’ll talk about a few counting techniques that
will help us quantify probabilities of particular discrete random variables.
One of the more basic approaches to counting is with the multiplication rule for counting.
Simply put, if an operation can be performed in n1 ways, and if for each of these a second
operation can be performed in n2 ways, then the two operations can be performed together
in n1 times n2 ways. For example, say we work for Norman, Oklahoma’s fourth largest cracker
factory, and our product line has two different styles of crackers that come in three varieties,
and in five different count sizes. So how many different packages do we need to design?
Two times three times five or thirty different package designs. For another example, much
is made lately of alternate college football uniforms and how many combinations of uniforms
that can be produced. Let’s say a team has four possible helmets, eight possible jerseys,
six possible pants, three colors of shoes, and two colors of gloves. How many uniform
combinations are possible? Four times eight times six times three times two, or one thousand
one hundred and fifty-two combinations.
Let’s look at one more example of the multiplication rule for counting. Say that a state license
plate has six characters, and say that the plates are of the form of three letters followed
by three numbers. How many ways are there to construct a license plate? We have twenty-six
options for the number of letters, and we have ten digits, or zero through nine, for
the possibilities of a number. For letter-letter-letter, we have twenty-six times twenty-six times
twenty-six possibilities. For number-number-number, we have ten times ten times ten. Therefore,
the total combinations to appear on a license plate is seventeen million five hundred seventy-six
thousand. Alternatively, let’s say that the six-character license plate can be made
up of any letter or any number for all six characters. For any one character, there are
twenty-six letters and ten numbers, or thirty-six possible characters. Therefore, the number
of possible license plates is thirty-six to the six, or just over two point one billion
possibilities.
A function that is useful in counting is the factorial function. The notation for a factorial
is an exclamation point. So, n exclamation point is not n! but it’s read as n factorial.
The factorial function is pretty simple: n factorial is equal to n times n minus one
times n minus two all the way down to one. For example, three factorial is three times
two times one. By definition, zero factorial is equal to one. One example of where a factorial
on its own is useful in counting is when we are ordering n objects. Say we have five books,
and we want to put them on the shelf. How many ways are there to order the five books
on the shelf? How many options do we have for the first book to place on the shelf?
Five books, so five options. Once we have placed that book on the shelves, how many
options do we have for the second book? Since one is already placed on the shelf, we have
only four options remaining for the second book. And only three options for the third
book, two options for the fourth, and only one option for the fifth to be placed on the
shelf. As a consequence of the multiplication rule for counting, we have five times four
times three times two times one or one hundred twenty ways to arrange the books. That’s
five factorial.
Let’s think about a completely different example. Say we have five students A, B, C,
D, and E who are equally worthy of a scholarship, but we only have two scholarships that are
exactly the same to hand out. How many ways are there to choose the two scholarship recipients?
Let’s enumerate the possibilities of scholarship recipients. The two recipients could be A
and B, or A and C, or A and D, and so on, for a total of ten possibilities. We can enumerate
these possibilities, but that will take more and more time to do the larger the problem
gets. The next counting function is called a combination, and it’s used to count the
number of ways that r elements can be chosen from n elements without regard to order. That
is, it’s the number of combinations of n distinct objects taken r at a time. On the
screen you’ll see a couple of common ways we write a combination, said as n choose
r. The function is written as n factorial divided by r factorial times n minus r factorial.
To calculate our scholarship recipients, five choose two is five factorial divided by two
factorial times three factorial, one hundred twenty divided by two times six, or ten.
Similar in concept to combinations, but where the order of selection is important, is another
counting function called a permutation. The notation for the selection of r elements from
n elements where the order or arrangement of those r elements is important, is shown
on the screen. Let’s go back to our scholarship example, but let’s assume that the two different
scholarships are different: one is the Switzer Scholarship, and the other is the Stoops Scholarship.
How many ways are there to allocate these two different scholarships to a possible five
students. Let’s enumerate these possibilities: A gets the Switzer Scholarship and B gets
the Stoops Scholarship, or B gets the Switzer and A gets the Stoops scholarship, such that
AB is different from BA because arrangement matters, or there’s AC and CA, AD and DA,
and so on, for a total of twenty possibilities.
How many ways are there to give out the Switzer scholarship? We have five students, so five
ways. Then how many ways are there to give out the Stoops scholarship? If we’ve already
given out one, there are four remaining students, so four ways. Five times four is twenty. In
a way, this is a factorial that is truncated. How do we truncate the factorial? We take
n factorial in the numerator and divide by n minus r factorial. This is a permutation.
For the scholarship example, we have five factorial divided by five minus two factorial.
Another way to think about this problem is to first select two recipients out of the
five students, and then order them. How many ways are there to generally choose two out
of five? With a combination, five choose two. Once we have our two recipients, how many
ways are there to assign to the scholarships? We have two options for the first scholarship,
and then one remaining option for the second, or two factorial. That is, we can calculate
the combination, and then multiply by r factorial. This gives us the relationship between the
permutation and the combination, and shows how order matters in the permutation. Note
that permutations tends to give us many more possibilities: r factorial times more possibilities.
Let’s say you’re a reliability engineer at a Bright Idea Incorporated, which is obviously
a light bulb manufacturer. You’re going to perform a life testing experiment on some
light bulbs, and you have a batch of four forty watt bulbs, five sixty watt bulbs, and
six seventy-five watt bulbs. Let’s say you pull three of those light bulbs at random.
How many ways are there for you to pull a sample that has exactly two seventy-five watt
light bulbs? First we have to find the number of ways to pull two seventy-five watt bulbs
from six, or six choose two which is equal to fifteen. Then we have to find how many
ways to pull the remaining one light bulb from the rest of the forty watt and sixty
watt bulbs, or the rest of the four plus five equals nine bulbs. That would be nine choose
one which is equal to nine.
From the multiplication rule for counting, we know the number of ways to get two seventy-five
watt bulbs, and we know the number of ways to get the remaining one bulb. We multiply
these two values together to get one hundred thirty-five different ways to get our desired
sample of three bulbs that contain exactly two seventy-five watt bulbs. If we define
event A as pulling two seventy-five watt bulbs out of three bulbs, the probability of A would
be described with classical probability. We know how many ways there are for event A to
happen, and we know exactly how many ways there are to pull three light bulbs out of
fifteen total bulbs. In the numerator, we’d have one hundred thirty-five. In the denominator,
we’d have fifteen choose three, or four hundred fifty-five ways. The probability of
A would then be one thirty-five divided by four fifty-five, or 0.297.
As you can see, counting is important for calculating probabilities of events that are
described with classical probability, and in upcoming videos, we’ll see how counting
is also important in the probability distribution functions of a few discrete random variables.