Week 13: PERT & Forecasting with Moving Averages

This week’s big question: how can a campus-area Starbucks store estimate the risk of missing its Mobile Order counter opening date and forecast next month’s drink demand?

Before the week

Read: Taylor, Introduction to Management Science (13e), Chapters 8 and 15. The PDFs and Appendix A are in Canvas.

Pages Section This week
Ch. 8, 388–397 Probabilistic Activity Times (PERT) Monday: three-point estimates, path variance and deadline risk
Appendix A, Table A.1 Normal Distribution (pp. 835–836) Read the bell-curve area between \(0\) and a positive \(Z\) value
Ch. 15, 727–733 Forecasting Components; Moving Average Wednesday: name the pattern, choose a window and forecast next month
Ch. 15, 742–750 Forecast Accuracy; Forecasting Using Excel Score MAD, MSE, MAPD and bias over the same observed periods

In Chapter 8, skip QM for Windows, Excel QM and Microsoft Project on pp. 395–397. In Chapter 15, stop before Weighted Moving Average on p. 733 (which moves to Week 15 after Thanksgiving), skip Excel QM and QM for Windows on pp. 748–750, and stop before Regression Methods on p. 750. Keep means, variances and standard deviations distinct as you read.

Session 1: Mon, Nov 16 · PERT and deadline risk

🧩 Puzzle

The Mobile Order counter before the fall rush. A campus-area Starbucks store is opening a dedicated Mobile Order & Pickup counter before classes start. Its buildout has the same branching structure as last week’s Apple Store launch, but contractor and equipment times are uncertain. Using expected durations, the five tasks look like this:

Task Work Expected days Must follow
A Confirm the counter layout 3 none
B Install espresso and cold-foam equipment 4 A
C Set up pickup shelving and app signage 2 A
D Test mobile-order routing and bar workflow 5 B, C
E Train baristas and open the pickup counter 2 D

Path A–B–D–E takes 14 expected days; path A–C–D–E takes 12 expected days. No tasks have been crashed. If the district manager asks whether the counter can open within 16 working days, how confident can the store be?

The store’s tasks, times and drink sales are hypothetical. On Monday the manager needs an opening date. On Wednesday the same manager uses the counter’s sales to plan next month’s order.

Build the skill 1: turn three time estimates into one expected duration

Last week’s Critical Path Method (CPM) used fixed task durations to find the earliest finish and slack. When equipment delivery or workflow testing can run fast or slow, a single duration hides that uncertainty. PERT (Program Evaluation and Review Technique) starts with three informed judgments for each uncertain task, all in working days:

  • Optimistic time, \(o\): how fast the task finishes if nearly everything goes right.
  • Most likely time, \(m\): the single duration you would see most often if you repeated the task.
  • Pessimistic time, \(p\): how long the task takes under serious, realistic delays, short of a catastrophe.

Taylor writes these estimates as \(a, m, b\); we use \(o, m, p\) so the letters match their names.

Why six shares?

We want an average that gives the most likely estimate more influence while still allowing both extremes to pull it. Conventional PERT chooses weights of 1, 4 and 1. The fourfold weight on \(m\) is a modeling convention, not something the three estimates prove. Those weights define the task’s expected time:

\[t_e = \frac{1o + 4m + 1p}{1 + 4 + 1} = \frac{o + 4m + p}{6}.\]

Divide by six because the weights total six. The optimistic and pessimistic estimates each get one sixth of the weight. The most likely estimate gets four sixths.

Try three identical estimates. If each is 4 days, the weighted total is \(4+4(4)+4=24\). Dividing by six returns 4 days, as an average of three identical estimates should. The shares measure each estimate’s influence. The result is still in working days.

Apply the rule to the Starbucks estimates

Start with Task B, installing espresso and cold-foam equipment: \(o=2\), \(m=4\) and \(p=6\) days. Its weighted total is \(2+4(4)+6=24\) share-days; dividing by six gives 4 expected days. The two extremes sit equally far from \(m\), so their pulls balance.

Now consider a separate espresso-line hookup quote at the same store: \(o=2\), \(m=3\) and \(p=10\) days if a custom valve is back-ordered. The likely time is still where runs cluster most, but a delay can add seven days while a fast finish saves only one:

Step Hookup calculation Meaning
Weight the three estimates \(2+4(3)+10=24\) share-days Give the likely time four times either extreme’s influence
Divide by the total weight \(24/6=4\) working days The long upper tail pulls expected time one day above \(m=3\)

Both examples have \(t_e=4\) days, but only the symmetric one has \(t_e=m\). The diagram shows the estimates as positions on a day line and the weights as stacked dots; the orange diamond marks their weighted balance point.

Six weighting dots, one at optimistic time, four at most likely time and one at pessimistic time. Task B has estimates 2, 4 and 6 days, with its expected time at 4. The separate hookup quote has estimates 2, 3 and 10 days, also with expected time 4, one day above its most likely time. The dots represent weights, not observed outcomes.

Apply that rule to the four uncertain tasks in the baseline buildout. Task C, shelving and signage, stays fixed at 2 days.

