Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Chapter 15: Probability

Probability gives us a way to measure how likely it is that something will happen. We use probabilities when reasoning about uncertainty, making decisions, and interpreting information in areas such as weather forecasts, games, business decisions, insurance, and data science models.

In this chapter, we use two complementary viewpoints. Sometimes probabilities can be computed from a mathematical model of the possible outcomes. Other times, probabilities are estimated from repeated observations or collected data. Both viewpoints use the same basic language of experiments, outcomes, sample spaces, and events.

Probability Terminology

Before discussing how to find probabilities, we need a few basic terms.

Definitions: Probability Terminology

These terms describe the possible results of a random experiment and the collections of results we want to study.

Random experiment. A random experiment is an activity or operation with a result that cannot be predicted ahead of time.

Outcome. An outcome is any possible result from conducting an experiment.

A dashed sample space S containing an event E. Outcomes x and y lie inside E, while outcomes z and w lie elsewhere in S.
Figure 15.1. The sample space contains all possible outcomes. The event contains the outcomes and , while and are outcomes in but not in .

Sample space. The sample space, usually denoted , is the set of all possible outcomes of an experiment.

Event. An event, denoted , is a subset of the sample space and describes a collection of outcomes.

Example: Rolling a Die

Consider an experiment of rolling a regular six-sided die. There are six possible outcomes, so the sample space is

Examples of events include:

  • Rolling a 2: .
  • Rolling an even number: .
  • Rolling a number greater than 4: .

Example: Tossing Two Coins

Two distinguishable coins, labeled 1 and 2, are tossed at the same time. In each outcome, the first letter records Coin 1 and the second records Coin 2. The sample space is

If event is "getting at least one head," then

If event is "getting one head and one tail," then

A dashed sample space S containing the nested events E and F. HT and TH lie in E, HH lies in F but outside E, and TT lies outside F.
Figure 15.2. The nested regions show : and belong to both events, belongs only to , and belongs to neither event.

Example: Coin and Die Outcomes

Gabe performs an experiment of flipping a coin and then rolling a regular six-sided die.

The sample space contains all possible coin-die outcomes:

If event is "rolls an odd number," then

If event is "gets tails and rolls an even number," then

A dashed sample space S containing separate event regions A and B. The outcomes H2, H4, and H6 lie outside both events.
Figure 15.3. The separate regions show that events and are mutually exclusive, or disjoint, subsets of . The outcomes , , and lie outside both events.

Theoretical Probability

One way to learn about a probability is to repeat an experiment many times and record how often an event occurs. This is not always practical, and in some situations it is not necessary. For simple experiments such as rolling a fair die or drawing from a well-shuffled deck of cards, we can often compute probabilities directly from a mathematical model of the sample space.

The key assumption in this section is that all outcomes in the sample space are equally likely. This means that every individual outcome has the same chance of occurring. Under this assumption, finding the probability of an event becomes a counting problem: count the outcomes in the event and compare that number with the total number of outcomes in the sample space.

Definition: Probability

Probability is a numerical measure of the likelihood that an event will occur. If is an event, then denotes the probability that event occurs.

Definition: Theoretical Probability

A theoretical probability is based on a mathematical model for the sample space.

can be viewed as a function: it takes an event as input and returns a number between and . The value is the probability that event occurs.

Under the equally likely model, if is an event in a finite sample space , then

In this model, each single outcome has probability

Example: Rolling a Six-Sided Die

Using the equally likely die model, start with the sample space and then count how many outcomes belong to each event.

Let

Define the events

Find the probability of each event:

  • Rolling a 2, represented by :
  • Rolling an even number, represented by :
  • Rolling a number greater than 4, represented by :
  • Rolling a 7:
  • Rolling a number less than 7:

Note: When Outcomes Are Not Equally Likely

The counting formula

only applies when all outcomes in the sample space are equally likely.

For a finite or countable discrete sample space whose outcome probabilities are known, the probability of an event is found by adding the probabilities of the outcomes in that event:

Example: A Loaded Die

Suppose a loaded six-sided die has sample space

but the outcomes are not equally likely. For example, suppose

These probabilities add to , so they define a valid probability model for the individual outcomes.

If is the event of rolling an even number, then

Since the outcomes are not equally likely, we do not use . Instead,

The examples above motivate the following basic properties of valid probabilities.

Properties: Probability

Impossible event. An event that cannot occur has probability . In set notation, the impossible event is the empty set. If , then

Certain event. An event that must occur has probability . The sample space is the certain event. If , then

Partition of the sample space. If events are mutually exclusive and together cover the whole sample space, then

Bounds. The probability of any event must be between and , inclusive:

Combining Events

The set operations introduced in Chapter 2 provide a compact way to describe events that occur together or separately.

Definitions: Unions and Intersections of Events

Let and be events in the same sample space.

Union. The event occurs when occurs, occurs, or both occur.

Intersection. The event occurs when both and occur.

Mutually exclusive events. Events and are mutually exclusive, or disjoint, if they cannot occur in the same trial. In set notation,

When adding and , outcomes in have been counted twice. Subtracting their probability once gives the addition rule.

Rule: Addition Rule

For any two events and ,

If and are mutually exclusive, then , so

Example: Union and Intersection

Roll a fair six-sided die. Let be the event of rolling an even number and let be the event of rolling a number greater than . Then

Therefore,

