Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to graph the error between a set of observed values and an expected values.

I calculate the relative error for each point as:

(observed - expect) / expected

This error however bounces up and down because the behaviour is sinusoidal. I want to make this error always a positive quantity. Is there an error measure like this? if so, what's its name?

I have looked for error measures, but all I find is absolute and relative, and I am interested in a positive relative error.

Any help appreciated, Ted.

share|cite|improve this question
you can always use the absolute value. – picakhu Feb 2 '11 at 20:27
for example, if observed-expected < 0, then use expected-observed instead – picakhu Feb 2 '11 at 20:28
Does this have a name? – Ted Flethuseo Feb 2 '11 at 20:38
@Ted Flethuseo: Yes, absolute value, as mentioned by picakhu. It's written $|x|$, defined by $$|x|=\left\{\begin{array}{ll}x &\mbox{if $x\geq 0$}\\-x &\mbox{if $x\lt 0$.}\end{array}\right.$$ Most computers/spreadsheets can compute it, usually with the abs command. – Arturo Magidin Feb 2 '11 at 20:41
absolute value.. – picakhu Feb 2 '11 at 20:41

I think it is sensible to use the following error measure:

$$\frac{(O - E)^2}{E}$$

This is related to the test statistic for Pearson's $\chi^2$ test.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.