Task Work \(o\) (days) \(m\) (days) \(p\) (days) Weighted calculation \(t_e\) (days)
A Confirm the counter layout 2 3 4 \([2+4(3)+4]/6\) 3
B Install espresso and cold-foam equipment 2 4 6 \([2+4(4)+6]/6\) 4
D Test mobile-order routing and bar workflow 3 5 7 \([3+4(5)+7]/6\) 5
E Train baristas and open the pickup counter 1 2 3 \([1+4(2)+3]/6\) 2

Refresh the forward pass with expected durations

Use those expected durations in the forward pass. Start at day 0. A task can start only when every predecessor has finished, so its earliest start (\(ES\)) is the largest predecessor earliest finish (\(EF\)):

\[ES=\max(\text{predecessor }EF), \qquad EF=ES+t_e.\]

A task with no predecessor starts at 0; adding its duration gives its finish. As in Week 12, the diagram puts starts in blue, finishes in green, and the critical path in orange. All times below come from the expected-duration schedule.

A takes 3 days, starting at 0 and finishing at 3. B and C both start at 3: B finishes at 7 and C at 5. D waits for both, so ES D equals max of 7 and 5, or 7; its 5 days finish at 12. E starts at 12 and finishes at 14. Orange path A to B to D to E totals 14 days; A to C to D to E totals 12. C can move from start 3 to start 5 without delaying D, giving 2 days of slack.

The join at D is the key: wait until day 7, even though C finishes at day 5. Path A → B → D → E takes \(3+4+5+2=14\) expected days; A → C → D → E takes \(3+2+5+2=12\). C can start at day 5 instead of day 3 and still finish when D needs it, giving \(5-3=2\) days of slack. Week 12’s illustrated passes give a longer refresher.

That schedule locates the expected finish. It does not yet tell us how widely the actual finish can vary around day 14.

Build the skill 2: measure task spread and add variance along the critical path

Expected time locates a task’s center. To judge deadline risk, we also need its spread: how far its duration can vary around that center. The standard deviation, \(\sigma\), measures spread in days; the variance, \(\sigma^2\), is its square, measured in days squared.

Estimate the spread of one task

Conventional PERT estimates the standard deviation as one-sixth of the optimistic-to-pessimistic range, then squares it:

\[\sigma = \frac{p-o}{6}, \qquad \sigma^2 = \left(\frac{p-o}{6}\right)^2.\]

Here the six comes from a different rule. On a normal curve, the distance from three SDs below the mean to three above is six SDs. PERT uses that span as a rough guide when it divides a task’s range by six. A contractor’s three estimates alone cannot tell us how often an actual duration will fall inside that range.

For Task D, the workflow test, \(o=3\), \(m=5\) and \(p=7\) days:

Step Calculation What the result measures
Find the range \(7-3=4\) days Distance between the two extreme estimates
Estimate standard deviation \(4/6=2/3\approx0.667\) days Spread expressed in the task’s original unit
Square it \((2/3)^2=4/9\approx0.444\) days² The quantity we can add for independent tasks

The same expected time can hide different risks

Compare two possible tasks at the store. A routine wiring check has estimates \(3,4,5\) days; custom espresso plumbing has estimates \(1,4,7\) days. Both have expected time 4 days, but the wider range changes the spread:

Task Range (days) SD (days) Variance (days²)
Wiring check \(5-3=2\) \(2/6=1/3\) \(1/9\)
Espresso plumbing \(7-1=6\) \(6/6=1\) \(1\)

The plumbing task has three times the SD and nine times the variance. In the illustration, both curves have total area one and center 4; the wider curve is lower because its area spreads across more days. The shaded band shows one SD on either side of the center. These normal curves illustrate the calculated spreads; they are not fitted task-time distributions.

Two normal curves drawn on identical axes. Wiring is narrow and tall with mean 4 days and standard deviation one-third day. Plumbing is wider and lower with the same mean and standard deviation 1 day. Each curve has area one, and its shaded one-standard-deviation band is labelled in days. Three times the SD means nine times the variance.

Combine the tasks on the expected critical path

Return to the baseline network, whose expected critical path is A → B → D → E. Its expected duration is the sum of the four task means: 3 + 4 + 5 + 2 = 14 working days. To estimate the spread of that path, combine only the uncertainties of those four tasks.

For independent task durations, add their variances, then take one square root. Write the path’s variance as \(\sigma_T^2\) and its standard deviation as \(\sigma_T\); the subscript \(T\) refers to the total duration of this fixed path:

\[\sigma_T^2=\sum_{i\text{ on path}}\sigma_i^2, \qquad \sigma_T=\sqrt{\sigma_T^2}.\]

The sum combines spread in days squared; the square root returns to days. Independence means one task’s duration does not make another task’s duration more or less likely. Tasks can have a required order and still have independent durations. Apply the rule to A, B, D and E:

Task \(t_e\) (days) \(\sigma=(p-o)/6\) (days) \(\sigma^2\) (days²)
A 3 \((4-2)/6=1/3\) \(1/9\)
B 4 \((6-2)/6=2/3\) \(4/9\)
D 5 \((7-3)/6=2/3\) \(4/9\)
E 2 \((3-1)/6=1/3\) \(1/9\)
Path total 14 Take the square root after adding variances \(10/9\approx1.111\)

Thus the fixed-path mean is 14 working days, its variance is \(10/9\) days², and its SD is \(\sqrt{10/9}\approx1.054\) days. Keep the exact ninths in calculations; decimals here are display values.

