Sprint Burndown

The Sprint Burndown chart gives the team a daily indication of their velocity and progress against the work they have committed to for the current Sprint. Even early on in a Sprint, the burndown chart gives the team a good idea of how they're progressing against their Sprint tasks and whether they will complete them by the end of the Sprint. This both keeps up the motivation to deliver on the work they have committed to and also provides a planning tool to aid decisions - see Sprint Rules for more information.


For a Sprint in progress, the line shows the total of Work Remaining for all Sprint Backlog Items in this Sprint. The trend lines give an indication of whether the Sprint will achieve its objectives on time, i.e. whether the line will "burndown" to the X-axis before the end of the Sprint.

For a Sprint that is complete, the chart shows how progress was viewed historically. The Capacity trend line is not shown on an historical chart, such as the one above. On this chart, which shows data from a real project, we can see that work was re-estimated on 24th and 25th February.

When run, the report has four parameters which the user selects from drop-down lists:

  • A Sprint Name
  • A Trend Type
  • Whether the trend line is to be Adjusted
  • Whether weekends are to be Included or Excluded

The dropdown of Sprint Names simply lists all the Sprints for the current Team Project, but will automatically load the chart for the current sprint. The other options are discussed in more detail below.

Trend Lines

For a Sprint in progress, the chart displays two Trend Lines: a simple line based on the Team Capacity divided by the number of working days in the Sprint (which may or may not include Weekends); and a trend line based on an algorithm that the user selects.

The options are:

A brief summary of each follows: for more detail on the mathematics behind each algorithm click on the list above.

Linear Regression models the real data points with a straight line, chosen to be the best fit based on minimising the "errors" between the observed and predicted points. Because we need the complete set of points before we can draw it, it is shown continuing from the last available point.

The chart below shows the true regression line. For details about adjusting this, see Adjustment below.


Note that the Capacity line shown above is based on the Capacity figure entered against the Sprint. If the actual Capacity achieved is different from that estimated at the start of the Sprint, the gradient of the Capacity line can be adjusted by updating the figure for the Sprint.

With a simple Moving Average, as shown below, each point on the Trend line is simply the average of the last n days' worth of real data. The 5-day chart gives a smoother result that the 3-day chart, but you have to be at least 5 days into the Sprint before a trend line can be drawn.


All Moving Averages "lag" behind the real data, i.e. if the chart is burning down, the trend line will tend to be above the real data, and so be slightly pessimistic.

The Weighted Moving Average tends to "hug" the real data better than a simple Moving Average, as shown below. Weights are applied to each data point in the moving average so that more recent points are weighted more heavily than earlier points.


The Exponential Moving Average, shown below, starts off like the simple Moving Average, i.e. you need 5 days worth of data for a 5 day EMA, and 3 days for a 3 day EMA. Thereafter, each point is computed solely from the previous trend point and the current actual point. It also hugs the real data more closely than a simple moving average.


Adjustment

The graphs for Linear Regression and the different flavours of Moving Average show the "true" trend lines for the set of real data points. However, the main reason for drawing the trend is to show when the Sprint will be complete if the trend persists. As such, it is only the final gradient of the line that is important, and we really want a line that passes through the last data point, i.e. the current amount of work left.

Weekends

In a normal development environment, team members go home at the weekends. So if we plot every day on the Burndown chart, we get a step-like effect because no work is done on Saturday and Sunday:


The real problem lies with Trend Lines in this situation. A Linear Regression line is not affected too badly but if, as shown above, we do a 3-day Moving Average on a Monday we get an unduly pessimistic trend line. Similarly, a 3-day average done on a Friday will be unduly optimistic.

The solution is to ignore weekends and only plot working days on the chart. However, if team members are working weekends, then ignoring weekends also gives misleading trend lines. So, the Include/Exclude setting is user selectable.

Note that this implementation does not take account of Public Holidays, so care should be exercised when these fall within a Sprint. Switching to Linear Regression when displaying the Burndown Chart following a Public Holiday should give a better result.

Mathematics behind the trend lines

Linear regression

Linear Regression is harder to understand than Moving Averages. These notes merely show how the trend is calculated, and not why. For those interested in delving further, Wikipedia is a good starting point.

As the result of the Linear Regression calculation is a straight line, its position can be defined by two values:

  • The slope, which is a number measuring the steepness of the line relative to the X-axis
  • The Y-intercept, which is the point at which the line crosses the Y-axis

The slope (or gradient) is calculated by dividing the "covariance of X and Y" by the "variance of X". The values for X are simply our Day numbers: 0, 1, 2, etc. The values for Y are our data points.

Variance is a statistic used to describe the spread of data about the mean. To get the "Variance of X", calculate the average of the sum of the squares of the deviations from X mean.

For the sake of example, suppose we have a Sprint of only 5 days. We number the sprint days 0, 1, 2, 3, 4 and so the mean is 2. The differences from the mean are -2, -1, 0, 1, 2. The squares of the differences are 4, 1, 0, 1, 4, and their sum is 10. So the Variance is 10 / 5 = 2.

Covariance is a measure of how much two variables change with respect to one another. First we have to calculate the mean of X and the mean of Y. Then for each X,Y point on the graph we calculate (X - Xmean) * (Y - Ymean), and then take the average.

Having calculated the slope, the Y-intercept = Ymean - slope * Xmean.


Moving Average

A simple Moving Average is easy to understand and to calculate, as this table of real and trend points shows:

Days 1 2 3 4 5 6
Real data 18 19 20 18 16 15
Trend 19 19 18 16.33

As this is a 3-day MA, no trend can be calculated until the 3rd day. Then the trend is (18+19+20)/3 = 19. On day 4, the average is (19+20+18)/3 = 19. On day 5, the 19 drops off and is replaced by 16, so the result is 18. On day 6, (18+16+15)/3 = 16.3333333.


Weighted Moving Average

A Weighted Moving Average weights the values used to calculate the average so that more recent values have more effect and less recent values have less effect.

Day 1 in a "N-Day" WMA gets 1 share, Day 2 gets 2 shares and so on. Each value is divided by the total number of shares.

So for a 3-day WMA, the weights are: 1/6, 2/6, 3/6. For a 5-day WMA, they are 1/15, 2/15, 3/15, 4/15, 5/15.

Days 1 2 3 4 5 6
Real data 18 19 20 18 16 15
Trend 19.33 18.83 17.33 15.83

Exponential Moving Average

An Exponential Moving Average starts off the same as the simple Moving Average, so in the 3-day EMA shown in the table the value for Day 3 is 19 as before.

Thereafter, each trend line point is a percent A of the current data point added to percent B of the last trend point, where A+B=100. The percentage A is 200 / (period+1), i.e. 50% for a 3-day EMA, 33% for a 5-day EMA.

Thus the trend point for Day 4 is 50% x 19 + 50% x 18 = 18.5, whilst Day 5 is 50% x 18.5 + 50% x 16 = 17.25

Days 1 2 3 4 5 6
Real data 18 19 20 18 16 15
Trend 19 18.5 17.25 16.125