Sub topic 4
PERT expected duration: (O + 4M + P) / 6
This chapter assumes you know basic scheduling vocabulary (task, duration, dependency, critical path) and what an average is. It also assumes you have a rough idea of what a probability distribution is. You do not need to know the beta distribution. The chapter explains the one fact about it that you need.
By the end you should be able to compute the PERT expected duration for a task and say what the number does and does not mean. You should also be able to predict how it reacts to changes in each input, and avoid the usual mistakes in using it.
The formula
You have three estimates for a task: optimistic (O), most likely (M) and pessimistic (P). The PERT expected duration, written E or TE, is a weighted average of them:
E = (O + 4M + P) / 6
The weights are 1, 4 and 1, and they sum to 6. That is why you divide by 6. Written as fractions, the formula is E = (1/6)·O + (4/6)·M + (1/6)·P. Two thirds of the result comes from the most likely value. The two extremes share the remaining third equally.
A worked example
Take a task with O = 4, M = 6 and P = 14 days.
- Multiply M by 4: 4 × 6 = 24.
- Add all three terms: 4 + 24 + 14 = 42.
- Divide by 6: 42 / 6 = 7.0 days.
The simple triangular average from the previous chapter gives (4 + 6 + 14) / 3 = 8.0 days. PERT lands a full day lower because it gives the long pessimistic tail a weight of 1/6 instead of 1/3. The expected duration is still above M = 6, because the tail does pull the result upward.
Where the 4 comes from
The estimate is not arbitrary. PERT was developed in the late 1950s for the US Navy's Polaris missile program. The designers needed a quick way to turn three estimates into one number without a computer. They modelled a task's duration as a beta distribution. This is a flexible, bounded distribution that can be skewed. It fits a task that cannot finish before O or after P but whose most likely value M can sit anywhere in between.
The exact mean of a beta distribution depends on two shape parameters, usually called alpha and beta. PERT fixes them from the three estimates:
- alpha = 1 + 4 × (M − O) / (P − O)
- beta = 1 + 4 × (P − M) / (P − O)
With this choice, alpha + beta is always 6. A beta distribution stretched over the range O to P has mean O + (P − O) × alpha / (alpha + beta). If you substitute and simplify, the result is exactly (O + 4M + P) / 6. The "4" is the same 4 that appears in the shape parameters.
You can check this with exact fractions in Python:
from fractions import Fraction
def beta_mean_scaled(o, m, p):
alpha = 1 + 4 * Fraction(m - o, p - o)
beta = 1 + 4 * Fraction(p - m, p - o)
return o + (p - o) * alpha / (alpha + beta)
print(beta_mean_scaled(4, 6, 14), (4 + 4 * 6 + 14) / 6)7 7.0Both routes give 7. The same alpha and beta formulas appear in the Monte Carlo sampler at the end of this tutorial. A simulation of many trials therefore averages to the PERT expected duration, apart from sampling noise.
The original PERT paper used a looser approximation to the mean and a different spread formula. The (O + 4M + P) / 6 form is sometimes called modified PERT or beta-PERT. It is the version used in textbooks and in the Project Management Institute's materials, and the one this tutorial uses.
How the result behaves
The size and direction of the gap between E and M depend only on the shape of your three estimates. Subtract M from the formula:
E − M = (O + P − 2M) / 6
This expression is the sum of the two gaps on either side of M, scaled by 1/6. The table shows three cases.
| Case | O | M | P | E (PERT) | E − M | Triangular |
|---|---|---|---|---|---|---|
| Symmetric | 4 | 6 | 8 | 6.00 | 0.00 | 6.00 |
| Long upper tail | 4 | 6 | 14 | 7.00 | +1.00 | 8.00 |
| Long lower tail | 2 | 8 | 9 | 7.17 | −0.83 | 6.33 |
In a symmetric task, PERT, the triangular average and M all agree. With a long upper tail, E sits above M. This is the common situation in project work, because tasks can run late by far more than they can finish early. With a long lower tail, E sits below M. This is rare. It is more likely a sign that M is too optimistic, or that the task has a hard floor and a deadline that makes the lower tail unrealistic.
The long-lower-tail row shows something that is easy to miss. The triangular estimate (6.33) falls below PERT (7.17) even though the PERT mean is pulled toward the lower tail. This is because PERT weights M at two thirds, so it stays closer to M = 8 than the triangular does.
Sensitivity to each input
The weights are also the sensitivities. Each unit of change in an input moves E by that input's weight:
| Input changes by 1 day | E changes by |
|---|---|
| O | 1/6, about 0.17 days |
| M | 4/6, about 0.67 days |
| P | 1/6, about 0.17 days |
So the result is much more sensitive to M than to the extremes. An extra day of pessimism costs only a sixth of a day in the expectation. If P grows from 14 to 20 while O = 4 and M = 6, E rises from 7.0 to 8.0, because 6 / 6 = 1. This gives a practical rule: argue about M first, because it carries most of the weight.
That low sensitivity to P is a feature when P is a rare worst case. It is a weakness if P hides a real risk. The mean barely moves, while the risk of a large overrun is real. Measuring that risk is the job of the standard deviation, which the next chapter covers.
Computing it in code
The function below computes both estimates and rejects inputs that are out of order. The check catches a common data-entry error.
def pert_mean(o, m, p):
if not (o <= m <= p):
raise ValueError("expected o <= m <= p")
return (o + 4 * m + p) / 6
def triangular_mean(o, m, p):
return (o + m + p) / 3
tasks = {
"Design review": (2, 3, 4),
"API build": (4, 6, 14),
"Data migration": (2, 8, 9),
}
for name, (o, m, p) in tasks.items():
print(f"{name:15} PERT={pert_mean(o, m, p):.2f} "
f"tri={triangular_mean(o, m, p):.2f} M={m}")Design review PERT=3.00 tri=3.00 M=3
API build PERT=7.00 tri=8.00 M=6
Data migration PERT=7.17 tri=6.33 M=8Because the formula is linear, you can average estimators' inputs first, or average their PERT results. Both give the same answer. If three people each give O, M and P, you can average each of the three values across people, then apply the formula once. This is not true of the standard deviation, which you will meet in the next chapter.
What the expected duration means
E is a mean. If you could run the same task many times under the same conditions, the average duration would approach E. This has three consequences.
- It is not the most likely value. M is the mode, the single most probable duration. E is the balance point of the whole distribution. They differ whenever O, M and P are not symmetric.
- It is not a commitment. For a task with a long upper tail, many outcomes fall below E, but the outcomes above E can be much larger. The probability of finishing by E is generally not 50%. It depends on the shape. For a right-skewed task, the median is usually below the mean, so the chance of finishing by E is somewhat above 50%. Do not promise E as a deadline for a single task.
- It is a good basis for a sum. Means add. If you sum E over the tasks on a path, you get the expected path duration. This is the main reason PERT exists, and the chapter on combining tasks develops it. The mean of the sum is the sum of the means even when tasks are not independent. The independence assumption matters only for the spread, which a later chapter discusses.
A related consequence is that you should not summarize a task by M alone and then add up the M values. When tasks have long upper tails, the sum of the M values is systematically too low. Adding the E values corrects that bias, which is one practical reason to prefer PERT over single-point estimates.
Edge cases and common errors
Degenerate inputs
- O = M = P. The task has no uncertainty, and E equals that value. The formula works. The beta sampler from the spine would divide by zero when P = O, so a simulation needs a special case for this.
- M equal to O or P. The formula still works. If M = O, then E = (5O + P) / 6, which is fine but suggests the estimator sees no way to finish faster than the most likely case. Check that this is deliberate.
- M outside the range [O, P]. The formula returns a number, but the inputs are inconsistent. Treat this as an input error, as the
pert_meanfunction above does. It usually means two columns were swapped or one value was typed in the wrong unit. - Mixed units. If O is in days and P is in weeks, E is meaningless. Convert everything to one unit before computing. Working days and calendar days are different units, so settle which one you are using.
Misreadings
- Reading E as a 50% estimate. As noted above, this is only roughly true, and only for symmetric inputs.
- Reading P as an absolute worst case. The method assumes that P is a rare but plausible bound. If estimators give "everything goes wrong" values far beyond anything likely, the spread is overstated, even though the mean barely changes. Agree on what P means before collecting numbers. Common conventions are roughly a 1-in-100 or 1-in-20 chance of being exceeded. The next chapters discuss how the spread formula depends on this choice.
- Rounding too early. E is often a fraction, such as 7.17 days. Keep the extra digits while you add tasks along a path, and round only the final figure. Rounding each task up inflates a long path.
- Using E for tasks off the critical path without checking. Float hides a slow task only while the float lasts. A noncritical task with a large E and a large P can become critical. A later chapter on assumptions covers this.
An old fix that does not work
Some teams try to make the estimate "safer" by raising the weight on P, for example (O + 4M + 2P) / 7. This changes the method and loses its link to the beta distribution. If you need a more cautious figure, use the confidence-level approach in the chapters ahead. It keeps the mean honest and moves the uncertainty into a separate, visible number.
PERT and the triangular estimate
Both methods take the same three inputs, so the choice between them is about how you want the middle value and the tails to count.
| Row | Triangular | PERT |
|---|---|---|
| Formula | (O + M + P) / 3 | (O + 4M + P) / 6 |
| Weight on M | 1/3 | 2/3 |
| Weight on each extreme | 1/3 | 1/6 |
| Reaction to a large P | Strong (1/3 per day) | Mild (1/6 per day) |
| Underlying shape | Triangle with its peak at M | Beta distribution with the same bounds and mode |
Use PERT when you trust M more than the extremes, which is the usual case when the estimator has done similar work before. Use the triangular figure when M is uncertain, or when you want the tails to count for more, as with a novel task. Both give the same result when the three values are symmetric. When they do not, the difference between the two is a quick indicator of how much the tails matter.
Exercises
Exercise
A task has O = 3, M = 5 and P = 13 days. Compute the PERT expected duration and the triangular estimate. Which is higher, and why?
Show answer
PERT: (3 + 4 × 5 + 13) / 6 = 36 / 6 = 6.0 days. Triangular: (3 + 5 + 13) / 3 = 21 / 3 = 7.0 days. The triangular estimate is higher because it gives the long pessimistic value (13) a weight of 1/3, while PERT gives it only 1/6 and gives M a weight of 2/3.
Exercise
For O = 4 and M = 6, the pessimistic estimate P grows from 14 to 20 days. By how much does the PERT expected duration change, and why is the change smaller than the change in P?
Show answer
E goes from (4 + 24 + 14) / 6 = 7.0 to (4 + 24 + 20) / 6 = 8.0, so it rises by 1.0 day. P rose by 6 days, but P carries a weight of only 1/6 in the formula, so E moves by 6 × 1/6 = 1 day.
Exercise
An estimator gives O = 5, M = 9 and P = 7. What should you do before computing E, and what does the formula give if you ignore the problem?
Show answer
The values are out of order, because M is greater than P. Go back to the estimator, since the values were probably swapped or typed wrongly. If you ignore the problem, the formula still returns (5 + 36 + 7) / 6 = 8.0, a number that looks fine but is based on inconsistent inputs.
Exercise
Show that E − M = (O + P − 2M) / 6, and use it to find E − M for O = 2, M = 8 and P = 9.
Show answer
Start with E − M = (O + 4M + P) / 6 − 6M / 6 = (O + 4M + P − 6M) / 6 = (O + P − 2M) / 6. For O = 2, M = 8 and P = 9, this gives (2 + 9 − 16) / 6 = −5 / 6, about −0.83 days. So E is about 7.17 days, below M = 8.