Probability/Print version

From Wikibooks, open books for an open world
< Probability
Jump to navigation Jump to search



Probability theory provides a mathematical model for the study of randomness and uncertainty. Many important decisions, whether from business, government, science, recreation or even one's personal life must be made with incomplete information or some degree of uncertainty. Hence, a formalized study of uncertain or random outcomes occupies an important role in modern society. In situations where one of any number of possible outcomes may occur, the mathematical model of probability theory offers methods for quantifying the likelihoods associated with those outcomes. Probability also provides tools which allow us to move beyond simply describing the information contained within a set of data (descriptive statistics) to actually inferring further information from that data (inferential statistics). Many of the early attempts to model likelihood arose from games of chance. For a brief history of probability see this Wikipedia article.

Although probability theory is now a very formal branch of mathematics, the language of probability is often used informally in everyday speech. We express our beliefs about likelihoods of outcomes in situations involving uncertainty using intuition guided by our experiences and in some cases statistics. Consider the following examples:

  • Bill says "Don't buy the avocados here; about half the time, they're rotten". Bill is expressing his belief about the probability of an event — that an avocado will be rotten — based on his personal experience.
  • Lisa says "I am 95% certain the capital of Spain is Barcelona". Here, the belief Lisa is expressing is only a probability from her point of view, because only she does not know that the capital of Spain is Madrid (from our point of view, the probability is 100%). However, we can still view this as a subjective probability because it expresses a measure of uncertainty. It is as though Lisa is saying "in 95% of cases where I feel as sure as I do about this, I turn out to be right".
  • Susan says "There is a lower chance of being shot in Omaha than in Detroit". Susan is expressing a belief based (presumably) on statistics.
  • Dr. Smith says to Christina, "There is a 75% chance that you will live." Dr. Smith is basing this off of his research.
  • Nicolas says "It will probably rain tomorrow." In this case the likelihood that it will rain is expressed in vague terms and is subjective, but implies that the speaker believes it is greater than (or 50%). Subjective probabilities have been extensively studied, especially with regards to gambling and securities markets. While this type of probability is important, it is not the subject of this book. A good reference is "Degrees of Belief" By Steven Vick (2002).

Notice that in the previous examples the likelihood of any particular outcome is expressed as a percentage (between 0% and 100%), as is common in everyday language. However, probabilities in formal probability theory are always expressed as real numbers in the interval (e.g. a probability of .25 may be expressed as 25%, or a probability of may be expressed as approximately 31.83%). Other differences exist between common expressions of probabilities and formal probability theory. For example, a probability of 0% is typically taken to mean that the event to which that probability is assigned is impossible. However, in probability theory (usually in cases where there are infinitely many possible outcomes) an event ascribed a probability of zero may actually occur. In some situations, it is certain that such an event will occur (e.g. in selecting a real number between 0 and 1, the probability of selecting any given number is zero, but it is certain that one such number will be selected).

Another way to express the probability of an outcome is by its odds: the ratio of the probability of "success" (event occurs) to the probability of "failure" (event does not occur). In gambling odds are expressed as the ratio of the stakes risked by each participant in a wager. For instance: a bookmaker offering odds of 3 to 1 "against" a horse will pay a punter three times their stake (if the horse wins). In fact, the bookmaker (ignoring factors such as his potential need to "lay off" bets which are exposing him to the possibility of an unacceptable overall loss) is announcing that he thinks the horse has a chance of winning. If we express odds as "chance of winning": "chance of not winning", then 3 to 1 against would be represented as or . So an event with a probability of or 25% has odds of 33%. This disparity is even more clear where an event has a probability of 50% (e.g., the odds of a coin showing heads is 50%:50% = 1:1 or ).

Types of probability

As mentioned earlier, probability can be expressed informally in a variety of different ways, but even formal definitions and approaches vary. The most general and rigorous approach is known as axiomatic probability theory, which will be the focus of later chapters. Here we briefly discuss a few other approaches, their uses and limitations. All of these approaches rely in one way or another on the concept of an experiment. Recall that probability provides means to study randomness and uncertainty.

An experiment is any action or process whose outcome is subject to uncertainty or randomness.

Here the term experiment is used in a wider sense than its usual connotation with controlled laboratory situations. Further clarification on experiments will be given later, but for now the following examples of experiments will suffice:

  • observing whether or not a commercial product is defective.
  • tossing a coin one or more times or selecting a card from a card deck.
  • conducting a survey.
  • measuring the wind speed or rainfall in a particular area.

Assuming that an experiment can be repeated under identical conditions, then each repetition of an experiment is called a trial.

Basic Concepts

There are two standard approaches to conceptually interpreting probabilities: the relative frequency approach and the subjective belief (or confidence approach). In the Frequency Theory of Probability, probability is the limit of the relative frequency with which certain outcomes occur in repeated trials (note that the outcome of any single trial cannot depend on the outcome of other trials). The relative frequency approach requires that experiments be random and that all possible outcomes be known before execution of the experiment. The probability of any set of outcomes is expressed as the relative frequency with which those outcomes will occur among many repeated trials.

Physical probabilities fall within the category of objective or frequency probabilities, and are associated with random physical systems such as roulette wheels, rolling dice and radioactive atoms. In such systems, a given outcome (such as a die yielding a six) tends to occur at a persistent rate, or 'relative frequency', in a long run of trials. Physical probabilities either explain, or are invoked to explain these stable frequencies.

