FA17 Lecture 4

From CS2800 wiki

Lecture 4: probability

  • Reading: Peter Cameron's Notes on Probability [[../handouts/cameron_prob_notes.pdf#page=9|1.1–1.4]]
  • [[../../2017sp/lectures/lec12-probability.html|Last semester]]
  • Definitions
    • Probability space, sample space, probability measure, event, outcome
  • examples of modeling experiments as sample spaces
    • one die, sum of two dice, height of people
  • basic properties of probability spaces
    • probability of complement, probabilities ≤ 1


  • If [math]A [/math] and [math]B [/math] are sets, then [math]A \cap B [/math] (read "[math]A [/math] intersect [math]B [/math]") is the set of all elements that are both in [math]A [/math] and in [math]B [/math]. [math]A \cup B [/math] (read "[math]A [/math] union [math]B [/math]") is the set of all elements in either [math]A [/math] or [math]B [/math]. [math]A \setminus B [/math] (read "[math]A [/math] minus [math]B [/math]") is the set of elements in [math]A [/math] that are not in [math]B [/math].
  • We say that [math]A [/math] is a subset of [math]B [/math] (written [math]A \subseteq B [/math]) if every element of [math]A [/math] is also in [math]B [/math]. Note that [math]\emptyset \subseteq A [/math] for any [math]A [/math] (because everything in the empty set is also in [math]A [/math]) and [math]A \subseteq A [/math] (since every element of [math]A [/math] is also in [math]A [/math]).
  • If [math]A [/math] is a set, the power set of [math]A [/math] (written [math]2^A [/math]) is the set of all subsets of [math]A [/math]. For example, [math]2^{\{a,b\}} = \{\emptyset, \{a\}, \{b\}, \{a,b\}\} [/math].


A probability space is a set [math]S [/math] (called the sample space) paired with a function [math]Pr : 2^S → \mathbb{R} [/math], satisfying:

  1. for all [math]E \subseteq S [/math], [math]Pr(E) \geq 0 [/math].
  2. [math]Pr(S) = 1 [/math].
  3. If [math]E_1 [/math] and [math]E_2 [/math] are disjoint, then [math]Pr(E_1 \cup E_2) = Pr(E_1) + Pr(E_2) [/math].

[math]Pr [/math] is called the probability function or probability measure.

The elements of [math]S [/math] are called outcomes; the subsets of [math]S [/math] are called events. Thus the probability measure assigns a (non-negative) real number to every event.

Important: The probability of [math]E [/math] is not [math]|E|/|S| [/math]. This is true for some probability spaces, but not all. Assuming that [math]Pr(E) = |E|/|S| [/math] will lead to incorrect answers for most problems.


To model the throw of a single six-sided die, we could choose the sample space [math]S = \{1, 2, \dots, 6\} [/math]. If we wanted to assume that all outcomes were equally likely, we could define [math]Pr(E) = |E|/6 [/math], but this is only one possible definition; we could certainly model a die with different likelihoods for different sides, which would give a different function.

There are many ways to model a throw of two dice. On possible sample space is

[math]S_1 = \{1, 2, 3, \dots, 12\} [/math]

Another possible sample space is [math]S_2 = N \times N [/math] where [math]N = \{1,2,\dots,6\} [/math].

There are a few things that determine a good choice:

  • there should be enough outcomes to describe the experiments we are interested. For example, the first sample space wouldn't allow us to ask "what is the probability that both dice are even?")
  • it's nice to model the problem in a way that makes the probability function easy to write down. With [math]S_1 [/math], writing down the probabilities is non-trivial, whereas it is easier to write down the probability function for [math]S_2 [/math] if both dice are fair.

Another example: suppose we wanted to perform an experiment by selecting a student from the room uniformly at random and sampling their height. Possible sample spaces include:

  • [math]\mathbb{R} [/math]
  • some subset of [math]\mathbb{R} [/math], such as the positive reals, or the set of numbers having somebody in the room with that height
  • the set of people in the room.