This is a fixed-path approximation to project risk. C is not in that path’s variance sum. If an uncertain parallel branch overtakes A–B–D–E, the project waits for that branch too, which this calculation does not capture.

Why independent tasks add variances, not standard deviations

Suppose the store has two setup checks to do in order. If the first runs late, the second can still finish early. How much does the total time vary?

For this example, flip a fair coin for each check. Heads means 8 days and tails means 12 days. Each check averages 10 days with an SD of 2 days. The two flips are independent, so each row below has probability \(1/4\). Together the checks average 20 days.

First check Second check Total time Deviation from the 20-day mean
Early: 8 days Early: 8 days 16 days −4 days
Early: 8 days Late: 12 days 20 days 0 days: early and late cancel
Late: 12 days Early: 8 days 20 days 0 days: late and early cancel
Late: 12 days Late: 12 days 24 days +4 days

The total is 4 days from the mean in two cases. In the other two, it is exactly 20 days. To find the variance, average all four squared deviations:

\[\text{Combined variance}=\frac{(-4)^2+0^2+0^2+4^2}{4}=8\text{ days}^2.\]

This equals the sum of the individual variances, \(2^2+2^2=8\). Take the square root to return to days: the combined SD is \(\sqrt{8}\approx2.83\) days.

You can draw each check’s SD as one side of a right triangle. With independent checks, the diagonal gives the SD of their total time:

\[\sigma_T^2=\sigma_1^2+\sigma_2^2,\qquad \sigma_T=\sqrt{\sigma_1^2+\sigma_2^2}.\]

Now suppose a shared delay makes both checks early together or late together. Only the 16-day and 24-day totals remain, each equally likely. With this perfect positive correlation, the total is always 4 days from its mean. This is the case where adding the two SDs, \(2+2=4\), works. The figure places those lengths on a straight line.

Left: a right triangle has two perpendicular sides, each representing a task SD of 2 days. Its diagonal represents the combined SD, square root of 8, about 2.83 days. Right: under perfect positive correlation, two 2-day SD segments lie on one straight line and total 4 days. All lengths represent standard deviations, not task durations.

For nine independent tasks, each with an SD of 1 day, the variances add to \(9\times1^2=9\) days². The path SD is \(\sqrt{9}=3\) days. All nine tasks could still run late. Other combinations include early finishes that offset delays.

For the actual A → B → D → E path, use the same addition rule: variance \(10/9\) days², then SD 1.054 days. The next question is whether a deadline’s cushion is large compared with that spread.

Build the skill 3: convert a deadline cushion into a z-score

The path averages 14 working days and has an SD of about 1.054 days. A deadline’s cushion is the time it allows beyond that expected finish. To judge whether the cushion is large or small, measure it in path standard deviations.

The path mean, \(\mu_T\) (read “mu sub T”), is the sum of the task means on the fixed path. For the pickup counter we need two numbers.

Quantity Notation Starbucks value
Expected path duration \(\mu_T=\sum_{i\text{ on path}}t_{e,i}\) \(3+4+5+2=14\) working days
Path standard deviation \(\sigma_T\) \(\sqrt{10/9}\approx1.054\) days

Subtract the mean from the deadline, then divide by the SD. This standardized distance is the z-score:

\[z=\frac{\text{deadline}-\mu_T}{\sigma_T}.\]

The numerator measures cushion in days; dividing by the path SD converts it to a unitless count of standard deviations. A positive \(z\) allows extra time, zero sets the deadline at the mean, and a negative \(z\) asks the project to beat its expected duration.

For Starbucks’s day-16 target, use \(\mu_T=14\) days and \(\sigma_T=\sqrt{10/9}\approx1.054\) days:

Step Calculation Interpretation
Find the cushion \(16-14=2\) working days Two days beyond the fixed-path mean
Express it in SD units \(2/\sqrt{10/9}\approx1.90\) The deadline is 1.90 path SDs above the mean

The denominator matters: the same two-day cushion would be four SDs if \(\sigma_T=0.5\) day, but only half an SD if \(\sigma_T=4\) days. Days alone do not measure confidence.

To turn standardized distances into probabilities in Skill 4, we approximate the fixed-path total by a normal distribution. Adding many independent task durations can make a total more bell-shaped when no task dominates; with only four tasks, normality is a working approximation, not a guarantee. Compare three candidate opening dates on that common scale:

Promised deadline Cushion \(\text{deadline} - 14\) (days) Calculation \((\text{deadline} - 14) / 1.054\) \(z\)-score (SD units) Schedule meaning
Day 16 \(+2\) \(+2 / 1.054\) \(+1.90\) Nearly 2 SDs of cushion past the mean
Day 14 \(0\) \(0 / 1.054\) \(0.00\) Zero cushion; right at expected finish
Day 13 \(-1\) \(-1 / 1.054\) \(-0.95\) Almost 1 SD tighter than expected finish
Normal bell curve for the Starbucks Mobile Order counter centered at expected finish mu_T=14 working days with standard deviation sigma_T=1.054 days. Two aligned horizontal rulers sit beneath the curve: working days (11 to 17) on top and z-score units on the bottom (-1.90 at day 12, -0.95 at day 13, 0 at day 14, +0.95 at day 15, and +1.90 at day 16). Callouts mark day 13 (1 day before the mean, z=-0.95), day 14 (expected finish, z=0), and day 16 (+2 days of cushion, z=+1.90).