Relative frequency probabilities are always expressed as a figure between 0% (the outcome essentially never happens) and 100% (the outcome essentially always happens), or similarly as a figure between 0 and 1. According to the Frequency Theory of Probability, saying that "the probability that A occurs is p%" means that if you repeat the experiment many times under essentially identical conditions, the percentage of time for which A occurs will converge to p. For example, a 50% chance that a coin lands "heads up" means that if you toss the coin over and over again, then the ratio of times the coin lands heads to the total number of tosses approaches a limiting value of 50% as the number of tosses grows. Notice that the outcome of one toss never depends on another toss, and that the ratio of heads to total number of tosses is always between 0% and 100%.

In the Subjective Theory of Probability, probability measures the speaker's "degree of belief" that a set of outcomes will result, on a scale of 0% (complete disbelief that the event will happen) to 100% (certainty that the event will happen). According to the Subjective Theory, saying that "the probability that A occurs is " means that I believe that A will happen twice as strongly as I believe that A will not happen. The Subjective Theory is particularly useful in assigning meaning to the probability of outcomes that in principle can occur only once. For example, how might one assign meaning to the following statement: "there is a 25% chance of an earthquake on the San Andreas fault with magnitude 8 or larger before 2050"? It would be very hard to qualify this measure in terms of relative frequency.

One way to represent an individual's degree of belief in a statement, given available evidence, is with the Bayesian approach. Evidential probability, also called Bayesian probability, can be assigned to any statement whatsoever, even when no random process is involved. On most accounts evidential probabilities are considered degrees of belief, defined in terms of dispositions to gamble at certain odds. The primary evidential interpretations include the classical interpretation, the subjective interpretation, the epistemic or inductive interpretation, and the logical interpretation.

The next several sections discuss the principal theories within the relative frequency approach to probability.

Classical theory of probability

The classical approach to probability expresses probability as a ratio of the number of favorable outcomes in a series of successive trials to the number of total possible outcomes. Note the immediate implication that the number of total possible outcomes be known. Furthermore, all possible outcomes are assumed to be equally probably and no two possible outcomes can both result from the same trial. Here, the term "favorable" is not subjective, but rather indicates that an outcome belongs to a group of outcomes of interest. This group of outcomes is called an event, which will be formalized with the introduction of axiomatic probability theory.

Classical definition of probability
If the number of outcomes belonging to an event is , and the total number of outcomes is , then the probability of event is defined as .

For example, a standard deck of cards (without jokers) has 52 cards. If we randomly draw a card from the deck, we can think of each card as a possible outcome. Therefore, there are 52 total outcomes. We can now look at various events and calculate their probabilities:

  • Out of the 52 cards, there are 13 clubs. Therefore, if the event of interest is drawing a club, there are 13 favorable outcomes, and the probability of this event is .
  • There are 4 kings (one of each suit). The probability of drawing a king is .
  • What is the probability of drawing a king OR a club? This example is slightly more complicated. We cannot simply add together the number of outcomes for each event separately () as this inadvertently counts one of the outcomes twice (the king of clubs). The correct answer is from where this is essentially .

Classical probability suffers from a serious limitation. The definition of probability implicitly defines all outcomes to be equiprobable. While this might be useful for drawing cards, rolling dice, or pulling balls from urns, it offers no method for dealing with outcomes with unequal probabilities.

This limitation can even lead to mistaken statements about probabilities. An often given example goes like this:

I could be hit by a meteor tomorrow. There are two possible outcomes: I will be hit, or I will not be hit. Therefore, the probability I will be hit by a meteor tomorrow is .

Of course, the problem here is not with the classical theory, merely the attempted application of the theory to a situation to which it is not well adapted.

This limitation does not, however, mean that the classical theory of probability is useless. At many points in the development of the axiomatic approach to probability, classical theory is an important guiding factor.

Empirical or Statistical Probability or Frequency of occurrence

This approach to probability is well-suited to a wide range of scientific disciplines. It is based on the idea that the underlying probability of an event can be measured by repeated trials.

Empirical or Statistical Probability as a measure of frequency
Let be the number of times event occurs after trials. We define the probability of event as

It is of course impossible to conduct an infinite number of trials. However, it usually suffices to conduct a large number of trials, where the standard of large depends on the probability being measured and how accurate a measurement we need.

A note on this definition of probability: How do we know the sequence in the limit will converge to the same result every time, or that it will converge at all? The unfortunate answer is that we don't. To see this, consider an experiment consisting of flipping a coin an infinite number of times. We are interested in the probability of heads coming up. Imagine the result is the following sequence:


with each run of heads and tails being followed by another run twice as long. For this example, the sequence oscillates between roughly and and doesn't converge.

We might expect such sequences to be unlikely, and we would be right. It will be shown later that the probability of such a run is 0, as is a sequence that converges to anything other than the underlying probability of the event. However, such examples make it clear that the limit in the definition above does not express convergence in the more familiar sense, but rather some kind of convergence in probability. The problem of formulating exactly what this means belongs to axiomatic probability theory.

Axiomatic probability theory

Although axiomatic probability theory is often frightening to beginners, it is the most general approach to probability and has been employed in tackling some of the more difficult problems in probability. It begins with a set of axioms which, although not immediately intuitive, are guided by the more familiar classical probability theory. These axioms are discussed in the (as yet unwritten) following chapter.

About This Book

This book is going to discuss the topic of mathematical probability using Calculus and Linear Algebra. Readers of this book should have a good understanding of both those topics before attempting to read and understand this book completely.

The Counting Principle

The Counting Principle

Before we can delve into the properties of probability and odds, we need to understand the Counting Principle. We use the Counting Principle to determine how many different ways one can choose/do certain events. It is easier to define the Principle through examples:

