Sub topic 12
Uncertain durations and three-point estimates
This chapter assumes you can run a forward and backward pass, calculate float, and read the critical path from zero-float activities. The code uses basic Python (dictionaries, loops, functions). Here you replace single-number durations with ranges. You will learn what that does to the critical path and what it cannot fix.
Why a single duration is not enough
The critical path method treats each duration as a fixed number. A task of "4 days" is really a guess, and the true value might be 3, 4, or 11. Real durations are skewed. A task can seldom finish much faster than planned, but it can finish far later. A 4-day task might take 2 days at best and 12 at worst.
If you plan with the most likely value only, you drop that skew. The schedule looks precise, but its dates are optimistic on average. Three-point estimation puts the uncertainty into the numbers before you run the passes.
The three estimates
For each activity, ask the people who will do the work for three values:
- Optimistic (O): the duration if almost everything goes well.
- Most likely (M): the duration under normal conditions.
- Pessimistic (P): the duration if the usual problems occur, such as rework, waiting for a review, or a late delivery. This is not the worst conceivable disaster.
Always check that O ≤ M ≤ P. Ask for the pessimistic value in terms of a stated risk level, for example "a duration you would be surprised to exceed". Otherwise each person will interpret it differently.
The PERT formulas
PERT (Program Evaluation and Review Technique) combines the three values into an expected duration, a weighted average that gives the most likely value four times the weight of either extreme:
expected = (O + 4M + P) / 6
std dev = (P - O) / 6
variance = ((P - O) / 6)^2The standard deviation is a rough measure of spread. It assumes that nearly all outcomes fall between O and P, about six standard deviations wide. It is a convention, not a measured quantity.
def pert_expected(optimistic, most_likely, pessimistic):
return (optimistic + 4 * most_likely + pessimistic) / 6
print(pert_expected(2, 4, 12)) # 5.0The task with estimates (2, 4, 12) has a most likely value of 4 days, but its expected duration is 5.0 days. The long tail pulls the average up. A task with symmetric estimates such as (3, 4, 5) has an expected value equal to its most likely value, 4.0.
| Task | O | M | P | Expected | Std dev |
|---|---|---|---|---|---|
| A | 2 | 3 | 4 | 3.0 | 0.33 |
| B | 1 | 2 | 3 | 2.0 | 0.33 |
| C | 2 | 4 | 12 | 5.0 | 1.67 |
| D | 2 | 3 | 4 | 3.0 | 0.33 |
Task C has the same most likely value as in the usual CPM example (4 days), but a wide range. Its expected duration of 5.0 days now sets the length of the network.
Feeding expected durations into the critical path method
Use the expected duration as the duration of each activity, then run the forward pass, backward pass, and float calculation exactly as before. Nothing in the method changes. Only the inputs change.
Putting a spread on the project duration
Once you have the critical path, you can estimate how uncertain its total length is. If the activity durations are independent, the variance of the path is the sum of the activity variances. Standard deviations do not add. Variances do. Then:
- Sum the expected durations on the critical path to get the expected project duration.
- Sum the variances on that path and take the square root to get the path standard deviation.
- Compute z = (deadline − expected) / standard deviation.
- Read the probability from the normal distribution at z.
The following program does all four steps for the table above.
import math
estimates = {
"A": (2, 3, 4),
"B": (1, 2, 3),
"C": (2, 4, 12),
"D": (2, 3, 4),
}
preds = {"A": [], "B": ["A"], "C": ["A"], "D": ["B", "C"]}
def expected(o, m, p):
return (o + 4 * m + p) / 6
def variance(o, p):
return ((p - o) / 6) ** 2
mean = {t: expected(*e) for t, e in estimates.items()}
var = {t: variance(e[0], e[2]) for t, e in estimates.items()}
# Forward pass on expected durations, remembering the driving predecessor
finish = {}
best_pred = {}
for t in estimates: # predecessors are listed first
if preds[t]:
p = max(preds[t], key=lambda x: finish[x])
best_pred[t] = p
start = finish[p]
else:
start = 0
finish[t] = start + mean[t]
# Walk back from the last-finishing task
node = max(finish, key=finish.get)
path = [node]
while node in best_pred:
node = best_pred[node]
path.append(node)
path.reverse()
path_mean = finish[path[-1]]
path_sd = math.sqrt(sum(var[t] for t in path))
def prob_by(deadline):
z = (deadline - path_mean) / path_sd
return 0.5 * (1 + math.erf(z / math.sqrt(2)))
print(path) # ['A', 'C', 'D']
print(round(path_mean, 1)) # 11.0
print(round(path_sd, 2)) # 1.73
print(round(prob_by(11), 2)) # 0.5
print(round(prob_by(12), 2)) # 0.72
print(round(prob_by(14), 2)) # 0.96The expected length is 11 days. A deadline equal to the expected length has only a 50% chance of being met, not a high one. A deadline of 12 days gives about 72%. To be 95% sure, you need roughly the expected length plus 1.65 standard deviations, which is about 14 days here.
The merge bias: why the expected path is optimistic
The calculation above has a flaw that matters most in networks with parallel paths. Suppose two independent paths merge at the final task, and each has an expected length of 10 days with a standard deviation of 2. The project finishes when the later path finishes. Each path alone has a 50% chance of finishing by day 10, so both do so with probability about 0.5 × 0.5 = 25%.
The true expected finish is therefore later than 10 days, but the CPM calculation reports 10. This is called merge event bias. It grows with the number of parallel paths and with how close their lengths are. Three consequences follow:
- A network with many near-critical paths is riskier than the critical path alone suggests.
- The path with the longest expected duration is not always the path most likely to be late. A shorter path with high variance can overtake it.
- The probability computed from a single path is an upper bound on the true probability of meeting the deadline.
Limits of the PERT formulas
The formulas are a convenient approximation. Know where they are weak:
- The 1:4:1 weighting and the (P − O) / 6 spread are conventions. They fit a beta distribution only roughly.
- The normal approximation for a path needs enough activities on it. With only two or three, the path distribution is noticeably skewed.
- Independence is assumed. In practice, one cause such as a shortage of a key engineer delays many tasks at once, so real variance is larger than the sum of the parts.
- Estimates carry bias. People tend to set O too close to M and give a small P. Collecting estimates from several people and recording actuals against them improves calibration.
- Activities on near-critical paths need ranges too. Applying three-point estimates only to critical activities hides the risk elsewhere.
Common errors
- Using the most likely value as the duration and calling the result "expected". It is the mode, not the mean.
- Adding standard deviations along the path instead of variances.
- Treating a 50% date as a safe commitment.
- Recomputing float with the expected durations but not rechecking which path is critical. A change of one day on a high-variance task can move the critical path.
- Giving a pessimistic estimate that covers only mild delays, which makes the spread look smaller than it is.
Exercise
A task has estimates O = 3, M = 6, P = 15 days. What are its PERT expected duration and standard deviation?
Show answer
Expected = (3 + 4 × 6 + 15) / 6 = 42 / 6 = 7.0 days. Standard deviation = (15 − 3) / 6 = 2.0 days. The expected value is above the most likely value because the pessimistic end is much farther from M than the optimistic end.
Exercise
The critical path has an expected length of 40 days and a total variance of 16. What is the approximate probability of finishing within 44 days, and why might the true probability for the whole project be lower?
Show answer
The standard deviation is sqrt(16) = 4 days. z = (44 − 40) / 4 = 1.0, which corresponds to about 84%. The true project probability can be lower because other, near-critical paths also have to finish on time (merge event bias), and because the calculation assumes independent durations.
Exercise
Two independent parallel paths each have an expected length of 20 days and the same spread. What is the approximate probability that the project finishes by day 20, and what does this show?
Show answer
Each path has about a 50% chance of finishing by day 20, so both do with about 0.5 × 0.5 = 25%. This shows that the expected critical path length is optimistic whenever several paths are close to critical.