Each \(z\)-score locates a deadline on the curve. How much of the curve represents finishes on or before that date?

Build the skill 4: turn z into a completion probability (Table A.1 and Excel)

First picture the possible finish dates. The bell curve below is our approximation for the fixed path: dates near day 14 are more common, and dates far from 14 are less common. Finishing on or before a deadline means landing anywhere to its left. The shaded area collects all those finishes.

Three views of the same bell curve centered at day 14. For a day-14 deadline, the shaded area to its left is half the curve. Moving the deadline to day 16 shades more than half. Moving it to day 13 shades less than half. The curve does not change: only the deadline and the area counted as on time move. Probability is area, not curve height.

Before calculating, you can already rank the promises: day 16 is the easiest to meet, day 14 has a half chance under this symmetric approximation, and day 13 is the hardest. The probability is the shaded area, not the curve’s height at the deadline.

Use the picture to choose addition or subtraction

The whole curve has area \(1\) (100%). Its left half has area \(0.5\) (50%). Table A.1 supplies the slice between the mean and a deadline’s \(z\)-score; combine that slice with the left half:

Deadline position Area to count Calculation
At the mean: \(z=0\) Exactly the left half \(0.5\)
After the mean: \(z>0\) Left half plus the extra slice \(0.5+\text{Table A.1 slice}\)
Before the mean: \(z<0\) Left half with the middle slice removed \(0.5-\text{Table A.1 slice}\)

The picture determines the operation before the table supplies a number. For a negative \(z\), use its positive magnitude in the table and subtract the returned slice.

Read Taylor’s Table A.1 in Appendix A carefully: it gives only the middle slice between the mean (\(0\)) and a positive \(z\), never the whole cumulative left tail. Match the ones-and-tenths digits of \(\lvert z \rvert\) down the left column with the hundredths digit across the top row:

\(z\) (ones and tenths) Column .00 Column .05 Slice from mean \(0\) to \(z\)
0.0 0.0000 0.0199 At \(z = 0.00\), zero width gives 0.0000
0.9 0.3159 0.3289 At \(z = 0.95\), middle slice is 0.3289
1.9 0.4713 0.4744 At \(z = 1.90\), middle slice is 0.4713
Two standard normal bell curves centered at expected finish day 14 (z equals 0). Left panel for deadline day 16 (z equals plus 1.90): the left half below day 14 holds area 0.5000 and Table A.1 gives 0.4713 between z equals 0 and z equals 1.90, summing to 0.9713 (97.13 percent). Right panel for deadline day 13 (z equals minus 0.95): by symmetry the slice between minus 0.95 and 0 holds Table A.1 area 0.3289, so subtracting from 0.5000 leaves 0.1711 (17.11 percent) in the left tail.

Combine that Table A.1 slice with the \(0.5000\) left half according to which side of the mean the deadline sits on:

  1. At the mean (Day 14, \(z = 0.00\)): no middle slice is added or subtracted, leaving exactly the left half of the symmetric curve:

    \[P(\text{finish} \le 14) = 0.5000 = \mathbf{50.00\%}.\]

    Promising the 14-day expected finish date is only a coin flip.

  2. After the mean (Day 16, \(z = +1.90 > 0\)): add the full \(0.5000\) left half below day 14 to the Table A.1 slice between \(0\) and \(+1.90\) (0.4713):

    \[P(\text{finish} \le 16) = \underbrace{0.5000}_{\text{left of mean}} + \underbrace{0.4713}_{\text{Table A.1}(1.90)} = 0.9713 = \mathbf{97.13\%}.\]

    Both terms are unitless probabilities (shares of bell-curve area). Stopping at 0.4713 (47.13%) forgets the entire 50% of finishes that beat day 14.

  3. Before the mean (Day 13, \(z = -0.95 < 0\)): by symmetry, the slice from \(-0.95\) to \(0\) holds the exact same area as Table A.1 at \(\lvert z \rvert = 0.95\) (0.3289). Subtract that middle slice from the \(0.5000\) left half to isolate the left tail below day 13:

    \[P(\text{finish} \le 13) = \underbrace{0.5000}_{\text{left of mean}} - \underbrace{0.3289}_{\text{Table A.1}(\lvert -0.95 \rvert)} = 0.1711 = \mathbf{17.11\%}.\]

    Sanity-check the direction: any deadline earlier than day 14 must land below 50%.

Compute PERT task times and deadline risk in Excel

Select Copy for Excel and paste into A1 on a blank worksheet. Each of the first four task rows belongs to path A → B → D → E. Follow Task D’s estimates through to the day-16 probability.

  A B C D E F
