You are on page 1of 37

# ECONOMETRICS & DATA ANALYSIS

ECON 131

Lecture 2
Probability Trees and Random Variables

## Overview for Today

Goals:
Understand the concept of independence
Know how to analyze conditional probability problems with
probability trees
Understand what a random variable is
Be able to compute measures of central tendency,

## dispersion, and covariance

Probability trees
probability tree: a way of deriving probabilities from conditional
information. They are most useful when one has information
that can be arranged sequentially.
Probability Tree Rules:
The tree is drawn on its side.
It starts from a circle called a chance node.
The branches of the tree at each node correspond to possible
outcomes. We label the branches with conditional probabilities.
The probabilities at the end of the tree are joint probabilities obtained
by multiplication.
Example: Draw a probability tree for two independent fair coin tosses.

## Independence and Conditional Probability

Sometimes, conditioning on one event does not provide any information about the
probability of another event.
Example: The outcome of the first of two coin flips.
We call this independence.
Definition: Two events, A and B, are independent if

Prob(A | B) = Prob(A)
In words: The conditional probability = the marginal probability
(of the unconditioned event).
Note: Independent is not the same as mutually exclusive.

## Independence and joint events

An (Equivalent) Alternative Definition
Using the multiplication rule, we can define (and check) the
independence of two events, A and B, with the formula:

## Prob(A and B) = Prob(A) * Prob(B)

In words:
The joint probability = the product of the marginals
(for independent events).

## Copyright 2009, C. Lanier Be

Independence

Independence
Example: The internet survey.
None

Dial-up

DSL

Cable

T1/Fiber

Other

Urban

.098

.039

.088

.071

.001

.019

.316

Suburban

.159

.086

.130

.114

.008

.024

.521

Rural

.074

.035

.030

.016

.000

.008

.163

.331

.160

.248

.201

.009

.051

## Are there any independent events?

How about events that are close to independent?
Interpretation?

2.9

## Copyright 2009, C. Lanier Be

Independence

Independence
Example: The internet survey.
None

Dial-up

DSL

Cable

T1/Fiber

Other

Urban

.098

.039

.088

.071

.001

.019

.316

Suburban

.159

.086

.130

.114

.008

.024

.521

Rural

.074

.035

.030

.016

.000

.008

.163

.331

.160

.248

.201

.009

.051

(orange circle)

## How about events that are close to independent?

Interpretation?

(green circles)

2.9

Random Variables
random variable: an experiment with numerical outcomes
Two examples:
Rolling two dice and counting the number of spots
A week passes and the stock market goes up or down some %
Notation. We denote a random variable with a capital letter, like X or Y.
Terminology. We will say things like:
Let the random variable X be the outcome of rolling two fair dice
By which we mean: There is an experiment (i.e., roll two dice), with a
numerical outcome space (e.g., {2, 3, ..., 12}). We will denote the actual
outcome (before we know it) by the symbol X.

## Our old friend event

Events. An event is a result of the relevant experiment, as in: the event
X = 4; or, the event X is odd
By which we mean: The outcome of the experiment is 4;
or, the outcome of the experiment is one of the list {3, 5, 7, 9, 11}.
So, summing up the terminology:
We write things like: Prob{ X = 4} = 3/36
We say this as: The probability of the event `X equals 4 is 3/36
Or sometimes just: The probability that X equals 4 is 3/36

10

## Why study random variables?

Most economics applications involve numerical outcomes (e.g.,

## prices, quantities, sales, etc).

Computers can more easily manipulate numerical versus character

experimental outcomes.
We can compute averages and other measures of central tendency.
E.g.: Expected auto sales under a carbon tax.

## e.g., stock market volatility, exchange rate fluctuations, bond yields.

We can determine how uncertainty in one thing (e.g., gas prices)

11

## Copyright 2010 C. Lanier Benkard

Variance
Associates
Variance
Associates
The President of VA is not pleased with performance.
The President of VA is not pleased with performance.
VA has had good and bad years in the past, but cumulatively it is just
breaking
good and bad years in the past, but cumulatively it is
even.
just breaking even.
Out of frustration, he hires a consultant...
Out of frustration,
he hires aHarbus,
consultant
Poindexter
III
Poindexter Harbus, III (FILS `93)

Before we start the case, what are the key features of this market?
Before we start the case, what are the key features of this market?

12

## Key Features of Market