The result can be checked directly because contains four of the six equally likely outcomes.

Conditional Probability and Independence

Sometimes additional information changes the sample space under consideration. Conditional probability describes this change.

Definition: Conditional Probability

If , the probability of given that has occurred is

Rearranging this definition gives the multiplication rule

Example: Conditional Probability

One card is drawn from a well-shuffled standard deck. Let be the event that the card is an ace and the event that it is a spade. Given that the card is a spade, only the spades remain under consideration, and one of them is an ace. Thus,

Definition: Independent Events

Events and are independent if knowing that one occurred does not change the probability of the other. Equivalently,

If , this is equivalent to .

Warning: Mutually Exclusive vs. Independent

Mutually exclusive events cannot occur together. Independent events do not affect each other's probabilities. If two events have positive probability and are mutually exclusive, then they are not independent because their intersection has probability .

Example: Independent Trials

Flip a fair coin and roll a fair six-sided die independently. Let be the event of getting heads and the event of rolling a . Then

A Minimal Counting Rule

Suppose an experiment is repeated times. We call the occurrence of an event of interest on any trial a success. If we want exactly successes, those successes can occur in different positions within the sequence. For instance, two successes in five trials could occur in the first two trials, the first and third trials, and so on.

To determine the probability of exactly successes, we must account for every possible arrangement of those successes among the trials. The binomial coefficient counts these arrangements.

Definition: Binomial Coefficient

The binomial coefficient

counts the number of ways to choose positions from positions, where and are integers satisfying and . Here and .

Example: Two Successes in Five Trials

Suppose five trials contain exactly two successes. Write for success and for failure. Each arrangement is determined by choosing which two of the five positions contain the successes. Therefore,

so there are possible arrangements. For example, has successes in positions and .

Complements

Complements use the set-theoretic idea from Chapter 2: instead of counting outcomes in an event, we can sometimes count the outcomes not in it.

Definition: Complement

If is an event in sample space , then the complement of , denoted , is the set of all outcomes in that are not in :

The events and are mutually exclusive and together cover the entire sample space. Therefore,

so

A dashed sample space S containing event E, with its complement shown by diagonal hatching outside E.
Figure 15.4. An event and its complement split the sample space into two disjoint parts whose probabilities add to one.

Example: Complement of an Event

Roll a fair six-sided die and let

be the event of rolling an even number. Then the complement is the event of rolling an odd number:

Since ,

A dashed die sample space S with the even outcomes inside event A and the odd outcomes in the hatched complement.
Figure 15.5. The even outcomes lie in ; the odd outcomes lie in the diagonally hatched complement . Together, the two regions cover the sample space .

Empirical Probability

Theoretical probability depends on a model. In many real situations, however, the model may be unknown, too complicated, or not based on equally likely outcomes. In those cases, we can estimate probabilities from data by repeating or observing the experiment and recording how often the event occurs.

Definitions: Theoretical and Empirical Probability

These two terms distinguish model-based probabilities from data-based estimates.

Theoretical probability. A theoretical probability is computed from a mathematical model.

Empirical probability. An empirical probability is an estimate based on collected data. After trials, if the event occurs times, its relative frequency is

Note: Fractions, Decimals, Percentages, and Proportions

Probabilities are numbers between and . They can be written as fractions, decimals, or proportions on this scale.

To write the same quantity as a percentage, multiply the decimal by and add the percent sign. For example,

so is when written as a percentage.

A relative frequency is an observed proportion: it tells us what fraction of the trials produced an event. It can also be reported as a percentage by multiplying the proportion by .

Example: Empirical Probability with Two Coins

Suppose two distinguishable fair coins are tossed independently and we are interested in the event

meaning exactly one head and one tail.

The theoretical probability is

As a percentage, multiply by : , so this is .

If we perform the experiment times and observe or in of the trials, then the empirical probability is

As a percentage, multiply by : , so this is .

The empirical probability differs from the theoretical probability because it is based on a small number of trials.

Example: Theoretical and Empirical Probability

Consider drawing one card at random from a well-shuffled standard 52-card deck and recording whether the card is a queen.

The theoretical probability of drawing a queen is

which is about , so about .

If the experiment is repeated times, with the card replaced each time, and a queen is drawn times, then the empirical probability is

which is , so .

The Law of Large Numbers

Empirical probabilities can vary substantially when the number of trials is small. As the number of trials increases, they tend to stabilize near the theoretical probability.

Law: The Law of Large Numbers

The Law of Large Numbers states that, over many independent repetitions of the same experiment, the empirical probability of an event tends to approach its theoretical probability.

For repeated independent tosses of two distinguishable fair coins, the event has theoretical probability . Suppose the experiment is repeated many times:

Table 15.1. Empirical probability of one head and one tail over repeated trials.

Number of TrialsTimes ObservedEmpirical Probability
107
2013
3017
4022
5026

Notice that the empirical probability begins to approach the theoretical probability .

Running empirical probability of one head and one tail converging toward 0.5 over repeated two-coin tosses.
Figure 15.6. The running empirical probability for fluctuates but gradually stabilizes near the theoretical value .

The table and figure show the main idea of the law: the empirical probability can fluctuate from trial to trial, but over many repetitions it tends to move closer to the theoretical probability. This approach is not necessarily monotone: after an additional trial, the estimate can temporarily move farther away before later moving closer again.