Probability Review Stochastic
Probability Review Stochastic
Probability Review
Noha Youssef
1 / 23
Table of Contents
Introduction to Probability
Random Variables
Conditional Expectation
2 / 23
Probability
3 / 23
Probability Rules
Axioms
1. P (φ) = 0
2. 0 ≤ P (A) ≤ 1
Complement
P (Ā) = 1 − P (A).
Addition Rule
P (A ∪ B) = P (A) + P (B) − P (A ∩ B). If A and B are mutually
exclusive then P (A ∪ B) = P (A) + P (B).
Conditional probability
P (A∩B)
P (A|B) = P (B) .
4 / 23
Cont’D
Multiplication Rule
P (A ∩ B) = P (A) × P (B|A) = P (B) × P (A|B).
5 / 23
Cont’D
Bayes’Theorem
P (A|B)P (B)
P (B|A) = ,
P (A)
more generally if B1 , B2 , · · · Bm form a partition of Ω, then
P (A|Bj )P (Bj )
P (Bj |A) = Pm .
i=1 P (A|Bi )P (Bi )
Chain of events
For any events A1 , A2 , · · · , ...An ,
6 / 23
Example 1
Solution
P (B ∩ C|A) = PA (B ∩ C)
= PA (B|C)PA (C)
= P (B|C ∩ A)P (C|A).
7 / 23
Examples
b. Which of the following is true
(a) P (B̄|A) = 1 − P (B|A) (b)P (B̄|A) = P (B) − P (B|A)
c. Which of the following is true?
(a)P (B̄ ∩ A) = P (A) − P (A ∩ B)
(b)P (B̄ ∩ A) = P (B) − P (A ∩ B)
Solution
(a)
P (B̄|A) = 1 − P (B|A)
(b)
9 / 23
The Distribution Function
10 / 23
Continuous Random Variable
11 / 23
Discrete Random Variable
fX (x) = P (X = x).
12 / 23
Cont’D
The mean, expected value, or expectation of a random variable X is
written as E(X) or µX . If we observe N random values of X, then
the mean of the N values will be approximately equal to E(X) for
large N . The expectation is defined differently for continuous and
discrete random variables.
Definition 1.7:
Let X be a continuous random variable with p.d.f. fX (x). The
expected value of X is
Z ∞
E(X) = xfX (x)dx
−∞
Definition 1.8:
Let X be a discrete random variable with probability function
fX (x). The expected value of X is
X X
E(X) = xf (x) = xP (X = x).
x x
13 / 23
Properties of Expectation
14 / 23
Cont’D
Notes:
1. E(XY ) = E(X)E(Y ) is ONLY generally true if X and Y are
INDEPENDENT.
2. If X and Y are independent, then E(XY ) = E(X)E(Y ).
However, the converse is not generally true: it is possible for
E(XY ) = E(X)E(Y ) even though X and Y are dependent.
15 / 23
Variance
The variance of a random variable X is a measure of how spread
out it is. The variance measures how far the values of X are from
their mean, on average.
Let X be any random variable. The variance of X is
Definition 1.8
Consider a pair (X, Y ) of discrete random variables X and Y with
joint probability mass function p(x, y). The conditional expectation
E[X|Y = y] is defined as with and for
X
E[X|Y = y] = xpX|Y (x|y),
x
with
p(x, y)
pX|Y (x|y) = ,
pY (y)
and for
pY (y) 6= 0.
17 / 23
Cont’D
Definition 1.9
Consider a pair (X, Y ) of continuous random variables X and Y
with joint probability density function f (x, y). The conditional ex-
pectation E[X|Y = y] is defined as with and for
Z
E[X|Y = y] = xfX|Y f (x|y)dx,
x
with
f (x, y)
fX|Y (x|y) = ,
fY (y)
and for
fY (y) 6= 0.
Note that E[X|Y = y] changes with y. It follows that E[X|Y ]
is itself a random variable. Conditional expectation, EX|Y ), is a
random variable with randomness inherited from Y , not X.
18 / 23
Example
Consider the following joint density
1
f (x, y) =
x
for 0 < y ≤ x ≤ 1. Find E[Y |X].
Solution
First, we find the marginal density function of X by integrating
f (y, x) wrt y over 0 < y ≤ x.
Z x
1 1
f (x) = dy = y|x0 = 1
0 x x
It follows that
f (y, x) 1
f (y|x) = = .
f (x) x
The conditional expectation E[Y |X = x] is given by
Z x Z x
y y2 x x
E[Y |X = x] = yfY |X (y|x)dy = dy = | = .
0 0 x 2x 0 2
19 / 23
Example
Suppose that p(x, y), the joint probability mass function of X and Y ,
is given by p(1, 1) = 0.5, p(1, 2) = 0.1, p(2, 1) = 0.1, p(2, 2) = 0.3.
Find the distribution of E[X|Y ].
Solution
First we need to find the values E[X|Y ], bear in mind that by con-
ditioning we are restricting our sample space
y 1 2
1(0.5)+2(0.1) 7 1(0.1)+2(0.3) 7
E[X|Y = y] 0.5+0.1 = 6 0.1+0.3 = 4
P (Y = y) 0.6 0.4
20 / 23
Laws of Total Expectation and Variance
If all the expectations below are finite, then for ANY random vari-
ables X and Y , we have:
1. E(X) = EY (EX|Y (X|Y )), Law of Total Expectation.
2. V ar(X) = EY (V ar(X|Y )) + V arY (E(X|Y )), Law of Total
Variance.
The expectation or variance is computed over the distribution of the
random variable Y .
21 / 23
Proof for the discrete case
!
X X
EY EX|Y ((X|Y )) = xP (X = x|Y ) PY (Y = y)
Y x
!
X X P (X, Y )
= x PY (Y = y)
x
PY (Y = y)
Y
!
X X
= xP (X, Y )
Y x
!
X X
= x P (X, Y )
x y
X
= xP (X = x)
x
= E(X).
22 / 23
Homework
23 / 23