Statistics & Decision Science for Agile - A Guided Tour

1,014 views
871 views

Published on

Provides an overview of statistical & decision science techniques, their application and benefits in agile software projects.

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,014
On SlideShare
0
From Embeds
0
Number of Embeds
63
Actions
Shares
0
Downloads
8
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Statistics & Decision Science for Agile - A Guided Tour

  1. 1. (c) GrayPE Systems Statistics & Decision Science for Agile A Guided Tour Provides an overview of statistical & decision science techniques, their application and benefits in agile software projects. Agile Convention 2013 1st Agile & Scrum Event in Noida www.agilenoida.wordpress.com
  2. 2. (c) GrayPE Systems 2 I am @sanjayaksaxena cofounder of graype.in with @R4CHN4 Pursuing Quantitative Analysis & Decision Sciences (QUADS)
  3. 3. (c) GrayPE Systems Agenda Estimation Prioritization Application of AHP, SAW and Boxplot in 3
  4. 4. (c) GrayPE Systems 4 Estimation
  5. 5. (c) GrayPE Systems 5 Estimate Accurately.
  6. 6. (c) GrayPE Systems 6 Estimate Accurately. seems like an oxymoron!
  7. 7. (c) GrayPE Systems 7 the only thing we know about an estimate is that it is not exact!
  8. 8. (c) GrayPE Systems 8 An Interlude
  9. 9. (c) GrayPE Systems 9 A 5’8” tall statistician drowned while crossing a river which had an average depth of barely 4’2” feet! why?
  10. 10. (c) GrayPE Systems 10 If you toss a fair coin 20 times, how many heads (or tails) do you expect?
  11. 11. (c) GrayPE Systems 11 1 2 4 7 9 10 12 17 18 19 20 count of heads frequency
  12. 12. (c) GrayPE Systems 12 Never use average velocity computed from past data to estimate number of story points that you can cover in next iteration. Moral of the story! And if you do then you can only be about 50% sure of meeting your commitment!
  13. 13. (c) GrayPE Systems 13 key is to understand variation
  14. 14. (c) GrayPE Systems 14 How to be 95% sure?
  15. 15. (c) GrayPE Systems 15 1 61 2 61 3 62 4 64 5 64 6 64 7 64 8 65 9 65 10 65 11 65 12 66 13 66 14 66 15 67 16 67 17 68 18 68 19 68 20 68 21 69 22 72 23 84 1. start with past velocity data
  16. 16. (c) GrayPE Systems 16 1 61 2 61 3 62 4 64 5 64 6 64 7 64 8 65 9 65 10 65 11 65 12 66 13 66 14 66 15 67 16 67 17 68 18 68 19 68 20 68 21 69 22 72 23 84 1st Quartile (Q1): QUARTILE(array, 1) Median (Q2): QUARTILE(array, 2) 3rd Quartile (Q3): QUARTILE(array, 3) 2. use XL to find quartiles
  17. 17. (c) GrayPE Systems 17 1 61 2 61 3 62 4 64 5 64 6 64 7 64 8 65 9 65 10 65 11 65 12 66 13 66 14 66 15 67 16 67 17 68 18 68 19 68 20 68 21 69 22 72 23 84 1st Quartile (Q1) Median (Q2) 3rd Quartile (Q3) 3. determine IQR IQR = Q3 - Q1 = 68 - 64 = 4 ** IQR is Inter Quartile Range
  18. 18. (c) GrayPE Systems 18 1 61 2 61 3 62 4 64 5 64 6 64 7 64 8 65 9 65 10 65 11 65 12 66 13 66 14 66 15 67 16 67 17 68 18 68 19 68 20 68 21 69 22 72 23 84 1st Quartile (Q1) Median (Q2) 3rd Quartile (Q3) 4. determine outliers , if any Velocity values smaller than Q1 - 3 x IQR Velocity values greater than Q3 + 3 x IQR > Q3 + 3 x IQR = 68 + 3 x 4 = 68 + 12 = 80; therefore a potential outlier
  19. 19. (c) GrayPE Systems 19 1 61 2 61 3 62 4 64 5 64 6 64 7 64 8 65 9 65 10 65 11 65 12 66 13 66 14 66 15 67 16 67 17 68 18 68 19 68 20 68 21 69 22 72 23 84 1st Quartile (Q1) Median (Q2) 3rd Quartile (Q3) 5. review outliers, if any Exclude them from the data if you determine that there were extraordinary reasons causing such a high (or low) value; and are not likely to reoccur. Let us assume, we retain the outlier value. > Q3 + 3 x IQR = 68 + 3 x 4 = 68 + 12 = 80; therefore an potential outlier
  20. 20. (c) GrayPE Systems 20 1 61 2 61 3 62 4 64 5 64 6 64 7 64 8 65 9 65 10 65 11 65 12 66 13 66 14 66 15 67 16 67 17 68 18 68 19 68 20 68 21 69 22 72 23 84 ROUND(n/2 - 0.98 x (n)0.5 + 0.5, 0) = 7th row Median (Q2) 6. determine 95% confidence interval ROUND(n/2 + 0.98 x (n)0.5 + 0.5, 0) = 17th row n = 23
  21. 21. (c) GrayPE Systems 21 Median velocity is 66 and there is a 95% chance that this median velocity will fall between 64 and 68. With 95% confidence, you can expect to complete minimum 64 story points worth of work in next iteration; the maximum can be 68 story points. Meaningful Estimate Alternatively, all of the previous steps could have been done using box plot tool in a standard statistical analysis software.
  22. 22. (c) GrayPE Systems 22 About Story Points
  23. 23. (c) GrayPE Systems 23 Always remember the law of diminishing returns!
  24. 24. (c) GrayPE Systems 24 Triangulation - surveying Image Credit: http://en.wikipedia.org/wiki/File:Distance_by_triangulation.svg
  25. 25. (c) GrayPE Systems 25 Triangulation - surveying Image Credit: http://en.wikipedia.org/wiki/File:Distance_by_triangulation.svg works very well as it involves measurements & not judgements!
  26. 26. (c) GrayPE Systems 26 It is a process of judging the size of a user story relative to, two other known user stories with the purpose of increasing the reliability. Triangulation - Agile
  27. 27. (c) GrayPE Systems 27 Analytical Hierarchical Process
  28. 28. (c) GrayPE Systems 28 Analytical Hierarchical Process its about relative measurement based on judgement to derive a scale of priorities for a set of items
  29. 29. (c) GrayPE Systems 29 let’s explore a simplified view in our context
  30. 30. (c) GrayPE Systems 30 AHP Basics ‣ Relative measurements based on judgement ‣ Uses pairwise comparisons ‣ For “n” items, n x (n - 1)/2 comparisons are required ‣ Uses a scale of 1 to 9 or the reciprocals for comparisons ‣ Items in question should be of same “order of magnitude” ** We say two numbers have the same order of magnitude of a number if the big one divided by the little one is less than 10. source: http://en.wikipedia.org/wiki/Order_of_magnitude **
  31. 31. (c) GrayPE Systems 31 AHP thru Example s1 s2 s3 Derive a scale in terms of areas of squares 3 Items: 3 x (3 -1)/2 = 3 comparisons will be required
  32. 32. (c) GrayPE Systems 32 1 S1/S2 S1/S3 S2/S1 1 S2/S3 S3/S1 S3/S1 1 s1 s2 s3 s1 s2 s3 Each cell (r, c) to contain ratio of itemr/itemc Only “white cells” need to be filled with judgement values Diagonal cells will always have a value “1” “Dark gray” cell values can be derived from “white” cell values (reciprocal) AHP thru Example ** ** r: row & c: column of the matrix
  33. 33. (c) GrayPE Systems 33 1 2 5 1/2 1 3 1/5 1/3 1 Step I - Make judgements AHP thru Example
  34. 34. (c) GrayPE Systems 34 Step II - Compute Geometric Mean for each row (contd.) AHP thru Example Geometric mean for a1, a2, ... an is computed as (a1 x a2 ... x an)1/n
  35. 35. (c) GrayPE Systems 35 1 2 5 1/2 1 3 1/5 1/3 1 2.1544 1.1447 0.4055 Geometric Mean AHP thru Example Step II - Compute Geometric Mean for each row
  36. 36. (c) GrayPE Systems 36 3.7046SUM = 0.58 0.31 0.11 Geometric Mean Normalized AHP thru Example Step III - Normalize geometric means to arrive at results (contd.) 2.1544 1.1447 0.4055 1 2 5 1/2 1 3 1/5 1/3 1
  37. 37. (c) GrayPE Systems 37 AHP thru Example Step III - Normalize geometric means to arrive at results If the area [read story points] of one square [read story] was known, others can be easily estimated from the resultant “scale of priorities”. Similarly, the scale of priorities could have been applied to themes (instead of squares!) by judging their relative importance (instead of areas!!).
  38. 38. (c) GrayPE Systems 38 AHP thru Example Step IV - Review inconsistency (contd.) 1. AVERAGE((r11 x w1 + r12 x w2 + r13 x w3)/w1, (r21 x w1 + r22 x w2 + r23 x w3)/w2, (r31 x w1 + r32 x w2 + r33 x w3)/w3) average must be greater than 3 (or n) 2. compute (average - n)/(n - 2), where n = 3 3. divide the result by random index (see table below) for n = 3 to obtain Consistency Ratio 4. Consistency Ratio (CR) must be less than 0.1 n 3 4 5 6 7 8 9 Random Index 0.52 0.89 1.11 1.25 1.35 1.40 1.45
  39. 39. (c) GrayPE Systems 39 0.58 0.31 0.11 Geometric Mean Normalized AHP thru Example 2.1544 1.1447 0.4055 1 2 5 1/2 1 3 1/5 1/3 1 3.0037 3.0037 3.0037 3.0037AVERAGE = CR = 0.0032 Step IV - Review inconsistency
  40. 40. (c) GrayPE Systems 40 Possibilities with AHP ‣ Estimate story points ‣ pick up 3-4 homogenous stories and throw 1-2 stories with known story points; and apply AHP ‣ can improve accuracy further by applying AHP separately for UX, Coding, DB, ... Testing and use weighted sum to arrive at story points ‣ Prioritize themes or backlog ‣ Improve SAW by computing criteria weights using AHP ‣ consider using contextually & semantically applicable adjectives/adverbs instead of numeric ranks for alternatives; and use AHP to determine rank (or priority) of such adjectives.
  41. 41. (c) GrayPE Systems 41 Q & A possibilities are limitless! Sanjaya Kumar Saxena @sanjayaksaxena sanjaya@graype.in Rachna Chakraborty @R4CHN4 rachna@graype.in GrayPE Systems (P) Limited www.graype.in Contact:
  42. 42. (c) GrayPE Systems 42 Thank you! References: [1] Agile Estimation & Planning by Mike Cohn [2] Fundamentals of Decision Making with the Analytic Hierarchy Process by Thomas L Saaty [3] http://www.discover6sigma.org/cat/statistics/

×