Ask Your Question

What kind of standard error do Calc and Charts use for error bars? [closed]

asked 2013-11-01 00:29:39 +0100

chtfn gravatar image

I tried to find in the documentation what is the calculation used to ad "standard error" error bars on a chart, but could not find any explanation.

I tried to create a chart with two versions:

  1. the automatic standard error error bars from the "Insert > error bars" menu
  2. the same but with my own calculated values for standard error of the mean, using the formula Std err = Std dev of the sample / square root of the sample size.

Here is the spreadsheet.

Could anyone explain to me why the resulting error bars are different from one to another?


edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by Alex Kemp
close date 2015-11-12 16:04:53.571422

1 Answer

Sort by » oldest newest most voted

answered 2013-11-01 01:56:29 +0100

oweng gravatar image

Definition can be found in the ODF v1.2 specification, Part 1, under 20.13 chart:error-category:

The chart:error-category attribute is used to determine which function is used to calculate error indicators at data points. By default, no error indicators are shown. The defined values for the chart:error-category attribute are:

  • cell-range: Use values from cell ranges for positive and negative error indicators. The chart:error-lower-range and chart:error-upper-range attributes determine the cell ranges which contain the values to be used for negative and positive error indicators.

  • constant: Use fixed absolute values for both directions: positive and negative The absolute value for a positive direction is given with chart:error-upper-limit attribute. The absolute value for a negative direction is given with chart:error-lower-limit attribute.

  • error-margin: Use a fixed percentage of the largest value – this is called error-margin. The percentage value is given within chart:error-margin attribute.

  • none: No error indicators are shown.

  • percentage: Use a fixed percentage of each value The percentage value is given within chart:error-percentage attribute.

  • standard-deviation: Standard deviation of the values of a series assuming an equal distribution.

  • standard-error: Standard error (standard deviation of the mean) of the values of a series.

  • variance: Variance of the values of a series assuming an equal distribution.

This attribute is evaluated for chart styles that are applied to <chart:error-indicator>, <chart:series> or <chart:plot-area> elements.

edit flag offensive delete link more


Thank you for your response. However, Wikipedia tells me that the "standard deviation of the mean" cited in the specification is the same as the standard error of the mean. Which means I should get the same results in the cases I described. Any idea why I do not get the same results? I would love to know what the software is actually calculating (the actual formula).

chtfn gravatar imagechtfn ( 2013-11-01 06:25:13 +0100 )edit

I could be wrong, but my reading of the spec indicates that standard-error == standard deviation of the mean (as it states). The standard-deviation assumes "an equal distribution" and the error bars in the first chart in the example appear identical. In chart2/source/tools/StatisticsHelper.cxx the code indicates getStandardDeviation of fResult = sqrt( fResult ); and a getStandardError of fResult = sqrt( fVar ) / sqrt( double(nValCount) ); which would seem what Wikipedia indicates.

oweng gravatar imageoweng ( 2013-11-01 11:36:41 +0100 )edit

Thank you, Oweng. I don't think I understand the standard error calculation: shouldn't it be fResult = fVar/sqrt(nValCount) like described here?

chtfn gravatar imagechtfn ( 2013-11-03 13:24:52 +0100 )edit

I find it difficult to understand estimation-based statistics i.e., sample stats. When I manually calculate std. dev. of the mean for a sample I always get a much lower figure than that returned by the STDEV function. That bit of code carries this comment: // standard-deviation / sqrt(n) which seems right as sqrt( fVar ) == the sample standard deviation i.e., σ mean == σ / sqrt(N). It looks like σ represents the corrected sample std. dev., hence the sqrt() around fVar, but my reading of the Wikipedia page (which has a lot of "citation needed" tags) suggests these are all related to population std. dev. Great Cthulhu help me! EDIT: For the eleventy-first time! Changing your manual calcs (e.g., cell ...(more)

oweng gravatar imageoweng ( 2013-11-04 02:20:45 +0100 )edit

Question Tools

1 follower


Asked: 2013-11-01 00:29:39 +0100

Seen: 1,568 times

Last updated: Nov 01 '13