Lecture Topic 3
Lecture Topic 3
Statistics
Topic 3: Probability and Random Variables
1 / 63
Probability
(Ref: Keller Chapter 6-1, 6-2, 6-3)
2 / 63
Terminology
I Examples
Rolling a die: Possible outcomes are 1, 2, 3, 4, 5, or 6;
Tossing a coin: Possible outcomes are heads or tails.
3 / 63
Terminology
4 / 63
Terminology
5 / 63
Two Important Rules
I In general:
The sample space, S = {E1 , E2 , ..., En } where there are n
possible outcomes; and,
n
X
2. P (Ei ) = 1
i=1
6 / 63
Joint, Marginal and Conditional Probability
Complement event
Intersection of events
Union of events
Mutually exclusive events
Dependent and independent events
7 / 63
Probability of an Event
¯
I P (Ac ) = P (A)=P(A complement)=P(A does not occur)
8 / 63
Probability of Combined Events
9 / 63
Probability of Combined Events
Consider two events, A and B.
I Union of Events Figure: Union of events
P(A or B)=P(A ∪ B)=P(A
union with B)
=P(A occurs, or B occurs, or
both occur)
I Intersection of Events
P(A and B) =P(A ∩ B) = P(A
intersection with B)
= P(A and B both occur)
I Dependent Events Figure: Intersection of events
P(A|B)=P(A occurs given that
B has occurred)
10 / 63
Probability of Mutually Exclusive Events
11 / 63
Joint, marginal and conditional probability
Example
12 / 63
Probabilities Mutual Fund outperforms Market Mutual Fund Does not outperform Market
Top-20 MBA 0.11 0.29
Not Top-20 MBA 0.06 0.54
13 / 63
Marginal Probabilities
Probabilities Mutual Fund outperforms Market Mutual Fund Does not outperform Market Total
Top-20 MBA P (A1 and B1 )=0.11 P (A1 and B2 )=0.29 P (A1 ) = 0.40
Not Top-20 MBA P (A2 and B1 )=0.06 P (A2 and B2 )=0.54 P (A2 ) = 0.60
Total P (B1 ) = 0.17 P (B2 ) = 0.83 1.00
14 / 63
Conditional Probability
I Bayes’ Theorem:
P(A and B)
P(A|B) =
P(B)
15 / 63
Conditional Probability Example
16 / 63
Independence
Example:
A1=Fund manager graduated from a top-20 MBA program
B2=Fund does not outperform the market
17 / 63
Probability Rules
18 / 63
Complement Rule
P (Ā) = 1 − P (A).
19 / 63
Multiplication Rule
Examples:
What is the probability of obtaining a Head on both of two
consecutive tosses of a coin?
1 1 1
P (H ∩ H) = P (H) × P (H) = × =
2 2 4
What is the probability of obtaining a double-six when rolling
two dice?
20 / 63
Multiplication Rule (not independent events)
Solution: Let
A = the first students chosen is female
B = the second student chosen is also female.
We want to find the joint probability:
21 / 63
cont...
22 / 63
Addition Rule
I Addition Rule
23 / 63
Addition Rule
Example
Solution:
P (A or B) = P (A) + P (B) − P (A and B) = 0.22 + 0.35 − 0.1 =
0.47.
24 / 63
Random Variables
25 / 63
Random Variables
26 / 63
Notation
Example:
I X is the random variable that can take values 0, 1, 2, 3.
I Suppose we actually perform the experiment and find the
pattern HTT. Then x=1.
27 / 63
Two Types of Random Variables
28 / 63
Probability Distributions
29 / 63
Discrete probability distributions
X 0 1 2 3
P (X = x) 1/8 3/8 3/8 1/8
30 / 63
Probability Notation:
P (Xi ) = P (X = xi ).
I Examples
31 / 63
Discrete Probability Distributions
Properties/ Rules
Example
X
p(xi ) = p(0) + p(1) + p(2) + p(3)
= P (X = 0) + P (X = 1) + P (X = 2) + P (X = 3)
= 1/8 + 3/8 + 3/8 + 1/8 = 1
32 / 63
cont...
P (X ≤ 1) = P (X = 0 or X = 1)
= p(0) + p(1) = 1/8 + 3/8 = 1/2
33 / 63
Population/Probability Distribution
34 / 63
Population Mean
35 / 63
Example
x 0 1 2 3
P (X = x) 1/8 3/8 3/8 1/8
X
µ = E(X) = xi p(xi )
xi
1 3 3 1
=0× +1× +2× +3×
8 8 8 8
= 1.5
36 / 63
Population Variance
h i
σ 2 = V (X) = E (X − µ)2
X
= (xi − µ)2 p(xi )
xi
X
= x2i p(xi ) − µ2 (“short-cut”formulation)
xi
37 / 63
Example
x 0 1 2 3
P (X = x) 1/8 3/8 3/8 1/8
X
σ 2 = V (X) = x2i p(xi ) − µ2
xi
1 3 3 1
= 02 × + 12 × + 22 × + 32 × − 1.52
8 8 8 8
= 0.75
√
σ = SD(X) = 0.75 = 0.866(3dp)
38 / 63
Laws of Expected Value
E(c) = c
E(cX) = cE(X)
E(X − Y ) = E(X) − E(Y )
E(X + Y ) = E(X) + E(Y )
E(XY ) = E(X) × E(Y ) only if X and Y are independent
39 / 63
Examples
E(Z) = E(2X − 7)
= 2 ∗ E(X) − 7 = −1
40 / 63
Laws of Variance
V (c) = 0
V (cX) = c2 V (X)
X(X + c) = V (X)
V (X + Y ) = V (X) + V (Y ) if X and Y are independent
V (X − Y ) = V (X) + V (Y ) if X and Y are independent
41 / 63
Example
V (Y ) = V (7 ∗ Z − 3)
= V (7 ∗ Z)
= 49 ∗ V (Z)
= 49 ∗ 6
= 294
42 / 63
Example
V (Z) = V (3X − 2Y )
= V (3X) + V (2Y )
= 9 ∗ V (X) + 4 ∗ V (Y )
=9∗2+4∗1
= 22
43 / 63
Bivariate Distributions
44 / 63
Independence of Random Variables
P (X = x and Y = y) = P (X = x) × P (Y = y)
or
p(x, y) = p(x) × p(y)
45 / 63
The sum of two random variables
46 / 63
I Marginal Distribution of X
x 0 1 2
P (x) 0.4 0.5 0.1
y 0 1 2
P (y) 0.6 0.3 0.1
E(X) = 0.7
V (X) = 0.41
E(Y ) = 0.5
V (Y ) = 0.45
48 / 63
Suppose the interest is in X+Y
49 / 63
I We repeat the calculation for X+Y= 0,1,3 and 4:
x+y 0 1 2 3 4
p(x + y) 0.12 0.63 0.19 0.05 0.01
E(X + Y ) = 1.2
V (X + Y ) = 0.56
50 / 63
Covariance
σx,y = Cov(X, Y )
= E [(X − µx ) (Y − µy )]
XX
= (xi − µx ) (yj − µy ) p (xi , yj )
y x
XX
= xi yj p (xi , yj ) − µx µy
y x
51 / 63
Correlation coefficient
Cov(X, Y )
ρxy =
σx σy
−1 ≤ ρ ≤ 1
52 / 63
Example
53 / 63
Outcomes
Outcomes (S) x y
HHH 3 0
HHT 2 1
HTH 2 2
THH 2 1
TTH 1 1
THT 1 2
HTT 1 1
TTT 0 0
54 / 63
Joint and marginal probabilities
3
µx = ; µy = 1
Check yourself at home: 2
3 1
σx2 = ; σy2 =
4 2
55 / 63
Calculate covariance
I Covariance:
XX
σx,y = xi yj p(xi , yj ) − µx µy
2 1 2 1 3
=1×1× +1×2× +2×1× +2×2× − ×1
8 8 8 8 2
=0
σxy
I The correlation coefficient ρxy = =0
σx σy
56 / 63
Linear Combinations of Random Variables
57 / 63
Example
58 / 63
Example cont...
An investor forms a portfolio by putting 25% of his money in Stock
A and 75% in stock B, with parameters below.
60 / 63
I Determine the variance of the return if ρ=0
V (Rp ) = 0.252 σA
2
+ 0.752 σB
2
+ 2 × 0.25 × 0.75ρσA σB
= 0.252 × 0.122 + 0.752 × 0.222
+ 2 × 0.25 × 0.75 × ρ × 0.12 × 0.22
= 0.0281 + 0.0099 × 0
= 0.0281 (to 4 dp)
61 / 63
I The standard deviation of the portfolio
√
If ρ = 1, SD(Rp ) = 0.0380 = 0.1949
√
If ρ = 0, SD(Rp ) = 0.0282 = 0.1676
I The risk of the portfolio is lower when these two stocks are not
correlated.
62 / 63
Summary
I Probabilities
Terminologies: random experiment, sample space, events
Joint, marginal and conditional probabilities
Probability Rules
I Random Variables;
I Probability distributions:
Expected values, variances, standard deviations
Laws of expected values
Laws of variances
I Bivariate distributions:
Marginal distributions
Independence
Sum of two random variables
Covariance and Correlation
Linear Combinations of Variables
63 / 63