31
+ Forecasting Dan Brown @KanbanDan

Forecasting, with Oranges

Embed Size (px)

Citation preview

Page 1: Forecasting, with Oranges

Forecasting

Dan Brown@KanbanDan

Page 2: Forecasting, with Oranges

Forecasting (with oranges)@KanbanDan

Who am I?

Dan Brown AKA @KanbanDanI’m a Kanban and agile coach and teacherI love a good metaphorI like juice

…especially orange juice

Page 3: Forecasting, with Oranges

Forecasting (with oranges)@KanbanDan

The Problems

We keep on confusing Estimating and ForecastingForecasting is importantWe’re really rubbish at estimatingCartesian Distribution with estimation doesn’t work

in man hours or in Story Points

Not just sum of estimates,we need to understand the tolerance too

Page 4: Forecasting, with Oranges

Forecasting (with oranges)@KanbanDan

I want to tell you a story…

Imagine I run an Orange Juice BarKanbanDan’s Groovy Juice Bar

Page 5: Forecasting, with Oranges

Forecasting (with oranges)@KanbanDan

I pop down the wholesaler

I need oranges to juice I buy 25 boxes of oranges “going cheap”

Page 6: Forecasting, with Oranges

Forecasting (with oranges)@KanbanDan

My analogy Vs the real world

Value unit = 1 Glass of Orange Juice (250ml)Backlog (Project) = all of my orangesEpic (Workstream) = one box of orangesStory (Work package)= one orange

Page 7: Forecasting, with Oranges

Forecasting (with oranges)@KanbanDan

How much juice do I have?

Lets try 3 approaches to finding out:1 Man Days ‘resource’ estimates2 Planning Poker Estimation3 Simplified Mathematical Forecasting

Page 8: Forecasting, with Oranges

Forecasting (with oranges)@KanbanDan

Method 1: Traditional Waterfall

We need to run a detailed analysis phase, so:We bring in an orange SMEThe whole staff sit and write a requirements spec for the orangeswe needWe plan delivery phases in detail

Page 9: Forecasting, with Oranges

Forecasting (with oranges)@KanbanDan

Lets get juicing

Phase 1: Unpack the orangesPhase 2: Juice all the orangesPhase 3: Sell the JuicePhase 5: Post Juice ReviewPhase 6: Close the bar (and re-assign the staff), the project is complete

Page 10: Forecasting, with Oranges

Forecasting (with oranges)@KanbanDan

Method 2: Planning Poker

Technique often used in agile estimationProduct Owner describes each storyEach team member chooses a number to represent the complexity / size of the storyEveryone shows their card at the same timeWe discuss any discrepancies between numbers, then re-vote.

Page 11: Forecasting, with Oranges

Forecasting (with oranges)@KanbanDan

Close the doors!

Okay we’re going to need to close the shop for a whileWe all need to get together and do some estimationClose the shop doors please.

Page 12: Forecasting, with Oranges

Forecasting (with oranges)@KanbanDan

Estimate your oranges

I’m going to open the first box…How much juice is there in this orange? Its variety is “Midknight” from South Africa(hold up 1, 2, 3, or 5 fingers)How about this one? It’s a Clementine? …

Page 13: Forecasting, with Oranges

Forecasting (with oranges)@KanbanDan

One box down…

This is a crucial decision pointDo we assume that each box has roughly the same amount of juice in it?Or do we want

“AN ACCURATE ESTIMATE”

Page 14: Forecasting, with Oranges

Forecasting (with oranges)@KanbanDan

Won’t somebody please think of the profits?

As long as we’re estimating, we’re not selling any juice

How would Deming classify estimation?

But if we don’t know how much juice we have, we may run out of oranges!It’s a business dilemma Once we’re done estimating, lets open the shop and make up for lost time! Total juice is 1725 Juice Points!

Page 15: Forecasting, with Oranges

Forecasting (with oranges)@KanbanDan

There MUST be a better way…

The shop is closed. Count the oranges in box 1

17 Oranges

Open the shop!Count the oranges in box 2 through 5Measure the juice produced in the first 11 orangesData collection DONE!None of these numbers are MalleableThey are all Immutable Numbers

Page 16: Forecasting, with Oranges

Forecasting (with oranges)@KanbanDan

But how did that help me?

Now that we have real numbers, we can do maths.

(Yipee!)

We counted 5 boxes of oranges We’ll use the largest and smallest outliers Discard the other 3 numbers

(they are dead to me)

Page 17: Forecasting, with Oranges

