Loading…

STAT410: Intro to Probability Theory

Yuval Amit

Instructor: Mestiyage D. Gunatilleka · Fall 2026

Preface

These notes were taken during lectures of STAT410: Intro to Probability Theory in the fall 2026 semester at the University of Maryland. The primary purpose of these notes is to act as a reference for material covered in lecture for me and my fellow students.

I cannot promise that these notes do not contain errors, and on the contrary there may be various problems ranging from small typos to (rarely) real mathematical flaws. Obviously, I am responsible for all such errors, and not the lecturer. Using these notes as a reference outside of the context of this course should be done cautiously.

Some links:

1 Probability: The Mathematical Study of Uncertainty

Definition1.1

A probability space (Ω,F,𝑃) is composed of

(i)
The sample space Ω. It contains all possible outcomes of the “experiment”.
(ii)
The event space F consisting of events. An event is a collection of outcomes.
(iii)
The probability measure 𝑃: F→ ℝ.

Example 1.2. Toss a fair coin. This has the sample space Ω:= {𝐻,𝑇}, the event space F= ℙ(Ω), and the probability measure 𝑃: F→ ℝ given by

𝑃({𝐻})=1/2,𝑃({𝑇})=1/2,𝑃(∅)=0,𝑃({𝐻,𝑇})=1

Example 1.3. Roll a fair dice. This has the sample space Ω= {1,…,6}, the event space F= ℙ(Ω). Note that F is too big to succinctly write what the probability measure 𝑃 does. More on this later.

Example 1.4. Pick a number uniformly at random from [0,1]. Here, Ω= [0,1]. We pretend that F= ℙ([0,1]), but in reality F⊊ ℙ(Ω). Again, we can’t explicitly write what 𝑃 does.

Definition1.5

We define the following axioms for the event space F:

1.
∅∈ F and Ω∈ F.
2.
If 𝐴∈ F, then 𝐴𝑐∈ F.
3.
If {𝐴𝑖} is a sequence of events in F, then ⋃𝐴𝑖∈ F.

This is the definition of a term𝜎-algebra.

Remark 1.6. If 𝐴1,…,𝐴𝑛∈ F, then ⋃𝑛𝑖=1𝐴𝑖∈ F.

Proof. Let 𝐴𝑖= ∅ for all 𝑖> 𝑛. Then, we know ⋃𝑛𝑖=1𝐴𝑖= ⋃∞𝑖=1𝐴𝑖∈ F

Proposition1.7

If {𝐴𝑖} is a sequence of events in F, then ⋂𝐴𝑖∈ F.

Proof.

∞⋂𝑖=1𝐴𝑖=(∞⋃𝑖=1𝐴𝑐𝑖)𝑐∈F

by axiom 2, 3, and De Morgan’s law.

Definition1.8

We define the following axioms for the probability measure 𝑃:

1.
𝑃(∅)= 0 and 𝑃(Ω)= 1.
2.
For any 𝐴∈ F, 𝑃(𝐴)≥ 0.
3.
(Countable additivity) If {𝐴𝑖} is a sequence of pairwise-disjoint events, then
𝑃(∞⋃𝑖=1𝐴𝑖)=∞∑𝑖=1𝑃(𝐴𝑖)

Example 1.9. Let Ω= {1,…,6} be the sample space for rolling a fair dice, and F= ℙ(Ω). Recall that 𝑃(Ω)= 1, and moreover

Ω={1}⊔{2}⊔⋯⊔{6}.

Thus,

1=𝑃(Ω)=6∑𝑖=1𝑃({𝑖}).

By the assumption that the dice is fair, we know 𝑃({𝑖})= 𝑃({𝑗}), hence 𝑃({𝑖})= 1/6 for all 𝑖∈ {1,…,6}.

Example 1.10. Suppose Ω= [0,1], and for any subinterval 𝐼⊂ [0,1], 𝑃(𝐼)= length of 𝐼. What is the probability you see a rational number? An irrational number?

Note that for any 𝑥∈ [0,1], 𝑃({𝑥})= 0 since {𝑥} can be considered a closed interval with length 0. Thus, since ℚ is countable, it follows that

𝑃(ℚ∩[0,1])=0,𝑃((ℝ∖ℚ)∩[0,1])=1
Proposition1.11

𝑃(𝐵𝑐)=1−𝑃(𝐵)

2 Continuity of Probability Measures

Let 𝐵1⊃ 𝐵2⊃ ⋯ be a decreasing sequence of sets. Then, we write

lim𝑛→∞𝐵𝑛=𝐵=∞⋂𝑖=1𝐵𝑖,

which is the greatest lower bound, or the infimum.

Theorem2.1

The probability measure 𝑃 commutes with limits. That is, given an ascending sequence 𝐶1⊂ 𝐶2⊂ ⋯,

𝑃(∞⋃𝑛=1𝐶𝑛)=𝑃(lim𝑛→∞𝐶𝑛)=lim𝑛→∞𝑃(𝐶𝑛)

Proof. Let 𝐷1= 𝐶1, 𝐷2= 𝐶2− 𝐶1, and generally 𝐷𝑖+1:= 𝐶𝑖+1− 𝐶𝑖. Then, observe

∞⋃𝑖=1𝐶𝑖=∞⋃𝑖=1𝐷𝑖,

hence

𝑃(⋃𝐶𝑖)=𝑃(⋃𝐷𝑖).

Moreover, since the 𝐷𝑖’s are pairwise disjoint, one shows that

𝑃(𝐷𝑖+1)=𝑃(𝐶𝑖+1)−𝑃(𝐶𝑖),

hence

𝑛∑𝑖=1𝑃(𝐷𝑖)=𝑃(𝐶𝑛).

Thus,

𝑃(∞⋃𝑖=1𝐶𝑖)=𝑃(∞⋃𝑖=1𝐷𝑖)=∞∑𝑖=1𝑃(𝐷𝑖)=lim𝑛→∞𝑛∑𝑖=1𝑃(𝐷𝑖)=lim𝑛→∞𝑃(𝐶𝑛)

as desired.

3 Inclusion-Exclusion Principle

Inclusion-Exclusion Principle3.1

𝑃(𝐴∪𝐵)=𝑃(𝐴)+𝑃(𝐵)−𝑃(𝐴∩𝐵)

Proof. Observe