Independent Events

Let's say that John is at a deli sub restaurant. There are 3 different breads, 3 different cheeses, 3 different condiments, and 3 different vegetables he can place on his sandwich, assuming that he can only place one from each category on to his sandwich. How many different ways can he set up his sandwich?

Since choosing a cheese doesn't affect the number of choices of vegetables, condiments, or bread, these events are called independent events. For this problem, we will multiply , so , which is 81. So there are 81 different possible combinations to form this sandwich.

Practice Problems

1) Thomas goes to a McDonalds' restaurant and chooses to create his own burger. He has 2 different kinds of cheese, 3 different breads, and 3 different sauces he can choose from, but he can only choose one of each category. How many different ways can he create this burger?

2) Diane is ordering pizza for her family. There are 4 different possible sizes of the pizza. Also, she has to choose one of 5 toppings to place on the pizza and one of 3 different types of cheese for the pizza. In addition, she must choose one of 3 different kinds of crust. How many different ways can she have her pizza?


a) How many 3-digit numbers can be formed from the digits 2, 3, 4, 5, 7 and 9?
b) How many of these numbers are less than 400?





a) Since there are six available digits, the answer is
b) For the value of the 3-digit number to be less than 400, we only have two choices for the first digit, namely 2 or 3. After that we can choose the other two digits freely. The answer is thus .

Dependent Events

Assume that John is now working at a library. He must put 5 books on a shelf in any order. How many different ways can he order the books on the shelf? Unlike the independent events, when John puts a book on the shelf, that eliminates one book from the remaining choices of books to put next on the shelf; thus these are referred to as dependent events. At first, he has 5 different choices, so our first number in the multiplication problem will be 5. Now that one is missing, the number is reduced to 4. Next, it's down to 3, and so on. So, the problem will be

However, there is a symbol for this very idea. A represents the term factorial. So, for example, . Factorials are very useful in statistics and probability.

Therefore, the problem can be rewritten as , which ends up being equal to 120.

However, not all dependent event problems are that simple. Let's say that there are 10 dogs at a dog competition. How many different ways can one select the Champion AND the Runner-Up? This problem could actually be considered simpler than the last one, but it doesn't involve a factorial. So, how many different ways can the judge determine the Champion? Of course, there are 10 different dogs, so 10 different ways. Next, how many dogs are left to select the Runner-Up from? Well, you removed one, so it's down to 9. Instead of placing a factorial, though, you will only multiply 10 and 9, resulting in 90.

Independent Or Dependent?

To help you differentiate between the two, we will do a few more examples, but we will have to decide if it is dependent or independent before solving the problem.

Let's say that you are creating a 5-digit garage door opener code (the digits would include 0-9). If there were absolutely no restrictions, would the events be independent of each other or dependent on each other? Of course, there are no restrictions, since you could have five 4's for the code, so to solve the problem, you multiply 10 by itself 5 times, resulting in 100000.

Alternatively, suppose that the first number of the code cannot be 0, and that there can be no repeated numbers whatsoever. Obviously these events are dependent on each other, because there cannot be any repetitions. Let's look at this problem one number at a time.

The first number can be all the numbers except 0, reducing the possible numbers to 9. The second number can be 0 this time, so the possible numbers returns to 10. However, it cannot be a repeat of the previous number, so there are 9 possible choices again. After that, the numbers will reduce by one each time, due to the fact that there cannot be repeats, so the problem would look like this

Now, just one more example. Let's say that you were choosing your schedule for school. There are 8 periods each day, and there are 7 classes to choose from. Nonetheless, you must have a lunch period during the 4th period. We can think of 4th period as non existent because it is in a constant position and therefore does not affect the possible choices. With 7 slots and 7 options, the answer is simply .

Review Of The Counting Principle

So, we use the Counting Principle to determine the different unique ways we can do something, such as a sandwich or a selection of classes. Sometimes, these events will affect each other, such as when you can't choose the same number twice for your garage door code, so they are dependent events. However, other times, one event has no effect on the next event, such as when you have different cheeses and breads to choose for your sandwich, so they are independent events. The Counting Principle is a fundamental mathematical idea and an essential part of probability.

Counting Rules

Rule 1: If any one of mutually exclusive and exhaustive events can occur on each of trials, there are different sequences that may result from a set of such trials.

  • Example: Number of possible sequences resulted from flipping a coin three times is .

Rule 2: If are the numbers of distinct events that can occur on trials in a series, the number of different sequences of events that can occur is .

  • Example: Number of possible sequences resulted from flipping a coin and roll a six-faced die is .

Rule 3: The number of different ways that distinguishable things may be arranged in order is , in which . An arrangement in order is called a permutation. The total number of permutations of objects is (the symbol Is called n-factorial).

  • Example: Number of possible ways to arrange 10 items in order is

Rule 4: The number of ways of selecting and arranging distinguishable objects from among distinct objects is: , or as seen on calculators, [nPr].

  • Example: Number of possible ways to pick 3 things from 10 items, and arrange them in order is .

Rule 5: The total number of ways of selecting distinct combinations of distinguishable objects, irrespective of order (i.e. order is NOT important), is: or as seen on calculators, [nCr].

  • Example: Number of possible ways to pick 3 items from 10 items irrespective of order is .

Probability Spaces


We will now proceed to develop a more axiomatic theory of probability, allowing for a simpler mathematical formalism. We shall proceed by developing the concept of a probability space, which will allow us to harness many theorems in mathematical analysis.

