---
title: "Error Estimation in Large Spreadsheets using Bayesian Statistics"
description: "Bradley and McDaid estimate spreadsheet error rates from expert judgment and partial audits to help reviewers decide how much more to check."
canonical: "https://research.elamur.ai/free/en/papers/bradley-2009-error-estimation-large-spreadsheets-bayesian/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/) · [Constitution](https://md.constitution.elamur.ai/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/bradley-2009-error-estimation-large-spreadsheets-bayesian/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2009](https://md.research.elamur.ai/free/en/papers/2009/) / Error Estimation in Large Spreadsheets using Bayesian Statistics

# Error Estimation in Large Spreadsheets using Bayesian Statistics

Paper · 2009 · Leslie Bradley and Kevin McDaid

**Authors:** Leslie Bradley and [Kevin McDaid](https://md.research.elamur.ai/free/en/authors/kevin-mcdaid/) · **Year:** 2009 · **Venue:** arXiv:0908.1190 (Proc. European Spreadsheet Risks Int. Grp. (EuSpRIG) 2009 27-38 ISBN 978-1-905617-89-0) · **Licence:** [arXiv — non-exclusive licence to distribute](https://arxiv.org/licenses/nonexclusive-distrib/1.0/license.html)

arXiv:0908.1190 (Proc. European Spreadsheet Risks Int. Grp. (EuSpRIG) 2009 27-38 ISBN 978-1-905617-89-0) · [licence](https://arxiv.org/licenses/nonexclusive-distrib/1.0/license.html)

- [PDF](https://arxiv.org/pdf/0908.1190v1)
- [arXiv 0908.1190](https://arxiv.org/abs/0908.1190)

## Summary

A large spreadsheet can take a great deal of work to check, and the cells already inspected may give an uneven picture of what remains. A reviewer might go through a long stretch of formulas without finding a problem, then discover several defects close together. Leslie Bradley and Kevin McDaid ask how reviewers can use these partial results, together with what they knew before testing, to estimate the error rate in the rest of the spreadsheet. The aim is to help managers decide whether to continue checking, accept the remaining uncertainty, or consider rebuilding the spreadsheet.

The authors use Bayesian statistics to express an expert’s initial judgment as a range of possible error rates, with more weight on rates the expert considers plausible. As an audit proceeds, each finding changes the distribution. A formula with a defect adds weight to higher rates, while a formula that passes inspection adds weight to lower ones. The calculation treats a contiguous block of copied formulas as a single inspection unit, so a mistake carried through a block does not count as a series of independent discoveries. The updated distribution gives reviewers an estimated defect rate, a range showing the uncertainty around it, and the probability that the rate is at or below a threshold chosen by the organisation.

The paper illustrates the calculation on three operational spreadsheets used to manage research project finances at a third-level institution. With an acceptable defect rate of 5%, the first spreadsheet finishes the reported sequence with only 20% probability of meeting that threshold. In the case shown in Figure 5, that probability stays above 95% from 100 unique formulas onward. The authors suggest that the latter review could have stopped after checking 100 – 130 unique formulas under their criterion. The contrast shows how audits using the same initial assumptions can lead to different decisions as their findings accumulate.

These cases illustrate a decision procedure, and the paper leaves its predictive accuracy for future evaluation. The calculation assumes that reviewers discover the defects in the formulas they check and that the unique formulas provide independent evidence. Grouping adjacent copies addresses an obvious source of dependence, but nearby formulas or formulas using related functions can still share causes of error. The authors also distinguish the frequency of defective formulas from their consequences for the decisions a spreadsheet supports.

## Deep dive: Error Estimation in Large Spreadsheets using Bayesian Statistics

Bradley and McDaid estimate spreadsheet error rates from expert judgment and partial audits to help reviewers decide how much more to check. · about 35 minutes to read

**In this deep dive**

1. [The problem and its context](#dd-the-problem-and-its-context)
2. [The method, step by step](#dd-the-method-step-by-step)
3. [Experiments and results](#dd-experiments-and-results)
4. [What the ablations show](#dd-what-the-ablations-show)
5. [Limitations](#dd-limitations)
6. [What came after](#dd-what-came-after)

### The problem and its context

#### Why the decision arises during an audit

The paper starts from the place spreadsheets occupy in business. Organisations use them to make forecasts, assess risks, prepare reports and decide what to do next. The authors pay particular attention to finance, where spreadsheets can be part of the process that produces information on which other people rely. They describe the Sarbanes-Oxley Act of 2002 as a reason for companies to examine that role more closely. Greater scrutiny can require more people or more time, especially when the calculations are spread across a workbook that has grown beyond what a reviewer can readily inspect.

Spreadsheet size matters in more than one way. The paper cites Croll’s description of how Microsoft Excel’s 256-column cap constrained financial work and also cites reports of spreadsheets larger than 1 GB. These observations describe the scale of the files. The number of distinct calculations is closer to the amount of reasoning an auditor may have to do. Croll’s account places the number of unique formulas in some reviews between 1,000 and 10,000 and upwards. A workbook may have many repeated cells and still contain a substantial number of formulas whose intended behaviour someone has to establish.

Reading a formula involves more than getting a spreadsheet to recalculate. For the kind of defect Bradley and McDaid study, an auditor needs to decide whether a calculation produces a wrong result. A formula may therefore warrant examination even if it runs without reporting a problem. At the scale described in the paper, checking each calculation in context can demand considerable resources. Management needs to decide how to use those resources while the evidence is still incomplete.

The paper gives an example of why that evidence matters. Two spreadsheets from the Agricultural Bank of Namibia reported different loan amounts, N$59.5 million and N$50.4 million. The example illustrates a discrepancy that could matter to someone using the figures. It also helps explain why the paper keeps the prevalence of errors separate from their consequences. A disagreement over one amount and a count of faulty formulas describe different properties of a workbook, even when both are relevant to the audit.

There are two decision points in the authors’ account. Before detailed inspection, a reviewer can ask whether what is already known about the workbook justifies committing resources to it. After inspection begins, the reviewer can ask whether the findings justify continuing. Both questions involve uncertainty about formulas the reviewer has yet to examine. They also admit different practical responses. A spreadsheet that looks promising may warrant less further checking under a given standard, while a spreadsheet with persistent defects may require more extensive review or redevelopment.

#### What earlier research counted as an error

The paper distinguishes between the cell error rate and the spreadsheet error rate. The cell error rate, or CER, measures the proportion of cells that contain errors in the population being counted. The spreadsheet error rate, or SER, is the proportion of spreadsheets with at least one error. The first describes how frequent errors are within the units under review. The second describes how often a workbook is affected at all. A spreadsheet with a single defect and one with recurring defects would both contribute to the spreadsheet-level count, while their contributions to a cell-level analysis could be quite different.

Bradley and McDaid cite Panko’s review of 13 studies of operational spreadsheets conducted during 1995 – 2004. It reported an average CER of 5.2% for 43 spreadsheets and an SER of 94% for 88 spreadsheets. The two figures answer different questions, and the paper gives different sets of spreadsheets for their denominators. In particular, the SER should be read as a frequency across the workbooks studied. It does not describe how much of any affected workbook contained errors.

The paper contrasts these findings with work by Powell and colleagues on 50 operational spreadsheets from several kinds of organisations. That study reported a CER of 1.79% over 270,722 formulas. It also distinguished a cell affected by an error from an error instance. An instance could extend across several cells, and the reported average was 10.05 cells per instance. This is directly relevant to the proposed audit procedure. A count of affected cells and a count of distinct findings can differ because a problem can appear in a collection of related formulas.

What inspectors classify as an error changes the rate as well. Powell and colleagues separated wrong results from poor practices. The example discussed by Bradley and McDaid is a formula containing a hard-coded number. If the formula gives a wrong answer, it belongs in the wrong-result category. A hard-coded number can also be flagged as a poor practice when the answer is correct. Restricting the calculation to wrong results gave an error rate of 0.87% in that study. This narrower definition is the one closest to Bradley and McDaid’s focus on formula defects.

The denominator also varies across the studies. Powell and colleagues counted formula cells. Some studies included in Panko’s review applied different definitions, including one that concentrated on high-risk formulas. A frequency measured among formulas selected because they look risky answers a useful audit question about that selection. Applying it to a whole workbook would require evidence about how those formulas compare with the rest. The range of published rates gives the authors a reason to allow workbook-specific information to influence an estimate.

The paper also describes earlier work on the consequences of errors. The study by Powell and colleagues examined 25 operational spreadsheets. Ten had errors with reported impacts ranging from $216,806 to $110,543,305. Six had errors with no measured impact, while nine had no errors. These categories clarify what an audit rate can offer. It can describe the frequency of a defined kind of finding, but its significance for the organisation depends on where the affected calculations are used and what happens when they are wrong.

#### How spreadsheet review had been approached

The earlier research in the paper includes work on how people create and repair spreadsheets. Baker and colleagues used an online questionnaire to examine the practices of spreadsheet users. The variation they found across people and organisations is relevant to judging a new workbook. Benham and Giullian approached the issue through training intended to make users more aware of errors. Bishop and McDaid examined whether experience with spreadsheet design might affect how users behave and perform when debugging. Together, these studies help explain why the authors were interested in factors such as developer experience and organisational practice.

Other work focused on the process of finding errors. Powell and colleagues devised an audit protocol combining activities such as mapping the spreadsheet and checking its formulas with the use of Xlanalyst and Spreadsheet Professional. Panko discussed adapting software checking practices and described direct examination of individual cells as an extensive form of inspection. Croll reported a staged approach to reviews in the City of London, with documentation accompanying the stages. Bradley and McDaid use an existing structured audit to obtain observations for their statistical procedure.

The paper also describes the SpACE methodology used by HM Revenue & Customs. It has 5 stages and includes an early judgment about whether the spreadsheet’s impact warrants full inspection. The auditor can consider information such as the developer, organisational policy and the complexity of the problem before starting detailed tests. Bradley and McDaid bring this kind of contextual judgment into the estimate itself. The same judgment can inform the starting distribution and then be revised in light of what the audit finds.

One illustration comes from the earlier study of 25 operational spreadsheets. Five of its error-free spreadsheets came from the same organisation. The authors suggest that an auditor could use this experience to form a favourable initial expectation about another spreadsheet from that organisation. The example concerns how evidence might inform a belief about a new case. The paper gives no rule for turning a history like this into a specific parameter value, and the same organisation could produce workbooks that differ substantially in complexity or purpose.

The authors also draw on software reliability research. In their account, studies using Bayesian networks sought to combine limited defect data with qualitative information such as staff experience and the quality of testing. Some of that work suggested that judgments and historical evidence collected within an organisation could help predict outcomes on later projects there. Bradley and McDaid pursue a narrower task in their implementation. They estimate a single rate for spreadsheet formula defects, with contextual information entering through an initial distribution selected by an expert.

#### The question behind the calculation

The starting question is how much an incomplete audit can tell someone about the part of a spreadsheet that remains unchecked. The authors consider the relationship between error rates at the cell and workbook levels, but the operational procedure they illustrate estimates a rate for unique formulas within a particular workbook. The distinction matters when a manager asks whether a spreadsheet is likely to fall below a specified rate. That decision concerns the prevalence of defects among the units that could still be checked. It is a different question from whether the workbook has any defects whatsoever.

The authors give particular attention to dependence between findings. When a formula is copied, a mistake in the original can carry over to other cells. Inspecting each copy could tell an auditor how widely the problem appears, but each repetition gives limited new evidence about the likelihood that an independently written calculation is defective. The authors therefore change the unit counted by the statistical procedure. They group contiguous copies and base the update on the resulting unique formulas. Whether those units provide sufficiently independent evidence is one of the central questions left open by the paper.

### The method, step by step

#### From an initial judgment to a decision

The procedure starts by stating what the reviewer intends to count. In the operational examples, the evidence is the number of checked unique formulas and the number found to contain a defect. Here a defect is a formula error that produces a wrong result. This gives a finding a specific meaning. A judgment about an inconvenient workbook structure, for instance, could affect an expert’s initial expectations, but it does not enter the running count as a defective formula solely because it makes the workbook harder to review.

Next, the reviewer expresses an initial belief about the defect rate. A person familiar with the organisation, the workbook or related spreadsheets can judge what rates seem plausible and how much confidence to place in that judgment. The authors mention the developer’s skills, organisational pressures, the difficulty of the calculations and information from an initial examination of workbook structure and contents. They also discuss practices such as documentation and version control. These factors can influence the judgment, while the statistical calculation receives the resulting distribution as its starting point.

The reviewer then inspects unique formulas and records each outcome. A result of either kind changes the estimate. A defect provides evidence for a higher underlying rate, and a checked formula judged correct provides evidence for a lower one. The same calculation can be repeated as the inspected portion grows. At each point, management can use the current estimate and its uncertainty to decide how much more scrutiny the workbook warrants.

The final decision described by the paper has two ingredients. One is the error rate the organisation is prepared to tolerate. The other is how sure the organisation wants to be that the rate is within that tolerance. The procedure can estimate the probability associated with the first ingredient, while the organisation’s use of that probability depends on the standard it chooses. Reporting both the estimated rate and the probability of meeting a threshold gives the reviewer ways to communicate what is known at the present checkpoint.

Updating a spreadsheet defect estimate during review The steps in order.

#### What a unique formula represents

The unit of counting is easy to miss because the paper frames its problem in terms of cell error rates. Some formula cells are direct copies of neighbouring cells. Recording each copied cell as an independent trial could give a single mistake more influence simply because the formula was filled across a larger area. The grouping rule identifies connected blocks of copies, so the block contributes one outcome to the running estimate. This also changes the population to which the estimate applies. A block that fills many cells and an isolated formula can each contribute one observation.

In the authors’ worksheet example, there are 12 non-empty cells, including 3 formula cells and 9 inputs. The formulas in B5 and D5 are copies of the one in A5. A5 and B5 form a contiguous group under the paper’s rule. D5 is separated from that group and is counted separately, even though its formula is also a copy. The example therefore yields 2 unique formulas, represented by A5 and D5. A block can extend through neighbouring cells in different directions, provided it is uninterrupted by a blank or a different value.

This is a local definition. The authors distinguish it from counting root formulas across a workbook. Their grouping addresses copying that is apparent within a contiguous region. Two separated calculations can still be alike, as the example itself shows. A reviewer interpreting the resulting rate should therefore understand “unique” as a description of how the inspection units were constructed. It does not establish that those calculations were conceived independently or that their errors are unrelated.

The operational rate is best understood in relation to those units. If a formula defect appears in a large block, the defect counts for the block in the update. If the same workbook were described by the fraction of its physical formula cells that were wrong, that defect could carry more weight. Either figure can answer a meaningful question. The paper’s choice follows from the statistical rationale for grouping and from the goal of learning about the remaining unique formulas.

#### Representing expert judgment

The authors use a beta distribution for the prior. A prior describes uncertainty about the rate before the outcomes of the detailed inspection are included. A rate is bounded at either end, and the beta distribution describes how the expert’s belief is spread across this range. It can put substantial weight near a narrow band of plausible rates, or it can spread weight more broadly when the expert has little basis for a precise estimate.

The density has the following form. The integration variable is written separately from the rate being evaluated so the two roles are clear.

```
f(θ) = θ^(α − 1) · (1 − θ)^(β − 1) / ∫₀¹ t^(α − 1) · (1 − t)^(β − 1) dt
```

Here f is the prior density, and θ is the unknown defect rate. The parameters α and β determine the shape of the distribution. The caret marks an exponent, the middle dot means multiplication, and the slash denotes division. In the integral, t ranges over the possible rates from 0 to 1, and dt indicates integration with respect to t. The integral normalises the density so that its total probability is 1. Parentheses group terms to which the operations apply, and the minus signs indicate subtraction. The density at a rate measures the concentration of probability near it. Probabilities for ranges of rates come from the area under the density.

The paper gives the mean and variance. The mean is the rate averaged over the distribution, weighted by the belief assigned to each possibility.

```
Mean = α / (α + β)
```

Here Mean is the average defect rate under the beta distribution, and α and β are its shape parameters. The plus sign adds the parameters, the parentheses enclose the denominator, and the slash means division. The same expression applies whether the parameters describe the initial belief or the belief after inspection. It is the average the authors use when they draw the estimated defect rate during a review.

```
Variance = α · β / ((α + β)^2 · (α + β + 1))
```

Here Variance measures the spread of the beta distribution, and α and β are again its shape parameters. The middle dots indicate multiplication, the slash indicates division, and the plus signs indicate addition. The parentheses indicate how factors are grouped, the exponent 2 squares the sum of the parameters, and 1 is the constant added in the last factor. A distribution with a smaller spread puts more of its probability close to its mean. Together, the mean and spread allow priors with similar central estimates to express different degrees of certainty.

The expert’s task is to choose parameters that represent a plausible level of error and a plausible amount of uncertainty. The authors leave this judgment to someone with the relevant knowledge, which could be the reviewer after a cursory examination. When little is known, they suggest a vague prior. The application to operational spreadsheets uses the same chosen parameters for each case, allowing the examples to show how different sequences of audit findings affect a common starting distribution.

The way parameters enter the later update gives them a practical interpretation. The first behaves like an initial weight assigned to findings of defects, and the second behaves like an initial weight assigned to findings of correct formulas. The paper’s illustrative prior uses parameters 2 and 8, described as analogous to knowing of 2 defective cells among 10. This is an interpretation of the expert’s starting belief. The worksheet in the illustration is subsequently tested, and those inspection outcomes supply the actual observations.

#### Recording partial test evidence

For the operational cases, the authors applied the audit procedure developed by Powell and colleagues. Two people audited the spreadsheets independently, compared their findings and reached agreement on the errors. There is a difference between doing the audit and presenting what the authors would have known at a given checkpoint. The paper orders the checked formulas and examines the effect of the findings in that order, making it possible to see how the estimate would develop during a sequential review.

The sequence begins with the first block of unique formulas in the first worksheet and moves through the workbook by columns and rows. The authors maintain cumulative counts of checked units and observed defects. At a checkpoint, those counts are the inputs from inspection. The workbook’s contents and intended calculations matter to the auditor who classifies a formula. The update uses the resulting classification without separately representing the nature or seriousness of the defect found.

The probability distribution for the inspection count is binomial. It assumes that, for a given underlying rate, the units are independent and share that probability of being defective. The count of defects can then be described without knowing which positions in the sequence contained them.

```
b(x; n, θ) = C(n, x) · θ^x · (1 − θ)^(n − x)
```

Here b is the probability of observing x defects in a set of n inspected units when the underlying rate is θ. The semicolon in the argument list separates the outcome x from the quantities that specify its distribution. The commas separate arguments, and C(n, x) counts the ways to place x defects among n units. The first power accounts for the defective units, and the second accounts for the units judged correct. The caret denotes exponentiation, the middle dots denote multiplication, and the minus signs denote subtraction. The possible counts x extend from 0 defects to n defects. In the statistical terminology used to describe the binomial, a success is the event being counted, so its occurrence means that a defect has been found.

The distinction between the two distributions is important. The beta prior describes uncertainty about the rate itself. The binomial expression describes the count expected from inspection if the rate were known. When the reviewer has an observed count, the binomial expression also gives the relative support that observation offers to different possible rates. A sequence of checked formulas with few defects will be easier to reconcile with some rates than with others, and the update combines that evidence with the starting belief.

Though the calculation uses cumulative totals, the order of the findings still matters to the path drawn during the review. At any fixed checkpoint with the same totals, rearranging the outcomes already counted leaves the updated distribution the same. Changing which formulas come before that point can change the totals and thus the estimate available when a reviewer considers stopping. This distinction is important because the workbook order determines what evidence the reviewer has early in the examples.

#### Combining the two sources of information

The binomial and beta distributions fit together so that the update again gives a beta distribution. This property is called conjugacy. Here it makes the update a direct addition to the parameters. The defect count is added to the first parameter. The count of checked units judged correct is added to the second. The resulting distribution is the posterior, meaning that it describes the rate after taking the observed audit evidence into account.

```
f(θ | x, n) = θ^(α + x − 1) · (1 − θ)^(β + (n − x) − 1) / ∫₀¹ t^(α + x − 1) · (1 − t)^(β + (n − x) − 1) dt
```

Here f is the posterior density of the rate θ. The vertical bar indicates that the density is conditional on the x defective units observed among the n inspected units, given the chosen prior. The prior parameters are α and β, and n − x counts the inspected units judged correct. The exponents add the appropriate inspection counts to the prior contributions. The caret indicates a power, the middle dot indicates multiplication, the slash indicates division, and the plus and minus signs indicate addition and subtraction. Parentheses group the terms, and the comma separates the observed arguments. The integral uses t as its variable, with dt indicating integration across the rate range from 0 to 1, and normalises the posterior density.

The additions explain why the estimate can be updated after each inspection. A checked block with a defect increases the first parameter, whereas a checked block judged correct increases the second. The mean can then be evaluated with the revised parameters. The first changes tend to reflect both the initial judgment and the inspection findings strongly. As more units are checked, the accumulated observations carry more weight relative to the original parameters. How quickly the auditor sees that change depends on the weight assigned to the prior and the pattern of findings.

The paper’s worked example starts with 900 formula cells and a beta prior with parameters 2 and 8. The prior mean is given as 0.2. The authors then suppose that inspection of the first 20 formula cells finds 2 errors. The updated parameters are 4 and 26, and the posterior mean is reported as 0.13. This example shows how a relatively small number of observations can shift the mean when combined with the particular prior the authors chose.

The article’s reported standard deviation for the starting belief is 0.0146. That value is inconsistent with the variance formula and the stated parameters of 2 and 8. The example’s update can be followed using the parameters, the observed inspection counts and the reported means. The dispersion figure needs to be read separately as a numerical inconsistency in the paper. The most probable rate displayed by the density is also distinct from the mean and can occur at a different location.

#### Turning the posterior into quantities an auditor can read

The paper uses several views of the updated distribution. Its posterior mean supplies a central estimate of the underlying rate. The operational figures also plot the 5% and 95% limits of the posterior distribution. The lower limit leaves 5% probability below it, and the upper limit leaves 5% above it. The authors describe the interval between them as containing 90% probability. These limits are posterior probability statements conditioned on the prior, the inspected units and the assumptions of the calculation.

The authors also show how uncertainty about the rate translates into uncertainty about the number of defects in the uninspected portion. These are separate quantities. A rate describes how likely a unit is to be defective under the assumptions of the procedure. The count describes how many defective units might actually occur among a specified set. Even at a fixed rate, there is uncertainty about that count. Uncertainty about the rate adds a further source of variation. The worked example uses the remaining 880 formula cells to illustrate what the prior and updated distributions imply for that practical question.

For the stopping decision, the paper calls the relevant quantity reliability. It is the probability, under the current posterior distribution, that the underlying rate is at or below the organisation’s chosen acceptable rate. The operational illustrations use 5% as that acceptable rate. The probability is obtained from all the posterior weight up to the threshold. A change in the location of the distribution can change reliability, as can a change in how tightly the probability is concentrated.

This use of the term reliability has a specific scope. It describes confidence about meeting a frequency standard for defects among the units at issue. The paper uses that probability as evidence in a decision about further inspection. For a reader following the figures, the posterior mean, the interval and the reliability curve answer different questions. They show where the current estimate lies, how much uncertainty surrounds it and how much of that uncertainty is compatible with the organisation’s criterion.

### Experiments and results

#### The worked example and the operational cases

The paper presents a numerical illustration and then a case series using operational financial spreadsheets. The illustration holds the total number of formulas fixed at 900 and compares the prior with the posterior after a partial inspection. It makes the update visible in terms of both the rate and the number of errors that might remain. The operational cases use three spreadsheets relating to research project finance at a third-level institution. Their purpose is to show how the same procedure behaves when the input comes from recorded audit findings.

In the illustration, the authors compare prior and posterior beliefs for the same 880 unchecked formula cells. The prior curve for the rate is broad relative to the updated curve. The peaks of the rate distributions are reported at roughly 0.13 for the prior and 0.12 for the posterior. These are modes, the points where the density is highest. The corresponding means reported for the example are 0.2 and 0.13. The distinction helps explain how the shift in the mean can be more pronounced than the shift in the location of the peak.

The companion figure presents possible counts of errors in those unchecked cells. The paper describes the likely counts under the prior as extending approximately from 0 to 550, with a most probable count of 110. With the inspection evidence included, the reported span is roughly 0 to 320 and the most probable count is 96. The authors describe these as approximate spans visible in the figure, with no probability coverage attached to those endpoints. The modal counts compare two estimates for the same set of cells. A smaller modal count here means a lower estimate of remaining error burden, and the example gives no observed count for assessing the accuracy of either estimate.

Most probable defect count among 880 unchecked formula cells in the worked example The partial inspection shifts the most probable count of remaining defects downward.

**The numbers**

| System or setting | modal count of defective formula cells |
| --- | --- |
| Expert prior alone | 110 |
| Posterior after partial inspection (this paper) | 96 |

The prior alone is the direct comparison for the worked example. For the operational curves, the common starting point is the beta prior with parameters 5 and 95. The paper also discusses what a running estimate based only on findings would look like early in one case. It gives no competing procedure evaluated against verified withheld defect counts. The main reported quantities are the posterior mean for the unique-formula defect rate, the limits describing posterior uncertainty and the probability of meeting the 5% acceptable rate.

#### How to read the audit curves

The operational plots put the number of tested unique formulas on the horizontal axis. In the rate plot, the mean traces the change in the central estimate, and the bounding curves show the 5% and 95% limits. The corresponding reliability plot tracks the probability that the defect rate is at or below 5%. Each point uses the observations accumulated by that stage of the review and the same starting prior. Thus the curves represent what the procedure would have said while the auditors were still moving through the workbook.

A declining mean indicates a stretch in which findings judged correct pull the estimate downward. A stretch with several defects can produce a sharp rise. The reliability curve responds to how these changes relate to the threshold. A run of defects can move probability away from the acceptable range. A subsequent run of correct formulas can move it back. Reading the mean alongside the reliability curve helps show why a numerical estimate alone gives an incomplete account of whether the review has reached a decision point.

The paper describes its operational data in terms of audited formulas under the defect definition. The auditors had compared classifications and agreed on which errors to record. The reported trajectory uses these classifications as inspection outcomes. An intermediate plotted value is the posterior estimate based on the prefix of the audit, and the figure’s rightmost plotted value is the estimate at the endpoint of the reported sequence. Both remain statements from the statistical procedure.

#### Spreadsheet I

The first spreadsheet shows bursts of defect findings visible as sharp rises in the posterior mean. Between them are smoother declines as the reviewers progress through runs of formulas judged correct. These changes are informative for an auditor because they indicate that the evidence gathered so far is uneven. A long decline can take place even when some remaining part of the spreadsheet still contains a concentration of defects. In this example, subsequent discoveries cause the estimate to change direction.

For the 5% acceptable rate, the reliability curve approaches 0% in the part of the audit spanning 50 – 100 checked unique formulas. The paper describes local improvements, followed by a recovery towards the end of the sequence. The curve finishes at 20%. This endpoint means that under the stated assumptions the posterior gives 20% probability to a rate at or below the acceptable threshold. It is a probability about the rate. It is separate from the percentage of inspected formulas found to be defective.

The authors see the endpoint as weak grounds for concluding that the remaining formulas meet the organisation’s standard. They describe further review or redevelopment as possible responses. The example does not rank those responses by cost or estimate the potential loss from continuing to use the workbook. It shows how an auditor may arrive at a judgment that additional action is warranted even after a substantial sequence of inspections.

#### The other operational cases

The paper presents the same pair of plots for the case in Figure 4. One panel gives the estimated rate and its posterior bounds over the inspection sequence. The other gives the corresponding probability of meeting the 5% threshold. The discussion uses these figures as parallel applications of the same reasoning. The paper does not state a numerical endpoint for Figure 4 in its narrative or specify a stopping point for that case. Its reported contribution is to illustrate the use of the same outputs on another workbook.

In Figure 5, the posterior mean starts from the common prior and falls before the auditors begin finding defects. The authors describe the later mean as settling enough to draw a conclusion under their criterion. In the accompanying reliability plot, the probability of being within the acceptable rate stays above 95% from 100 checked unique formulas to the end of the spreadsheet. Here 95% measures posterior probability, and the acceptable rate remains 5%. This distinction matters because the two percentages refer to different aspects of the decision.

The authors suggest that testing in the Figure 5 case could stop after checking, for example, 100 – 130 unique formulas. Their interpretation comes from applying the threshold to the reliability trajectory. The paper follows that trajectory to the end of the spreadsheet and reports that the probability remains above 95%. It does not describe an audit in which the team actually stopped at the suggested point and measured the consequences of that decision. The result is evidence about what the rule would have indicated along the recorded sequence.

Spreadsheet I and the Figure 5 case are useful to read together because the conditions chosen for calculating reliability are shared. The same prior and acceptable rate are applied to both, yet the observed findings lead to different posterior judgments. For Spreadsheet I, the later improvements still leave little posterior probability within the acceptable range. In Figure 5, the accumulated evidence gives the authors grounds to consider an early stop. The comparison shows how the procedure can distinguish between audit trajectories under a fixed standard.

#### What the examples establish

The worked example shows that incorporating audit evidence can change both the central estimate and the distribution used to describe what may remain. The operational examples show how to use the calculation at successive checkpoints and how the two views of the posterior work together. The rate plot describes the estimated frequency and its uncertainty. The reliability plot shows how that distribution bears on a specific decision.

The paper’s experimental question about prediction remains open. The authors propose comparing estimated rates with actual rates in later work. The operational cases demonstrate calculations based on real audit data, but they give no systematic assessment of how closely estimates at early checkpoints match the rate among the formulas still untested at those checkpoints. The evidence therefore supports claims about the behaviour and presentation of the procedure, while accuracy and the safety of early stopping remain questions for evaluation.

### What the ablations show

The paper reports no formal ablations, and its closest comparisons are the prior and posterior in the worked example, a qualitative comparison with using inspection findings alone in Figure 5, and the different audit trajectories under a shared prior.

#### The effect of adding inspection evidence

The worked example isolates the change that follows from adding one set of findings to a fixed prior. It keeps the same unchecked portion of the hypothetical spreadsheet in view and shows how the estimate changes from the initial judgment. The posterior mean moves downward, and the density becomes narrower around its central region. The count display also concentrates the likely number of remaining defects in a smaller span. Under the assumptions of the calculation, the partial audit both redirects belief and gives it a firmer basis.

The comparison does not show that the reviewer’s original judgment was inaccurate or that the updated estimate agrees more closely with a verified error count. The hypothetical worksheet provides no such comparison. Its value lies in showing which parts of the output respond to the evidence. The mean, the height and shape of the density, and the probable count of remaining defects describe related changes. The figures make it possible to see a change in uncertainty even where a reader focusing on the peaks might see only a modest change in the likely rate.

The example also clarifies the role of the prior parameters. The expert’s starting beliefs have an explicit weight in the update. A prior with the same mean and a different spread would give the same initial central rate, but the same inspection outcomes could move the posterior by a different amount. This follows from the formula. The paper leaves empirical comparison of different prior strengths and different expert judgments open.

#### The early estimate with few findings

In the Figure 5 discussion, the authors consider what a rate based only on inspection findings would do at the start of the sequence. Before any defects were found, its observed error rate would remain zero. The first discovery could then make the running estimate jump sharply. The prior supplies a starting level and allows the estimate to move gradually downward during the initial defect-free stretch. It also moderates sudden changes while the number of checked formulas is small.

This is a comparison of how the early estimate behaves. The paper does not report a complete parallel analysis comparing decisions made using an inspection-only estimate with decisions made using the posterior. A smoother early trajectory can help a reviewer interpret sparse findings. Whether that smoothing also improves accuracy depends on the fit between the expert’s judgment and the workbook. The qualitative comparison shows where the prior acts and why its influence is most visible near the beginning.

The same point applies to a decision based on the first few inspections. An initial defect-free stretch supplies some evidence about the rate, but the reviewer still has substantial uncertainty about the rest of the workbook. By assigning probability across plausible rates, the posterior can reflect that uncertainty at the same time that its mean decreases. The paper’s interpretation of Figure 5 depends on the eventual probability of meeting the threshold, after further findings accumulate.

#### What the sequence and grouping explain

The case series keeps the prior parameters and acceptable rate constant, so the differences in the curves arise from the audit records supplied to the calculation. Spreadsheet I shows visibly abrupt changes where the authors identify periods of defect findings. The Figure 5 discussion describes a longer stretch of favourable posterior reliability. The contrast is a demonstration of responsiveness to the two records. It leaves open whether the particular inspection order represents the untested portion at each checkpoint.

The grouping example addresses a different question. It shows how counting contiguous copies as one unit changes the input to the analysis. A block of copied formulas would otherwise be able to contribute multiple outcomes from a shared source. Grouping removes that direct multiplication from the running count. The paper gives no paired results on the operational workbooks comparing counts by physical cell, contiguous block or workbook-wide root formula. The evidence for the grouping choice is therefore its rationale and the worksheet example, with the practical effect on calibration still unmeasured.

The sequential figures offer a further observation about how the inputs behave. Bursts of findings and stretches without findings produce different paths through the same calculation. The paper interprets those patterns in relation to the audit, and later raises the possibility that nearby formulas might have related defect risks. The figures themselves do not measure that dependence or distinguish it from other reasons for uneven findings. A comparison that reordered or randomly selected the formulas could address part of that issue. The authors identify random selection as ongoing research.

### Limitations

#### Assumptions identified by the authors

The authors state that the procedure assumes perfect discovery during inspection. A checked formula classified as correct is treated as evidence that the formula is correct. Earlier research discussed by the authors makes clear how difficult reliably finding spreadsheet errors can be. The separate audits and reconciliation give the case series an agreed record of defects. Agreement still leaves open whether both auditors overlooked the same problem. If a reviewer misses defects, the resulting observations can support a lower estimated rate than the one the procedure would give with complete discovery.

Omission errors are outside the prediction. The operational evidence consists of outcomes for existing formulas or blocks. A missing calculation does not give the reviewer an existing formula to classify in the same way. Accordingly, a workbook could meet the rate threshold for the defects counted in the paper while still leaving out a calculation it needs. The limitation follows from the kind of inspection unit used and from the definition of a defect the authors adopt.

The authors also identify independence as a critical assumption. The grouping rule protects the calculation against treating all cells in an adjacent copied block as independent observations. It cannot account for every relationship between formulas. Calculations can depend on similar functions or share features of a common local design, and the authors suggest that proximity may also matter. Where defects have a shared cause, examining several affected formulas may yield less independent evidence than their count suggests. The uncertainty displayed by the procedure depends on treating the counted outcomes as independent for a given rate.

This concern applies to how well inspection in one part of the workbook supports inference about another part. If the opening worksheets are routine and later worksheets contain different kinds of calculations, a favourable run early in the audit may be a poor guide to the remaining formulas. Conversely, reviewing a difficult area first may make later areas look worse than they are. The authors suggest random selection as a possible way to improve coverage. That change would address which formulas enter the sample, while dependence between particular formulas would remain a separate question.

The authors explicitly defer evaluation of predictive effectiveness. They plan to use operational spreadsheets, compare predictions with actual rates and examine the assumptions underlying the calculation. The case series is therefore an early application of the proposed approach. Its estimates and reliability curves illustrate what the procedure produces under its assumptions. The authors also recognise a broader limit to what even a reliable rate can tell management. The effect of a defect on decisions depends on the calculations and uses affected, and a count assigns no extra weight to a mistake because its consequences are severe.

#### Limits visible in the case design

The three operational spreadsheets come from a shared domain, the finances of research projects at a third-level institution. This gives the examples a clear setting. It leaves open how the same prior and audit procedure would behave with spreadsheets from organisations that have different development practices or use different kinds of calculations. The paper motivates the method partly with reports of very large workbooks, but it gives no measured audit savings on workbooks of the scale used to motivate the problem.

The examples also use a single prior for all the operational curves. That makes it straightforward to compare the updates, but it leaves the expert-judgment part of the method incompletely tested. The paper discusses what an expert might know without describing a reproducible process for eliciting parameter values, checking consistency across experts or testing the sensitivity of a stopping judgment to the chosen prior. Early results especially can depend on those choices, since the prior has more influence before a substantial number of checks have accumulated.

A spreadsheet can also vary in risk from one region to another. In the paper’s calculation, the examined units contribute to learning about a shared underlying rate for the untested units. If formulas with different purposes or different levels of complexity have systematically different risks, an estimate can depend heavily on the mix already inspected. Sequential review by workbook position makes this issue especially relevant. The procedure can produce a narrow distribution under its assumptions even when the selected portion provides a poor account of the remaining mix.

The change from cells to contiguous formula units also limits comparisons with published error rates. A rate among unique formulas and a rate among individual formula cells weight blocks differently. The audit in the paper also targets defects that produce wrong results. A broader audit could include poor practice, and a workbook-level measure may ask only whether any error occurs. The numerical estimate should therefore be read with the unit and the error definition attached, especially if an organisation plans to set a tolerance by looking at previous audits.

#### Interpreting the numerical illustrations

Two details in the paper call for care when reconstructing the examples. The worked illustration pairs a stated standard deviation of 0.0146 with a beta prior specified by 2 and 8. The standard deviation is inconsistent with those parameters under the paper’s variance expression. The reported prior and posterior parameter pairs, inspection counts and means still show the intended calculation, but the stated dispersion cannot be used to reproduce the prior.

The table illustrating sequential records also has entries that conflict with the stated update. At 4 cells tested and 1 recorded error, the displayed posterior mean is 5/104. The numerator of 5 stays at the initial first parameter in that entry. The formula requires the defect count to be added to that parameter. The paper’s description of the update and its worked beta example both specify this addition. The table illustrates the layout of a review record, while these entries leave the reported means unsuitable as arithmetic checks.

These issues concern reproducibility of the illustrations. A separate issue concerns the reported probability limits. The 5% and 95% curves describe the spread assigned by the posterior under the chosen assumptions. The operational examples do not show how often intervals with those limits would contain the actual remaining rate when applied to other workbooks. Likewise, the reliability curve describes the posterior probability of meeting the chosen rate threshold. Its interpretation as a guide to stopping depends on whether the assumptions support that degree of confidence.

#### What a stopping judgment can establish

A threshold decision depends on what the organisation uses as its definition of acceptable quality. The authors select 5% as the acceptable rate in their demonstrations. They do not derive that choice from the costs or consequences of defects in the workbooks. A probability above 95% in the Figure 5 case can support a stopping decision under the selected criterion. The procedure supplies evidence about one aspect of the workbook that management can use when making that decision.

Stopping also fixes which evidence the reviewer will have seen when making the judgment. Looking back at a full audit can show where a rule would have called for an earlier stop. It can also show later changes that the reviewer would never have observed if the rule had been acted on. The paper illustrates the former with the Figure 5 trajectory and shows through Spreadsheet I how changing findings can alter reliability. It leaves prospective evaluation of stopping decisions, including the relationship between estimates at those checkpoints and defects among the remaining formulas, to future work.

### What came after

The paper identifies two extensions for future work. One is to select formulas randomly for inspection and examine whether that gives better coverage of a workbook than following its layout. This follows from a specific concern in the results. A reviewer who proceeds by position may encounter groups of related calculations together. Selecting formulas from across the workbook would change the evidence available at an early checkpoint and allow an evaluation of whether the resulting estimate better describes what remains.

The other extension is to test the predictions against error rates established through operational audits. That would address the authors’ open question about how well the procedure predicts the rate, given the prior and the findings available at a particular point. It would also give researchers a basis for assessing the assumptions about discovery, dependence and how much can be inferred about untested formulas from the ones already examined.

These are research directions identified by Bradley and McDaid. No later cited study is documented here as carrying them out or building on the procedure.

## Cite

Cite as Leslie Bradley and Kevin McDaid. 2009. Error Estimation in Large Spreadsheets using Bayesian Statistics. arXiv:0908.1190 (Proc. European Spreadsheet Risks Int. Grp. (EuSpRIG) 2009 27-38 ISBN 978-1-905617-89-0).

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.48550/arxiv.0908.1190](https://doi.org/10.48550/arxiv.0908.1190) · [arXiv 0908.1190](https://arxiv.org/abs/0908.1190)

```bibtex
@misc{bradley2009error,
  title = {{Error Estimation in Large Spreadsheets using Bayesian Statistics}},
  author = {Leslie Bradley and Kevin McDaid},
  year = {2009},
  doi = {10.48550/arxiv.0908.1190},
  eprint = {0908.1190},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.48550/arxiv.0908.1190}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