𝑃(𝐴∪𝐵)=𝑃(𝐴∪(𝐵−𝐴))=𝑃(𝐴)+𝑃(𝐵−𝐴).

Moreover,

𝑃(𝐵)=𝑃(𝐴∩𝐵)+𝑃(𝐵−𝐴)⟹𝑃(𝐵−𝐴)=𝑃(𝐵)−𝑃(𝐴∩𝐵),

thus

𝑃(𝐴∪𝐵)=𝑃(𝐴)+𝑃(𝐵)−𝑃(𝐴∩𝐵).
Corollary3.2

𝑃(𝐴∪𝐵∪𝐶)=𝑃(𝐴)+𝑃(𝐵)+𝑃(𝐶)−𝑃(𝐴∩𝐵)−𝑃(𝐵∩𝐶)−𝑃(𝐴∩𝐶)+𝑃(𝐴∩𝐵∩𝐶)
Proposition3.3

𝑃(𝑛⋃𝑖=1𝐴𝑖)≤𝑛∑𝑖=1𝑃(𝐴𝑖)𝑃(∞⋃𝑖=1𝐴𝑖)≤∞∑𝑖=1𝑃(𝐴𝑖)
Proposition3.4

If 𝐴⊂ 𝐵, then 𝑃(𝐴)≤ 𝑃(𝐵).

4 Intro to Random Variables

Definition4.1

A random variable is a (measurable) function 𝑋: Ω→ ℝ.

Definition4.2

The cumulative distribution function, abbreviated cdf, is

𝐹𝑋(𝑎):=𝑃(𝑋≤𝑎)=𝑃(𝑋∈[−∞,𝑎]).

Now, suppose 𝑋 takes countably many values, i.e. {𝑋(𝜔)∣ 𝜔∈ Ω} is countable. A probability mass function, abbreviated pmt, is a function 𝑝𝑋 such that there’s sequence of real numbers {𝑥𝑛} with 𝑝𝑋(𝑥𝑛)= 𝑃(𝑋= 𝑥𝑛)> 0 for all 𝑛, and 𝑝𝑋(𝑥)= 𝑃(𝑋= 𝑥)= 0 for all other 𝑥.

Example 4.3. Any experiment with finitely many outcomes 𝑋 is called a discrete random variable. Then, 𝑃𝑋(𝑥) is the probability mass function of 𝑋. The set where 𝑃𝑋(𝑥)> 0 is called the support.

For any set 𝐵, we have

𝑃(𝑥∈𝐵)=∑𝑥∈supp⁡(𝑋)∩𝐵𝑝𝑋(𝑥).
Definition4.4

A random variable 𝑋 is said to be (absolutely) continuous if there exists a function 𝑓𝑋(𝑥) such that 𝑓𝑋(𝑥)≥ 0, and for any interval 𝐼= [𝑎,𝑏],

𝑃(𝑥∈𝐼)=∫𝑏𝑎𝑓𝑋(𝑥)𝑑𝑥

5 Conditional Probability

Question 5.1. Does knowing 𝐴 has taken place affect our chances of seeing 𝐵?

Definition5.2

Let 𝐴,𝐵 be events. Then, the probability of 𝐵 given 𝐴 is denoted 𝑃(𝐵|𝐴).

Theorem5.3

𝑃(𝐵|𝐴)=𝑃(𝐴∩𝐵)𝑃(𝐴)

Proof. We can give a frequentist proof with

𝑃(𝐵|𝐴)=lim𝑛→∞#𝐴,𝐵 both take place𝑛#𝐴 takes place𝑛=𝑃(𝐴∩𝐵)𝑃(𝐴).

Example 5.4. An experiment consists of tossing a fair coin, followed by rolling a fair D6 if you see heads, and rolling a fair D4 if you see tails. What is the probability that you see heads and two?

If 𝐴= coin is heads and 𝐵= dice is two, then our probability is

𝑃(𝐴∩𝐵)=𝑃(𝐴)⋅𝑃(𝐵|𝐴)=12⋅16=112.
Theorem5.5

𝑃′(𝑋):= 𝑃(𝑋|𝐴) is a probability measure. However, 𝑃″(𝑋):= 𝑃(𝐵|𝑋) is not a probability measure.

Law of Total Probability5.6

Let 𝐴1,…,𝐴𝑛 partition Ω. and 𝑃(𝐴𝑖)> 0 for all 𝑖. Then,

𝑃(𝐵)=∑𝑖∈𝐼𝑃(𝐵|𝐴𝑖)𝑃(𝐴𝑖)

This also holds for countable partitions.

Bayes’ Theorem5.7

Suppose 𝐴1,…,𝐴𝑛 partition Ω, and 𝑃(𝐴𝑖)> 0. Suppose further that 𝐵 is an event with 𝑃(𝐵)> 0. Then, for any 𝑗∈ {1,…,𝑛},

𝑃(𝐴𝑗|𝐵)=𝑃(𝐵|𝐴𝑗)𝑃(𝐴𝑗)∑𝑛𝑖=1𝑃(𝐵|𝐴𝑖)𝑃(𝐴𝑖),

as desired.

Proof. By Theorem 5.3,

𝑃(𝐴𝑗|𝐵)=𝑃(𝐴𝑗∩𝐵)𝑃(𝐵),

and by the law of total probability

𝑃(𝐴𝑗∩𝐵)𝑃(𝐵)=𝑃(𝐴𝑗∩𝐵)∑𝑛𝑖=1𝑃(𝐵|𝐴𝑖)𝑃(𝐴𝑖)=𝑃(𝐵|𝐴𝑗)⋅𝑃(𝐴𝑗)∑𝑛𝑖=1𝑃(𝐵|𝐴𝑖)𝑃(𝐴𝑖)

Example 5.8. The prevalence of a particular disease is 1%. A rapid test for this disease has a 2% false positive rate, and a 3% false negative rate. If the test comes up positive, how likely is it that you have the disease?

Solution. Let 𝐷 be the event that you have the disease, and 𝑇 be the event that you tested positive. Then,

𝑃(𝐷)=0.01,𝑃(𝑇|𝐷𝑐)=0.02,𝑃(𝑇𝑐|𝐷)=0.03.

By Bayes’ Theorem,