Recall that an experiment is any action or process with an outcome that is subject to uncertainty or randomness. A probability space or a probability triple is a mathematical construct that models an experiment and its set of possible outcomes.

Probability space

Before defining probability space, we define several terms used in its definition.

Definition. (Sample space) The sample space, denoted by , is the non-empty set whose elements are all possible outcomes of an experiment.


  • the sample space is often not unique, since there are often multiple ways to define the possible outcomes of an experiment, possibly because of the difference in expression [1]
  • alternative notations of sample space include and ( stands for 'universal set')
  • an outcome from the experiment is commonly denoted by (small letter of , omega)

Example. A sample space of the numbers coming up from rolling a six-faced dice is .

Definition. (Event) An event is a subset of the sample space.


  • it follows that the event space (it is power set of the sample space)
  • event consisting a single outcome (which is a singleton) is sometimes referred as simple event, and event consisting more than one outcomes is sometimes referred as compound event
  • an event is said to have happened or occurred if the outcome of the experiment is an element of the event

Example. are events from rolling a six-faced dice, while is not.

Definition. (Probability space) A probability space is a mathematical triplet consisting of the sample space , a set of events (or event space) , and a probability function .


  • there are multiple ways to define the probability functions, as we will see in the following sections, and among those definitions, the axiomatic definition is the most used, and general
  • the probability function is sometimes denoted by or instead
  • the notation is mainly used in this book to distinguish the probability function from other functions named or
  • a probability space is arbitrary, in the sense that its author ultimately defines which elements , , and will contain
  • the probability function may present a model for a particular class of real-world situations


Terminologies of set from set theory also apply to event, since event is essentially a set. Apart from those terminologies, we also have the following extra terminologies for event.

Definition. (Exhaustive) Events are exhaustive if .

Example. When we are rolling a six-faced dice, the events and are exhaustive, while the events and are not exhaustive.

Definition. (Partition) A group of events is a partition of if the events are both disjoint and exhaustive.

Example. When we are rolling a six-faced dice, the group of events and is a partition, while the group of events and is not a partition, since these events are not disjoint.

Probability definition

The remaining undefined item in the probability space is the probability function , and we will give various definitions of it, in which the combinatorial (or classical), and axiomatic definitions are important.

Definition. (Subjective probability) The probability of an event is a measure of the chance with which we can expect the event to occur. We assign a number between and inclusively to the probability of an event. A probability of means that we are certain the event will occur, and a probability of means that we are certain the event will not occur.

Example. Amy and Bob access their probabilities of winning the top prize from a lucky draw using the subjective probability approach.

  • Amy thinks that she is lucky, and thus assign 0.7 to the probability of winning the top prize
  • Bob thinks that he is unlucky, and thus assign 0.1 to the probability of winning the top prize


  • this illustrates a major problem of subjective probability, namely the probability assigned to an event is often not unique, due to different opinions from different people

Definition. (Combinatorial probability) Assume all outcomes in the sample space are equally likely. Then, the (combinatorial) probability of an event (say ) in the sample space is


  • it is also called classical probability
  • if the outcomes are not equally likely, we cannot apply this definition
  • by principle of indifference (or insufficient reason), unless there exists evidence showing that the outcomes are not equally likely [2], we should assume that the outcomes are equally likely
  • when the sample space contains infinitely many outcomes, the combinatorial probability is undefined

Example. The probability of getting the number 1 coming up from rolling a fair red six-faced dice and a fair blue six-faced dice is .

Proof. The number of pair of numbers coming up for the two dices is . Since the dice is fair, the 36 outcomes are equally likely, and so we can apply combinatorial probability here.



Suppose the blue dice is colored red. Calculate the probability again.

Example. (Capture-mark-recapture) We are fishing in a lake, containing fishes. First, we catch fishes from the lake (capture), and gave them each a marker (mark). Then, we catch fishes from the lake again (recapture), and catch (and also ) fishes this time. The probability that there is marked fishes in the fishes is .

Proof. We order the fishes in the lake notionally (e.g. by assigning them different number one by one), so that they are now distinguishable (notionally), then, we have:

  • : the number of outcomes of catching fishes from fishes
  • : the number of outcomes of catching marked fishes from marked fishes in the recapture process
  • : the number of outcomes of catching unmarked fishes from unmarked fishes in the recapture process (this ensure that we only catch marked fishes, by ensuring that the remaining caught fishes do not contain any marked fish)


Exercise. There are 9 balls in a box, consisting of 3 red balls, 2 blue balls and 4 green balls.

1 Calculate the probability that a red ball is drawn from the box if 1 ball is drawn from the box.

none of the above

2 Calculate the probability that 2 red balls and 3 green balls are drawn from the box if 6 balls are drawn from the box.

none of the above

3 orange balls are added to the box such that the probability that 2 red balls and 3 green balls are drawn from the box if 6 balls are drawn from the box is now . Calculate .

there exist such , and its value is none of the above
there does not exist such

4 Select the correct (in numerical value sense) expression(s) of the probability that red balls are drawn and blue balls are drawn if balls are drawn from the box (, and are of values such that all terms in the following are defined).

Definition. (Frequentist probability) The probability of an event or outcome is the long-term proportion of times the event would occur if the experiment was repeated independently many times. That is, letting be the no. of times that event occurs from repetitions of experiment, then the probability of is

Example. Suppose we throw a coin 1 million times (i.e. 1000000 times). The number of head coming up is 700102, the number of tail coming up is 299896, and the number of times that the coin lands on edge is 2.

Then, the probability that the head coming up is close to .