Market characterized by:
1. Capacity Constraints
2. Uncertain Demand
These are common features of many markets:
Leasing firms in general (office space, fleets, rental cars, etc)
Heavy mfg (ships, aircraft, heavy machinery)
Power generation
Internet/Telecomm services
Queues: bank tellers, ATMs, McDonalds
Because it takes a long time to put in place more capacity,
markets like these are thought to be key to the understanding

3.13

## Variance Associates: Expected Demand

Here is the information Poindexter initially has:
Demand
Prob

0
0.2

Fear Us
1
2
3
0.1 0.4 0.1

4
0.2

Demand
Prob

0
0.1

Oops
1
2
0.2 0.4

3
0.2

4
0.1

3.14

## Variance Associates: Expected Demand

Here is the information Poindexter initially has:
Demand
Prob

0
0.2

Fear Us
1
2
3
0.1 0.4 0.1

4
0.2

Demand
Prob

0
0.1

Oops
1
2
0.2 0.4

3
0.2

4
0.1

## From this information he calculates:

Fear Us Expected Demand:

## 0.2 + 1.1 + 2.4 + 3.1 + 4.2 =

0 + .1 + .8 + .3 + .8 =

## Oops Expected Demand:

0 .1 + 1 .2 + 2 .4 + 3 .2 + 4 .1 =
0 + .2 + .8 + .6 + .4 =

## Expected demand is the probability-weighted average of demand.

Total expected demand equals the sum of expected demands = 4

3.15

## Expected Cash Flows

Poindexter makes the following tables and calculates the
expected cash flow from each customer:
F earUs' Cash F low Distribution (\$ in 000s)
Demand
0
1
2
3
Prob
0.2
0.1
0.4
0.1
Revenue
\$0
\$150
\$300
\$450
Costs
\$300
\$300
\$300
\$300
Cash F low
(\$300)
(\$150)
\$0
\$150

4
0.2
\$600
\$300
\$300

Demand
0
1
2
3
Prob
0.1
0.2
0.4
0.2
Revenue
\$0
\$150
\$300
\$450
Costs
\$300
\$300
\$300
\$300
Cash F low
(\$300)
(\$150)
\$0
\$150

4
0.1
\$600
\$300
\$300

Expected
300
300
0

300
300
0

16

## Copyright 2010 C. Lanier Benkard

Poindexter
Reports
Variance
Associates
Poindexter Reports

## VA should expect 4 of their planes to be on the ground

VAeach
should
expect 4 of their 8 planes to be on the ground each month.
month.
Under VAs current business policies, the expected cash flow each
Under VAs current business policies, the expected
month
is in each
fact \$0.
cash flow
month is in fact \$0.
How did Poindexter arrive at his figures?

3.9

17

## Econ 131a Econometrics and Data Analysis I

Expected Value

Expected Value
Expected Value. If X is a r.v., the expected value (or expectation) of X is
E(X) =

outcomes

## Two General Principles:

1. If X is a r.v. and a,b are numbers,
E(a + bX) = a + bE(X)
In our example,
E(profits) = price * E(demand) - total costs
2. If X and Y are r.v.s, then E(X + Y) = E(X) + E(Y).
In our example,
E(total profits) = E(profits from FearUs) + E(profits from Oops)
3.12

18

New Strategy
Poindexters proposal:
Sell off one plane, and keep only 7 to meet demand.
To satisfy the customers, offer a new policy:
If a customer ever asks for a plane and VA does not have one, VA will pay

## Is Poindexter right -- will VA make money under the

new strategy?
First, what do we need to know to answer this
question?

19

New Strategy
Poindexters proposal:
Sell off one plane, and keep only 7 to meet demand.
To satisfy the customers, offer a new policy:
If a customer ever asks for a plane and VA does not have one, VA will pay

## Is Poindexter right -- will VA make money under the

new strategy?
First, what do we need to know to answer this
question?
...the probability distribution of total demand.

20

## Analysis of 7 Plane Strategy

Poindexter multiplies the marginals to get the following probability table:

Oops
Demand

0
1
2
3
4

0
0.02
0.04
0.08
0.04
0.02
0.2

Fear Us Demand
1
2
3
0.01 0.04 0.01
0.02 0.08 0.02
0.04 0.16 0.04
0.02 0.08 0.02
0.01 0.04 0.01
0.1 0.4 0.1

4
0.02
0.04
0.08
0.04
0.02
0.2

0.1
0.2
0.4
0.2
0.1

Total Dem.
Prob

.02

.05

.14

.17

.24

.17

.14

.05

.02
3.14

21

## Copyright 2010 C. Lanier Benkard

