Lecture Seven · 9 June 2026
07Lecture Seven

Risk & Decision
under Uncertainty

When the inputs are not numbers but distributions — decision trees, expected value, utility, and Monte Carlo.

Instructor
Dr. Zhijiang Chen
Session
No. 07 of 16
Date
9 June 2026
Room
YF108
Duration
110 minutes
Format
Lecture + Simulation
Today: probabilities meet PV. Bring Python or a spreadsheet.
Lecture VIIAgenda02 / 20
Today's Plan

Probability for engineers.

§TopicMinutes
I.Risk vs uncertainty — terms first10
II.Decision trees & expected monetary value25
III.Utility & risk attitude15
IV.Monte Carlo simulation25
Discussion: risk-attitude self-assessment10
V.Software-specific risks & bias15
HW7, questions10
Part — One
I

Risk vs uncertainty —
a vocabulary the textbooks
insist on.

§ IVocabulary04 / 20
Knight, 1921

The classical distinction.

Risk

Outcomes uncertain, but probabilities known. Roll of a fair die. Software example: a deployment with a known failure rate.

Uncertainty (true)

Outcomes uncertain AND probabilities unknown. New AI feature adoption. We act as if probabilities exist, but they're really subjective estimates.

Most software-economics problems are technically uncertainty masquerading as risk. We assign probabilities anyway — the act of estimation is half the value.

Part — Two
II

Decision trees —
think out loud, on paper.

§ IITree structure06 / 20
Decisions, chances, terminals

A decision tree is three node types.

□ Decision node

Branches the engineer controls. Pick the branch with the highest expected value.

○ Chance node

Branches nature controls. Multiply each branch's value by its probability; sum.

△ Terminal

An end state. Record the payoff (or cost).

Build the tree left-to-right (in time order). Roll back right-to-left, computing expected values at chance nodes and choosing maxima at decision nodes.

§ IIWorked example07 / 20
Should we ship the AI feature now?

EMV on a real decision.

Two options: A: ship now ($60K dev cost). B: spend $40K on a 6-week customer-discovery study, then decide.

BranchPOutcome NPVContribution
A: ship · high demand0.4+$300K+$120K
A: ship · low demand0.6−$60K−$36K
EMV(A)+$84K
B: study · then ship if signal+$108K *

* The study clarifies the probability, so the conditional ship decision is informed. Despite the $40K cost, the expected outcome rises.

The study creates option value — the right to ship only when conditions favour it. Information has measurable economic worth.

Part — Three
III

Utility & risk attitude —
not everyone treats
a 50/50 the same.

§ IIIUtility functions09 / 20
Beyond expected value

Risk attitude shapes the decision.

EMV treats $1M with certainty as equal to a 50/50 shot at $2M. In practice, decision-makers differ:

AttitudeUtility shapeWill accept
Risk-averseConcave (log, square root)Smaller, more certain payoffs
Risk-neutralLinearAnything with EMV ≥ 0
Risk-seekingConvex (exponential)Lottery-style large variance bets

Most software organisations are moderately risk-averse: a $100K loss hurts more than a $100K gain helps. Frame your decision tree with that in mind.

When you present a positive-EMV project that has substantial downside, expect resistance — and prepare a hedging argument.

Part — Four
IV

Monte Carlo simulation —
let the inputs roll.

§ IVThe technique11 / 20
Probability distributions in, NPV distribution out

Monte Carlo in 4 steps.

  1. Identify the inputs. For each, choose a probability distribution (uniform, normal, triangular, lognormal).
  2. Draw N random samples (typically N = 10,000+) from each input distribution.
  3. For each sample tuple, compute the NPV with your normal formula.
  4. Histogram the resulting N NPVs. Report P10, P50, P90, and the probability of NPV < 0.
P(NPV > 0)  is the modern, intelligible answer to "should we do this?"
§ IVWorked output12 / 20
A 10,000-trial result

Reading a Monte Carlo result.

StatisticValueInterpretation
Mean NPV+$112KAverage across 10K worlds.
P10 NPV−$45K10% chance of NPV being below this.
P90 NPV+$310K10% chance of NPV exceeding this.
P(NPV > 0)76%Three-in-four chance of value creation.

"Mean NPV is $112K with a 24% chance of loss" communicates more than "NPV is $112K." It is also harder to misinterpret.

Discussion10 minutes13 / 20
Find your risk attitude
π

Would you take a 50/50 shot at $1M or a guaranteed $400K?

Vote first. Then in pairs, discuss: why? What does that reveal about your personal utility curve?

  • Now replay: would your answer change if the gamble was a 50/50 at $10M vs $4M guaranteed? Why does the ratio matter so much less?
  • Engineering management often demands risk-averse capital allocation. As an individual contributor, are you more or less risk-tolerant than your manager? Why might that be?
Part — Five
V

Software-specific risks —
the ones your tree
should always have.

§ VRisk catalogue15 / 20
Seven categories

A starter taxonomy for software-project risk.

CategoryExampleMitigation
ScheduleSlip past launch windowBuffer; scope discipline
ScopeRequirements creepChange control; MVP first
TechnicalApproach proves infeasibleSpike / prototype early
PersonnelKey engineer departsKnowledge sharing; redundancy
VendorSaaS price doubles, vendor pivotsMulti-vendor; escape clauses
Model driftLLM behaviour changes mid-contractPinned versions; eval harness
RegulatoryNew AI law forces retrofitCompliance monitoring; design margin

"Model drift" and "regulatory" are the categories most teams underweight in 2026. A model that performs at 92% accuracy today may quietly drift to 86% next quarter.

§ VEstimation bias16 / 20
Why our subjective probabilities are usually wrong

Three biases to budget against.

Optimism

P10 outcomes routinely come true 25–35% of the time, not 10%. Our pessimistic case is rarely pessimistic enough.

Anchoring

The first number on the table dominates the rest of the conversation. Estimate independently before sharing.

Planning fallacy

We systematically underestimate time and effort, even for tasks we've done before.

Adjust subjectively for bias. A useful rule of thumb: take your "realistic" estimate, then ask "what would I think if this had to ship in half the time?" Use that as your new pessimistic.

BridgeTo Lecture 817 / 20

Tomorrow: how big is this project, exactly?

Lectures 8 & 9 turn the right side of our cash-flow models — the costs — into something we can estimate even at proposal stage. Function Points first, COCOMO II second.

Group project briefs are released after Lecture 8. Teams should be forming now.

HomeworkDue Lecture 918 / 20
Homework 07 — due Thursday 11 June

Add probability to your NPV.

  1. Build a decision tree for a real choice your team is facing (or has faced).
  2. Run a 10,000-trial Monte Carlo on the same project. Report mean, P10, P50, P90, P(NPV > 0). Plot the histogram.
  3. One paragraph: which uncertainty would you spend $5K of research budget to reduce — and why?
RecapWhat to remember19 / 20

What today bought you.

  1. A decision tree forces you to make assumptions visible. That alone is usually worth the exercise.
  2. Monte Carlo turns a single NPV into a distribution. "P(NPV > 0) = 76%" is more honest than a single number.
  3. Our subjective probabilities are biased. Build counter-bias into your scenarios; the P10 should hurt.
EndLecture Seven20 / 20
&

Questions & conversation.

Dr. Zhijiang Chen
Software Engineering Economics · Summer 2026
frostburg-state-university.github.io/bju