1 Critical-path task Optimistic, o Most likely, m Pessimistic, p Expected time, te Variance, sigma^2
2 A: Counter layout 2 3 4 =(B2+4*C2+D2)/6 =((D2-B2)/6)^2
3 B: Espresso and cold-foam 2 4 6 =(B3+4*C3+D3)/6 =((D3-B3)/6)^2
4 D: Routing and bar test 3 5 7 =(B4+4*C4+D4)/6 =((D4-B4)/6)^2
5 E: Train and open counter 1 2 3 =(B5+4*C5+D5)/6 =((D5-B5)/6)^2
6 Critical-path total       =SUM(E2:E5) =SUM(F2:F5)
7 Project SD (days) =SQRT(F6)   Promised day z-score P(finish by day)
8       16 =(D8-$E$6)/$B$7 =NORM.S.DIST(E8, TRUE)
9       14 =(D9-$E$6)/$B$7 =NORM.S.DIST(E9, TRUE)
10       13 =(D10-$E$6)/$B$7 =NORM.S.DIST(E10, TRUE)
  1. Read Task D’s formulas in E4 and F4. E4 divides the entire weighted sum by six and gives 5 days. F4 first subtracts the optimistic time from the pessimistic time, divides that range by six, then squares the result. It gives 0.4444 days².
  2. Follow the units from F6 to B7. F6 adds the four variances to get 1.1111 days². B7 takes the square root once and gives the path SD of 1.0541 days.
  3. Read the day-16 probability in F8. NORM.S.DIST(E8, TRUE) gives the entire area to the left of the deadline, including the left half. Excel uses the unrounded \(z\) and gives 97.11%. Table A.1 uses \(z=1.90\) and gives 97.13%. The FALSE setting returns the height of the curve.

Try it yourself: what if the district manager asks to open the Mobile Order counter by working day 15 (one day of cushion)? Find \(z\) and the Table A.1 probability before opening the check, and notice how it mirrors day 13.

Check the day-15 calculation

With one day of cushion above the 14-day mean, \(z = (15 - 14) / 1.054 \approx +0.95\). Table A.1 at \(0.95\) gives the same \(0.3289\) slice you used for day 13, but because \(z\) is now positive you add the left half: \(0.5000 + 0.3289 = 0.8289\), or 82.89% (=NORM.S.DIST((15-14)/SQRT(10/9), TRUE) gives 82.86%). One day below the mean gives roughly 17%; one day above gives roughly 83%.

In practice: what could change the opening-date estimate?

  • How wide is the contractor’s range? If the pessimistic estimate leaves out a plausible delay, the estimated SD can be too small. That makes a date after the mean, such as day 16, look easier to meet.
  • Could one delay affect several tasks? If the same vendor holds up both installation and testing, their durations can move together. Adding their variances as if they were independent would miss that extra risk.
  • How well does the bell curve fit? The day-16 probability uses a normal approximation for a path with just four tasks. A long delay on one task could change the shape of the total.

Could the signage branch set the finish? Both paths share A, D and E. At the join, D waits for whichever takes longer, equipment installation (B) or signage (C). Suppose the other tasks take their expected times:

Signage delivery Which task does D wait for? When does the counter open?
C takes 2 days B takes 4 days, so it finishes later. A → B → D → E takes 14 days.
C takes 5 days C now takes one day longer than B. A → C → D → E takes 15 days, still before day 16.

The 97% estimate followed A → B → D → E with C fixed at two days. If signage can also run late, a project team can simulate both branches to estimate the chance of meeting day 16.

Two complete-path comparisons share a working-day scale and a day-16 deadline. With C at 2 days, A–B–D–E takes 14 days and A–C–D–E takes 12. With C at 5 days and all other durations held at their expected values, A–C–D–E takes 15 days and becomes the longer path, while A–B–D–E still takes 14. The new 15-day finish is later than the original schedule but still meets day 16. Each bar segment is labelled with its task and duration.

Back to the puzzle

The store has about a 97% chance of opening by day 16 if A → B → D → E controls the finish. That path averages 14 working days with an SD of 1.05 days. Under the same assumptions, the chance falls to 50% for day 14 and 17% for day 13.

Before giving the district a date, the manager can confirm the signage delivery and ask whether installation and testing depend on the same vendor. If the district needs an earlier opening, use Week 12’s crashing method to price a shorter schedule, then update the estimates for both paths.

In-class group practice (wrap-up)

A student radio station wants its campus podcast studio open by working day 18. Work through the five tasks by hand.

  1. Find each task’s expected time and variance. Which estimates put the mean above the most likely time?
  2. Compare the two paths. Use the longer expected path to calculate the SD and look up the day-18 probability in Table A.1.
  3. Check whether a delay on the other branch could make the station miss day 18.

Write every member’s name on the sheet. You have 15 minutes for the practice, then two minutes to photograph your group’s own attempt before the solutions are shown. One member uploads the photo to Canvas by the end of class; participation credit is for attempting the work.

The instructor uses the final eight minutes to demonstrate the handout’s method, check the main results with units, and explain a common mistake. This demonstration closes the session.

Updated Nov 16: Steps 3 and 4 clarify the PERT assumptions and the branch-risk check. The data and numerical answers are unchanged.

Session 2: Wed, Nov 18 · Moving averages

🧩 Puzzle

Stocking the Mobile Order bar. Monday’s project was getting the Starbucks pickup counter open. Eight months later, the manager needs to order cups, oat milk and cold-brew kegs. The sales log counts drinks in hundreds, so Month 8’s 35 means 3,500 drinks.

Month 1 2 3 4 5 6 7 8
Drinks (hundreds) 22 25 24 28 30 27 32 35

How many Mobile Order drinks should the manager plan for in Month 9? How far off has that forecasting rule been in a typical month?