The Analysis
of the
7 Plane Option
The
7 Plane
Strategy
From this he creates a table to compute expected cash flow:
Expected Cash Flow Calculation - (\$ in 000s)

Expected
\$597
\$ 3
\$525
\$ 69

3.15

22

## What about only 4 planes?

The president likes this.
But now he wonders: Can I get by with fewer planes?
We expect demand to be only 4 planes
He reasons:
If thats what we expect, we should just carry four planes.
Instead of carrying enough to handle the maximum demand, well carry

## enough to handle the average demand, and suitably compensate FearUs

and Oops with a free plane if were short.

planes?

23

## What about only 4 planes?

The president likes this.
But now he wonders: Can I get by with fewer planes?
We expect demand to be only 4 planes
He reasons:
If thats what we expect, we should just carry four planes.
Instead of carrying enough to handle the maximum demand, well carry

## enough to handle the average demand, and suitably compensate FearUs

and Oops with a free plane if were short.

planes?
Yes! \$96k

## 24Copyright 2010 C. Lanier Benkard

Other
Options?
Other options?
We calculate
thethe
distribution
of of
cash
ofthe
thealternative
alternative
We calculate
distribution
cashflows
flowsunder
under each
each of
strategies:
strategies:
Cash Flows in \$000s
Total Dem. 0
1
2
3
4
5
6
7
8
E(Demand)
Prob
0.02 0.05 0.14 0.17 0.24 0.17 0.14 0.05 0.02
4
Cash Flow
E(Cash Flow)
4 Planes (\$300) (\$150) \$0 \$150 \$300 \$150 \$0 (\$150) (\$300)
\$ 96
5 Planes (\$375) (\$225) (\$75) \$75 \$225 \$375 \$225 \$75 (\$75)
\$ 135
6 Planes (\$450) (\$300) (\$150) \$0 \$150 \$300 \$450 \$300 \$150
\$ 123
7 Planes (\$525) (\$375) (\$225) (\$75) \$75 \$225 \$375 \$525 \$375
\$69
8 Planes (\$600) (\$450) (\$300) (\$150) \$0 \$150 \$300 \$450 \$600
\$0

3.17

25
131a Econometrics and Data Analysis I

## Copyright 2010 C. Lanier Benkard

Uh, ohSomethings
wrong
Moving
on: The Analysis Continues
VAs accountant, Flim Flambert, joins the fray.

## VAs accountant, Flim Flambert, joins the fray.

He is concerned about VAs monthly

cash
flow
He
is position.

## cash flow position.

Specifically, Flim is concerned with the risk of cash flows under the old and

Specifically,
concerned
withrisk,
the risk
of cash flows
under in
new
strategies. ToFlim
get aismeasure
of this
he computes
the variance
the old
and new strategies. To get a measure of this risk, he
monthly
income.
computes the variance in monthly income.

I cantIreconcile
Poindexters
probabilities
with our with
past our
cash flows. We
cant reconcile
Poindexters
probabilities
have more
variance
in our
Poindexters
figures imply.
past cash
flows.
Wecash
haveflows
morethan
variance
in our cash

3.18

26

## Variance of a Random Variable.

Variance
of
a
Random
Variable
The variance of a r.v. is a measure of how dispersed its outcomes are.
variance: a measure of how dispersed the outcomes of a random
Variance. variable
If X is a r.v.,
arethe variance of X is
Var(X) =

outcomes

## (value of outcome - expected outcome)2 * (prob of outcome)

Standard Deviation.

SD(X) =

Var(X)

## Concept: Variance and S.D. are interpreted as a measure of our confidence

in the expected value as a predictor of an uncertain outcome.
expected value as a predictor of an uncertain outcome
Higher variance is viewed as higher risk in financial contexts.

## Variance and SD can be interpreted as our confidence in the

Fact:
Higher
variance
is viewed
as +higher
financial contexts
If a,b
are numbers,
Var(a
bX) =risk
b2 *in Var(X)
If a and b are numbers, Var(a+bX) = b2 * Var(X)

3.19

27

## Econ 131a Econometrics and Data Analysis I

Variance Calculations

Variance Calculations
To calculate measures of spread for each, we construct the following tables:
Information Common to Both Variance Calculations (\$ in 000s)
Total Demand
0
1
2
3
4
5
6
7
8
Cash Flow
(\$600)
(\$450) (\$300) (\$150) \$0 \$150 \$300 \$450
\$600
E(Cash Flow)
0
0
0
0
0
0
0
0
0
Square Dev
360000 202500 90000 22500 0 22500 90000 202500 360000

