CYCLE TIME ANALYTICS: RELIABLE #NOESTIMATES FORECASTING USING DATA, TROY MAGENNIS (KEYNOTE) - LKCE13

Preview:

DESCRIPTION

If you are struggling to forecast project delivery dates and cost, or you want to eliminate the story estimation process because you feel it is waste, or you need to build the business case for hiring more staff, then this session is relevant to you. All estimates have uncertainty, and understanding how multiple uncertain factors compound is the first step to improving project and team predictability. A major benefit of Lean is the low weight capture of cycle time metrics. This session looks at how to use historical cycle time data to answer questions of forecasting and staff skill balancing. This session compares the benefits of using cycle time for analysis over current planning techniques such as velocity, burn-down charts, and cumulative flow diagrams. This session takes you on a journey of what to do after capturing cycle time data or what to do if you have no history to rely upon. Reducing reliance on developer estimation (popularized by the twitter hashtag of #NoEstimates movement) is good general advice, having the tools to plan and manage teams and projects is still important to maintain support at the executive level. This session details the approaches to getting the numbers you need to have whilst minimizing un-necesary overhead and estimating ONLY this factors that matter most.

Citation preview

Cycle Time AnalyticsMaking decisions using Lead Time and Cycle Time to avoid needing estimates for every

story

Troy Magennis @t_magennis

Slides at bit.ly/agilesim

LKCE 2013 – Modern Management Methods

2 @t_Magennis slides at bit.ly/agilesim

Commercial in confidence3

Forecasting Myths

1. You need lots of data to forecast

2. Statistical forecasting requires complex mathematics

3. If we have no data we can’t statistically forecast

False. Everything you see today uses nothing more than the + and /

operations!

False, if we understand the behavior of a domain (cycle time for example)

we can be confident with no initial data

False. Most uncertainty is reduced within the

first few samples

Actual Maximum

Actual Minimum

1

3

2

4

Q. What is the chance of the 4th sample being between the range seen after the first three samples? (no duplicates, uniform distribution, picked at random)

@t_Magennis slides at bit.ly/agilesim

Actual Maximum

Actual Minimum

1

3

2

4

Highest sample

Lowest sample

Q. What is the chance of the 4th sample being between the range seen after the first three samples? (no duplicates, uniform distribution, picked at random)

?

?

?

?

@t_Magennis slides at bit.ly/agilesim

Actual Maximum

Actual Minimum

1

3

2

4

25% chance higher than highest seen

25% lower than highest and higher than second highest

25% higher than lowest and lower than second lowest

25% lower than lowest seen

Highest sample

Lowest sample

Q. What is the chance of the 4th sample being between the range seen after the first three samples? (no duplicates, uniform distribution, picked at random)

A. 50%

% = (1 - (1 / n – 1)) * 100@t_Magennis slides at bit.ly/agilesim

Actual Maximum

Actual Minimum

1

3

2

12

5% chance higher than highest seen

5% lower than lowest seen

Highest sample

Lowest sample

Q. What is the chance of the 12th sample being between the range seen after the first three samples? (no duplicates, uniform distribution, picked at random)

?

?

A. 90%

% = (1 - (1 / n – 1)) * 100

4

5

6

7

8

9

10

11

@t_Magennis slides at bit.ly/agilesim

# Prior Samples Prediction Next Sample Within Prior Sample Range

3 50%4 67%5 75%6 80%7 83%8 86%9 88%

10 89%11 90%12 91%13 92%15 93%17 94%20 95%

@t_Magennis slides at bit.ly/agilesim

9

Four people arrange a restaurant booking after work

Q. What is the chance they arrive on-time to be seated?

@t_Magennis slides at bit.ly/agilesim

Commercial in confidence10

Person 1 Person 2 Person 3 Person 41

in 1

6 EV

ERYO

NE

is O

N-T

IME

15 T

IMES

mor

e lik

ely

at le

ast o

n pe

rson

is la

te

11

Commercial in confidence13

Estimating the wrong things and getting a poor result

doesn’t mean we shouldn’t estimate at all

We just need to estimate things that matter most

17

Forecasts are attempts to answer questions about

future events. They are an estimate with a stated

uncertainty

85% Change of

15th August 2013

Definitely Greater

than $1,000,000

At Least 2 Teams

@t_Magennis slides at bit.ly/agilesim

There is NO single forecast result

Uncertainty In = Uncertainty Out

There will always be manypossible results, some more likely and this is the

key to proper forecasting@t_Magennis slides at bit.ly/agilesim

19

Probabilistic Forecasting combines many uncertain inputs to find many possible outcomes, and what

outcomes are more likely than others

Time to Complete Backlog

50% Possible Outcomes

50% Possible Outcomes

Like

lihoo

d

@t_Magennis slides at bit.ly/agilesim

20

Did the Obama 2012 Campaign Fund Advertising to Achieve 50% Chance of Re-election?

Time to Complete Backlog

85% Possible Outcomes

15%

Like

lihoo

d

@t_Magennis slides at bit.ly/agilesim

21

Task Uncertainty – Summing Variance

Source attribution: Aidan Lyon, Department of Philosophy. University of Maryland, College Park. “Why Normal Distributions Occur” http://aidanlyon.com/sites/default/files/Lyon-normal_distributions.pdf

1 2 3 4

@t_Magennis slides at bit.ly/agilesim

22

Staff

Dev

Cos

t

Cost

of D

elay

Decision Induced Uncertainty

Forecast Completion DateJuly August September October November December

Planned / Due Date

Actual Date

Every choice we make changes the outcome

@t_Magennis slides at bit.ly/agilesim

23

MODELING AND CYCLE TIMEWhat is modelling and how to use cycle time

A model is a tool used to mimic a real world process

Models are tools for low-cost experimentation

@t_Magennis slides at bit.ly/agilesim

Commercial in confidence26

Depth of Forecasting models

Linear Projection

System Cycle Time

Partitioned Cycle Time

Simulated process

Sim

ple

Dia

gnos

tic

27

Simple Cycle Time Model

Amount of Work(# stories)

Lead Time or Cycle Time

ParallelWork in Proc.(WIP)

Random Chance / Risk / Stupidity @t_Magennis slides at bit.ly/agilesim

Use with attribution28

Capturing Cycle Time and WIPStory Start Date Completed

DateCycle Time

(days)1 1 Jan 2013 15 Jan 20132 5 Jan 2013 12 Jan 20133 5 Jan 20134 6 Jan 20135 3 Jan 2013 7 Jan 20136 7 Jan 2013 18 Feb 20137 10 Jan 2013 22 Jan 20138 10 Jan 2013 18 Jan 20139 13 Jan 2013 26 Jan 2013

10 15 Jan 2013

Date “Complete” – Date “Started”

14

Use with attribution29

Capturing Cycle Time and WIPStory Start Date Completed

DateCycle Time

(days)1 1 Jan 2013 15 Jan 20132 5 Jan 2013 12 Jan 20133 5 Jan 20134 6 Jan 20135 3 Jan 2013 7 Jan 20136 7 Jan 2013 18 Feb 20137 10 Jan 2013 22 Jan 20138 10 Jan 2013 18 Jan 20139 13 Jan 2013 26 Jan 2013

10 15 Jan 2013

Date WIP1 Jan3 Jan4 Jan5 Jan6 Jan7 Jan8 Jan9 Jan

10 Jan…

15 JanCount of Started, but Not completed work

5

Use with attribution30

Capturing Cycle Time and WIPStory Start Date Completed

DateCycle Time

(days)1 1 Jan 2013 15 Jan 2013 142 5 Jan 2013 12 Jan 2013 7 3 5 Jan 20134 6 Jan 20135 3 Jan 2013 7 Jan 2013 46 7 Jan 2013 18 Feb 2013 427 10 Jan 2013 22 Jan 2013 128 10 Jan 2013 18 Jan 2013 89 13 Jan 2013 26 Jan 2013 13

10 15 Jan 2013

Date WIP1 Jan 13 Jan 24 Jan 25 Jan 36 Jan 47 Jan 58 Jan 59 Jan 5

10 Jan 7… …

15 Jan 7

9

5

13 13

11

Use with attribution31

9

13

117

5

35

14

4 19

1Sum: 51

14751128

35195131183

Trial 1 Trial 2 Trial 100

Fancy term for turning a small set of samples into a larger set:

Bootstrapping

By repetitively sample we build trial

hypothetical “project” completions

Sum Random Numbers

25112943342631452227

31436545

87

34735448

1912242721

39

202329

187410295Sum:

…..

Historical Story Cycle Time Trend

Days To Complete

Basic Cycle Time Forecast Monte Carlo Process

1. Gather historical story lead-times2. Build a set of random numbers based on pattern3. Sum a random number for each remaining story to build a potential outcome4. Repeat many times to find the likelihood (odds) to build a pattern of likelihood outcomes

𝑇𝑜𝑡𝑎𝑙𝐷𝑎𝑦𝑠❑=𝑆𝑢𝑚(𝑆𝑡𝑜𝑟𝑦𝑛×𝑅𝑎𝑛𝑑𝑜𝑚𝑛)

𝐸𝑓𝑓𝑜𝑟𝑡

More often

Less often

34

Backlog

Feature 1

Feature 2

Feature 3

1. Historical Cycle Time

3. The Work (Backlog)

2. Planned Resources/ WIP

Monte Carlo Analysis = Process to Combine Multiple Uncertain Measurements / Estimates

4. Historical Scope Creep Rate

(optional) 5. Historical Defect Rate and Cycle Times(optional)

6. Phases

@t_Magennis slides at bit.ly/agilesim

Commercial in confidence35

36 @t_Magennis slides at bit.ly/agilesim

37

Y-Axis: Number of Completed

Stories

Project Complete Likelihood

Range of complete stories probability

0 to 50%

50 to 75%

>75%X-Axis: Date

@t_Magennis slides at bit.ly/agilesim

Commercial in confidence38

How certain based on model

forecast

Further calculations to

make economic tradeoffs

39

Baseline

Experiment: 10% Cycle Time Reduction

Staff Cost€912.000

Cost of Delay€190.000

Total Cost€1.102.000+ =

Staff Cost€883.200

Cost of Delay€177.419

Total Cost€1.060.619+ =

Opportunity: €41.381

What is 10% Cycle Time Reduction Worth?

40

Backlog

Feature 1

Feature 2

Feature 3

1. Historical Cycle Time

2. Planned Resources/ Effort

3. The Work (Backlog)

5. Historical Defect Rate & Cycle Times

4. Historical Scope Creep Rate

A Process to Combine Multiple Uncertain Measurements / Estimates is Needed

(optional)(optional)

Design Develop Test

Design Develop Test

41

Baseline

Experiment: + 1 Designer

Staff Cost€912.000

Cost of Delay€190.000

Total Cost€1.102.000+ =

Staff Cost€610.400

Cost of Delay€5.000

Total Cost€615.400+ =

Opportunity: €486.600

What is One Designer Worth?

42

FORECASTING STRATEGIES

Janu

ary

Febr

uary

Mar

ch

April

May

June July

Augus

tSe

ptem

ber

The Future

The Past

1. Model Baseline using historically

known truths

2. Test Model against historically

known truths3. Forecast

When you have historical data

45

Compare Model vs Actual Often

@t_Magennis slides at bit.ly/agilesim

Range of complete probability

Actual results to compare if model is predictable

When you have no historical dataJa

nuar

y

Febr

uary

Mar

ch

April

May

June July

Augus

tSe

ptem

ber

The Future

@t_Magennis slides at bit.ly/agilesim

49

If we understand how cycle time is statistically distributed, then an

initial guess of maximum allows an accurate inference to be made

Alternatives -

• Borrow a similar project’s data• Borrow industry data• Fake it until you make it… (AKA guess range)

@t_Magennis slides at bit.ly/agilesim

50

Probability Density Function

Histogram Gamma (3P) Lognormal Rayleigh Weibull

x1301201101009080706050403020100-10

f(x)

0.32

0.28

0.24

0.2

0.16

0.12

0.08

0.04

0

@t_Magennis slides at bit.ly/agilesim

1997: Industrial Strength Softwareby Lawrence H. Putnam , IEEE ,

Ware Myers

2002: Metrics and Models in Software Quality Engineering

(2nd Edition) [Hardcover]Stephen H. Kan (Author)

Commercial in confidence51

Waterfall

Weibull Shape Parameter = 2AKA Rayleigh

Commercial in confidence52

Agile / Lean / Kanban

Weibull Shape Parameter = 1.5

Commercial in confidence53

Typical Operations / Release

Weibull Shape Parameter = 1AKA Exponential

54

Probability Density Function

Histogram Weibull

x1201101009080706050403020100

f(x)

0.28

0.24

0.2

0.16

0.12

0.08

0.04

0

Scale – How Wide in Range. Related to the

Upper Bound. *Rough* Guess: (High – Low) / 4

Shape – How Fat the distribution. 1.5 is a good starting point.

Location – The Lower Bound

@t_Magennis slides at bit.ly/agilesim

55

What Distribution To Use...

• No Data at All, or Less than < 11 Samples (why 11?)– Uniform Range with Boundaries Guessed (safest)– Weibull Range with Boundaries Guessed (likely)

• 11 to 30 Samples– Uniform Range with Boundaries at 5th and 95th CI– Weibull Range with Boundaries at 5th and 95th CI

• More than 30 Samples– Use historical data as bootstrap reference– Curve Fitting software

@t_Magennis slides at bit.ly/agilesim

56

Questions…• Download the slides (soon) and software at

http://bit.ly/agilesim• Contact me

– Email: troy.Magennis@focusedobjective.com– Twitter: @t_Magennis

• Read: