Diff for "FAQ/absdiff" - CBU statistics Wiki
location: Diff for "FAQ/absdiff"
Differences between revisions 2 and 9 (spanning 7 versions)
Revision 2 as of 2011-11-02 16:34:20
Size: 1365
Editor: PeterWatson
Comment:
Revision 9 as of 2013-03-08 10:17:37
Size: 1408
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 5: Line 5:
{{{
Line 8: Line 9:
}}}
Line 11: Line 13:
sgn(T-B) 100[abs(T-B)] / abs(B), T and B have different signs {{{
sgn(T-B) 100[abs(T-B)] / abs(B) if T and B have different signs or
Line 13: Line 16:
100[abs(T) - abs(B)]/abs(B) = 100(SF - 1), T and B have the same sign 100[abs(T) - abs(B)]/abs(B) = 100(SF - 1) if T and B have the same sign
}}}
Line 19: Line 23:
If we ignore the absolute values in the above formulae we can end up with misleading values due to failing to ignore the signs of B and T. For example we have scores of -3 for B and +2 for T then the total number of errors B+A = -1 where in fact there are 5 errors made in total. If we ignore the absolute values in the above formulae we can end up with misleading values due to failing to ignore the signs of B and T. For example if we have scores of -3 for B and +2 for T then the total number of errors equal to B+A equals -1 when in fact there are 5 errors made in total.

Difference in errors adjusted for overall number when the errors have different signs

Suppose we have error scores which can take positive or negative values, of equal importance, on two conditions, baseline (B) and treatment (T) then assuming at least one of B and T are non-zero the difference in the errors adjusted for total number can be expressed using absolute values, abs(), as

sgn(T-B)[abs(T-B)] / [(abs(B) + abs(T)] if T and B have different signs or

[abs(T) - abs(B)] / [(abs(B) + abs(T)] if T and B have the same sign

Alternatively, provided B is nonzero, we can express the difference in errors as a percentage change (PC) by

sgn(T-B) 100[abs(T-B)] / abs(B) if T and B have different signs or

100[abs(T) - abs(B)]/abs(B) = 100(SF - 1) if T and B have the same sign

where SF is the scaling factor relating to T and B.

For example if T and B both have the same sign and the number of errors doubles (SF=2) it follows abs(T) - abs(B) = 2 abs(B) so abs(T) = 2 abs(B) which gives a 100 (2abs(B)- abs(B))/abs(B) = 100% increase in errors from baseline.

If we ignore the absolute values in the above formulae we can end up with misleading values due to failing to ignore the signs of B and T. For example if we have scores of -3 for B and +2 for T then the total number of errors equal to B+A equals -1 when in fact there are 5 errors made in total.

None: FAQ/absdiff (last edited 2013-03-08 10:17:37 by localhost)