Again, these are all perfectly reasonable ways to model the experiment (they will of course have different probability functions). However, some of them make it easier to write down the probability function.

Properties of probability spaces

Everything else that we know about probability is derived from the definition. Here are some examples:

Notation: if there is a sample space that is clear from context, I will write [math]\bar{E} [/math] (read "[math]E [/math] complement") for [math]S \setminus E [/math].

Claims about probability all assume that [math]S [/math] and [math]Pr [/math] form a probability space; I will not explicitly write this down.

Claim: [math]Pr(E) + Pr(\bar{E}) = 1 [/math] (alternatively, [math]Pr(\bar{E}) = 1 - Pr(E) [/math]).

Proof: By above, [math]E [/math] and [math]\bar{E} [/math] are disjoint, so [math]\begin{aligned} Pr(E) + Pr(\bar{E})

&= Pr(E \cup \bar{E}) && \text{by rule 3} \\
&= Pr(S)              && \text{since \lt math\gt E \cup \bar{E} = S
[/math]} \\

&= 1                  && \text{by rule 2} \\


Claim: For all [math]E [/math], [math]Pr(E) \leq 1 [/math].

Proof: For the sake of contradiction, suppose there were some [math]E [/math] with [math]Pr(E) \gt 1 [/math]. By rule 2, we know [math]Pr(\bar{E}) \geq 0 [/math]. Adding these inequalities together, we see that [math]Pr(E) + Pr(\bar{E}) \gt 1 + 0 = 1 [/math]. But by the previous claim, we know that [math]Pr(E) + Pr(\bar{E}) = 1 [/math]; this is a contradiction.

Aside: proving facts about sets

Occasionally I assert properties of sets. For example, above we used the fact that if [math]E \subseteq S [/math], then [math]E \cup (S \setminus E) = S [/math].

On your homework, you may assert these kinds of properties without proof as long as:

  1. They are clearly stated.
  2. They are true
  3. They do not trivialize the problem

For example, if asked to prove that [math]A \cap (B \cup C) = (A \cap B) \cup (A \cap C) [/math], it is not enough to say "this is obvious", but it is fine to say that this is obvious in the context of another proof.

To show you how such a proof would go, I gave the following example:

Claim: If [math]E \subseteq S [/math] then [math]E \cup (S \setminus E) = S [/math].

Proof: We must show that if [math]x [/math] is in the left hand side, then it is in the right hand side, and vice-versa; this is what it means for two sets to be equal.

First, choose an arbitrary [math]x \in E \cup (S \setminus E) [/math]. By definition of [math]\cup [/math], either [math]x \in E [/math] or [math]x \in S \setminus E [/math]. In the former case, since [math]E \subseteq S [/math], we see that [math]x \in S [/math], while in the latter case, [math]x \in S [/math] because [math]S \setminus E [/math] is the set of elements of [math]S [/math] that don't appear in [math]E [/math]. In either case, [math]x \in S [/math], completing the proof in this direction.

For the other direction, assume [math]x \in S [/math]. Then either [math]x \in E [/math] or [math]x \notin E [/math]. In the former case, [math]x \in E \cup (S \setminus E) [/math] by definition of [math]\cup [/math]. In the latter case, by definition of [math]\setminus [/math], we see that [math]x \in S \setminus E [/math], so that [math]x \in E \cup (S \setminus E) [/math], again by definition of [math]\cup [/math]. In either case, [math]x [/math] is in [math]E \cup (S \setminus E) [/math], completing the proof in this direction.

Here is another example:

Claim: [math]E \cap (S \setminus E) = \emptyset [/math].

Proof: by contradiction. Suppose [math]E \cap (S \setminus E) \neq \emptyset [/math]. Then there exists some [math]x \in E \cap (S \setminus E) [/math]. By definition of [math]\cap [/math], we see [math]x \in E [/math] and [math]x \in S \setminus E [/math]. By definition of [math]\setminus [/math], we see that [math]x \notin E [/math], but this contradicts the fact that [math]x \in E [/math].