After that, we may infer that the coin is unfair.

Definition. (Axiomatic probability) A probability is a set function defined on the event space (). It assigns a real value to each event , with the following probability axioms satisified:

(P1) for each event , (nonnegativity)
(P2) (unitarity)
(P3) for each (countable) infinite sequence of mutually exclusive (or disjoint) events , (countable additivity)


  • mutually exclusive events means that the intersection of each two of the events is empty set

Example. Based on the probability axioms, the probability of an event is impossible to be -0.1.

Example. (Combinatorial probability is probability) Combinatorial probability is a probability since it satisfies all three probability axioms.


(P1) it follows from observing that the no. of outcomes is nonnegative
(P2) it follows from observing that the no. of outcomes in the event (which is a subset of sample space) cannot be larger than the no. of outcomes in the sample space
(P3) it follows from observing that the no. of outcomes in union of (infinite) disjoint sets is the same as the sum of no. of outcomes in each of the (infinite) disjoint sets (possibly through the Venn diagram, non-rigorously)

With these three axioms only, we can prove many well-known properties of probability.

Properties of probability

Basic properties of probability

Proposition. (Probability of empty set) .

Proof. Let for each positive integer . are mutually exclusive, since they are all empty sets, and the intersection of each two of them is also empty set. Also, . So,

By P1, . It follows that from these two inequalities that .

Proposition. (Extended P3) The property of probability in the third axiom of probability (P3) is also valid for a finite sequence of events.

Proof. For each positive integer , suppose that are disjoint events, and append to these the infinite sequence of events . By P3,

since .

Proposition. (Simplified law of total probability) For each event , .



Illustration of simplified law of total probability:

|  B\A    | <----- B
|    |----|-----|
|    |BnA |     |
|----|----|     | <---- A

Proposition. (Simplified inclusion-exclusion principle) For each event and , .

Proof. Since events and are disjoint, by extended P3,

since .

Illustration of simplified inclusion-exclusion principle:

|         | <----- B
| II |----|-----|
|    |AnB |     |
|----|----| I   | <---- A

Proposition. (Complement rule) For each event ,


Illustration of complement rule:

|               |
|      E^c      | <--- Omega (Pr(Omega)=1)
|    |---|      |
|    | E |      |
|    |---|      |

Proposition. (Numeric bound for probability) For each event , .

Proof. By P1, , and . So,

Proposition. (Monotonicity) If , then .

Proof. By simplified law of total probability,

Illustration of monotonicity: (when )

|               |
|               | <--- B 
|    |---|      |
|    | A |      |
|    |---|      |

Example. The probability of winning the champion in a competition is less than or equal to that of entering the final of the competition, by monotonicity.

Proof. Let and the event of winning the champion in the competition, and entering the final of the competition respectively. Then, , since (when we win the champion, then we must enter the final), and so .



Select all correct statement(s). All following capital letters are events.

If , then .
if and .
if .

More advanced properties of probability

Theorem. (Inclusion-exclusion principle)

Illustration of inclusion-exclusion principle when

For each event ,

Proof. We can prove this by induction.

Recall the simplified inclusion-exclusion principle, which is essentially the inclusion-exclusion principle when . So, we know that the inclusion-exclusion principle is true for , and it remains to prove the case with larger .

The idea of the induction is illustrated as follows: by simplified inclusion-exclusion principle,


  • we can write the inclusion-exclusion principle more compactly as follows:

  • an alternative and more elegant proof is provided in the chapter about properties of distributions
  • for the intersections of event, each possible distinct combination is involved

Example. When , for each event and ,



Select the correct expression(s) for for each event and .

Example. (Application of inclusion-exclusion principle) Among 160 students,

  • 40% has a major in mathematics
  • 55% has a major in statistics
  • 30% has a major in accounting
  • 20% has a major in statistics and accounting
  • 15% has a major in accounting and mathematics
  • 20% has a major in mathematics and statistics
  • 10% has a major in mathematics, statistics and accounting

The number of students that do not have any of these majors is

Proof. We can regard the percentage as combinatorial probability, since their definitions match (both are about proportion). Let be the event that a student among them has a major in mathematics, statistics and accounting respectively. Then,


Alternatively, we can consider the following Venn diagram:

|-------------| <--------- A
|             |
|        |----|----|
|        |    |    |
| 0.05   |0.05|0.15| <---- M
|        |    |    |
|        |0.1 |0.1 |      | 
| 0.1    |    |    | 0.25 | <---- S
|        |----|----|      |

We can from this diagram that , and then we can calculate the desired no.

The steps for constructing the above Venn diagram: [4]



1 Calculate the percentage of students that have at least two of those three majors.


2 Calculate the percentage of students that have one and only one major.



  • this example illustrates that we can apply inclusion-exclusion principle to the no. of outcomes in events
  • to be more precise, we can replace with in the inclusion-exclusion principle, for which is the no. of outcomes in the event

Lemma. For each event ,


