Elamur Research

On the Numerical Accuracy of Spreadsheets

Paper · 2010 · Marcelo G. Almiron, Bruno Lopes, Alyson L. C. Oliveira et al.

Summary

A spreadsheet can return a number in the expected cell even when the calculation has lost most of its accuracy. Almiron and colleagues examine how often this happens in Calc, Excel, Gnumeric, NeoOffice and Oleo. They compare the programs’ answers with independently established reference values, using both observed datasets and examples constructed to expose numerical weaknesses. The tests cover descriptive statistics, analysis of variance, regression and distribution functions. The authors also examine whether users have enough information and control to reproduce sequences of pseudorandom numbers for simulation.

The results vary sharply by operation. Gnumeric reaches a log-relative error score of 15.0 for the sample mean on every dataset in that test, the highest score reported there. Yet on the most difficult standard-deviation dataset it scores 8.2, alongside Calc and NeoOffice, while Excel 2008 scores 0. For the F statistic in the hardest analysis-of-variance example, Excel 2007 receives a negative score and Gnumeric reaches 4.1. Excel 2007 is comparatively strong in linear regression, especially when the quantity of interest is the residual standard deviation, which measures the scale of the deviations from the fitted equation. The accuracy of individual regression coefficients gives a more mixed picture.

Nonlinear regression is the clearest case in which the way a calculation is run changes what the benchmark finds. The authors vary both the initial coefficient values and the Solver settings. Under default settings, sixteen of the twenty-seven datasets produce a fit with at least four correct significant digits in the least accurate coefficient when the starting values are farther from the certified solution. With a closer start and customized settings, twenty-three datasets reach that criterion in at least one tested configuration. The coverage across configurations still leaves difficult cases, and even the strongest individual methods fail frequently enough that the authors advise against using the tested spreadsheets for nonlinear regression.

The distribution tests reveal errors that depend on the function, release and operating environment. Gnumeric agrees closely with the reference values across the selected cases. Calc 3.0.1 also does well on the tested Student’s t and F quantiles under Ubuntu and Windows, while its Mac OS build returns values with no correct significant digits in those examples. The simulation assessment reaches a different kind of conclusion. Problems with generator documentation, control of the seed, or both prevent the authors from endorsing any tested spreadsheet for serious Monte Carlo work. Across the study, the evidence supports judgments about particular calculations run in particular configurations.

Deep dive: On the Numerical Accuracy of Spreadsheets

A benchmark of statistical accuracy in five spreadsheets, from sample means and regression to tail probabilities and random number generation. · about 34 minutes to read

The problem and its context

A spreadsheet presents statistical procedures as functions, menus and cells. That makes a calculation accessible to someone who knows what quantity they need without knowing how software evaluates it. The convenience also puts most of the arithmetic out of sight. The number that appears at the end gives little direct evidence of how much accuracy survived the intermediate steps. If the value feeds another formula, a chart or a decision, the user may have no independent figure against which to check it.

The paper describes spreadsheet use in settings where this distinction matters. It points to corporate accounting for large transactions and to scientific uses ranging from control-system analysis to hospital process monitoring and radiotherapy. These are examples of the kinds of work for which people were already using spreadsheets. The benchmark asks a narrower question than whether any of those applications was sound. It asks whether the statistical procedures available in the tested programs can recover known answers when the inputs are held fixed.

Earlier assessments had already found numerical problems in successive releases of Excel and in other spreadsheets. The authors cite work on Excel’s statistical procedures across releases, as well as Knüsel’s studies of its distribution functions. They also cite work on software fixes that makes a release change an empirical question in its own right. A corrected procedure in a newer build is evidence of improvement for that procedure. The ability to open a workbook in that build gives no comparable evidence about the arithmetic. This history explains why the study records software releases and operating environments instead of treating the product name as the full description of a test.

The numerical sources of error are familiar from statistical computing. Cancellation occurs when subtracting quantities that agree in many leading digits leaves a small result, making inaccuracies in the inputs large relative to what remains. Accumulation occurs when errors carried by successive operations affect the eventual answer. Truncation arises when a calculation uses a finite representation or approximation where the mathematical quantity admits further detail. The paper associates these problems with the finite binary representation of numbers and with choices in implementing statistical functions. Identifying one of these mechanisms as a possibility takes far less evidence than locating it inside a particular program.

The authors therefore approach the spreadsheets from the user’s side. Some vendors give little detail about their algorithms, and inspecting source code can be demanding even when it is available. A benchmark can establish how far a returned value lies from a trusted answer without settling exactly where the discrepancy originated. McCullough’s earlier methodology supplies this comparison. The paper describes its use in assessments of spreadsheet and statistical software, including work on JMP, IDL and GAUSS. For distribution functions, it draws more directly on Yalta’s comparison of Excel releases with Gnumeric and Calc. Yalta’s difficult inputs supply a focused way to look for persistent failures and changes across implementations.

The products also entered the study with different histories. The paper describes Gnumeric as having placed particular emphasis on accuracy from its outset. It traces NeoOffice to OpenOffice.org source code but explains that the Mac-oriented implementation included its own changes. Oleo supported both graphical and character-mode operation, and the authors found little existing evidence on how it behaved numerically. Though it could load functions from the GNU Scientific Library, the functions assessed in the paper did not come from that library. Those details explain why differences in feature availability and numerical implementation belong in the comparison even when two interfaces appear to offer similar operations.

The method, step by step

Start with a calculation whose answer is known

For the main accuracy tests, the authors take a dataset or a distribution-function input with an independently established answer. They ask a spreadsheet to perform the corresponding calculation using its available function or fitting procedure. They then measure the agreement between the returned number and the reference. The reference stays fixed as the spreadsheet, release, operating system or Solver configuration changes. If a feature is missing, that limits the comparison to configurations that can perform the calculation. If the feature runs and fails to return a number, the failure is recorded with the results.

