# Actual vs. Target

I’ve a data set contains two columns: actual value and target value. Is there a way where I can express the difference between these two columns as a single percentage value (that’s standardized, i.e., between 0-100%)? So I was wondering if I can calculate the standard deviation for the difference between values and then how can I standardize it to be a percentage between 0-100%?

Any help will be appreciated.

• It depends on what you mean by "difference as a percentage value" -- percentage of what, exactly? That is, what is it you want to measure? And, very much relatedly, what is it about the problem that makes it necessary that the error stay between 0 and 1 (100%)? Is the 'target' some kind of gold standard you want to measure the deviation from, or is it that you want to measure how far the target is relative to the actual? (And if you want either of those, how does that fit with the 0-1 restriction?) – Glen_b Jun 20 '13 at 21:18

Sounds like you want to calculate Mean Absolute Percent Error. In R, you could do this as follows (assuming t is your target and a is your actual):

mean(abs(a-t)/a) * 100 (Image from Wikipedia, A=Actual, F=forecast or target)

• But MAPE can be larger than 100%. – Scortchi - Reinstate Monica Jun 20 '13 at 18:48
• This can exceed 100%. E.g., let the (target, actual) data be $((100, 100), (101, 1))$. Then $M = \frac{1}{2}\left(|\frac{100-100}{100}| + |\frac{1-101}{1}|\right)$ = $50$ = $5000$%. You might have been thinking of mean absolute relative percent difference, which does the trick provided all actual and target values are positive. (I'm not recommending this, though: in such cases, measures based on logarithms are better.) – whuber Jun 20 '13 at 18:49
• @whuber: yes, both actual and target values are positive. What do you recommend here? Thanks! – user9292 Jun 20 '13 at 19:14
• I hesitate to recommend anything because I do not know why you want to do this and I am ignorant of the nature of your data (except now I know they are all positive). – whuber Jun 20 '13 at 19:16
• In that case you shouldn't insist the results lie between 0 and 100%. Your verbal description translates to subtracting the total daily target from the total parts made during the day and expressing that difference--which may be negative or positive and even greater than 100%--as a percentage of the total target. – whuber Jun 20 '13 at 20:23