Compare the differences between numbers

Alex100

New member
Joined
Mar 6, 2021
Messages
2
My math skills are limited, so I would like to ask for your help.

I will first list here two formula examples, followed by a full explanation.

FIRST EXAMPLE
-----------------
row 1: 3, 7, 10, 15, 20
row 2: 4, 3, 5, 5
row 3: (17 / 55) * 100 = 30.9%

SECOND EXAMPLE
---------------------
row 1: 3, 7, 10, 25, 125
row 2: 4, 3, 15, 100
row 3: (122 / 170) * 100 = 71.8%

In both of the examples above, the numbers on the first row may just be any numbers, while the ones on the second row represent the differences between these random numbers (the 2nd number minus the 1st number, the 3rd number minus the 2nd number, and so on). The result listed on the third row consists of the sum of the differences on the second row divided by the sum of the numbers on the first row, and multiplied by 100.

With this formula, I try to evaluate on a scale of 0 to 100, how large the differences between the random numbers are, relative to their sum. As you can see, in my first example the result comes at 30%, while in my second example this figure goes higher, at 71%. This indicates the differences in the first example are smaller in comparison to the ones in the second example.

I have an application where I need to do just that: quantify and compare the differences between some series of numbers, exactly like I showed you in the two examples above. The problem with this formula is that it doesn't work with negative numbers, or when the differences between them are negative or alternating. In such cases, the end percent result would sometimes be higher than 100. Here's one such example:

7, -66, 22, -13, 70
-73, 88, -35, 83
(63 / 20) * 100 = 315%


So, like I said, I am looking for a way to quantify and compare the differences between some series of numbers. If the sum of the differences is positive, the result should rank between 0 and 100. Vice versa, if this sum is negative, the result should go between -100 and 0. So, the full range must be between -100 and 100.

My formula is obviously flawed, but I have listed it so you can better understand what I am looking for.

What am I missing, and how can I achieve something like this, please?

Thank you!

Alexander
 
I apologise but I can't really see the purpose of this. I will just make this one observation: as it stands, the second row of differences is really irrelevant; it could be left out. The only difference which matters here is the difference between the last number and the first number of the 1st row.
The top line of the fraction comes simply from the first row of numbers: the last number - the first number

E.g.

FIRST EXAMPLE
-----------------
row 1: 3, 7, 10, 15, 20
row 3: (17 / 55) * 100 = 30.9%
top line: 17 is 20-3, bottom line: 55 is 3+7+10+15+20

You'll see that this is the case for all your examples.
 
FIRST EXAMPLE
-----------------

row 3: (17 / 55) * 100 = 30.9%

SECOND EXAMPLE
---------------------

row 3: (122 / 170) * 100 = 71.8%
.
.
.
(63 / 20) * 100 = 315%
Regardless of where these numbers came from, you are multiplying by a form of 1,
so there must be a percent symbol following the 100:

(17/55)*100% = 30.9% (approximately)

(122/170)*100% = 71.8% (approximately)

(63/20)*100% = 315%
 
lex, lookagain: Thank you both for your answers! You are both right.

In the meantime I found out that adding up the absolute values of the numbers on the first row will always keep the result in the -100% to 100% range, and that's exactly what I was looking for. I believe this was the key issue I was missing. So, my third example (the one I was having trouble with) now looks like this:

7, -66, 22, -13, 70
(63 / 178) * 100% = 35.4%

Alex
 
Top