Probability
Sq Dev*Prob

Probability
Sq Dev*Prob

## Poindexter's Table for Variance Calculation (\$ in 000s)

0.02
0.05
0.14 0.17 0.24 0.17 0.14
0.05
7200
10125 12600 3825
0
3825 12600 10125
Flambert's Table for Variance Calculation (\$ in 000s)
0.08
0.09
0.08
0.1 0.23 0.14 0.19
28800 18225 7200 2250
0 3150 17100

0.03
6075

0.02
7200

0.06
21600

## Note: Squared Deviation = (Random Var - Expected)^2

Variance
Poindexters Calculations
Flamberts Calculations

67,500
104,400

Standard Dev

259.8
323.1

3.20

28

## Econ 131a Econometrics and Data Analysis I

Variance
Analysis
What
went
wrong?
To reconcile
the discrepancy
between
Flim
To reconcile
the discrepancy
betweentheir
theirvariance
variance estimates,
estimates, Flim
and Poindexter
create
a probability
from
and Poindexter
create
a probabilitytable
tablefor
forthe
themonthly
monthly demand
demand from
each each
customer:
customer:

NEW (Flambert)

Oops
Demand

0
0 0.08
1 0.07
2 0.03
3 0.01
4 0.01
0.2

Fear Us Demand
1
2
3
4
0.02
0
0
0 0.1
0.05 0.07
0 0.01 0.2
0.02 0.21 0.03 0.11 0.4
0.01
0.1 0.06 0.02 0.2
0 0.02 0.01 0.06 0.1
0.1
0.4
0.1
0.2

OLD (Poindexter)

Oops
Demand

0
1
2
3
4

0
0.02
0.04
0.08
0.04
0.02
0.2

Fear Us Demand
1
2
3
0.01 0.04 0.01
0.02 0.08 0.02
0.04 0.16 0.04
0.02 0.08 0.02
0.01 0.04 0.01
0.1 0.4 0.1

4
0.02
0.04
0.08
0.04
0.02
0.2

0.1
0.2
0.4
0.2
0.1

What do you infer from the new probability table about demand
What do you infer from the new probability table about demand patterns
patterns of the two customers?
of the two customers?
3.21

## Econ 131a Econometrics and Data Analysis I

Graphical Interpretation

Graphical Interpretation
Poindexter's Total Demand

Fear Us Demand
0.2
Probability

Probability

0.25

0.4
0.35
0.3
0.25
0.2
0.15
0.1
0.05
0

0.15
0.1
0.05
0

Demand

Demand

0.4
0.35
0.3
0.25
0.2
0.15
0.1
0.05
0

0.25
Probability

Probability

Oops Demand

0.2
0.15
0.1
0.05
0

Demand

Demand

3.22

30

## Copyright 2010 C. Lanier Benkard

Covariance
Covariance
How do we quantify this association? Covariance.
Covariance. If X and Y are two random variables, then
Cov(X,Y) =

## (Value of X outcome - E(X)) * (Value of Y outcome - E(Y))

joint outcomes
* (Joint prob of X and Y)

Intuition:
Cov(X,Y) > 0:
Cov(X,Y) < 0:
Cov(X,Y) = 0:

## when X goes up, Y tends to go up;

or when X goes down, Y tends to go down.
when X goes up, Y tends to go down;
or when X goes down, Y tends to go up.
no (linear) association between X and Y

The covariance measures the linear association between two random variables.
Fact: If a,b,c,d are numbers, Cov( a+bX , c+dY ) = b d Cov(X,Y)
3.23

31

## Reconciling Poindexter and Flim

What is the covariance of FearUs and Oops demands?
Flim has discovered that the two random variables (FearUs demand
and Oops demand) are not independent. They covary.

32

## Econ 131a Econometrics and Data Analysis I

Calculating theCovariance
Covariance in Demand
Calculating
of Demands
Product
Oops (X)
0
1
2
3
4
0
1
2
3
4
0
1
2
3
4
0
1
2
3
4
0
1
2
3
4

Fear Us (Y)
0
0
0
0
0
1
1
1
1
1
2
2
2
2
2
3
3
3
3
3
4
4
4
4
4

Prob
0.08
0.07
0.03
0.01
0.01
0.02
0.05
0.02
0.01
0
0
0.07
0.21
0.1
0.02
0
0
0.03
0.06
0.01
0
0.01
0.11
0.02
0.06

E[X]
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2

