CSIT 5220
Page 1
L09: Car Buyer Example
Joe is going to buy a used car, which could be good with probability 0.8 or a
lemon with probability 0.2.
Joe's profit will be $60 if the car is good, and $-100 if it is bad.
Before buying the car he has the option of having one test or two tests done on
it.
The first test costs $9, and both together cost $13.
The first test has a 90% chance of returning positive if the car is good, and
a 40% chance if it's a lemon.
If the first test returns positive, then the second test has a 88.89% chance
of returning positive if the car is good, and a 33.33% chance if it's a lemon.
If the first test returns negative, then the second test has a 100% chance of
returning positive if the car is good, and a 44.44% chance if it's a lemon.
How to make the decisions: whether to do the tests, and whether to buy the
car.
CSIT 5220
Page 2
The Model: Decision Graph
Random nodes
Condition (C): {good, lemon};
First Test (F); Second Test (S): {not done, positive, negative}
Decision Nodes
Do Tests (T): {none, first, both}; Buy It (B): {buy don’t buy}
Utility Nodes
U: costs of tests; V: Profits
CSIT 5220
Page 3
The Model: Decision Graph
Probability Distributions for random variables
P(C):
P(F|C, T)
P(S|F, C, T)
CSIT 5220
Page 4
The Model: Decision Graph
Utility functions for utility nodes
U(T)
V(C, B)
CSIT 5220
Page 5
Analysis with Netica
Finding optimal polices with Netica: Compile network and check “table” of
decision nodes
Best decision regarding Tests: none
CSIT 5220
Page 6
Best decision regarding Buy:
No test: Buy
First test: Buy if positive
Both test: Buy if both positive
Impossible scenarios crossed out
CSIT 5220
Page 7
Analysis with Netica
Netica can also compute expected values for different scenario: Just set the
node values, and let Netica do the rest.
T=none
B=buy:
Expected Value: 28
B=don’t buy
Expected Value: 0
CSIT 5220
Page 8
Analysis with Netica
T=first
F=positive (0.8)
B=buy
35 (best second decision)
B=don’t buy
-9
F=negative (0.2)
B=buy
-45
B=don’t buy
-9 (best second decision)
© Copyright 2026 Paperzz