Proposition. (Boole's inequality) For each event , .

Proof. First, by inclusion-exclusion principle, for each event and , .


Using the lemma,

Mathematical Review

The review of set theory contained herein adopts a naive point of view. We assume that the meaning of a set as a collection of objects is intuitively clear. A rigorous analysis of the concept belongs to the foundations of mathematics and mathematical logic. Although we shall not initiate a study of these fields, the rules we follow in dealing with sets are derived from them. A set is a collection of objects, which are the elements of the set.


If an element belongs to a set , we express this fact by writing . If does not belong to , we write . We use the equality symbol to denote logical identity. For instance, means that are symbols denoting the same object. Similarly, the equation states that are two symbols for the same set. In particular, the sets contain precisely the same elements. If are different objects then we write . Also, we can express the fact that are different sets by writing .

A set is a subset of if every element of is also contained in . We express this relation by writing . Note that this definition does not require to be different from . In fact, if and only if and . If and is different from , then is a proper subset of and we write .

There are many ways to specify a set. If the set contains only a few elements, one can simply list the objects in the set;

The content of a set can also be enumerated whenever has a countable number of elements,

Usually, the way to specify a set is to take some collection of objects and some property that elements of may or may not possess, and to form the set consisting of all elements of having that property. For example, starting with the integers , we can form the subset of S consisting of all even numbers

More generally, we denote the set of all elements that have a certain property by

The braces are to be read as the words "the set of" whereas the symbol | stands for the words "such that." It is convenient to introduce two special sets. The empty set, denoted by , is a set that contains no elements. The universal set is the collection of all objects of interest in a particular context, and it is denoted by . Once a universal set is specified, we need only consider sets that are subsets of . In the context of probability, is often called the sample space.

The complement of a set , with respect to the universal set , is the collection of all objects in that do not belong to ,

We note that .

Elementary Set Operations

Probability theory makes extensive use of elementary set operations. Below, we review the ideas of set theory, and establish the basic terminology and notation. Consider two sets .

Two sets.png

The union of sets is the collection of all elements that belong to or (or both), and it is denoted by . Formally, we define the union of these two sets by

Set Union.png

The intersection of sets is the collection of all elements that are common to both and . It is denoted by , and it can be expressed mathematically as

Set Intersection.png

When have no elements in common, we write . We also express this fact by saying that are disjoint. More generally, a collection of sets is said to be disjoint if no two sets have a common element. A collection of sets is said to form a partition of if the sets in the collection are disjoint and their union is .

Set Partition.png

The difference of two sets, denoted by or , is defined as the set consisting of those elements of that are not in ,

This set is sometimes called the complement of relative to , or the complement of in .

Set Difference.png

We have already looked at the definition of the union and the intersection of two sets. We can also form the union or the intersection of arbitrarily many sets. This is defined in the obvious way,

The index set I can be finite or even infinite.

Rules of Set Theory

Given a collection of sets, it is possible to form new ones by applying elementary set operations to them. As in algebra, one uses parentheses to indicate precedence. For instance, denotes the union of two sets , while represents the intersection of two sets .The sets thus formed are quite different.


Sometimes different combinations of operations lead to the same set. For instance, we have the two distributive laws

Two particularly useful equivalent combinations of operations are given by De Morgan's laws, which state that

These two laws can be generalized to

when multiple sets are involved. To establish the first equality, suppose that belongs to . Then is not contained in . That is, is not an element of for any . This implies that belongs to for all , and therefore . We have shown that . The converse inclusion is obtained by reversing the above argument. The second law can be obtained in a similar fashion.

Cartesian Products

There is yet another way to create new sets form existing ones. It involves the notion of an ordered pair of objects. Given sets , the cartesian product is the set of all ordered pairs for which is an element of and is an element of ,


Summary of Probability & Set Theory

  • [*if and only if and are mutually exclusive]
  • [*if and only if and are independent]
  • [*conditional]
Basic Set Theory

UNION: combined area of set , known as . The set of all items which are members of either or

  • Union of are added together
  • Some basic properties of unions:
  • , where
  • , if and only if

INTERSECTION: area where both overlap, known as . It represents which elements the two sets have in common

  • If , then A and B are said to be DISJOINT.
  • Some basic properties of intersections:
  • , if and only if
  • UNIVERSAL SET: space of all things possible, which contains ALL of the elements or elementary events.
  • is called the absolute complement of

Complement (set): 2 sets can be subtracted. The relative complement (set theoretic difference of and ). Denoted by (or ) is the set of all elements which are members of , but not members of

Some basic properties of complements ():

  • , and
  • Intersection --> AND – both events occur together at the same time
  • Union --> OR – everything about both events,
  • Complement --> NOT – everything else except (or the event in question)
  • (sample space)
  • (impossible event)

Union and Intersection are:



What is combinatorics?

See also: Set Theory/Sets, Wikipedia:Set-builder notation, and w:Combinatorics
Figure 1. Venn diagram to illustrate union, intersection, and universe.

Combinatorics involves the counting and enumeration of elements of sets and similar structures such as sequences and multisets. We begin by reviewing the properties of sets, as illustrated in the Venn diagram of figure 1, the integer 2 is both even and prime, while the integer 1 is not a prime number. Letting denote prime and denote even, the figure suggests that we define the two sets, , and If a set has a finite number of elements[5] that number is known as the set's cardinality. Hence the cardinality of and are 3 and 2, respectively. The intersection, and union, of our two sets is probably well known to most of our readers. The value in introducing students to set theory using Venn diagrams is that it is self evident that order is not important in defining the elements of a set. In roster notation, this equivalence can be expressed as,

Two other sets associated with figure 1 are worth mentioning. The universe can be defined as set of items that are under consideration within the context of any given discussion or analysis of a system. In figure 1, the box around suggests that the universe for this discussion should be Another important set is the empty set, which contains no elements whatsoever. The empty set can also be written as .

Figure 2. The dotted circles and ovals define the 8 elements of the power set of the set {1,2,3}.

Power set

The power set (or power set) of a set is the set of its subsets of , including the empty set and the set itself. The power set of the set t is illustrated in Figure 2. We denote the power set of as (or ).

Example. If , then


  • note that contains elements, while its power set contains elements
  • the generalization to the power set of a set with elements containing elements follows in the next section.
  • the empty set is often denoted by


Like a set, a sequence contains a possibly infinite number of elements (or members.) In contrast, with sets, the order (enumeration) is part of what defines a sequence. Sequences are written with parentheses instead of curly brackets , so that in contrast with the situation for set of (even) in Figure 1, these two sequences are not equal:

... or in string/word notation:

In computer science, a sequence consisting of characters is called a string. For that reason, it is often convenient to write sequences of characters as words (or strings.) For example, the sequence is more efficiently expressed as . Note that repetition plays an essential role in defining a sequence:
Example: While and are pronounced the same,


A multiset (or bag, or mset) combines the properties of a set and a sequence. Order (enumeration) is not important in defining a multiset, but repetition of elements is allowed. It is often convenient to denote multisets with square brackets Example: While represents the equality of two multisets, we have, for sequences (or in string notation.)

Fundamental Counting Principle

Theorem. (Fundamental counting principle) If trial has possible outcomes respectively, then the trials have possible outcomes.

Proof. First, consider the case for : we can enumerate each possible outcomes using ordered pair, as follows:

Then, we can count that there are possible outcomes (by considering the rows (or columns) one by one).

After establishing the case for , we can establish the case for positive integer inductively, e.g.:

then we can count that there are outcomes (by considering the rows (or columns) one by one), and we can prove the remaining cases inductively.


  • it is also known as multiplicative counting principle, or rule of product


Figure 3. In set theory, this is called the Cartesian product of two sets, with cardinality,

The tree diagram of Figure 3 illustrates this for , , and . The number of possible outcomes is



1 Determine the number of possible outcomes if and instead.

2 Suppose now. Given that the number of possible outcomes is still without changing other conditions given in the example, calculate .


  • this might be visualized by imagining a flip of three-sided die (with three outcomes, e.g. 1,2,3), followed by a flip of a two-sided coin (with two outcomes, e.g. A,B).

Counting the number of elements in a power set

Example. (Number of elements in a power set) The number of elements in a power set of set with elements is .

Proof. Consider the elements in one by one. For each of them, we can either include or do not include it in a subset of . Then, there are steps involved to construct a subset of , and each step has two outcomes. It follows from the multiplicative counting principle that the steps have outcomes. That is, there are possible (distinct) subsets of . Since power set contains all subsets of by definition, it follows that the power set has elements.



Determine the number of elements in (i.e. power set of empty set).

It is undefined.


  • is arbitrary nonnegative integer

The counting principle misused

Figure 4. The counting principle is not useful when the number of choices at each step is not unique.
Figure 5. The counting principle only applies if the outcomes are defined such that (i.e. order matters).

Figures 4 and 5 illustrate the fact that the counting principle is not always useful. Figure 4 calculates the ways the three integers can be added to five, if the integers are restricted to the set . Since these three integers are choices (decisions), it is convenient to label the choice indices with capital letters:

E.g., means the second choice is the integer 3.

We cannot apply the counting principle to figure 4 because depends on In our case, and and This leads us to an important caveat about using the counting principle:

  • the counting principle cannot be used if the number of outcomes at each step cannot be uniquely defined

Figure 5 exams two flips of a coin. It calculates the correct number of outcomes to be, but only if we carefully define the outcome. The counting principle is valid only if heads followed by a tails (HT) is a different outcome than tails followed by heads (TH). In other words:

  • when counting outcomes it is important to understand the role that order (enumeration) plays in defining outcomes

But, if we instead are counting the outcomes in a fashion such that HT and TH are considered to be the same, then a formula such as cannot be used:

  • the counting principle does not hold if two different decision paths lead to the same final outcome (in the theorem, we say 'trial ', which implicitly assumes that the order matters in the outcomes for the trials)

Example. Suppose we throw two six-faced dice, with colors red and blue respectively. The number of possible distinct pairs of number facing up is .

Proof. Since the dice are distinguishable, we can use multiplicative principle of counting. To be more precise, we can let the possible numbers facing up of red dice to be the possible outcomes in 'trial 1', and that of blue dice to be the possible outcomes in 'trial 2'. Since each trial has six outcomes, it follows that the number of outcomes (i.e. possible distinct pairs) is .



Suppose the red dice becomes a blue dice, such that the two dices are not distinguishable anymore. Calculate the number of possible distinct pairs of number facing up.

Number of ways to select some objects from distinguishable objects

In this section, we will discuss number (no.) of ways to select some objects from distinguishable objects, in four types, classified by whether the selection is ordered, and whether the selection is with replacement.

Before discussing these four types of selection, we will introduce some preliminary mathematical concepts used in the following.

Preliminary mathematical concepts

Definition. (Factorial) For each nonnegative integer , the factorial of , denoted by , is

More generally, we have gamma function.

Definition. (Gamma function) The gamma function is

in which .

Proposition. (Relationship between gamma function and factorial) For each nonnegative integer , .

Proof. Using integration by parts,

for each nonnegative integer .


  • the infinity in the proof is in limit sense, so '' is sort of abuse of notations

Theorem. (Binomial series theorem) For each real number ,

in which .


  • special case:
  • special case:

Definition. (Binomial coefficient) The binomial coefficient, indexed by nonegative integers and such that , denoted by , is .

When is an integer, the binomial series theorem reduces to a special case of binomial theorem:

Binomial theorem

Theorem. (Binomial theorem) For each nonegative integer ,

Proof. It can be proved combinatorially or inductively. Complete proof is omitted.


  • binomial series theorem is more useful than binomial theorem in this chapter

The binomial theorem can be illustrated by Pascal's triangle:

Ordered selection without replacement

Theorem. The no. of ways for ordered selection of objects from distinguishable objects without replacement is .

Proof. Consider an equivalent situation: selecting objects from distinguishable objects to be put into ordered boxes, labelled box , in which each box contains at most one object. By considering the boxes from box to box ,

  • for box , there are choices of object to be put into it
  • for box , there are choices of object to be put into it, since the object put into box cannot be simultaneously put into box
  • ...
  • for box , there are choices of object to be put into it, since each of the objects put into box cannot be simultaneously put into box

Thus, by multiplicative principle of counting, the desired no. of ways is


  • the unordered selection without replacement is also known as combination
  • sometimes, is read as '-choose-'

Example. The no. of distinct ways to select objects to be put into boxes, labelled and from objects, labelled and is



1 After putting the objects into the boxes, of them are taken out and put into boxes, labelled and . Calculate the no. of distinct ways to do this.

2 Continue from previous question. Suppose only of them is taken out and put into box, labelled , now. Calculate the no. of distinct ways to do this.

Example. (Competition) There are candidates for a competition. The no. of ways to award winner, 1st and 2nd runners-up is

If, Amy and Bob are among the candidates, and it is given that Amy is awarded 1st runner-up, while Bob does not receive any award, the no. of ways to award winner, 1st and 2nd runners-up becomes . In particular, Amy and Bob cannot be awarded winner or 2nd runner-up.



1 Suppose Chris is also among the candidates. Given that Amy, Bob and Chris receive an award from the competition, calculate the no. of ways to award winner, 1st and 2nd-runners up.

2 Continue from previous question. Given that Amy, Bob and Chris do not receive any award from the competition, calculate the no. of ways to award winner, 1st and 2nd-runners up.

A special case of ordered selection without replacement is when the no. of selected objects equals the no. of objects to be selected. In this case, this selection is called permutation, and the no. of ways for permutation of objects (i.e. ordered selection of objects from objects) is .


Figure 6. 3!=3·2·1= 6 permutations of {1,2,3}.

The 6 ways to permute the string 123 are shown in Figure 6.

Unordered selection of distinguishable objects without replacement

Theorem. The no. of ways for unordered selection to select objects from distinguishable objects without replacement is .

Proof. There are two ways to prove this.

First, consider an equivalent situation: selecting objects from distinguishable objects without replacement to be put into one box [6]. Then, we consider the no. of ways to do this in order, and then remove some ways that are regarded to be the same for unordered selection (i.e. regarded as the same when we put the objects into one box). The no. of ways to do this in order is (choice means the th selection of objects to be put into the box)

Among these ways, putting the same objects into the box in different orders counts as different ways, and we need to merge them together, into one way. To merge them, we consider how many different ways are counted for putting the same objects into the box in different orders. Indeed, this is permutation (ordered selection of objects from distinguishable objects), so the no. of different ways is . So, we count extra times of no. of ways (i.e. scale up the no. of ways by a factor ) , and thus we need to scale down the no. of ways, by dividing the no. by . Thus, the desired no. of ways is .

Second, we use the notion of generating function, by encoding the selection process into a binomial series, and then use the coefficients to determine the desired no. of ways. To be more precise, recall a special case of binomial series theorem:

By encoding each selection to each of , through treating the and in the th as not selecting the object and selecting the object respectively, the coefficient of is the desired no. of ways, since it is the no. of ways to build , through selecting in 's, and selecting in other 's (i.e. selecting objects, regardless of the order). Thus, the desired no. of ways is .


Figure 8: is shown for and The dotted ellipses remind us that these are sets, where order is not important.

For combination, the order in which the items are selected are not important, so each selection from a set can be regarded as a subset of the original set. Figure 8 illustrates for the set The number of elements in this set is From our earlier discussion of the power set, we know that the total number of subsets is . All 8 subsets are shown in the figure, organized by how many items are in each subset (for example, the subset in the upper-left corner contains 3 elements, while all subsets with 2 elements occupy the lower-right corner.) Let denote the number of elements "chosen" to be in each of the 8 subsets of set (where the number of elements in is, .)

  • set has elements. It is the empty set: .
  • sets have element. They are ,,and .
  • sets have elements. They are ,,and .
  • set has elements. It is the set itself: .


Figure 9: combinations.

No. of ways to select objects from distinguishable objects without considering the order is

Example. (Competition) There are candidates for a competition. The no. of ways to select candidates to enter final is



1 Amy, Bob and Chris are among the candidates. Calculate the no. of ways to select them to enter final.

2 Continue from the previous question. Calculate the no. of ways to select candidates other than Amy, Bob and Chris to enter final.

Special cases worth remembering

The formula for counting combinations has special cases that are worth remembering:

(There is only one way to pick no thing and only one way to pick all things.)
(there are n ways to pick one thing or to leave one thing out)
(There are the same number of ways of picking of things as there are of leaving out of things)

Ordered selection of distinguishable objects with replacement

Theorem. The no. of ways for selecting objects from distinguishable objects in order, with replacement is .

Proof. Consider the equivalent situation: selecting objects from types of objects, in which each type of the objects has unlimited stock, to be put into ordered boxes (the same object may be selected more than once). Then, the no. of ways is , since for each box, there are types of objects that can be selected to be put into it.


  • can be greater than

Example. (Setting password) The number of ways to set a password with characters, with the following rules:

(R1) numbers are allowed
(R2) alphabets