Build the skill 1: plot the history and name the pattern

A time series records the same quantity at regular intervals. Here each point is one month of sales. Read the upper-left panel from left to right. Where do sales fall for a month? Which way do they move over the full eight months?

The store's eight monthly counts rise from 22 to 35 hundred drinks, with dips in Months 3 and 6. Three illustrative panels show a repeating quarterly pattern, a multi-year wave and irregular variation around a level of 25 hundred drinks.
Pattern What to look for
Trend A sustained rise or fall. Sales dip from 25 to 24 and from 30 to 27, yet climb from 22 to 35 overall.
Seasonal pattern Highs and lows recur on the calendar. In the quarterly example, iced-drink sales peak in the third quarter of each year.
Cycle Demand rises and falls over several years. Enrollment swings can affect campus sales on this longer timescale.
Random variation (noise) Irregular bumps. A one-time concert could lift sales for a single month.

When demand fluctuates around a stable level, high and low months can offset each other in an average. The store’s eight months also show a climb. A recent average will smooth the dips, but it will still include some older, lower sales counts. Checking for annual seasonality would take observations from the same months in more than one year.

Build the skill 2: smooth random noise with a moving average

At the end of each month, the manager knows what sold. A moving average gives each of the last \(k\) months an equal share in the next forecast. The window moves forward when a new sales count arrives.

\[F_{t+1}=\frac{A_t+A_{t-1}+\dots+A_{t-k+1}}{k}.\]
  • \(A_t\) is actual sales in the most recently completed month, \(t\). Read backward through the numerator until you have \(k\) observations.
  • \(k\) is the window length. With \(t=3\) and \(k=3\), the oldest month is \(t-k+1=1\). Each of Months 1, 2 and 3 gets one third of the weight.
  • \(F_{t+1}\) is the forecast for the following month. Like the sales counts, it is in hundreds of drinks. Taylor uses \(n\) for window length. Here \(k\) is the window and \(n\) will count the months we score.

Slide the window forward one month

Forecast for Actual sales available to the window (hundreds) Calculation Forecast (hundreds)
Month 4 Months 1–3 \((22+25+24)/3\) 23.67
Month 5 Months 2–4 \((25+24+28)/3\) 25.67
Month 9 Months 6–8 \((27+32+35)/3\) 31.33

Month 4 is the first forecast because three earlier months are needed. To forecast Month 5, drop Month 1’s 22, keep 25 and 24, and add Month 4’s observed 28. The previous forecast of 23.67 never enters that window.

Three strips highlight Months 1 to 3, then 2 to 4, then 6 to 8. On the chart above, each average appears one month to the right of the observations that produced it. Month 9 has a forecast of 31.33 hundred drinks.

Move the forecast window

The chart starts with Months 1–3. The rings mark the three sales counts. Follow the horizontal dotted line at their average to the orange dot in Month 4.

Drag the shaded band one month to the right, or move the Forecast month slider to Month 5. Which sales count drops out? Which enters? Check the calculation below the chart. Then shorten Window length to 2. How does the Month 5 forecast change?

What changes when the window gets wider?

Imagine that the counter usually sells 20 hundred drinks and a concert lifts one month to 26. How much of that extra 6 carries into the next forecast? Now consider a steady climb of 2 hundred drinks each month. If that climb continues, the next count will be 30.

Five months of sales (hundreds) 2-month forecast 3-month forecast 5-month forecast
One concert spike: 20, 20, 20, 20, 26 23 22 21.2
Steady climb: 20, 22, 24, 26, 28 27 26 24

After the concert, the three-month forecast rises by \(6/3=2\). The five-month forecast rises by only \(6/5=1.2\). On the steady climb, the wider window is slower to catch up. Its forecast of 24 falls 6 short of 30. That delay in following a change is lag.

Return to the store’s eight recorded months. The manager now has three candidate forecasts for the same order.

Window Months used Month 9 calculation (hundreds) Forecast in drinks
2 months 7–8 \((32+35)/2=33.50\) 3,350
3 months 6–8 \((27+32+35)/3\approx31.33\) 3,133
5 months 4–8 \((28+30+27+32+35)/5=30.40\) 3,040

Month 9 sales are still unknown. The manager can judge these rules by asking what each would have forecast in months whose sales are known.

Build the skill 3: compare forecast errors over the same months (MAD)

Choose a past month. Make its forecast using only the sales available before that month. Then compare the forecast with what sold. The forecast error keeps the direction of the miss.

\[e_t=A_t-F_t.\]

Subtract the forecast from the actual for the same month. With the three-month rule, the sign has a concrete meaning at the counter.

Month Actual minus forecast (hundreds) What happened
4 \(28-71/3\approx+4.33\) The store sold about 433 more drinks than forecast. A low forecast risks running out of cups.
6 \(27-82/3\approx-0.33\) The store sold about 33 fewer drinks than forecast. A high forecast risks buying too much milk.

How large was a typical miss?

Suppose two forecasts miss by +500 and −500 drinks. Their signed average is zero, even though each forecast missed by 500 drinks. For mean absolute deviation (MAD), take the size of each error before averaging.

\[\text{MAD}=\frac{\sum_t\lvert e_t\rvert}{n}.\]

The bars around \(e_t\) mean absolute value. Add those miss sizes, then divide by \(n\), the number of months scored. MAD has the same units as demand.

