Download as pdf or txt
Download as pdf or txt
You are on page 1of 12

Solutions to practice problems: Bayesian Updating

A1) We start by collecting the relevant prior and conditional probabilities given in the problem:

P( dry ) = 0.3 P( Light Rain | dry ) = 0.8 P( Heavy Rain | dry ) = 0.2
P( moderate) = 0.5 P( Light Rain | moderate) = 0.45 P( Heavy Rain|moderate) = 0.55
P( damp ) = 0.2 P( Light Rain | damp ) = 0.3 P( Heavy Rain | damp ) = 0.7

Then we can calculate the required posterior probabilities:

Light Rain report:

state prior conditional joint posterior


dry 0.3 0.8 0.24 0.457
mod 0.5 0.45 0.225 0.429
damp 0.2 0.3 0.06 0.114
And the marginal probability of a prediction of Light Rain: 0.525

Heavy Rain report:

state prior conditional joint posterior


dry 0.3 0.2 0.06 0.126
mod 0.5 0.55 0.275 0.579
damp 0.2 0.7 0.14 0.295
And the marginal probability of a prediction of Heavy Rain: 0.475

Recall the payoff table from Q4 in Decision Analysis Practice Problems:

Dry Moderate Damp


Crop 1 $20,000 $35,000 $40,000
Crop 2 $22,500 $30,000 $45,000
Crop 3 $30,000 $25,000 $25,000
Crop 4 $20,000 $20,000 $20,000

Note that Crop 4 is a dominated alternative, that has worse payoffs than Crop 3 in all situations. It can be
excluded from further analysis (but we left it in the tree anyway to practice the calculations).

This problem can be finished with a decision tree (next three pages)
TreePlan Student License 0.457143 For Education Only
Dry
20000
20000

0.428571
Crop 1 Mod
35000
28714.29 35000

0.114286
Damp
40000
40000

0.457143
Dry
22500
22500

0.428571
Crop 2 Mod
30000
28285.72 30000

0.114286
Damp
0.525 45000
Light Rain 45000
1
28714.29 0.457143
Dry
30000
30000

0.428571
Crop 3 Mod
25000
27285.71 25000

0.114286
Damp
25000
25000

0.457143
Dry
20000
20000

0.428571
Crop 4 Mod
20000
20000 20000

0.114286
Damp
20000
Report 20000

31500
Report

31500 0.126316
Dry
20000
20000

0.578947
Crop 1 Mod
35000
34578.95 35000

0.294737
Damp
40000
40000

0.126316
Dry
22500
22000

0.578947
Crop 2 Mod
30000
33473.68 30000

0.294737
Damp
0.475 45000
Heavy Rain 45000
1
34578.95 0.126316
Dry
30000
30000

0.578947
Crop 3 Mod
25000
25631.58 25000

0.294737
Damp
25000
25000
1
31500 0.126316
Dry
20000
20000

0.578947
Crop 4 Mod
20000
20000 20000

0.294737
Damp
20000
20000
0.3
Dry
20000
20000

0.5
Crop 1 Mod
35000
31500 35000

0.2
Damp
40000
40000

0.3
Dry
22500
22500

0.5
Crop 2 Mod
30000
30750 30000

0.2
Damp
45000
No Report 45000
1
31500 0.3
Dry
30000
30000

0.5
Crop 3 Mod
25000
26500 25000

0.2
Damp
25000
25000

0.3
Dry
20000
20000

0.5
Crop 4 Mod
20000
20000 20000

0.2
Damp
20000
20000
Since we make the same decision (plant crop 1) with either prediction, and this decision is the same as
with no report (see Q4 in Decision Analysis), we suspect the farmer’s almanac is not actually helpful.

To confirm, we calculate expected value of using the almanac using the (marginal) report probabilities:

EV[ using almanac ] = 0.525 * $ 28,714.29 + 0.475 * $ 34,578.95 = $31,500

Which is the same expected value as in the original question

The EVSI of the almanac is $0.

Note: when you are using rounded posterior probabilities (0.457, 0.429, etc.), your EVSI can become a
small positive or negative number due to rounding errors. In exam, if needed, you will be asked to
calculate the probabilities up to a specific number of fractional digits.
A2) Relevant probabilities (priors and conditionals) given in the problem:

P( low demand ) = 0.2 P( medium demand) = 0.3 P( high demand ) = 0.5

P( Negative | low ) = 0.7 P( Negative | medium ) = 0.25 P( Negative | high ) = 0

P( Neutral | low ) = 0.3 P( Neutral | medium ) = 0.6 P( Neutral | high ) = 0.25

P( Positive | low ) = 0 P( Positive | medium ) = 0.15 P( Positive | high ) = 0.75

Posterior Probabilities for each Report Outcome:

Negative report:

state prior conditional joint posterior


low 0.2 0.7 0.14 0.651
medium 0.3 0.25 0.075 0.349
high 0.5 0 0 0
And the marginal probability of a Negative Report: 0.215

Neutral report:

state prior conditional joint posterior


low 0.2 0.3 0.06 0.164
medium 0.3 0.6 0.18 0.493
high 0.5 0.25 0.125 0.342
And the marginal probability of a Neutral Report: 0.365

Positive report:

state prior conditional joint posterior