From reference inputs to spreadsheet accuracy scores

The steps in order.

From reference inputs to spreadsheet accuracy scoresStep 1: Select benchmark inputs and certified answers1. Select benchmark inputs and certified answersStep 2: Match each calculation to available spreadsheet functions2. Match each calculation to available spreadsheet functionsStep 3: Specify the regression equations and starting values3. Specify the regression equations and starting valuesStep 4: Run the selected spreadsheet configurations4. Run the selected spreadsheet configurationsStep 5: Record numeric answers and missing results5. Record numeric answers and missing resultsStep 6: Compare answers with the certified values6. Compare answers with the certified valuesStep 7: Report agreement by statistic, dataset and configuration7. Report agreement by statistic, dataset and configuration

The National Institute of Standards and Technology supplies the Statistical Reference Datasets used for univariate statistics, analysis of variance and both kinds of regression. The benchmark includes nine datasets for univariate summaries, eleven for analysis of variance, eleven for linear regression and twenty-seven for nonlinear regression. The sets are classified as low, average or high difficulty. Observed data bring examples from actual measurements. Constructed data allow the benchmark to include numerical problems that may be hard to find by taking ordinary examples alone.

For summaries, analysis of variance and linear regression, the reference calculations used multiple-precision arithmetic to obtain 500 digits before rounding the answers to fifteen significant digits. The nonlinear regression references were prepared by the same approach and issued to eleven significant digits. The distribution benchmarks come from Yalta’s calculations in Mathematica 5.2 and are certified to six significant digits. The precision available in the references matters when interpreting agreement. A distribution result at the reported reference precision supports a different statement from one backed by the longer references for the sample mean.

Turn the discrepancy into a measure of accuracy

An absolute error gives the distance between the computed and reference values. Its meaning depends on the scale of the answer. The authors therefore normally divide that distance by the magnitude of the certified value, then apply a negative base-ten logarithm. Their log-relative error, abbreviated LRE, uses a separate rule when the certified value is zero.