𝑃(𝐷|𝑇)=𝑃(𝑇|𝐷)𝑃(𝐷)𝑃(𝑇|𝐷)𝑃(𝐷)+𝑃(𝑇|𝐷𝑐)𝑃(𝐷𝑐)=(1−0.03)⋅0.01(1−0.03)⋅0.01+0.02⋅(1−0.01)=0.3288

◻

6 Independence

Definition6.1

Events 𝐴 and 𝐵 are said to be independent of 𝑃(𝐴∩ 𝐵)= 𝑃(𝐴)𝑃(𝐵).

Theorem6.2

Let 𝐴,𝐵 be events with 𝑃(𝐴),𝑃(𝐵)> 0. If they are independent, they cannot be disjoint.

Proof. 𝑃(𝐴∩ 𝐵)= 𝑃(𝐴)𝑃(𝐵)> 0.

Theorem6.3

For any events 𝐴1,…,𝐴𝑛 with 𝑃(𝐴𝑖)> 0,

𝑃(𝑛⋂𝑖=1𝐴𝑖)=𝑃(𝐴𝑛|𝑛⋂𝑖=1𝐴𝑖)𝑃(𝐴𝑛−1|𝑛−2⋂𝑖=1𝐴𝑖)⋯𝑃(𝐴1).

Example 6.4. An experiment consists of tossing a fair coin until you see heads for the first time, at which point the experiment terminates. Let 𝐴𝑖 be the event you see tails on the 𝑖’th toss. Are the 𝐴𝑖’s independent? What is the probability we see heads for the first time on the 𝑛’th toss?

No, the 𝐴𝑖’s are not independent. Next, let 𝐵𝑛 be the event that heads is seen on the 𝑛’th toss. Then,

𝐵𝑛=𝐴1∩𝐴2∩⋯∩𝐴𝑛−1∩𝐴𝑐𝑛.

Therefore,

𝑃(𝐵𝑛)=𝑃(𝐴𝑐𝑛|𝑛−1⋂𝑖=1𝐴𝑖)⋅𝑛−1∏𝑘=1𝑃(𝐴𝑘|𝑘−1⋂𝑖=1𝐴𝑖)=(1/2)𝑛.

Exercise 1. If 𝐴,𝐵 are independent, show that 𝐴,𝐵𝑐 are independent.

7 Random Variables

Definition7.1

For a random variable 𝑋, and a (measurable) 𝐴⊂ ℝ, we define the distribution 𝐷𝑋 to be

𝐷𝑋(𝐴)=𝑃(𝑋∈𝐴)

Now, given a random variable 𝑋: Ω→ ℝ, we have

𝐷𝑋(𝐴)=𝑃(𝑋∈𝐴)=𝑃({𝜔|𝑋(𝜔)∈ℝ}),

and

𝐹𝑋(𝑎)=𝑃(𝑋≤𝑎)=𝑃(𝑋∈(−∞,𝑎]).

Clearly, 𝐷𝑋 determins 𝐹𝑋, but in fact we’ll see that 𝐹𝑋 determines 𝐷𝑋.

Example 7.2. Let 𝑋 be the outcome of rolling a fair die. Then,