Forecasting (with oranges)@KanbanDan

A little bit of knowledge about averages

Arithmetic Mean average only works on an equal distribution.

Good for oranges.Not so much for Work Item Lead Time

Median does work just fine on all distributions which is handyMedian is also how our brains understand averages anyway, so that actually helps.

Page 18: Forecasting, with Oranges

Forecasting (with oranges)@KanbanDan

Back to the boxes

Our median is half way between the 2 outliers. That’s a good enough tool to know how many oranges we have in totalIn the real world, its unlikely we will work on the 25th epic in the way we currently understand it. Working on the 24 other epics will cause us to change or replace it.

Page 19: Forecasting, with Oranges

Forecasting (with oranges)@KanbanDan

Houston we have some oranges

Our counts are 17, 23, 16, 30, 25We have 75% likelihood all boxes contain between 16 and 30 oranges

Median is 23 oranges per box. We can refine that number every time we open a box.But how much juice is that?

Page 20: Forecasting, with Oranges

Forecasting (with oranges)@KanbanDan

Lets talk WW2 Tanks (really)

The US Sherman was an OK tankThe Panzer V had:

A more powerful gunA more accurate gunVery strong armourA big advantage

Page 21: Forecasting, with Oranges

Forecasting (with oranges)@KanbanDan

D-Day is coming

How many Panzer Vs are in France?The allies asked Military Intelligence and the Boffins at Bletchley ParkThey said:

Maths IntelligenceJune 1940 169 1000June 1941 244 1550August 1942 327 1550

Factory Records122271342

Page 22: Forecasting, with Oranges

Forecasting (with oranges)@KanbanDan

Page 23: Forecasting, with Oranges

Forecasting (with oranges)@KanbanDan

11 oranges already juiced

We have already measured the juice in the first 11 orangesThe data is 79.1, 78.5, 71.2, 72.1, 65.2, 79.3, 73.2, 67.2, 65.0, 75.3, and 69.1 ml65, 65.2, 67.2, 69.1, 71.2, 72.1,73.2,75.3,78.5, 79.1,79.390% likelihood 65 is smallest we’ll see, and 79.3 is the largest. Median is 72.2ml.

Page 24: Forecasting, with Oranges

Forecasting (with oranges)@KanbanDan

So how much Juice

Each box has 72.2ml * 23 oranges making 1.66 litresI have 25 boxes making 41.52 litres of juice Each glass is 0.25 litres, so I have 166 glasses of juice. I better get off down the wholesaler again.

Page 25: Forecasting, with Oranges

Forecasting (with oranges)@KanbanDan

Simple scenario

This is a “simple” or “obvious” situationYou’d be mad to do anything else than measuring and using maths hereKnowledge work is Complex and AdaptiveDoes this still apply?

Page 26: Forecasting, with Oranges

Forecasting (with oranges)@KanbanDan

Real world

If it doesn’t I just wasted a lot of your time… It does but there is something we need to change. We can’t safely use the median lead time of a work item as our SLA.

85th Percentile is a much better bet

We need to care more about the variance

Page 27: Forecasting, with Oranges

Forecasting (with oranges)@KanbanDan

WIP-ing up

In the office we tend to have a higher WIPMy shop only has one juicer, our teams tend to work on multiple thingsFor knowledge work we care more about Delivery Rate

Page 28: Forecasting, with Oranges

Forecasting (with oranges)@KanbanDan

…but we just did all that lead time stuff…

Little’s Law Links Lead Time, WIP and Delivery rateWIP is the control, Lead Time is measured and the Delivery Rate is the output.See Chris (@WorldOfChris)Young’s lightning talk about this later.

Page 29: Forecasting, with Oranges

Forecasting (with oranges)@KanbanDan

So how long (to sing this song)…

23 ‘Story’ Work Items per ‘Epic’, 25 EpicsWe have 575 Work Items to deliverOur median Lead Time is 4 daysOur WIP is 8 work itemsOur Delivery rate = 8 / 4 2 Work Items finish per dayThe project is 290 days for 1 teamOk, lets add some slack, 320 days

Page 30: Forecasting, with Oranges

Forecasting (with oranges)@KanbanDan

Is that a good answer?

Who thinks that is a good forecast?I don’t But it is a lot better than any estimateHow do we do better? S-Curve modelling – see DJA’s BlogMonte-Carlo Simulation

See Dimitar Bakardzhiev’s talk tomorrow on #NoEstimates

Page 31: Forecasting, with Oranges

Forecasting

Dan Brown@KanbanDan