I am creating a model that compares multiple data points of two attributes and compares them vs one another as a percentage of 100.
So for instance, comparing the values A=1.24 v B=0.44 would be:
100/(A+B)*A = 73.81% 100/(A+B)*B = 26.19%
However, one of the data points sometimes has negative numbers and I am looking for a formula to compare them in the same way; is this possible? I can compare +/+ and -/- using the above method, but it doesn't work using +/-.
Would I have to use the difference between the two numbers as a regulator? If so, I am not sure how.
So an example of the formula I would like to work out would be:
A=1.04 v B=-0.32 as a percentage of 100.
Thanks for any help - I have no formal mathematics tuition so please forgive any naivety!
This depends entirely on how you're comparing the two numbers.
If you want, you can compare them using $$\frac{|A|}{|A|+|B|}\times100\%$$ where the vertical bars indicates absolute value.
I just want to point out that 'comparing' numbers in this way is really, really sketchy and I can't imagine many circumstances under which it would be useful. A more natural thing to do would be e.g $$X=\frac{\left||A|-|B|\right|}{|A|}\times100\%$$
whence you can say that $B$ is $X%$ more/less than $A$.