# Calculating a Positive Relative error

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.

-
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

$$\frac{(O - E)^2}{E}$$
This is related to the test statistic for Pearson's $\chi^2$ test.