Skip to main content

Section 2.1 The product rule

The product rule is a rule that applies when we there is more than one variable (i.e. thing that can change) involved in determining the final outcome.

Consider the example of buying coffee at a coffee shop that sells four varieties and three sizes. When you are choosing your coffee, you need to choose both variety and size. One way of figuring out how many choices you have in total, would be to make a table. You could label the columns with the sizes, and the rows with the varieties (or vice versa, it doesn't matter).

Small Medium Large
Latte small latte medium latte large latte
Mocha small mocha medium mocha large mocha
Espresso small espresso medium espresso large espresso
 Cappuccino   small cappuccino   medium cappuccino   large cappuccino 

As you can see, a different combination of variety and size appears in each entry of the table, and every possible combination of variety and size appears somewhere. Thus the total number of possible choices is the number of entries in this table. Although in a small example like this we could simply count all of the entries and see that there are twelve, it will be more useful to notice that elementary arithmetic tells us that the number of entries in the table will be the number of rows times the number of columns, which is four times three.

In other words, to determine the total number of choices you have, we multiply the number of choices of variety (that is, the number of rows in our table) by the number of choices of size (that is, the number of columns in our table). This is an example of what we'll call the product rule.

We're now ready to state the product rule in its full generality.

In the above example, we can think of the aspects that can change as being the variety of coffee, and the size. There are four outcomes (choices) for the first aspect, and three outcomes (choices) for the second aspect, so the total number of possible outcomes is \(4\cdot 3=12\text{.}\)

Sometimes it seems clear that there are more than two aspects that are varying. If this happens, we can apply the product rule more than once to determine the answer, by first identifying two aspects (one of which may be “all the rest”), and then subdividing one or both of those aspects. An example of this is the problem posed earlier of buying a doughnut to go with your coffee.

Kyle wants to buy coffee and a doughnut. The local doughnut shop has five kinds of doughnuts for sale, and sells four varieties of coffee in three sizes (as in Example 2.1.1). How many different orders could Kyle make?

Solution

A natural way to divide Kyle's options into two aspects that can vary, is to consider separately their choice of doughnut, and their choice of coffee. There are five choices for the kind of doughnut they order, so \(n_1=5\text{.}\) For choosing the coffee, we have already used the product rule in Example 2.1.1 to determine that the number of coffee options is \(n_2=12\text{.}\)

Thus the total number of different orders Kyle could make is \(n_1n_2=5\cdot12=60\text{.}\)

Let's go through an example that more clearly involves repeated applications of the product rule.

Chloë wants to manufacture children's t-shirts. There are generally three sizes of t-shirts for children: small, medium, and large. She wants to offer the t-shirts in eight different colours (blue, yellow, pink, green, purple, orange, white, and black). The shirts can have an image on the front, and a slogan on the back. She has come up with three images, and five slogans.

To stock her show room, Chloë wants to produce a single sample of each kind of shirt that she will be offering for sale. The shirts cost her $4 each to produce. How much are the samples going to cost her (in total)?

Solution

To solve this problem, observe that to determine how many sample shirts Chloë will produce, we can consider the size as one aspect, and the style (including colour, image, and slogan) as the other. There are \(n_1=3\) sizes. So the number of samples will be three times \(n_2\text{,}\) where \(n_2\) is the number of possible styles.

We now break \(n_2\) down further: to determine how many possible styles are available, you can divide this into two aspects: the colour, and the decoration (image and slogan). There are \(n_{2,1}=8\) colours. So the number of styles will be eight times \(n_{2,2}\text{,}\) where \(n_{2,2}\) is the number of possible decorations (combinations of image and slogan) that are available.

We can break \(n_{2,2}\) down further: to determine how many possible decorations are available, you divide this into the two aspects of image and slogan. There are \(n_{2,2,1}=3\) possible images, and \(n_{2,2,2}=5\) possible slogans, so the product rule tells us that there are \(n_{2,2}=3 \cdot 5=15\) possible combinations of image and slogan (decorations).

Putting all of this together, we see that Chloë will have to create \(3(8(3\cdot 5))=360\) sample t-shirts. As each one costs $4, her total cost will be $1440.

Notice that finding exactly two aspects that vary can be quite artificial. Example 2.1.4 serves as a good demonstration for a generalisation of the product rule as we stated it above. In that example, it would have been more natural to have considered from the start that there were four apparent aspects to the t-shirts that can vary: size; colour; image; and slogan. The total number of t-shirts she needed to produce was the product of the number of possible outcomes of each of these aspects: \(3 \cdot 8 \cdot 3 \cdot 5=360\text{.}\)

Now let's look at an example where we are trying to evaluate a probability. Since this course is about counting rather than probability, we'll restrict our attention to examples where all outcomes are equally likely. Under this assumption, in order to determine a probability, we can count the number of outcomes that have the property we're looking for, and divide by the total number of outcomes.

Iswar has flipped a coin twice, and come up with heads both times. What is the probability that he will flip heads each of his next two tries?

Solution

To answer this, we consider each coin flip as a different aspect. There are two possible results for the third flip: heads or tails. For each of these, there are two possible results for the fourth flip: heads or tails. So in total, the product rule tells us that there are \(2\cdot 2=4\) possible combinations for the results of the third and fourth flips. This will be the denominator of the probability.

To determine the numerator (that is, the number of ways in which both flips can result in heads), we again consider each flip as a different aspect. There is only one possible way for the third flip to be heads, and then there is only one possible way for the fourth flip to be heads. So in total, only one of the four possible combinations of outcomes involves both coins landing as heads.

The probability that Iswar's next two flips will also result in heads is \(1/4\text{.}\)

Notice that in this example, the fact that Iswar's first two flips were heads was irrelevant to our calculations, because it was already a known outcome, over and done with, so is true no matter what may happen with his later flips. If Iswar hadn't yet flipped the coin and we asked for the probability that his first four flips will all be heads, then our calculations would have to include both possible options for the outcome of each of his first two flips. In this case, the final probability would be \(1/16\) (there are \(16\) possible combinations for the outcomes of four coin flips, only one of which involves all four being heads).

Use only the product rule to answer the following questions:

  1. The car Ace wants to buy comes in four colours; with or without air conditioning; with five different options for stereo systems; and a choice of none, two, or four floor mats. If the dealership they visit has three cars in the lot, each with different options, what is the probability that one of the cars the dealership has in stock has exactly the options Ace wants?

  2. Candyce is writing a “Choose your own adventure” book in which she wants every possible choice to result in a different ending. If there are four points at which choices must be made in every storyline, and there are three choices the first time but two every time after that, how many endings does Candyce need to write?

  3. William is buying five books. For each book he has a choice of version: hardcover, paperback, or electronic. In how many different ways can he make his selection?