Skip to main content
Mathematics LibreTexts

2.2: The Sum Rule

  • Page ID
    60099
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    The sum rule is a rule that can be applied to determine the number of possible outcomes when there are two different things that you might choose to do (and various ways in which you can do each of them), and you cannot do both of them. Often, it is applied when there is a natural way of breaking the outcomes down into cases.

    Example \(\PageIndex{1}\)

    Recall the example of buying a bagel or a doughnut at a doughnut shop that sells five kinds of doughnuts and three kinds of bagels. You are only choosing one or the other, so one way to determine how many choices you have in total, would be to write down all of the possible kinds of doughnut in one list, and all of the possible kinds of bagel in another list:

    Doughnuts Bagels
    chocolate glazed blueberry
    chocolate iced cinnamon raisin
    honey cruller plain
    custard-filled
    original glazed

    The total number of possible choices is the number of entries that appear in the two lists combined, which is five plus three.

    In other words, to determine the number of choices you have, we add the number of choices of doughnut (that is, the number of entries in the first list) and the number of choices of bagel (that is, the number of entries in the second list). This is an example of the sum rule.

    We’re now ready to state the sum rule in its full generality.

    Theorem \(\PageIndex{1}\): Sum Rule

    Suppose that when you are determining the total number of outcomes, you can identify two distinct cases with the property that every possible outcome lies in exactly one of the cases. If there are \(n_1\) possible outcomes in the first case, and \(n_2\) possible outcomes in the second case, then the total number of possible outcomes will be \(n_1 + n_2\).

    It’s hard to do much with the sum rule by itself, but we’ll cover a couple more examples and then in the next section, we’ll get into some more challenging examples where we combine the two rules.

    Sometimes the problem naturally splits into more than two cases, with every possible outcome lying in exactly one of the cases. If this happens, we can apply the sum rule more than once to determine the answer. First we identify two cases (one of which may be “everything else”) and then subdivide one or both of the cases. Let’s look at an example of this.

    Example \(\PageIndex{2}\)

    Mary and Peter are planning to have no more than three children. What are the possible combinations of girls and boys they might end up with, if we aren’t keeping track of the order of the children? (By not keeping track of the order of the children, I mean that we’ll consider having two girls followed by one boy as being the same as having two girls and one boy in any other order.)

    Solution

    To answer this question, we’ll break the problem into cases. First we’ll divide the problem into two possibilities: Mary and Peter have no children; or they have at least one child. If Mary and Peter have no children, this can happen in only one way (no boys and no girls). If Mary and Peter have at least one child, then they have between one and three children. We’ll have to break this down further to find how many outcomes are involved.

    We break the case where Mary and Peter have between one and three children down into two cases: they might have one child, or they might have more than one child. If they have one child, that child might be a boy or a girl, so there are two possible outcomes. If they have more than one child, again we’ll need to further subdivide this case.

    The case where Mary and Peter have either two or three children naturally breaks down into two cases: they might have two children, or they might have three children. If they have two children, the number of girls they have might be zero, one, or two, so there are three possible outcomes (the remaining children, if any, must all be boys). If they have three children, the number of girls they have might be zero, one, two, or three, so there are four possible outcomes (again, any remaining children must be boys).

    Now we put all of these outcomes together with the sum rule. We conclude that in total, there are \(1 + (2 + (3 + 4)) = 10\) different combinations of girls and boys that Mary and Peter might end up with.

    Notice that it was artificial to repeatedly break this example up into two cases at a time. Thus, Example 2.2.2 serves as a good demonstration for a generalisation of the sum rule as we stated it above. It would have been more natural to have broken the problem of Mary and Peter’s kids up into four cases from the beginning, depending on whether they end up with zero, one, two, or three kids. The total number of combinations of girls and boys that Mary and Peter might end up with, is the sum of the combinations they can end up with in each of these cases; that is, \(1 + 2 + 3 + 4 = 10\).

    Theorem \(\PageIndex{2}\): Sum Rule For Many Cases

    Suppose that when you are determining the total number of outcomes, you can identify \(k\) distinct cases with the property that every possible outcome lies in exactly one of the cases. If for each \(i\) between \(1\) and \(k\) there are \(n_i\) possible outcomes in the \(i^{th}\) case, then the total number of possible outcomes will be \(\prod_{i=1}^{k} n_i\) (that is, the sum as \(i\) goes from \(1\) to \(k\) of the \(n_i\)).

    There is one other important way to use the sum rule. This application is a bit more subtle. Suppose you know the total number of outcomes, and you want to know the number of outcomes that don’t include a particular event. The sum rule tells us that the total number of outcomes is comprised of the outcomes that do include that event, together with the ones that don’t. So if it’s easy to figure out how many outcomes include the event that interests you, then you can subtract that from the total number of outcomes to determine how many outcomes exclude that event. Here’s an example.

    Example \(\PageIndex{3}\)

    There are 216 different possible outcomes from rolling a white die, a red die, and a yellow die. (You can work this out using the product rule.) How many of these outcomes involve rolling a one on two or fewer of the dice?

    Solution

    Tackling this problem directly, you might be inclined to split it into three cases: outcomes that involve rolling no ones, those that involve rolling exactly one one, and those that involve rolling exactly two ones. If you try this, the analysis will be long and fairly involved, and will include both the product rule and the sum rule. If you are careful, you will be able to find the correct answer this way.

    We’ll use a different approach, by first counting the outcomes that we don’t want: those that involve getting a one on all three of the dice. There is only one way for this to happen: all three of the dice have to roll ones! So the number of outcomes that involve rolling ones on two or fewer of the dice, will be \(216 − 1 = 215\).

    Exercise \(\PageIndex{1}\)

    Use only the sum rule to answer the following questions:

    1. I have four markers on my desk: one blue and three black. Every day on my way to class, I grab three of the markers without looking. There are four different markers that could be left behind, so there are four combinations of markers that I could take with me. What is the probability that I take the blue marker?
    2. Maple is thinking of either a letter, or a digit. How many different things could she be thinking of?
    3. How many of the 16 four-bit binary numbers have at most one 1 in them?

    This page titled 2.2: The Sum Rule is shared under a CC BY-NC-SA license and was authored, remixed, and/or curated by Joy Morris.

    • Was this article helpful?