Score the two- and three-month rules on Months 4–8. Month 4 is the first month both can forecast. Month 8 is the last with recorded sales. Both rules therefore have \(n=5\) errors.

Read across each row from the forecast to its signed error, in hundreds of drinks. The table shows two decimals. Keep the unrounded values when calculating scores.

Month Actual 2-month forecast → error 3-month forecast → error
4 28 24.50 → +3.50 23.67 → +4.33
5 30 26.00 → +4.00 25.67 → +4.33
6 27 29.00 → −2.00 27.33 → −0.33
7 32 28.50 → +3.50 28.33 → +3.67
8 35 29.50 → +5.50 29.67 → +5.33
Total absolute error   18.50 18.00
MAD (divide by 5)   3.70 3.60

The three-month rule missed by 360 drinks per month on average. The two-month rule missed by 370. On these five months, the three-month rule has the lower MAD, by 10 drinks per month.

Vertical bars connect the three-month forecast and actual sales in Months 4 to 8. Four forecasts fall below actual sales. Only Month 6 is above, by 0.33 hundred drinks. The five bar lengths total 18 hundred drinks.

Which months belong in the comparison?

Giving one rule an extra month can reverse the result. The two-month rule could also forecast Month 3. Its error was just \(24-23.50=+0.50\). Including that month lowers its MAD to \((18.50+0.50)/6\approx3.17\). Comparing 3.17 against 3.60 gives only the two-month rule credit for that easy month.

Adding a longer window shortens the shared history. The five-month rule first forecasts Month 6. Keep only Months 6–8 for both rules. For Month 6, the five-month forecast was \((22+25+24+28+30)/5=25.80\). Sales were 27, so the miss was 1.20 hundred drinks.

Miss sizes in hundreds of drinks Month 6 Month 7 Month 8 MAD on these three months
3-month rule 0.33 3.67 5.33 \(9.33/3\approx\mathbf{3.11}\)
5-month rule 1.20 5.20 6.80 \(13.20/3=\mathbf{4.40}\)

The three-month rule again has the smaller average miss. The same errors can also show whether the store faced a few large misses or repeatedly forecast too low.

Build the skill 4: check big misses, relative scale, and directional lag (MSE, MAPD, and bias)

How much should one large miss count?

Suppose two rules have the same MAD. The manager may still prefer the one that avoids a single large supply shortfall. Mean squared error (MSE) gives large misses extra weight by squaring each error before averaging.

\[\text{MSE}=\frac{\sum_t e_t^2}{n}.\]

Doubling a miss multiplies its squared error by four. A large surplus and a large shortfall both count heavily. Compare two possible pairs of monthly misses, measured in hundreds of drinks.

Rule Miss sizes MAD (hundreds of drinks) MSE (hundreds of drinks)²
A 3 and 3 \((3+3)/2=3\) \((3^2+3^2)/2=9\)
B 0 and 6 \((0+6)/2=3\) \((0^2+6^2)/2=18\)

Apply both measures to Starbucks Months 4–8. Keep the five months fixed and change only how you count a miss.

Measure 2-month rule 3-month rule Lower score
MSE, in (hundreds of drinks)² \(74.75/5=14.95\) \(79.56/5\approx15.91\) 2-month rule
MAD, in hundreds of drinks \(18.50/5=3.70\) \(18.00/5=3.60\) 3-month rule

The two measures favor different windows. For a cup order, the manager wants to know how many drinks a forecast typically misses. MAD answers that question in drinks.

How large are the misses relative to sales?

A 360-drink miss is 12% of 3,000 drinks and 72% of 500. To put misses in context across several months, mean absolute percent deviation (MAPD) expresses the total absolute error as a share of total demand.

\[\text{MAPD}=\frac{\sum_t\lvert e_t\rvert}{\sum_t A_t}.\]

Use the same months for both totals. For the three-month rule, the five absolute misses total 18 hundred drinks. Actual sales total \(28+30+27+32+35=152\) hundred drinks. The units cancel. Expressed as a percentage, \(18/152\approx\mathbf{11.8\%}\). Across these five months, the absolute misses amounted to 11.8% of all drinks sold.

Did the store usually forecast too high or too low?

Keep the signs to find cumulative error. Divide that total by the months scored to get average error (bias).

\[E=\sum_t e_t,\qquad \text{bias}=\frac{E}{n}.\]
For the three-month rule, Months 4–8 Result What the manager learns
Add the five signed errors \(E\approx+17.33\) hundred drinks Sales exceeded forecasts by about 1,733 drinks in total.
Divide the signed total by five \(E/5\approx+3.47\) hundred drinks per month Forecasts ran low by about 347 drinks per month on average.

Four of the five forecasts were too low. That fits the climb in the sales log. A signed average near zero can also come from large misses that cancel, so read bias alongside MAD.

Check the errors on the moving-average chart. Open Forecast accuracy below the calculation.

  1. Set the window to 3, the forecast month to 6, and the first scored month to 4. In the Month 6 row, was the forecast high or low? Compare the signed error with its absolute value.
  2. Move the forecast to Month 9. Sales are known only through Month 8, so the table now scores five months. Follow the absolute-error total into MAD and MAPD. Which denominator changes?
  3. Compare the 2- and 3-month windows over Months 4–8. Then set First scored month to 6 before comparing the 3- and 5-month windows. Which rule has the smaller MAD on those same three months?

