# Assessment of the complexity of tasks

### Assessment of tasks

When assessing the complexity of tasks, it is often difficult to give an absolute score. It is much easier to estimate the relative size of two tasks, i.e., for example, to say that task A is twice as large as task B.

During the agile development process, you have to evaluate many user stories.

Using pairwise comparison, the error in determining the estimates is reduced, and moreover, this error can be calculated.

### Theory

Suppose we need to evaluate

*n*stories. Denote the size of each story by

*s*.

_{i}To find the size of each story, we estimate the size of each story relative to all other stories and write the result

*a*in the matrix A

_{ij}_{nxn}:

I note that only the upper part of the matrix is to be filled, because

*a*.

_{ij}= 1 / a_{ji}### Story Sizing

To calculate the average relative size of the history

*mrs*you need to find the geometric mean for the

_{i}*i-th*row of the matrix, i.e.

(1)

Average relative size of the history a little about what we said, so the size of the history, we need units, calculated on the basis of history, the size of which we know

*s*:

_{ref}(2)

where

*s*- the size of the reference history in the required units ( history points, hours, etc.),

_{ref}*mrs*- the relative size of the reference history, calculated by the formula (1).

_{reference}### Numerical example

Imagine that we have four user stories for evaluation, which we briefly describe as follows:

- Registration / Authorization
- Add post
- Show list of posts
- Post classification

Fill in the matrix with relative estimates:

1 | 2 | 3 | 4 | Relative size mrs _{i} | Score s _{i} | |
---|---|---|---|---|---|---|

1. Registration / Authorization * | 1 | 0.33 | 2.00 | 3.00 | 1.19 | 10 |

2. Add a post | 3.00 | 1 | 3.00 | 5.00 | 2.59 | 21.83 |

3. Show a list of posts | 0.50 | 0.33 | 1 | 0.50 | 0.54 | 4.52 |

4. Post classification | 0.33 | 0.20 | 2.00 | 1 | 0.60 | 5.08 |

We took history No. 1 as a reference value and rated it at 10 story points. The size of stories No. 2, 3, 4 was calculated by the formula (2).

### Convergence Index and Confidence Interval Calculation

The variance of estimates in the matrix A

_{nxn is}calculated by the formula [1]: The

square root of the variance is called the convergence index:

The smaller the convergence index, the more consistent our estimates.

However, the convergence index is difficult to interpret. Better if you translate it into a confidence interval for estimates.

For this, we make the assumption that each story in our assessment makes the same contribution to the total variance, then the error and the confidence option are calculated using the following formulas:

#### Implementation

I tried to implement this functionality in Javascript. I posted here estimateit.ru .

#### Future plans

An obvious drawback when using this method is that with an increase in the number of evaluated stories, the number of necessary comparisons grows. This can be avoided by using not all comparisons, but only minimally necessary ones.

There is also a technique for finding inconsistent estimates in matrix A.

###### Literature:

[1] Sizing User Stories Using Paired Comparisons // Eduardo Miranda, Pierre Bourque, Alain Abran