E[Y]
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2

X-E[X]
-2
-1
0
1
2
-2
-1
0
1
2
-2
-1
0
1
2
-2
-1
0
1
2
-2
-1
0
1
2

Y-E[Y]
-2
-2
-2
-2
-2
-1
-1
-1
-1
-1
0
0
0
0
0
1
1
1
1
1
2
2
2
2
2

4
2
0
-2
-4
2
1
0
-1
-2
0
0
0
0
0
-2
-1
0
1
2
-4
-2
0
2
4

Prod * Prob
0.32
0.14
0
-0.02
-0.04
0.04
0.05
0
-0.01
0
0
0
0
0
0
0
0
0
0.06
0.02
0
-0.02
0
0.04
0.24

Covariance:

0.82

(X-E[X])*(Y-E[Y])

3.28

33

## Reconciling Poindexter and Flim

What is the covariance of FearUs and Oops demands?
Flim has discovered that the two random variables (FearUs demand
and Oops demand) are not independent. They covary.
How does this affect Poindexters original expected value and variance
calculations?
The expected value calculation is still correct.
Poindexters variance calculation is not correct.
Why?

34

## Variance of a Sum of two RVs

If X and Y are two random variables, then:
Var(X + Y) = Var(X) + Var(Y) + 2 Cov(X,Y)
Intuition: If two r.v.s negatively covary, they will tend to cancel each
other out and reduce the variance of the sum; if they positively
covary, they will tend to magnify the variance of the sum.
So: Why did independence matter here?
X, Y independent implies Cov(X, Y) = 0

35

## So, why is Poindexters variance calculation wrong?

Because the monthly demand from FearUs and the monthly demand from

Oops have positive covariance, it follows that the true variance in VAs profits
is larger than what one would get using Poindexters independence
assumption.
Some further questions:
What effect does the covarying demand have on outages?
What impact does covarying demand have on VAs expected cash flow? With

## 8 planes? Less than 8 planes?

What is the optimal number of planes to hold with covarying demand?

36

## Corrected Expected Cash Flow

Total Dem. 0
1
2
3
4
5
6
7
8
E(Demand)
Prob
0.08 0.09 0.08 0.1 0.23 0.14 0.19 0.03 0.06
4
Cash Flow
4 Planes (\$300) (\$150) \$0
\$150
\$300
\$150
\$0
(\$150) (\$300)
\$45
Options?
5 Planes (\$375) Other
(\$225) (\$75)
\$75
\$225
\$375
\$225
\$75
(\$75)
\$96
6 Planes (\$450) (\$300) (\$150) \$0
\$150
\$300
\$450
\$300
\$150
\$105
7 Planes (\$525) (\$375)
(\$225) (\$75)
\$75
\$225
\$525
\$375
\$57
We calculate
the distribution
of cash\$375
flows under
each
of the alternative
8 Planes (\$600) (\$450)strategies:
(\$300) (\$150)
\$0
\$150
\$300
\$450
\$600
\$0
Econ 131a Econometrics and Data Analysis I

Uncorrected
Cash Flow:

## Cash Flows in \$000s

Total Dem. 0
1
2
3
4
5
6
7
8
E(Demand)
Prob
0.02 0.05 0.14 0.17 0.24 0.17 0.14 0.05 0.02
4
Cash Flow
E(Cash Flow)
4 Planes (\$300) (\$150) \$0 \$150 \$300 \$150 \$0 (\$150) (\$300)
\$ 96
5 Planes (\$375) (\$225) (\$75) \$75 \$225 \$375 \$225 \$75 (\$75)
\$ 135
6 Planes (\$450) (\$300) (\$150) \$0 \$150 \$300 \$450 \$300 \$150
\$ 123
7 Planes (\$525) (\$375) (\$225) (\$75) \$75 \$225 \$375 \$525 \$375
\$69
8 Planes (\$600) (\$450) (\$300) (\$150) \$0 \$150 \$300 \$450 \$600
\$0

3.29

37

## What have we learned?

Several concepts including independence, probability tree, random

## variable, expected values, variance, and covariance

Some economics:
This kind of problem shows up in any firm that faces uncertain demand and has
capacity constraints.
Examples: Manufacturing, telecommunication, financial services, semiconductor
fabrication, airline overbooking
Boeing Corp manages this problem well. It offers option contracts that share
demand and price risk with customers
Big lesson: Its often important to study demand as a random variable (with a
probability distribution)Firms shouldnt assume its constant at the expected value
or plan based on the maximum possible.