Build moving averages and error checks in Excel

Select Copy for Excel and paste into A1 on a blank worksheet. The sheet contains the eight sales counts and the working formulas. Row 5 is Month 4 because row 1 holds the headings.

  1. Check the first forecast in C5. Select the cell and read =AVERAGE(B2:B4) in the formula bar. Its last input is Month 3. The result is about 23.67. The Month 4 actual of 28 first enters C6, the forecast for Month 5.
  2. Find the future month in C10. The forecast is about 31.33. Leave B10 and D10:F10 empty until Month 9 sales arrive. Subtracting the forecast from a blank actual would treat the blank as zero and invent a miss.
  3. Read the scores in B12:B16. MAD in B12 is 3.60. Its range E5:E9 ends at Month 8, the last observed month. Format B14 as a percentage with one decimal place to see 11.8%. A two-month rule must use the same five months for this comparison.
View the worked sheet and its formulas
  A B C D E F
1 Month Actual (100s) 3-month forecast Signed error Absolute error Squared error
2 1 22        
3 2 25        
4 3 24        
5 4 28 =AVERAGE(B2:B4) =B5-C5 =ABS(D5) =D5^2
6 5 30 =AVERAGE(B3:B5) =B6-C6 =ABS(D6) =D6^2
7 6 27 =AVERAGE(B4:B6) =B7-C7 =ABS(D7) =D7^2
8 7 32 =AVERAGE(B5:B7) =B8-C8 =ABS(D8) =D8^2
9 8 35 =AVERAGE(B6:B8) =B9-C9 =ABS(D9) =D9^2
10 9   =AVERAGE(B7:B9)      
11 Months 4–8          
12 MAD (100s) =AVERAGE(E5:E9)        
13 MSE (100s squared) =AVERAGE(F5:F9)        
14 MAPD =SUM(E5:E9)/SUM(B5:B9)        
15 Cumulative error (100s) =SUM(D5:D9)        
16 Bias (100s per month) =AVERAGE(D5:D9)        

Try it yourself. Use a four-month window on the same sales log. Which month can you forecast first? Was that forecast high or low, and by how much? What is the Month 9 forecast?

Check the 4-month window
  1. First forecast. Months 1–4 give \((22+25+24+28)/4=24.75\) hundred drinks for Month 5.
  2. Signed error. Month 5 sales were 30 hundred drinks. The error was \(30-24.75=+5.25\) hundred drinks. The forecast was 525 drinks too low.
  3. Month 9. Use Months 5–8. Their average is \((30+27+32+35)/4=31\) hundred drinks, or 3,100 drinks.

In practice: which sales belong in the forecast?

Put sales on the same time basis. Suppose the manager is comparing weeks to plan staffing. The store normally opens five weekday mornings. A fall-break total and a daily average cannot go straight into the same column.

What the log reports Convert to a five-day equivalent
18 hundred drinks over 3 open mornings Divide by 3 to get 6 hundred per open morning. Multiply by 5 to get 30 hundred drinks.
6.4 hundred drinks per morning over a 5-day week Multiply by 5 to get 32 hundred drinks.

The first conversion assumes the three open mornings represent a usual weekday. If break traffic is unusually light, flag that week before using it to plan a normal one.

  • Look for a lasting change. If demand keeps rising, older, lower months hold down the forecast. If demand peaks each September, a plain average misses the timing. Week 15 models trend and seasonality directly.
  • Check unusual months. A campus festival lifts every forecast whose window still includes it. With a three-month window, the spike affects the next three forecasts, then drops out.

Back to the puzzle

Plan for about 3,133 Mobile Order drinks in Month 9. The three-month window averages the most recent sales of 27, 32 and 35 hundred drinks. On Months 4–8, it missed by 360 drinks per month on average, compared with 370 for the two-month rule.

Four of those five forecasts ran low. In Month 8 alone the store sold about 533 more drinks than forecast, already a larger miss than 360. The manager can use 3,133 as the starting point for the order and weigh the cost of running out of cups against storage space and the risk of milk spoiling. MAD describes past misses. It supplies no probability or fixed quantity for a stock buffer.

After-class check

Check PERT means, variance and deadline risk, then moving averages, forecast error and bias. Retry freely; nothing is submitted.

Weekly take-home (graded: submit on Canvas)

A campus counseling center has two decisions to make.

  1. Can the center promise an opening date? Use Monday’s PERT method for the three tasks in sequence. Estimate the chance of opening by working day 15 and explain what that estimate assumes.
  2. How many appointment requests should staff expect in Week 9? Use Wednesday’s moving-average method. Put all eight weeks on a five-day basis. Compare the two- and three-week windows by MAD over Weeks 4–8. Explain your choice, then use that same window for MSE, cumulative signed error and the Week 9 forecast. What does the sign of the error tell the staff?

Complete the model sheet, two short responses and the AI-use disclosure in the workbook. Upload the .xlsx to Canvas by Sunday Nov 22 at 11:59 PM. Nothing is due during Thanksgiving break.

Nov 17 workbook clarification. Either window can earn full credit if you explain your choice and use it consistently. If you already started, you can finish and submit your original copy.