LRE(x, c) = { −log₁₀(|x − c| / |c|)  if c ≠ 0
             { −log₁₀(|x|)            otherwise

Here x is the value obtained from the spreadsheet and c is the certified value for the same calculation. The vertical bars indicate absolute value, the slash indicates division, and log₁₀ is the logarithm in base ten. The minus sign before the logarithm makes smaller errors correspond to higher scores. The condition c ≠ 0 identifies the relative-error branch. When c is zero, the magnitude of the returned value supplies the absolute error directly.

The paper illustrates the scale with a returned value of 0.01521 and a certified value of 0.01522. Their LRE is 3.182415. It gives the same LRE for a returned value of 0.0000001521 against a certified value of 0.0000001522. The two examples have different absolute discrepancies and the same relative discrepancy. In each, the score corresponds to roughly three correct significant digits. The point of the scale is to treat that degree of agreement alike when the numerical quantities themselves are on very different scales.

The authors state a reporting convention of one decimal place for LRE values of at least 1. An LRE from 0 up to but below 1 is generally represented as zero, and a negative LRE is shown by a dash. Some table entries retain more detail below 1. The tables also use NA for a calculation that returns no numeric answer. These distinctions matter when reading difficult cases. A dash marks a numerical answer that is sufficiently far from the reference to yield negative LRE. An NA marks the absence of a number to score. A feature absent from a spreadsheet’s test coverage is a separate case again. The authors calculate the LRE scores in R 2.8.0 under Ubuntu Intrepid, using R for the comparison step with the certified values as the reference.

Match the spreadsheet operation to the reference statistic

The sample mean is a starting point because it has a direct mathematical definition and a built-in function in every spreadsheet tested. The certified values use the sum of the observations divided by their count.

x̄ = (∑ᵢ₌₁ⁿ xᵢ) / n

The symbol x̄ denotes the sample mean, n is the number of observations and xᵢ is the observation at position i. The summation symbol ∑ adds the observations over positions from 1 through n, and the slash divides the resulting sum by n. The benchmark calls AVERAGE in Calc, Excel, Gnumeric and NeoOffice, and AVG in Oleo.

The sample standard deviation adds a different set of numerical operations. The gaps between observations and the mean are squared and summed, and their adjusted average is put back on the scale of the observations by taking a square root.

s = √[(∑ᵢ₌₁ⁿ (xᵢ − x̄)²) / (n − 1)]

Here s is the sample standard deviation, xᵢ is observation i, x̄ is the sample mean and n is the sample size. The parentheses enclose the deviation to be squared, ² indicates squaring, and ∑ sums the squared deviations from 1 to n. The denominator n − 1 is the sample-variance divisor. The radical √ takes the square root of the quotient. The authors call STDEV in Calc, Excel, Gnumeric and NeoOffice, and STD in Oleo.

First-order autocorrelation measures how each observation relates to the observation immediately before it. Its reference definition centers both members of every adjacent pair on the mean of the entire series. It compares the sum of those products with the sum of squared deviations in the entire series.

r₁ = [∑ᵢ₌₂ⁿ (xᵢ − x̄)(xᵢ₋₁ − x̄)] / [∑ᵢ₌₁ⁿ (xᵢ − x̄)²]

The symbol r₁ denotes autocorrelation at the first lag, xᵢ is the current observation and xᵢ₋₁ is its predecessor. The mean x̄ and count n refer to the full sample. The upper sum starts at 2 because the first observation has no predecessor. Adjacent parentheses indicate multiplication of the deviations. The lower sum begins at 1 and includes every observation, with ² squaring each deviation. The slash divides the upper sum by the lower sum.

The authors describe the spreadsheet calculation using covariance for the lagged ranges and variance for the full sample. They emphasize that simply applying CORREL to the shifted ranges does not give the target quantity. The certified definition uses the full series for centering and scaling, so the arrangement of the data and the definition of the statistic both matter. Oleo is omitted from this part because it lacks the native covariance function required for the procedure described in the paper.

In one-way analysis of variance, or ANOVA, observations are assigned to groups and the F statistic compares variation between groups with variation within groups. The reference datasets provide a target F value. The authors evaluate the built-in procedure through Excel 2007’s Analysis ToolPak and Gnumeric’s ANOVA function. They restrict the comparison to those options because the other tested configurations do not offer a native procedure for this task. This design addresses the accuracy of a feature a user could invoke, with the same known answer for both eligible spreadsheets.

For linear regression the corresponding feature is LINEST, available across the tested configurations of Calc, Excel, Gnumeric and NeoOffice. The authors score the least accurate estimated coefficient and report a separate score for the residual standard deviation. A coefficient is a fitted number that controls how the equation relates the inputs to the predicted response. A residual is the difference between an observation and its fitted value. Reporting the weakest coefficient makes the test sensitive to a single badly estimated term. Reporting the residual standard deviation separately shows how accurately the spreadsheet summarizes the deviations around the fit. These outputs can lose accuracy at different rates.

The authors also control how regression expressions are written. They use full parentheses because spreadsheets and other statistical environments can interpret the same unparenthesized expression differently. Their example is negation combined with squaring. Excel and R can give opposite signs when the intended grouping is left implicit. If the spreadsheet and the reference are effectively evaluating different expressions, a discrepancy would tell the reader little about the accuracy of either computation. Specifying the grouping makes the numerical comparison meaningful.

Give the nonlinear Solver a defined problem

For nonlinear regression, the reference specifies both the data and the form of the fitted relationship. The authors turn the fit into a minimization problem. A proposed set of coefficients gives a fitted response at each observed input. The residuals are squared and added, and Solver searches for coefficients that make that total small. The accuracy score is calculated on the returned coefficients themselves. For each fit, the lowest coefficient LRE is the reported result.

The BoxBOD fit illustrates what the Solver has to do.

y = β₁(1 − exp(−β₂x)) + ε

In this equation x is the input and y is the response. The coefficients β₁ and β₂ are the quantities to estimate, and ε denotes the residual term. The function exp is the exponential function. Juxtaposition indicates multiplication, and 1 is the constant from which the exponential term is subtracted. This structure gives the coefficients different jobs. One scales the curve and the other controls how it approaches its limiting level. Solver has to select them together from the observed data.

Thurber gives the optimizer a different kind of curve, expressed as a ratio of polynomials.

y = (β₁ + β₂x + β₃x² + β₄x³) / (1 + β₅x + β₆x² + β₇x³) + ε

Here x again denotes the input, y the response and ε the residual term. The coefficients β₁ through β₄ appear in the numerator. The coefficients β₅ through β₇ appear in the denominator, whose constant term is 1. The superscripts ² and ³ indicate powers of the input, adjoining terms are multiplied, and the slash divides the entire numerator by the entire denominator. The benchmark compares each estimated coefficient with its certified counterpart before selecting the lowest LRE for the fit.

The available optimizers differ by release. Excel 2007 offers the methods identified as Newton and Conjugate. Calc 2.4.1 under Ubuntu and NeoOffice 2.2.5 have native nonlinear Solvers. Calc 3.0.1 and NeoOffice 3.0 require the nonlinear Solver extension for this test. The extension supplies DEPS, a hybrid approach based on particle swarm optimization, and SCO, or social cognitive optimization. The paper describes both as nondeterministic. Repeated searches can therefore differ even when the specified settings and starting values agree.

Each nonlinear reference dataset comes with a farther starting point and a closer one. The paper calls them Start 1 and Start 2. Each is a set of initial coefficients from which Solver begins its search. The farther start represents a user who has little prior knowledge of the solution, while the closer start gives the optimizer a more favorable initial position. The authors first run the methods using their defaults. They then repeat the comparison with customized settings for the Solvers that expose those controls. They also run a separate diagnostic from the certified coefficients themselves.

For Excel’s customized condition, the authors raise the permitted time and iteration limits, set convergence to 1E − 8, and select forward derivatives and tangent estimates. For DEPS and SCO, they set the swarm size and the stagnation limit to 150 and apply a stagnation tolerance of 1E − 8. The authors treat tolerance controls with similar purposes as comparable settings while recognizing that each optimizer has its own parameters. They leave the remaining options at their defaults. Calc 2.4.1 and NeoOffice 2.2.5 are absent from the tuned tests because the assessed native Solvers lack those controls. Runtime is outside the performance comparison, which is concerned with achieved accuracy.

Specify which probability or quantile is being evaluated

The distribution tests use the cases Yalta identified as numerically difficult. For a discrete distribution, the input may specify an outcome whose probability is wanted or a cutoff through which probabilities are accumulated. For continuous distributions, a cumulative probability gives the chance of a value at or below a cutoff. A density evaluates the distribution at an input on a different scale. A quantile reverses the direction of the cumulative calculation and finds the cutoff associated with a given probability.

P{X ≤ x} = p

Here P denotes probability, X is the random variable, and x is the cutoff that makes the event in braces have probability p. The symbol ≤ includes values at or below the cutoff. This equation describes the lower-tail quantiles tested for the standard Gaussian and beta distributions. If the variable is discrete, as in the cumulative binomial and Poisson tests, the specified cutoff is written k in the paper. The cumulative gamma tests use a specified x and compare the returned probability with the reference.

P{X > x} = p

Here P again denotes probability, X is the random variable, x is the cutoff and p is the specified probability. The greater-than sign selects values above the cutoff. This is the right-tail convention for the chi-square, Student’s t and F reference quantiles. The tested spreadsheet function for Student’s t takes a probability for the two tails together, expressed in the paper as follows.

P{|X| > x} = p

The vertical bars denote the magnitude of X, so the event includes values beyond the cutoff in either direction. In this expression P is probability, x is the magnitude cutoff and p is the combined tail probability. To match the right-tail references, the authors double the specified right-tail probability in the spreadsheet’s TINV call. The probability convention belongs to the setup because changing it changes the quantity being evaluated.

For the supported functions, the authors compare the standard spreadsheet calls and also test Gnumeric’s alternative functions based on R. Oleo has no native distribution functions for the comparison and is left out. The benchmark covers cumulative binomial probabilities, point and cumulative Poisson probabilities, cumulative gamma probabilities, and quantiles for the standard Gaussian, chi-square, beta, Student’s t and F distributions. The inputs vary by function. Several tests ask whether the implementation remains accurate when a tail probability is very small.

Examine reproducibility separately from agreement with a reference

A simulation needs streams of pseudorandom values. A seed is the initial state, or information used to establish that state, from which the stream can be reproduced. The authors discuss criteria from Ripley covering resemblance to uniform draws, independence of groups of draws, reproducibility across computational environments, speed and a long period before repetition. These criteria concern properties of a sequence and the conditions under which users can obtain it again.

The assessment in the paper concentrates on the information available about each generator and the possibility of setting its seed. The authors examine documentation, consult source code in some cases, and investigate whether the claimed generator identity matches the evidence for Excel. They discuss established batteries of statistical tests as tools for studying sequences. The LRE method used for estimation and distribution calculations does not produce a score for a spreadsheet’s generator. The simulation conclusion rests chiefly on whether users can identify and reproduce the sequence being used.

Experiments and results

The configurations and the comparison baseline

The i386 notebook ran Ubuntu Intrepid and Windows Vista SP1. The amd64 iMac ran Mac OS X Leopard, listed in the results as 10.5.6. Calc 3.0.1 was available on all those operating systems. Calc 2.4.1 was tested on Ubuntu and Windows. The Excel runs used Excel 2007 on Windows and Excel 2008 on Mac OS. Gnumeric was tested as 1.8.3 on Ubuntu and 1.9.1 on Windows. The Windows Gnumeric release was a development build because it was the available build for that operating system. NeoOffice 2.2.5 and 3.0 were tested on the Mac, and Oleo 1.99.16 was tested on Ubuntu.

The main comparison baseline is the certified answer for each input, and the spreadsheet scores are expressed in terms of agreement with that answer. The study also compares configurations directly when multiple programs implement the same procedure or when a program was tested in several releases or environments. When configurations give identical results, the paper can report a shared column. Accordingly, a result labeled with a product name may represent several tested builds for one task even when that product needs split columns for another.

Means, standard deviations and autocorrelation

Gnumeric’s sample means score 15.0 for every dataset in the univariate benchmark. All five spreadsheets reach 15.0 on the observed low-difficulty data. The constructed cases are more revealing. Calc, Excel and NeoOffice score 14.0 on NumAcc2 and 13.9 on NumAcc4. Oleo scores 6.6 on the low-difficulty NumAcc1 and on the average-difficulty NumAcc3. Its mean score on NumAcc4, the sole high-difficulty dataset in this part of the benchmark, is 7.6. The differences show why a test consisting only of the observed low-difficulty means would have given a much narrower view of the programs.

Spreadsheet sample mean LRE on the high-difficulty NumAcc4 dataset

Gnumeric reaches the highest reported precision, with Oleo showing the weakest agreement.

Spreadsheet sample mean LRE on the high-difficulty NumAcc4 datasetCalc: 13.9Calc13.9Excel: 13.9Excel13.9Gnumeric (this paper): 15.0Gnumeric (this paper)15.0NeoOffice: 13.9NeoOffice13.9Oleo: 7.6Oleo7.6
The numbers
System or settingLRE
Calc13.9
Excel13.9
Gnumeric (this paper)15.0
NeoOffice13.9
Oleo7.6

The standard deviation changes both the magnitude and the ordering of the results. Calc, Gnumeric and NeoOffice give identical scores throughout that test. They reach 15.0 on NumAcc2, then 9.4 on NumAcc3 and 8.2 on NumAcc4. Excel 2007 matches those figures on NumAcc3 and NumAcc4, but its NumAcc2 score is 11.5. Excel 2008 also scores 11.5 on NumAcc2. It falls to 1.4 on NumAcc3 and to 0 on NumAcc4. The Mac release also scores 9.4 on Mavro and 8.2 on Michelso, two low-difficulty datasets for which Excel 2007 scores 12.9 and 13.8. Oleo has negative LRE on NumAcc1, NumAcc3 and NumAcc4. The high scores for the mean of a dataset thus give limited evidence about the accuracy of its estimated spread.

First-lag autocorrelation shows how much the difficulty of a particular statistic can vary within a benchmark category. The low-difficulty Lottery dataset gives an LRE of 3.5 in every tested spreadsheet configuration for this statistic. The corresponding scores for Mavro and PiDigits are 4.1 and 5.3, respectively. On NumAcc1, another low-difficulty dataset, all tested configurations reach 15.0. Some of the right comparisons are therefore between statistics or configurations on the same input. A difficulty label is a useful way to organize the data, while the score describes the actual result for a given computation.

The largest autocorrelation gaps appear on NumAcc3 and NumAcc4. Excel 2007 scores 12.3 on NumAcc3 and 11.0 on NumAcc4. Excel 2008’s NumAcc3 entry is 0.9, and it returns no numeric result for NumAcc4. NeoOffice 2.2.5 has negative LRE on both datasets, while NeoOffice 3.0 reaches 12.2 on NumAcc3 and 11.0 on NumAcc4. A smaller difference appears within Calc on NumAcc2. The Ubuntu result is 14.4, and the Windows and Mac OS builds give 15.0. The mean comparison could pool the releases and environments of a product. The autocorrelation comparison needs some of them to remain visible.

Analysis of variance and linear regression

Excel 2007 and Gnumeric give identical F-statistic scores on several of the low- and average-difficulty ANOVA datasets. Both score 13.0 on the observed low-difficulty SiRstv data and 10.1 on the observed average-difficulty AtmWtAg data. Where their results differ, Gnumeric is more accurate. On SmLs08, a high-difficulty dataset, the scores are 1.8 for Excel 2007 and 4.1 for Gnumeric. On SmLs09, Excel 2007 returns a value with negative LRE, and Gnumeric again reaches 4.1. Gnumeric’s stronger relative performance on those cases still leaves a substantial gap between its accuracy on the difficult data and its accuracy on the easier examples.

The linear regression benchmark ranges from observed, low-difficulty datasets to constructed polynomial examples and more demanding observed data. It also includes the no-intercept cases NoInt1 and NoInt2 at average difficulty. That variety matters for LINEST. The same interface can run regressions with different numbers of terms and different numerical demands. The paper uses a single summary of coefficient accuracy for each fit by selecting the least accurate coefficient, then gives the residual standard deviation its own result.

By the authors’ tally, Excel 2007 is best or tied for best on coefficient accuracy in seven of the eleven datasets. Filip is a particularly clear case. Excel 2007 scores 7.2 for the least accurate coefficient, and Excel 2008 scores 6.4. Gnumeric scores 0, while the Calc and NeoOffice results are in the negative-LRE category for coefficient accuracy. The same benchmark also includes cases in which Excel is outperformed. The authors point to Norris, where some Calc builds and NeoOffice do better, and to Wampler4 and Wampler5, where Gnumeric supplies the strongest coefficient results. The low-difficulty data also let the authors invoke McCullough’s suggested expectation of at least nine correct digits for linear regression on easy problems.

For residual standard deviation, Excel 2007 is best or tied for best in eight of the eleven tests, according to the paper. Gnumeric’s better results are distributed across difficulty levels. The comparison again includes incomplete results. Gnumeric returns no numeric answer for the residual standard deviation on Longley, whereas Excel’s reported LRE for that quantity is 14.4. On Filip the Excel releases return residual standard deviation scores of 7.2 and 6.4, respectively. That result matters to someone who needs a scale for the residuals, while the weakest-coefficient scores matter to someone interpreting the individual terms. Neither outcome can be inferred merely from the presence of LINEST in a program.

The authors report that their Excel 2007 results for means, standard deviations, ANOVA and linear regression agree with results in earlier assessments they cite. In the context of the paper, this puts the comparisons with Mac builds and other spreadsheets alongside failures and successes that had been documented for earlier work on Excel. It also separates familiar problems from those that only become visible when the range of releases, functions and operating environments expands.

Nonlinear regression with default settings

The authors use McCullough’s criterion of at least four correct significant digits to judge whether the weakest estimated coefficient is reasonably accurate for a nonlinear fit. With default Solver settings and the farther starting values, sixteen of the twenty-seven datasets reach that criterion in at least one tested configuration. The closer start raises the reported coverage to eighteen datasets. These counts ask whether any tested configuration reaches the threshold on a dataset. A user who chooses a Solver before seeing the benchmark results faces the performance of that particular configuration.

At the farther start, some low-difficulty cases work with several algorithms. The Chwirut datasets are examples where methods from the extension produce usable results and Excel’s Conjugate method struggles. Misra1a and Lanczos3 lack reliable estimates across the tested configurations at that start. Calc 2.4.1 and NeoOffice 2.2.5 do poorly even within the low-difficulty group. Moving to the closer start improves Misra1a with some methods, and Lanczos3 still produces negative LRE throughout. A low difficulty rating on the dataset gives no guarantee that a particular Solver will find accurate parameters with its defaults.

The average-difficulty datasets show a wider division between usable and weak outcomes. Nelson, MGH17, Lanczos1, Lanczos2 and Roszman1 challenge all the configurations at the farther start. The closer start brings some improvement for Nelson, MGH17 and Roszman1, but the authors still regard the results as unreliable. DEPS supplies many of the strongest results in the group. It is also the only method to reach an acceptable result on ENSO from the farther start in the default-settings comparison. The tests make clear that closer initial values and a comparatively strong method can still leave the weakest coefficient short of the target.

In the high-difficulty group, BoxBOD is particularly sensitive to the starting values. With default settings, the farther start produces negative LRE across the tested configurations. From the closer start, DEPS and SCO produce reliable estimates, while the older native Solvers and the two Excel 2007 methods still give negative scores. Rat43 also improves with the closer start under DEPS. Bennett5 remains difficult. In the authors’ assessment, DEPS performs best overall with default settings, yet it produces unreliable results or no result in more than 30% of cases.

The paper’s fitted curves illustrate how negative LRE can correspond to quite different practical outcomes. In BoxBOD, the curves from the older Calc and NeoOffice Solvers and from both Excel methods visibly disagree with the certified fit. For Thurber, the Newton curve looks much closer to the reference even though the least accurate coefficient still has negative LRE. The Conjugate fit also receives a negative score and gives a visibly less satisfactory curve. The graph and the benchmark are sensitive to different parts of the result. A curve can track observations fairly closely over the plotted range while a coefficient differs greatly from its certified value.

Nonlinear regression with customized settings

Under customized settings, twenty of the twenty-seven datasets reach the four-digit criterion at the farther start in at least one tested configuration. The corresponding count for the closer start is twenty-three. The language of coverage matters especially here. Calc 2.4.1 and NeoOffice 2.2.5 are absent from the customized grid, and the other solvers can contribute successes on different datasets. The higher count describes what is achieved across these conditions.

At low difficulty, tuning can yield strong results from Newton as well as DEPS. On Gauss2 from Start 1, for example, Excel 2007’s Newton method reaches 7.5 and DEPS also gives good results. Misra1a from Start 1 is more selective. Newton’s LRE is 4.5 and the tested DEPS configurations score 0. At the closer start, the tuned DEPS configurations give much better scores on Misra1a. Lanczos3 continues to pose problems, with negative LRE for the tuned configurations at the closer start. In the average-difficulty group, Lanczos1 and Lanczos2 remain problematic even with the closer initialization. Other cases improve enough to show the effect of the changed setup. The best tuned results come mainly from Newton and DEPS, with their relative strength depending on the dataset.

Among high-difficulty data, the authors report reliable results from at least one tuned configuration for five out of eight datasets at the farther start. From the closer start DEPS reaches reliable results on six of the eight and Newton on five. Some of the strongest scores occur on different cases. For tuned Start 2 on BoxBOD, the Ubuntu build of Calc 3.0.1 using DEPS reaches 7.1 and the Windows build reaches 7.3, while Excel’s Newton method has negative LRE. On Rat43 with the same tuned start, Newton reaches 8.9, and the Ubuntu and Windows DEPS runs each reach 7.1. Bennett5 continues to fall short of the four-digit criterion.

Tuned Solver LRE for the least accurate Rat43 coefficient from Start 2

Newton gives the most accurate weakest coefficient among the configurations shown.

Tuned Solver LRE for the least accurate Rat43 coefficient from Start 2Calc 3.0.1 Ubuntu DEPS: 7.1Calc 3.0.1 Ubuntu DEPS7.1Calc 3.0.1 Windows DEPS: 7.1Calc 3.0.1 Windows DEPS7.1Excel 2007 Conjugate: 3.7Excel 2007 Conjugate3.7Excel 2007 Newton (this paper): 8.9Excel 2007 Newton (this paper)8.9NeoOffice 3.0 DEPS: 6.4NeoOffice 3.0 DEPS6.4
The numbers
System or settingLRE
Calc 3.0.1 Ubuntu DEPS7.1
Calc 3.0.1 Windows DEPS7.1
Excel 2007 Conjugate3.7
Excel 2007 Newton (this paper)8.9
NeoOffice 3.0 DEPS6.4

The algorithms also differ in how consistently they clear the paper’s accuracy threshold. In the final comparison, the authors put tuned DEPS ahead of Newton and report that it produces reliable results in over 70% of cases. Conjugate fails in more than 70% of assessments. SCO fails in more than 65% with the farther start and more than 50% with the closer start. An individual high score and the frequency of meeting the criterion answer different questions. The uncertainty that matters before running a new fit comes from the spread of results across cases.

Distribution probabilities and quantiles

The binomial tests show a large release difference within Excel. With 1030 trials and a per-trial success probability of 0.5, Excel 2007 scores 0 for cumulative probabilities at cutoffs of 1, 2, 100 and 300. At the cutoff of 1, the certified probability is 8.96114E − 308. Calc, Excel 2008, Gnumeric and NeoOffice all score 6.0 on that case. At a cutoff of 400, Excel 2007 scores 2.1 and the other tested functions score 6.0. The gap persists across selected inputs representing different magnitudes of cumulative probability.

Spreadsheet LRE for the cumulative binomial probability at cutoff 400

The comparison shows stronger agreement in every other tested spreadsheet group than in Excel’s Windows release.

Spreadsheet LRE for the cumulative binomial probability at cutoff 400Excel 2007: 2.1Excel 20072.1Calc, Excel 2008, Gnumeric and NeoOffice (this paper): 6.0Calc, Excel 2008, Gnumeric and NeoOffice(this paper)6.0
The numbers
System or settingLRE
Excel 20072.1
Calc, Excel 2008, Gnumeric and NeoOffice (this paper)6.0

For the tested Poisson point probabilities at mean 200, the Calc and NeoOffice results coincide with Gnumeric’s, while Excel receives 0 across the selected cases. The cumulative tests expose another distinction. They set the cutoff equal to the mean and use large values for both. At a cutoff and mean of 1E + 09, the certified cumulative probability is 0.500008. Gnumeric scores 6.0, Calc and NeoOffice return no number, and Excel scores 0. Though the inputs are large, the probability sought in this example lies near the middle of the probability scale. Tail magnitude alone cannot explain the pattern of weaknesses across the distribution benchmark.

For the cumulative gamma distribution with scale 1, Calc, NeoOffice and Gnumeric reach 6.0 on every tested input. Excel comes close on the cases where it returns a number, but it gives NA at the combination of input 0.1 and shape 0.1. With the standard Gaussian quantile, all tested implementations score 6.0 at probability 5E − 1. At 1E − 198, Excel’s score is 2.8, and at 1E − 300 it is 0. Calc, NeoOffice and Gnumeric reach 6.0 at both tail probabilities. The ordinary quantile and the extreme quantiles exercise the same named function and reveal markedly different behavior.

The chi-square and beta tests show improvements in newer Calc and NeoOffice releases. For the chi-square upper-tail quantile at probability 1E − 12 and five degrees of freedom, Calc 2.4.1 and NeoOffice 2.2.5 have negative LRE. Calc 3.0.1, NeoOffice 3.0 and Gnumeric reach 6.0, and Excel returns no numeric answer. In the beta test with shape parameters 5 and 2, Calc 3.0.1 under Ubuntu and Windows and Gnumeric reach 6.0 at 1E − 100. The Mac OS build of Calc 3.0.1 and NeoOffice 3.0 have negative LRE at that input, in spite of giving accurate results on less extreme benchmark probabilities, including 1E − 13.

The tested Student’s t and F quantiles are especially sensitive to the build of Calc. For the Student’s t cases with one degree of freedom, Calc 3.0.1 on Ubuntu and Windows and Gnumeric score 6.0 at every listed probability. The Mac OS build of Calc 3.0.1, Excel and NeoOffice 3.0 score 0. Calc 2.4.1 and NeoOffice 2.2.5 return no numeric answer. The F tests set both degrees-of-freedom parameters to 1. Again, Calc 3.0.1 on Ubuntu and Windows and Gnumeric score 6.0 throughout. Calc 3.0.1 on Mac OS, Excel 2007 and NeoOffice 3.0 return numeric answers scored 0, while Excel 2008 joins the earlier Calc and NeoOffice versions in returning no number. The authors give practical weight to this difference because a numeric value can feed subsequent calculations without making the failure visible.

Across the selected distributions, Gnumeric reaches the accuracy available from the reference values, and its R-based and standard spreadsheet functions agree in the tests. Calc 3.0.1 on Ubuntu and Windows also does well over the selected cases, apart from its failure to return numeric answers for the cumulative Poisson inputs. This part of the paper documents agreement with references certified to six significant digits. The cases are difficult examples chosen from earlier findings, so the tested inputs define the scope of the comparison.

What users can establish about the random generators

Gnumeric identifies its generator as the Mersenne Twister, which the paper describes as having a long period. The spreadsheet does not give users a high-level way to set the seed. Oleo also lacks high-level seed control. Its source code identifies a linear feedback shift register, while the user-facing integer generator is undocumented. In the authors’ description, a user specifies the upper end of the integer range and can choose how often the spreadsheet updates the generated value. That timing control does not give the user a way to restart the generator from a specified state.

Calc’s source code indicates use of the C rand function. According to the paper, the spreadsheet’s generator depends on which library it was built with because the C standard lets each library choose the algorithm for that function. Calc’s documentation does not identify the generator and the spreadsheet provides no user function to set the seed. The authors identify the same issue in NeoOffice. Even when products share a code lineage, the generator can depend on something outside the visible spreadsheet formula.

The paper records seed control for Excel 2007 and challenges the documentation about its algorithm. It cites earlier work showing that the implementation in Excel 2003 and 2007 does not match the claimed Wichmann–Hill generator. Applying the same methodology to Excel 2008, the authors conclude that the Mac generator matches neither the original Wichmann–Hill version nor the revised one they discuss. Excel 2008 also lacks the generator information and seed access recorded for comparison. The paper’s case against serious simulation in the tested spreadsheets follows from these different weaknesses. Some generators are identifiable but hard for users to restart. In other cases the available documentation fails to identify the implemented algorithm reliably.

What the ablations show

The paper contains no component-removal ablation. Its closest equivalents are controlled comparisons of initial coefficients, Solver settings, methods and releases, along with diagnostics that ask whether a solver can recognize a solution it has already reached.

Starting closer helps, with exceptions

The starting-point comparison holds the dataset, curve and certified coefficients fixed. Under the default settings, some of the strongest improvements come from moving to a closer initial position. BoxBOD supplies the most direct example. DEPS and SCO go from negative LRE in the farther-start runs to reliable fits in the closer-start runs. Rat43 shows a similar improvement under DEPS. Across the benchmark, this is consistent with the role of the initial coefficients in guiding a search. It also means that success from Start 2 makes a conditional statement about the Solver’s ability to find the solution from a favorable position.

The comparison contains counterexamples to a uniform effect. SCO’s result for Gauss2 in the Windows build is worse from the closer start under default settings. Several average-difficulty cases still fail to give reliable estimates, and the authors call attention to the nondeterministic behavior of DEPS and SCO when interpreting changes. A different score in a pair of runs can reflect a changed starting point and the variability of the search. The clearest result is the change in coverage across the observed benchmark, together with examples where the advantage of a closer start is large.

Tuning helps as a package of changes

The default-versus-customized comparison shows that the Solver options a user leaves in place are part of the accuracy conditions. Newton improves markedly on some cases after tuning, and DEPS reaches reliable estimates more often in the tuned comparisons. The authors also tried larger settings for swarm size and stagnation limit and saw no improvement in LRE. That observation pertains to the tested settings and datasets. The tuned comparison changes several controls at once, including stopping tolerances and, for Excel, other search settings and computational limits. The resulting score describes the combined configuration.

Comparing Newton with Conjugate in Excel 2007 keeps the spreadsheet release and its operating environment fixed. The tuned Rat43 fit shows a case where their weakest-coefficient scores diverge substantially. For DEPS and SCO, the extension places both algorithms in the same spreadsheet environment, yet DEPS generally returns reliable estimates more often. The rankings change on individual datasets, and a method that produces especially accurate estimates on one case can fail on another. These comparisons are most informative when the algorithm, start and settings are read together.

Starting at the certified solution tests recognition

The extra experiment begins from the certified coefficients with customized settings. It removes the need to search from a remote initial point and asks whether the optimizer recognizes that it is already at the solution. Newton and Conjugate recognize it in all cases except Bennett5. DEPS fails to stop at the certified value 12 times under Windows, 13 under Mac OS and 9 under Ubuntu, each out of 27 datasets. This gives evidence about the stopping behavior even in a favorable position.

Moving away from the certified values can have a modest or a serious effect on the benchmark score. When DEPS fails to stop there, it still reaches at least LRE 7 in most of the cases described by the authors. Rat43 is one of the exceptions, with negative LRE, and Bennett5 gives one correct significant digit. The exercise separates recognition from search. Newton and Conjugate usually identify the solution when placed there despite substantially weaker performance when asked to reach it from the other starts. DEPS’s ability to find useful fits in comparatively many search runs coexists with less consistent recognition of the certified point.

Release and operating environment can change an individual function

Some of the sharpest contrasts occur between releases running the same named procedure. NeoOffice’s later release improves autocorrelation on NumAcc3 and NumAcc4 and also improves the selected chi-square and beta quantiles. Excel 2008 improves on Excel 2007 for the selected binomial calculations, while the older Windows release gives stronger standard-deviation results in several cases. These outcomes show why release comparisons need a named statistic and input. Improvement in one operation gives little information about an unrelated operation.

The Calc 3.0.1 results for Student’s t and F show a pronounced split at the same release number. The Ubuntu and Windows builds agree with the references to the precision reported, while the Mac OS build scores 0. The same release number therefore covers different observable numerical behavior in this test. The experiment locates the difference in the tested configurations. The setup combines operating system, build and hardware differences, so it supplies correspondingly less evidence about which underlying factor caused the split.

Limitations

Limits stated by the authors

The authors treat the tuned nonlinear fits from the closer start as a favorable estimate of the reliability available from the spreadsheet Solvers they examined. In practical terms that setup presumes access to relatively good initial coefficients and to settings that improve accuracy in the tested problems. Their best observed methods still fail on enough cases that they find insufficient evidence to recommend these spreadsheets for nonlinear regression. They also note that the native Solvers in Calc 2.4.1 and NeoOffice 2.2.5 lack adjustment controls. For those versions, the study can describe only the accuracy the available procedure achieves.

The authors explicitly leave speed out of the optimization comparison. Raising limits or changing the search settings may affect the resources used by a fit, and the reported scores describe accuracy under those conditions. The exercise with larger swarm and stagnation settings yields their observation about LRE, instead of a general tradeoff between time and accuracy. They also caution that the nondeterministic methods make some apparent improvements hard to establish from the compared results, particularly when a closer start brings only a limited change.

For distributions, the authors say they concentrate on the cases where prior work identified difficulties. The benchmark establishes whether an implementation can recover reference values at those inputs and is particularly good at showing persistent weaknesses and fixes. The exercise with random generators has a different limit. The authors base their conclusion on repeatability and documentation concerns, while acknowledging the difficulty of verifying the statistical properties of sequences. They identify possible avenues for further work on spreadsheet graphics separately from the numerical assessment. In discussing graphics, the paper reports prior concerns about Excel defaults and notes the absence of comparable evaluations for the other products in the literature it reviewed.

Limits visible in the experimental design

The product comparisons are historical and configuration-specific. The tested environments do not form a complete grid in which every release is run on every operating system and architecture. In particular, the Mac and Windows Excel results combine a software release change with a platform change. The cross-platform Calc tests offer more direct comparisons at a fixed release number, but build and environment differences still travel together. A reader can use the scores to identify a configuration that returned accurate values on a benchmark. Attributing the difference to processor architecture, the operating system or one implementation detail would require further comparisons.

The evaluation is also limited to available software features. An absent ANOVA procedure means there is no native ANOVA result to score. It leaves open what might happen with a new implementation assembled from other operations. Conversely, an available function that reports an error is still an observable outcome for the benchmark. The paper’s distinction among missing capabilities, missing numeric answers and inaccurate numeric answers preserves these different implications. A ranking that assigns all three a single score would discard information that matters to a person relying on the calculation.

The accuracy metrics privilege specific properties of the output. The weakest-coefficient score is useful when every parameter must be estimated accurately, but it is sensitive to a large error in just one parameter. It is possible for a curve to look close to the reference even when that score is poor, as the authors show with Thurber. A good visual fit gives limited evidence about the correctness of each coefficient. The paper likewise evaluates the accuracy of the ANOVA F statistic and of the linear regression residual standard deviation as particular outputs. It does not quantify the downstream effect of those errors on every decision a user might make from the results.

The aggregate nonlinear counts are conditional on the set of configurations tried. They show the number of datasets for which there was a successful option in a benchmark with certified answers. A new user generally does not have those answers available for choosing among solvers or deciding whether tuning improved the estimates. The certified-start exercise is even more deliberately favorable and serves as a diagnostic, not a realistic source of starting coefficients. The paper provides no run-to-run distribution of scores for the stochastic methods, so its tables leave uncertainty about how often a repeated search would reproduce an individual entry.

Finally, numerical agreement has a reference precision. The distribution references can substantiate the reported agreement to six significant digits, including for very small tail probabilities. They cannot establish what the subsequent digits would have been. Nor do the selected distribution cases or the named regression datasets provide a representative sample of everything users compute in spreadsheets. The paper is strongest when read as evidence that particular failures occur, particular fixes can be observed, and some configurations are more dependable than others for the operations and inputs tested.

What came after

No subsequent studies citing the paper are identified here. The open questions at the end of the study concern how later spreadsheet releases would perform on the same reference cases and how confidently users could interpret the outputs of procedures whose accuracy or reproducibility varies by configuration. The paper’s discussion of spreadsheet graphics identifies a separate question about how well the programs communicate results once those results have been calculated.

Cite

Cite as Marcelo G. Almiron, Bruno Lopes, Alyson L. C. Oliveira, Antonio C. Medeiros and Alejandro C. Frery. 2010. On the Numerical Accuracy of Spreadsheets. Journal of Statistical Software 34(4).

The paper itself, not this page. BibTeX from the library's record of the work.

@article{almiron2010numerical,
  title = {{On the Numerical Accuracy of Spreadsheets}},
  author = {Marcelo G. Almiron, Bruno Lopes, Alyson L. C. Oliveira, Antonio C. Medeiros and Alejandro C. Frery},
  journal = {Journal of Statistical Software 34(4)},
  year = {2010},
  url = {https://www.jstatsoft.org/article/view/v034i04}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/almiron-2010-numerical-accuracy-spreadsheets/