low 0.2 0 0 0
medium 0.3 0.15 0.045 0.107
high 0.5 0.75 0.375 0.893
And the marginal probability of a Positive Report: 0.42

Answer to first part: Report Outcome probabilities are 21.5%, 36.5% and 42% (for Negative, Neutral
and Positive Reports)

Answer to second part: Posterior Probabilities are given in the tables above (right columns)
TreePlan Student License 0.651163 For Education Only
Low
-20000
-20000

0.348837
Manufacture Medium
40000
930.2326 40000

0
High
0.215 100000
Negative Report 100000
2
22209.3 0.651163
Low
10000
10000

0.348837
Purchase Medium
45000
22209.3 45000

0
High
70000
70000

0.164384
Low
-20000
-20000

0.493151
Manufacture Medium
40000
50684.93 40000

0.342466
High
0.365 100000
Report Neutral Report 100000
1
62575 50684.93 0.164384
Low
10000
10000

0.493151
Purchase Medium
45000
47808.22 45000

0.342466
High
70000
70000

0
Low
-20000
-20000

0.107143
Manufacture Medium
40000
93571.43 40000

0.892857
High
0.42 100000
Positive Report 100000
1 1
62575 93571.43 0
Low
10000
10000

0.107143
Purchase Medium
45000
67321.43 45000

0.892857
High
70000
70000

0.2
Low
-20000
-20000

0.3
Manufacture Medium
40000
58000 40000

0.5
high
100000
No Report 100000
1
58000 0.2
Low
10000
10000

0.3
Purchase Medium
45000
50500 45000

0.5
high
70000
70000

Answer to third part: The best decision given a Positive or Neutral report is to Manufacture. The best
decision given a Negative Report is to Purchase.

The Expected Value with the report is calculated using the best expected values from each report
outcome, times the report probabilities:

EV[ Using the Report] = 21.5% * $ 22,209.30 + 36.5% * $ 50,684.93 + 42% * $ 93,571.43

= $62,575

Using the priors, the original expected value of the best decision (which is to manufacture), is:

EV[ Manfacture (without report)] = 0.2 * (-20,000) + 0.3 * (40,000) + 0.5 * (100,000)

= $ 58,000

(you can check that the EV of Purchase using the original probabilities is only $50,500)

So the EVSI of the Report is

EVSI = EV with Report – EV without Report

= $62,575 - $58,000

= $4,575
The EV with perfect information is calculated by using the priors and picking the best outcome assuming
we know the state:

EV with perfect info = 0.2 * (10,000) + 0.3 * (45,000) + 0.5 * ( 100,000)

= $65,500

So EVPI is found by:

EVPI = EV with perfect info – EV without report

= $65,500 - $58,000

= $7,500

Finally, the Efficiency is the ratio of the EVSI to the EVPI:

Efficiency = $4,575 / $7,500

= 61%
A3)

Did you catch that the given probabilities about the report are actually Posterior Probabilities?

We have:

P( contract ) = 0.4 P( contract | Favourable ) = 0.7 P( contract | Unfavourable ) = 0.2

P( no contract) = 0. 6 P( no contract | Favourable ) = 0.3 P( no contract | Unfavourable ) = 0.8

The question also includes a marginal report probability:

P( Favourable Report ) = 0.5 P( Unfavourable Report ) = 0.5


TreePlan Student License 0.7 For Education Only
Contract
40000
Drill 40000

25600 0.3
No Contract
-8000
-8000

0.7
Contract
0.5 20000
Favourable Lathe 20000
1
0 25600 15200 0.3
No Contract
4000
4000

0.7
Contract
12000
Grinder 12000

11400 0.3
No Contract
10000
Report 10000

0 18000 0.2
Contract
40000
Drill 40000

1600 0.8
No Contract
-8000
-8000

0.2
Contract
0.5 20000
Unfavourable Lathe 20000
3
0 10400 7200 0.8
No Contract
4000
4000

0.2
1 Contract
18000 12000
Grinder 12000

10400 0.8
No Contract
10000
10000
0.4
Contract
40000
Drill 40000

11200 0.6
No Contract
-8000
-8000

0.4
Contract
20000
No Report Lathe 20000
1
0 11200 10400 0.6
No Contract
4000
4000

0.4
Contract
12000
Grinder 12000

10800 0.6
No Contract
10000
10000

The best decision given a Favourable Report is to buy the Drill Press, while the best decision given an
Unfavourable Report is to buy the Grinder.

The Expected Value with the report is calculated using the best expected values from each report
outcome, times the report probabilities:

EV[ Using the Report] = 50% * $ 25,600 + 50% * $ 10,400

= $18,000

Using the priors, the original expected value of the best decision (which is to buy the Drill Press), is:

EV[ Drill Press (without report)] = 0.4 * ($40,000) + 0.6 * ($-8,000)

= $ 11,200

So the EVSI of the Report is

EVSI = EV with Report – EV without Report

= $18,000 - $11,200

= $6,800
The EV with perfect information is calculated by using the priors and picking the best outcome assuming
we know the state:

EV with perfect info = 0.4 * ($40,000) + 0.6 * ($10,000)

= $22,000

So EVPI is found by:

EVPI = EV with perfect info – EV without report

= $22,000 - $11,200

= $10,800

Finally, the Efficiency is the ratio of the EVSI to the EVPI:

Efficiency = $6,800 / $10,800

= 62.96%

You might also like