Part 01 / Topic 5 of 8
Estimating under uncertainty
Customers plan budgets and staffing around your estimates, and single-number estimates are almost always wrong in the optimistic direction. A three-point (PERT) estimate asks for an optimistic, most-likely, and pessimistic duration per task, and combines them as (optimistic + 4 × most likely + pessimistic) / 6 — the pessimistic tail pulls the expected value up, which matches how integration work actually goes.
# examples/02_three_point_pert_estimates_for_an.py
tasks = { # (optimistic, most likely, pessimistic) in days
"Connect to Acme API": (2, 4, 10),
"Clean and load shipment data": (3, 5, 12),
"Dispatch dashboard": (4, 6, 9),
"Email auto-replies (AI)": (3, 7, 15),
}
total = 0.0
for name, (o, m, p) in tasks.items():
expected = (o + 4 * m + p) / 6 # PERT expected duration
total += expected
print(f"{name:30s} expected {expected:4.1f} days (range {o}-{p})")
print(f"{'Total':30s} expected {total:4.1f} days")
# Connect to Acme API expected 4.7 days (range 2-10)
# Clean and load shipment data expected 5.8 days (range 3-12)
# Dispatch dashboard expected 6.2 days (range 4-9)
# Email auto-replies (AI) expected 7.7 days (range 3-15)
# Total expected 24.3 days
About 24 working days of expected effort against a 6-week (30 working day) pilot: feasible, but with little slack — which is itself worth saying out loud in the plan. Give estimates as ranges, state the assumptions, and revise them visibly when the facts change. (Track D, the Engagement Lead track in Stage 5, runs a Monte Carlo over exactly this plan.)
🧪 Quick quiz
- With PERT, a task estimated at 2 days (best), 4 days (likely) and 10 days (worst) has what expected duration?
Show the answer
(2 + 4×4 + 10) / 6 = 4.7 days. The long worst case pulls the expected value above the most likely one. (verified against the example output above)
Done here? The practice set for Part 1 — 4 exercises with solutions — is on the part page.