𝐹𝑋(𝑎)=⎧{ { { {⎨{ { { {⎩0𝑎<11/61≤𝑎<22/62≤𝑎<3⋮5/65≤𝑎<616≤𝑎.

In other words,

𝐹𝑋(𝑎)=⎧{ {⎨{ {⎩0𝑎<11𝑎≥6⌊𝑎⌋61≤𝑎<6.
Proposition7.3

The function 𝐹𝑋: ℝ→ ℝ satisfies the following properties:

1.
lim𝑋→∞𝐹𝑋(𝑎)= 1 and lim𝑋→−∞𝐹𝑋(𝑎)= 0
2.
𝐹𝑋 is monotonically increasing
3.
𝐹𝑋 is right continuous, i.e.
lim𝑥→𝑎+𝐹𝑋(𝑥)=𝐹𝑋(𝑎)
Definition (Discrete Random Variables)7.4

𝑋 is called discrete if there is a countable 𝐴⊂ ℝ such that 𝑃(𝑋∈ 𝐴)= 1.

Then, the function 𝑎↦ 𝑃(𝑋= 𝑎) is called the probability mass function (pmf), and the probabilites of interest are computed by taking a suitable sum of the pmf.

Definition (Continuous Random Variables)7.5

𝑋 is called (absolutely) continuous if there is some function 𝑓𝑋(𝑥) such that 𝑓𝑋(𝑥)≥ 0, and for any interval 𝐼 with endpoints −∞≤ 𝑎≤ 𝑏≤ ∞,

𝑃(𝑋∈𝐼)=∫𝑏𝑎𝑓𝑋(𝑥)𝑑𝑥

Note that we then have

𝐹𝑋(𝑎)=∫𝑎−∞𝑓𝑋(𝑥)𝑑𝑥
Definition (Identical Distributions)7.6

Random variables 𝑋,𝑌 are said to be identically distributed if 𝐷𝑋= 𝐷𝑌, which holds if and only if 𝐹𝑋= 𝐹𝑌.

A good way to think about identical distributions is with an example: how do you generate a random integer in {0,1}?

One way to do it is flipping a coin, taking 0 if the coin is tails, and 1 if the coin is heads. Another way to do it is generating a random real number in [0,1], taking 0 if it’s <1/2, and 1 if it’s ≥1/2.

Let 𝑋 be the coin method and 𝑌 be the real number method. Note that 𝑋 and 𝑌 have completely different sample spaces:

𝑋: {𝐻,𝑇}→ ℝ 𝑋({𝐻})= 1,𝑋({𝑇})= 0
𝑌: [0,1]→ ℝ 𝑌(𝜔)= {0𝜔<0.51𝜔≥0.5.

However, observe

𝐹𝑋(𝑎)=𝐹𝑌(𝑎)=⎧{ {⎨{ {⎩0𝑎<01/20≤𝑎<11𝑎≥1.

Thus, 𝑋 and 𝑌 are identically distributed, even though they’re completely different (they have different sample spaces!).

Moreover, let 𝑊= 1− 𝑋, i.e. 𝑊= 1 on tails and 𝑊= 0 on heads. Then, 𝑋 and 𝑊 are still identically distributed!

Remark 7.7.

1.
If 𝐹𝑋 is piecewise constant, then 𝑋 is a discrete random variable. In this case, 𝑃(𝑋= 𝑎) can be computed by 𝐹(𝑎)− lim𝑋→𝑎−𝐹𝑋(𝑎)
2.
If 𝑋 is (absolutely) continuous, 𝐹𝑋 is continuous
3.
If 𝐹𝑋 is differentiable with only finitely many exceptions, then 𝐹′𝑋(𝑥)= 𝑓𝑋(𝑥) for all points where 𝐹𝑋 is differentiable. At other points, we may define 𝑓𝑋 arbitrarily.

Example 7.8. Suppose 𝑋 is a continuous random variable with pdf 𝑓𝑋(𝑥)= 1/2 for 𝑥∈ [− 1,1].

(i)
Compute 𝑃(𝑋> 0)

We know

𝑃(𝑋>0)=∫∞0𝑓𝑋(𝑥)𝑑𝑥=∫1012𝑑𝑥=1/2
(ii)
Compute 𝑃(𝑋> 1/2|𝑋> 0).

Using conditional probability, we see that

𝑃(𝑋>1/2|𝑋>0)=𝑃(𝑋>1/2∩𝑋>0)𝑃(𝑋>0)=1/41/2=12.
(iii)
Compute the pdf of 𝑋2.

Observe that

𝑃(𝑋2≤𝑎)=𝑃(−√𝑎≤𝑋≤√𝑎)=∫√𝑎−√𝑎𝑓𝑋(𝑥)𝑑𝑥.

When 0≤ 𝑎< 1, this evaluates to √𝑎. Thus, we see

𝐹𝑋2(𝑎)=⎧{ {⎨{ {⎩0𝑎<0√𝑎0≤𝑎<11𝑎≥1.

Note that this is the cdf of 𝑋2. Differentiating, we get

𝑓𝑋2(𝑎)=⎧{ {⎨{ {⎩0𝑎<012√𝑎0≤𝑎<10𝑎≥1.
Definition7.9

We say that a random variable 𝑋 has a uniform distribution on [𝑎,𝑏], denoted 𝑋∼ 𝑢[𝑎,𝑏], if

𝑓𝑋(𝑥)=1𝑏−𝑎

for 𝑥∈ 𝑎,𝑏.

Example 7.10. Suppose 𝑋∼ 𝑢[0,1]. Find the pdf of 𝑌:= 𝑒𝑋.

Solution. If 𝑎< 1, then 𝑒𝑋 doesn’t attain 𝑎 on [0,1], so 𝐹𝑌(𝑎)= 0 for 𝑎< 1. Similarly, when 𝑎> 𝑒, we know with certainty that 𝑒𝑋< 𝑎, so 𝐹𝑌(𝑎)= 1. Finally, if 𝑎∈ [1,𝑒], then

𝐹𝑌(𝑎)=𝑃(𝑌≤𝑎)=𝑃(𝑒𝑋≤𝑎)=𝑃(𝑋≤log⁡𝑎)=𝑃(0≤𝑋≤log⁡𝑎)=log⁡𝑎.

Thus,

𝐹𝑌(𝑎)=⎧{ {⎨{ {⎩0𝑎<1log⁡(𝑎)1≤𝑎≤𝑒1𝑎>𝑒,

and differentiating yields

𝑓𝑌(𝑎)=⎧{ {⎨{ {⎩0𝑎≤11𝑎1<𝑎<𝑒0𝑎≥𝑒.

◻

8 Expected Values

Definition (Expected Value (Discrete))8.1

Let 𝑋 be a discrete random variable with support 𝐴. Then, the expected value of 𝑋, denoted 𝐸[𝑋], is

𝐸[𝑋]=∑𝑥∈𝐴𝑥𝑝𝑋(𝑥)=∑𝑥∈𝐴𝑥𝑃(𝑋=𝑥)
Definition (Expected Value (Continuous))8.2

Let 𝑋 be a continuous random variable. Then, the expected value of 𝑋, denoted 𝐸[𝑋], is

𝐸[𝑋]=∫∞−∞𝑥𝑓𝑋(𝑥)𝑑𝑥
Definition8.3

We say that the expected value 𝐸[𝑋]exists if 𝐸[|𝑋|]< ∞.

Example 8.4. Suppose 𝑋∼ 𝑢[0,1]. Compute 𝐸[𝑋] and 𝐸[𝑒𝑋].

Solution. By definition,

𝐸[𝑋]=∫∞−∞𝑥𝑓𝑋(𝑥)𝑑𝑥=∫10𝑥𝑑𝑥=12.

For 𝐸[𝑒𝑋], one method involves using the pdf we computed earlier, which gives

𝐸[𝑒𝑋]=∫∞−∞𝑦𝑓𝑌(𝑦)𝑑𝑦=∫𝑒1𝑦𝑦𝑑𝑦=𝑒−1.

However, we may use the following general result:

𝐸[𝑔(𝑥)]=∫∞−∞𝑔(𝑥)𝑓𝑋(𝑥)𝑑𝑥,

which gives

𝐸[𝑒𝑋]=∫10𝑒𝑥𝑑𝑥=𝑒−1.

◻

LOTUS8.5

Let 𝑋 be a random variable with density function 𝑓𝑋. Then, for 𝑔: ℝ→ ℝ,

𝐸[𝑔(𝑋)]=∫∞−∞𝑔(𝑥)𝑓𝑋(𝑥)𝑑𝑥
Linearity of Expectation8.6

If 𝑋,𝑌 are random variables, and 𝑎 is a real number, then 𝐸[𝑎𝑋+ 𝑌]= 𝑎𝐸[𝑋]+ 𝐸[𝑌].

Markov’s Inequality8.7

Suppose 𝑋≥ 0 and 𝑐∈ ℝ+. Then

𝑃(𝑋≥𝑐)≤𝐸[𝑋]/𝑐,
Chebyshev’s Inequality8.8

Let 𝑋 be a random variable with finite mean 𝜇 and finite variance 𝜎2. For any 𝑐∈ ℝ+,

𝑃(|𝑋−𝜇|≥𝑐)≤𝜎2𝑐2
Proposition8.9

If 𝐸[𝑋𝑘] is finite, then 𝐸[𝑋𝑛] is finite for all 𝑛∈ {1,…,𝑘}. In particular, for Chebyshev’s inequality, it’s sufficient to know that 𝜎2 is finite.

Proof. Observe

𝐸[|𝑋𝑚|]=∫∞−∞|𝑥𝑚|𝑓𝑋(𝑥)𝑑𝑥=∫|𝑥𝑚|>1|𝑥𝑚|𝑓𝑋(𝑥)𝑑𝑥+∫|𝑥𝑚|≤1|𝑥𝑚|𝑓𝑋(𝑥)𝑑𝑥

by LOTUS (Theorem 8.5), for any 𝑚. Let 𝐴 be the first term above when 𝑚= 𝑘, and 𝐵 the second term when 𝑚= 𝑘. When 𝑥𝑛> 1, then |𝑥𝑛|𝑓𝑋(𝑥)≤ |𝑥𝑘|𝑓𝑋(𝑥). When |𝑥𝑚|≤ 1, then |𝑥𝑚|𝑓𝑋(𝑥)≤ 𝑓(𝑥). Thus,

𝐸[|𝑋𝑛|]≤∫|𝑥𝑛|>1|𝑥𝑘|𝑓𝑋(𝑥)𝑑𝑥+∫∞−∞𝑓𝑋(𝑥)≤𝐴+1<∞,

so 𝐸[𝑋𝑛] is finite.

9 Special Distributions

In this section, we study some important distributions to know.

Discrete Distributions

9.1 Bernoulli Distribution

Definition9.1

A Bernoulli trial is a random variable which has two outcomes: success (1) and failure (0).

Proposition9.2

A bernoulli random variable 𝑋 has a probability mass function

𝑝𝑋(𝑥)={1−𝑝𝑥=0𝑝𝑥=1

where 𝑝 is the probability of success. Moreover,

𝐸[𝑋]=𝑝𝑉[𝑋]=𝑝(1−𝑝)

Proof. We compute

𝐸[𝑋]=∑𝑥𝑝𝑋(𝑥)=0⋅(1−𝑝)+1⋅𝑝=𝑝𝑉[𝑋]=𝐸[𝑋2]−𝐸[𝑋]2=𝑝−𝑝2=𝑝(1−𝑝)

Example 9.3. Repeat a Bernoulli trial in an independent manner. Let 𝑋 be a random variable that counts the number of trials until the first success. Then, we know 𝑋 has the probability mass function

𝑝𝑋(𝑥)=𝑝(1−𝑝)𝑥−1𝑥=1,2,…

Moreover,

𝐸[𝑋]=∞∑𝑛=1𝑛⋅𝑝(1−𝑝)𝑛−1=1𝑝

To compute this sum, use the derivative trick. Remember the sums and derivatives commute when we’re within the radius of convergence.

Question 9.4. The probability of an independent event happening is 𝑝. What’s the expected number of attempts does it take for the event to happen?

Solution. Let 𝑋 be the number of attempts to make the event happen, and we saw in the previous example that 𝑋∼ Geom⁡(1/107). Then, 𝐸[𝑋]= 107. ◻

9.2 Binomial Distribution

We repeat a Bernoulli trial, with success chance 𝑝, 𝑛 times, where 𝑛 is fixed. Let 𝑋 be the random variable counting the number of successes.

Let’s compute 𝑃(𝑋= 𝑘). This involves 𝑘 successes, which has probability 𝑝𝑘, and 𝑛− 𝑘 failures, with probability (1− 𝑝)𝑛−𝑘. Now, we must count the number of ways in which we can achieve 𝑘 successes. This is (𝑛𝑘), and so

𝑃(𝑋=𝑘)=(𝑛𝑘)𝑝𝑘(1−𝑝)𝑛−𝑘

Moreover,

𝐸[𝑋]=𝑛∑𝑘=0𝑘(𝑛𝑘)𝑝𝑘(1−𝑝)𝑛−𝑘.

This sum can be computed with some neat tricks. However, we will eventually see that 𝑋 can be written 𝑋= 𝑋1+ ⋯+ 𝑋𝑛 as the sum of 𝑛 Bernoulli random variables, which are independent and identically distributed (IID). Note that 𝐸[𝑋𝑖]= 𝑝, so 𝐸[𝑋]= 𝑛𝑝.

9.3 Hypergeometric Distributions

Say we want to sample a portion of a population for some property. Do we sample with or without replacement? If we sample with replacement, we get a binomial distribution. However, it can be better to sample without replacement, in which case we get a hypergeometric distribution.

Definition9.5

Let 𝑁,𝑁𝐴,𝑛 be integers with 0≤ 𝑛≤ 𝑁𝐴≤ 𝑁. A random variable 𝑋 is said to follow a hypergeometric distribution with respect to the parameters (𝑁,𝑁𝐴,𝑛) if 𝑋 takes values in {1,…,𝑛}, and

𝑃(𝑋=𝑘)=(𝑁𝐴𝑘)(𝑁−𝑁𝐴𝑛−𝑘)(𝑁𝑛).

This is interpreted as follows: there are (𝑁𝑛) ways to select 𝑛 people out of your population of 𝑁. Then, if 𝑁𝐴 of those people have the condition, there are (𝑁𝐴𝑘) ways to find 𝑘 of them, and (𝑁−𝑁𝐴𝑛−𝑘) for the rest of them to not have it.

Example 9.6. Suppose that a collection of 20 rare books contains 5 first editions, each costing $5000, and 15 second editions, each costing $1000. Four books are picked at random to be sold. What is the expected income?

Solution. Let 𝑋 be the number of first editions, so 4− 𝑋 is the number of second editions. Then, the revenue is

𝑟(𝑋):=5000𝑋+1000(4−𝑋)=4000𝑋+4000.

By linearity of expectation,

𝐸[𝑟(𝑋)]=𝐸[4000𝑋+4000]=4000𝐸[𝑋]+4000.

We’re now left to compute 𝐸[𝑋]. Note that 𝑋 is sampling randomly from a population without replacement, so it’s a hypergeometric distribution. The population size is 𝑁= 20, the number of first editions is 𝑁𝐴= 5, and the sample size is 𝑛= 4. Computing 𝐸[𝑋] is left as an exercise. ◻

9.4 Poisson Distribution

Definition9.7

Fix 𝜆> 0. A random variable 𝑋 is said to have a Poisson distribution with parameter 𝜆 if 𝑋≥ 0 is integer valued, and has a probability mass function

𝑝𝑋(𝑘)=𝑒−𝜆𝜆𝑘𝑘!

for 𝑘∈ {0,1,2,…}.

Remark 9.8. If 𝑋∼ Poisson⁡(𝜆), then 𝐸[𝑋]= 𝑉[𝑋]= 𝜆.

Let 𝑋∼ Bin⁡(𝑛,𝑝) and 𝑌∼ Poisson⁡(𝑛𝑝). Then, for any 𝐴⊂ {0,1,2,…}, we have

|𝑃(𝑋∈𝐴)−𝑃(𝑌∈𝐴)|≤𝑛𝑝2

Example 9.9. Assume that a random variable 𝑋 counts the occurrence of rare events that are not “strongly dependent”. Then, the distribution of 𝑋 can be approximated with a Poisson⁡(𝐸[𝑋]) distribution.

Example 9.10. Suppose that a large factory experiences, on average, three accidents each month. What is the probability that on a particular month there are two accidents?

Solution. Since the factory is large, we can assume that three accidents per month is very small, so we may assume that the number of accidents is represented by 𝑋∼ Poisson⁡(3). Then,

𝑃(𝑋=2)=𝑒−3322!≈0.224

◻

Continuous Distributions

There are three types of continuous distributions: uniform, exponential, and normal.

Uniform distributions try to compute the idea that the regions with equal “length” have the same probability of having something “drawn” from them.

9.5 Uniform Distribution

Definition9.11

A random variable 𝑋 is said to have a uniform distribution, denoted 𝑋∼ Unif⁡[𝑎,𝑏] for 𝑎< 𝑏 if

𝑓𝑋(𝑥)=1𝑏−𝑎,𝑥∈[𝑎,𝑏]

9.6 Exponential Distribution

Definition9.12

Let 0< 𝜆< ∞. The exponential distribution with rate 𝜆 is given by 𝑓𝑋(𝑥)= 𝜆𝑒−𝜆𝑥, 𝑥≥ 0. If 𝑋 is a random variable with this distribution, we write 𝑋∼ exp⁡(𝜆).

Note that the exponential distribution is related to the geometric distribution.

Proposition9.13

Let 𝑋 be a continuous random variable with an exponential distribution with rate 𝜆. Then

𝐸[𝑋]=1/𝜆,𝑉[𝑋]=1/𝜆2.

Proof. We compute

𝐸[𝑋]=∫∞0𝑥𝜆𝑒−𝜆𝑥𝑑𝑥=limℎ→∞[−𝑥𝑒−𝜆𝑥∣ℎ0+∫ℎ0𝑒−𝜆𝑥𝑑𝑥]=1𝜆.

The variance computation is similar.

Proposition9.14

Let 𝑋 be a continuous random variable with an exponential distribution with rate 𝜆. Then,

𝐹𝑋(𝑥)={1−𝑒−𝜆𝑥𝑥≥00𝑥<0.

Example 9.15. A library has 5 computers for public use. The average lifetime of a computer is 6 years, and follows an exponential distribution. What is the probability that at least one computer is working after 7 years? You may assume the lifetimes are independent.

Solution. Let 𝑇𝑖 be the lifetime of computer 𝑖∈ {1,…,5}. Then, 𝑇𝑖∼ exp⁡(1/6), and

𝑃(𝑇1>7∨⋯∨𝑇5>7)=1−𝑃(𝑇1≤7,⋯,𝑇5≤7)=1−5∏𝑖=1𝑃(𝑇𝑖≤7)=1−𝑃(𝑇≤7)5

where 𝑇∼ exp⁡(1/6). We computed in Proposition 9.14 that 𝑃(𝑇≤ 7)= 1− 𝑒−7/6. Thus,

⋯=1−(1−𝑒−7/6)5

◻

9.7 Normal Distributions

Definition9.16

A continuous random variable 𝑋 is said to have a normal distribution with parameters 𝜇,𝜎2 (mean and variance) if

𝑓𝑋(𝑥)=1√2𝜋𝜎exp⁡(−(𝑥−𝜇)22𝜎2)

for −∞< 𝑥< ∞.

Central Limit Theorem (Philosophy)9.17

For large samples, the sample average follows a normal distribution.

Example 9.18. The height of males in a particular island can be modeled by a normal distribution with mean 170 and standard deviation 5. What is the probability that a randomly picked male has a height that falls between 160 and 180?

Solution. Let 𝑋 be the height of a randomly picked male, so 𝑋∼ 𝑁(170,25). Then

𝑃(160<𝑋<180)=𝑃(160−1705<𝑋−𝜇𝜎<180−1705)=𝑃(−2<𝑍<2)

where 𝑍= (𝑋− 𝜇)/𝜎. Note that 𝑍∼ 𝑁(0,1), and so we’ve translated this problem into one about the standard normal.

Assume we have a table (called a 𝑍-table) which gives values of Φ(𝑧)= 𝑃(𝑍≤ 𝑧)= 𝐹𝑍(𝑧). Then

𝑃(𝑎<𝑍<𝑏)=Φ(𝑏)−Φ(𝑎).

PIC

(a) Z-table of negatives

PIC

(b) Z-table of positives
Figure 1: Z-table

Figure 1 is an example of a 𝑍-table. Using it, we get

Φ(2)−Φ(−2)≈0.9772−0.228≈0.95.

◻

10 Moment Generating Functions

Definition10.1

The 𝒌-th moment of a random variable 𝑋 is defined as 𝐸[𝑋𝑘].

Remark 10.2. Recall that if 𝐸[𝑋𝑘]< ∞, then 𝐸[𝑋𝑚]< ∞ for 𝑚∈ {1,…,𝑘}, but the converse does not hold.

Definition10.3

A moment generation function of a random variable 𝑋 is defined as

𝜇𝑋(𝑡)=𝐸[𝑒𝑡𝑋].

We say that the moment generating function exists if 𝜇𝑋(𝑡) is finite on some open interval (− 𝜀,𝜀).

Theorem10.4

Let 𝑋 be a random variable. Then,

𝜇(𝑛)𝑋(𝑡)=𝐸[𝑋𝑛𝑒𝑡𝑋],𝜇(𝑛)𝑋(0)=𝐸[𝑋𝑛].

Example 10.5. Let 𝑋∼ exp⁡(𝜆). Then

𝜇𝑋(𝑡)=𝐸[𝑒𝑡𝑥]=∫∞−∞𝑒𝑡𝑥𝑓𝑋(𝑥)𝑑𝑥=𝜆∫∞0𝑒𝑡𝑥𝑒−𝜆𝑥𝑑𝑥=𝜆limℎ→∞∫ℎ0𝑒(𝑡−𝜆)𝑥𝑑𝑥.

If 𝑡≥ 𝜆, this diverges. Otherwise,

𝜇𝑋(𝑡)=𝜆𝑡−𝜆limℎ→∞[𝑒(𝑡−𝜆)𝑥]ℎ0=𝜆𝜆−𝑡.

Thus

𝜇𝑋(𝑡)={𝜆𝜆−𝑡𝑡<𝜆,∞𝑡≥𝜆.

Now computing the variance is easy. Namely,

𝑉[𝑋]=𝐸[𝑋2]−𝐸[𝑋]2=𝜇″𝑋(0)−[𝜇′𝑋(0)]2=2𝜆(𝜆−𝑡)3∣𝑡=0−(𝜆(𝜆−𝑡)2)2∣𝑡=0=2𝜆2−1𝜆2=1𝜆2.

This aligns with Proposition 9.13.

Example 10.6. Let 𝑍∼ 𝑁(0,1). Then

𝜇𝑍(𝑡)=1√2𝜋∫∞−∞𝑒𝑡𝑧⋅𝑒−𝑧2/2𝑑𝑧=1√2𝜋∫∞−∞exp⁡(2𝑡𝑧−𝑧22)𝑑𝑧=1√2𝜋∫∞−∞exp⁡(𝑡2/2)exp⁡(−(𝑡−𝑧)2/2)𝑑𝑧=exp⁡(𝑡2/2)√2𝜋∫∞−∞exp⁡(−(𝑡−𝑧)22)𝑑𝑧=exp⁡(𝑡2/2)√2𝜋∫∞−∞exp⁡(−𝑧22)𝑑𝑧=exp⁡(𝑡2/2)√2𝜋⋅√2𝜋=exp⁡(𝑡2/2).

11 Random Vectors

Definition11.1

Let 𝑋1,…,𝑋𝑛: Ω→ ℝ be a collection of random variables. We define the random vector ⃗𝑋: Ω→ ℝ𝑛 to be

⃗𝑋=⎛⎜ ⎜ ⎜ ⎜ ⎜ ⎜ ⎜⎝𝑋1𝑋2⋮𝑋𝑛⎞⎟ ⎟ ⎟ ⎟ ⎟ ⎟ ⎟⎠,

also written ⃗𝑋= (𝑋1,…,𝑋𝑛). The probability distribution of 𝑋 is called the joint distribution.

Proposition11.2

If 𝑋,𝑌 are random variables, then

𝑝𝑋,𝑌(𝑥,𝑦)=𝑝𝑋(𝑥)𝑝𝑌|𝑋(𝑦|𝑥).

Proof. By definition

𝑝𝑋,𝑌(𝑥,𝑦)=𝑃(𝑋=𝑥,𝑌=𝑦)=𝑃(𝑋=𝑥)⋅𝑃(𝑌=𝑦|𝑋=𝑥)=𝑝𝑋(𝑥)⋅𝑝𝑌|𝑋(𝑦|𝑥),

as desired.

Example 11.3. We flip a coin, and if heads we roll a D6, and if tails we roll a D4. Then

Ω={(𝐻,1),…,(𝐻,6),(𝑇,1),…,(𝑇,4)}.

We write

𝑋(𝑎,𝑏)={0𝑎=𝑇1𝑎=𝐻𝑌(𝑎,𝑏)=𝑏

Compute the joint probability mass function 𝑝𝑋,𝑌(𝑥,𝑦)/

Solution. By Proposition 11.2,

𝑝𝑋,𝑌(𝑥,𝑦)=𝑝𝑋(𝑥)⋅𝑝𝑌|𝑋(𝑦|𝑥).

Note that 𝑋∼ Ber⁡(1/2), and 𝑝𝑋(𝑥)= 1/2 when 𝑥∈ {0,1}. Moreover

𝑝𝑌|𝑋(𝑦|0)=1/4,𝑦∈{1,…,4},𝑝𝑌|𝑋(𝑦|1)=1/6,𝑦∈{1,…,6}.

Hence

𝑝𝑌|𝑋(𝑦|𝑥)=⎧{ {⎨{ {⎩1/4𝑥=0,𝑦=1,…,41/6𝑥=1,𝑦=1,…,60otherwise.

We conclude that

𝑝𝑋,𝑌(𝑥,𝑦)=⎧{ {⎨{ {⎩1/8𝑥=0,𝑦=1,…,41/12𝑥=0,𝑦=1,…,60otherwise.

◻

Question 11.4. What is the probability that the die roll in Example 11.3 is prime?

Solution. We are computing

𝑝𝑋,𝑌(0,2)+𝑝𝑋,𝑌(0,3)+𝑝𝑋,𝑌(1,2)+𝑝𝑋,𝑌(1,3)+𝑝𝑋,𝑌(1,5).

This evaluates to

18+18+112+112+112=12.

However, we kay take another approach: if we compute 𝑝𝑌(𝑦), then all we need is 𝑝𝑌(2)+ 𝑝𝑌(3)+ 𝑝𝑌(5). Well, by the law of total probability,

𝑝𝑌(𝑦)=𝑝(𝑌=𝑦)=𝑝(𝑌=𝑦|𝑋=0)+𝑝(𝑌=𝑦|𝑋=1).

We compute that

𝑝𝑌(𝑦)={5/24𝑦=1,2,3,41/12𝑦=5,6,

and so 𝑝𝑌(2)+ 𝑝𝑌(3)+ 𝑝𝑌(5)= 5/24+ 5/24+ 1/12= 1/2. ◻

Proposition11.5

For random variables 𝑋,𝑌,

𝑝𝑌(𝑦)=∑𝑥𝑝𝑋,𝑌(𝑥,𝑦).
Definition11.6

The random variables 𝑋1,…,𝑋𝑛 are said to be independent if

𝑝𝑋𝑖1,…,𝑋𝑖𝑘(𝑥𝑖1,…,𝑥𝑖𝑘)=𝑘∏𝑗=1𝑝𝑋𝑖𝑗(𝑥𝑖𝑗)

for all (𝑖1,…,𝑖𝑘)⊂ (1,…,𝑛).

Definition11.7

A simple random sample of size 𝑛 is a collection 𝑋1,…,𝑋𝑛 of iid (independent identically distributed) random variable. A statistic is a function defined on a random variable.

Example 11.8. Suppose 𝑋1,𝑋2 are IID random variables with common pmf

𝑝𝑋(𝑥):={1/3𝑥=1,2,3𝑚0otherwise.

Compute

(i)
𝑝𝑋1,𝑋2(𝑥1,𝑥2)
(ii)
𝑝𝑋1+𝑋2(𝑡)
(iii)
𝐸[𝑋1+ 𝑋2]
(iv)
𝐸[𝑋1𝑋2]− 𝐸[𝑋1]𝐸[𝑋2].

We discuss the solution to this problem, and make note of general lessons along the way.

We can represent out probability distribution as a table:

𝑥1\𝑥2 1 2 3
1 1/9 1/9 1/9
2 1/9 1/9 1/9
3 1/9 1/9 1/9

This is the joint probability distribution 𝑝𝑋1,𝑋2(𝑥1,𝑥2), solving (i).

For (ii), we note that the only non-zero values 𝑋1+ 𝑋2 can take are {2,3,…,6}. Here’s how we compute the pmf of the sum:

𝑃(𝑋1+𝑋2=2)=𝑃(𝑋1=1,𝑋2=1)=𝑃(𝑋1=1)𝑃(𝑋2=1)=1/9𝑃(𝑋1+𝑋2=3)=𝑃(𝑋1=1,𝑋2=2 or 𝑋1=2,𝑋2=1)=𝑃(𝑋1=1,𝑋2=2)+𝑃(𝑋1=2,𝑋2=1)=1/9+1/9=2/9.

Observing a pattern, we compute

𝑡 2 3 4 5 6
𝑝𝑋1+𝑋2(𝑡) 1/9 2/9 3/9 2/9 1/9

This solves (ii).

For (iii), we note the following.

Proposition11.9

For any 𝑔: ℝ𝑛→ ℝ, we have

𝐸[𝑔(⃗𝑋)]=∑𝑝⃗𝑋(𝑥)𝑔(𝑥)

if ⃗𝑋 is discrete, and

𝐸[𝑔(⃗𝑋)]=∫ℝ⋯∫ℝ𝑔(𝑥1,…,𝑥𝑛)𝑝𝑋(𝑥1,…,𝑥𝑛)𝑑𝑥1⋯𝑑𝑥𝑛

if ⃗𝑋 is continuous.

Furthermore, for random variables 𝑋,𝑌,

𝐸[𝑎𝑋+𝑏𝑌]=𝑎𝐸[𝑋]+𝑏𝐸[𝑌].

Now we see

𝐸[𝑋1+𝑋2]=𝐸[𝑋1]+𝐸[𝑋2]=2𝐸[𝑋1]=2(13+23+33)=4.

This solves (iii). Finally, for (iv), we note that we should have

𝐸[𝑋1𝑋2]−𝐸[𝑋1]𝐸[𝑋2]=0

because of independence. This is indeed the case.

Proposition11.10

If 𝑋,𝑌 are independent, then

𝐸[𝑋𝑌]=𝐸[𝑋]𝐸[𝑌].

Proof.

𝐸[𝑋𝑌]=∫∞−∞∫∞−∞𝑥𝑦𝑓𝑋,𝑌(𝑥,𝑦)𝑑𝑦𝑑𝑥=∫∞−∞∫∞−∞𝑥𝑦𝑓𝑋(𝑥)𝑓𝑌(𝑦)𝑑𝑦𝑑𝑥=∫∞−∞𝑥𝑓𝑋(𝑥)𝑑𝑥∫∞−∞𝑦𝑓𝑌(𝑦)𝑑𝑦=𝐸[𝑋]𝐸[𝑌].

12 Transformation of a Joint Density Function

Consider two jointly continuous random variables 𝑋,𝑌 with joint density 𝑓𝑋,𝑌. Let 𝑈:= 𝑔(𝑋,𝑌) and 𝑉:= ℎ(𝑋,𝑌), so (𝑈,𝑉) are themselves jointly continuous random variables. We aim to compute 𝑓𝑈,𝑉.

Let 𝐾⊂ ℝ2 be the support of 𝑓𝑋,𝑌. Let 𝐺(𝑥,𝑦)= (𝑔(𝑥,𝑦),ℎ(𝑥,𝑦)) be an injective function, and let 𝐿:= 𝐺(𝐾). Hence 𝐺: 𝐾→ 𝐿 is bijective. Denote 𝐺−1(𝑢,𝑣):= (𝑞(𝑢,𝑣),𝑟(𝑢,𝑣)). Then 𝑞,𝑟 are functions from 𝐿→ 𝐾 such that

𝑢=𝑔(𝑞(𝑢,𝑣),𝑟(𝑢,𝑣))𝑣=ℎ(𝑞(𝑢,𝑣),𝑟(𝑢,𝑣)).

Now, assume that 𝑞 and 𝑟 satisfy the following conditions.

(i)
The partial derivatives 𝜕𝑞𝜕𝑢,𝜕𝑞𝜕𝑣,𝜕𝑟𝜕𝑢,𝜕𝑟𝜕𝑣 exist and are continuous.
(ii)
The determinant of the matrix
𝐽(𝑢,𝑣):=(𝜕𝑞𝜕𝑢𝜕𝑞𝜕𝑣𝜕𝑟𝜕𝑢𝜕𝑟𝜕𝑣),

known as the Jacobian, does not vanish anywhere on 𝐿. The determinant is denoted |𝑱(𝒖,𝒗)|.

Theorem12.1

Under the conditions discussed above,

𝑓𝑈,𝑉(𝑢,𝑣)=𝑓𝑋,𝑌(𝑞(𝑢,𝑣),𝑟(𝑢,𝑣))⋅|𝐽(𝑢,𝑣)|

for all (𝑢,𝑣)∈ 𝐿, and 𝑓𝑈,𝑉(𝑢,𝑣)= 0 elsewhere.