SIGforum.com    Main Page  Hop To Forum Categories  The Lounge    Looking for the name of a mathematical function
Page 1 2 
Go
New
Find
Notify
Tools
Reply
  
Looking for the name of a mathematical function Login/Join 
Baroque Bloke
Picture of Pipe Smoker
posted
Specifically (new - old) / |old|

I created that function and named it rchng (relative change). But I suspect that there’s a common name for it. Does anyone know?



Serious about crackers.
 
Posts: 11306 | Location: San Diego | Registered: July 26, 2014Reply With QuoteReport This Post
Oriental Redneck
Picture of 12131
posted Hide Post
What happened to (a - b) / |b|?

Anyway, Grok says “normalized difference” or “relative difference”.


Q






 
Posts: 30991 | Location: TEXAS | Registered: September 04, 2008Reply With QuoteReport This Post
Member
Picture of konata88
posted Hide Post
Depends on context? Looks like percentage gain or percentage change to me.

Relative change works for me.




"Wrong does not cease to be wrong because the majority share in it." L.Tolstoy
"A government is just a body of people, usually, notably, ungoverned." Shepherd Book
 
Posts: 14785 | Location: In the gilded cage | Registered: December 09, 2007Reply With QuoteReport This Post
Baroque Bloke
Picture of Pipe Smoker
posted Hide Post
quote:
Originally posted by 12131:
What happened to (a - b) / |b|?

Anyway, Grok says “normalized difference” or “relative difference”.

Thanks Q. My name guess, “relative change”, was pretty close.

And I decided to revise the argument names for clarity of purpose.



Serious about crackers.
 
Posts: 11306 | Location: San Diego | Registered: July 26, 2014Reply With QuoteReport This Post
Member
Picture of Keystoner
posted Hide Post
I've always called that 'percent difference' but the form of the equation in the OP will give a decimal answer. I don't see the need to include the absolute value in the denominator. The signs work themselves out and if you're trying to force non-negative answers, that won't work.



The danger of baobabs is so little recognized.
 
Posts: 2803 | Registered: November 05, 2012Reply With QuoteReport This Post
Step by step walk the thousand mile road
Picture of Sig2340
posted Hide Post
Why the absolute value in the denominator?





Nice is overrated

"It's every freedom-loving individual's duty to lie to the government."
Airsoftguy, June 29, 2018
 
Posts: 33884 | Location: Loudoun County, Virginia | Registered: May 17, 2006Reply With QuoteReport This Post
Baroque Bloke
Picture of Pipe Smoker
posted Hide Post
quote:
Originally posted by Keystoner:
I've always called that 'percent difference' but the form of the equation in the OP will give a decimal answer.
Me: it’s definitely not percent. I have another function, percentify, that I sometimes use in tandem with rchng. E.g.:
percentify(rchng(old, new), 2)
will multiply the rchng result by 100, round it to two decimal places, then append a ”%” character.

I don't see the need to include the absolute value in the denominator. The signs work themselves out
Me: because I want to know the direction of the change as well as its magnitude. I think I’m doing that correctly.

and if you're trying to force non-negative answers, that won't work.
Me: I’m not.



Serious about crackers.
 
Posts: 11306 | Location: San Diego | Registered: July 26, 2014Reply With QuoteReport This Post
His Royal Hiney
Picture of Rey HRH
posted Hide Post
quote:
Originally posted by Pipe Smoker:
Specifically (new - old) / |old|

I created that function and named it rchng (relative change). But I suspect that there’s a common name for it. Does anyone know?


It’s all in the context. It really is as you call it - relative change or relative delta.



"It did not really matter what we expected from life, but rather what life expected from us. We needed to stop asking about the meaning of life, and instead to think of ourselves as those who were being questioned by life – daily and hourly. Our answer must consist not in talk and meditation, but in right action and in right conduct. Life ultimately means taking the responsibility to find the right answer to its problems and to fulfill the tasks which it constantly sets for each individual." Viktor Frankl, Man's Search for Meaning, 1946.
 
Posts: 21704 | Location: The Free State of Arizona - Ditat Deus | Registered: March 24, 2011Reply With QuoteReport This Post
Member
Picture of 4MUL8R
posted Hide Post
All I know is that Excel needs this function in its library. I am so tired of creating it in spreadsheets.


-------
Trying to simplify my life...
 
Posts: 6114 | Location: Commonwealth of Virginia | Registered: January 15, 2007Reply With QuoteReport This Post
Baroque Bloke
Picture of Pipe Smoker
posted Hide Post
quote:
Originally posted by 12131:
<snip>
Anyway, Grok says “normalized difference” or “relative difference”.

Thanks (again) for the reply. And for the idea of using AI to find answers for such questions. I don’t have Grok, but when I posed this question:

“What is the name of this function:
(new - old) / |old|”

to ChatGPT (free version) just now, I got this result:

“This measure is the signed relative change (commonly called the relative change or fractional change); when multiplied by 100 it is the percent change. The absolute value in the denominator ensures the change is scaled by the magnitude of the original value regardless of its sign. …”

So my name choice was spot on, and my function implementation is correct.



Serious about crackers.
 
Posts: 11306 | Location: San Diego | Registered: July 26, 2014Reply With QuoteReport This Post
אַרְיֵה
Picture of V-Tail
posted Hide Post
quote:
Originally posted by 4MUL8R:

All I know is that Excel needs this function in its library. I am so tired of creating it in spreadsheets.
I never thought about this before. I don't use Excel, I use LibreOffice, but a general thought re this type of spreadsheet -- they should have the ability to host a library of user-defined functions, so that a function can be used just like a built-in one, and does not have to be re-defined when a new spreadsheet is created.



הרחפת שלי מלאה בצלופחים
 
Posts: 33411 | Location: Central Florida, Orlando area | Registered: January 03, 2010Reply With QuoteReport This Post
Member
posted Hide Post
Konata is correct if we are speaking in a engineering / statistical manner. Percent difference is correct.
 
Posts: 631 | Location: Helena, AL | Registered: July 15, 2008Reply With QuoteReport This Post
Member
posted Hide Post
In machining, we use this function to find the adjusted feed rate depending on use. The adjusted feed rate is due to Radial Depth of Cut due to chip thickness changes.

Example: cutting inside a bore with an end mill, it would be ((part size-tool size)/part size)× linear feed rate.

See link

If external feature, like a boss, then the tool is added instead.
 
Posts: 1773 | Location: Lehigh County,PA-USA | Registered: February 20, 2005Reply With QuoteReport This Post
Baroque Bloke
Picture of Pipe Smoker
posted Hide Post
quote:
Originally posted by bordeth:
Konata is correct if we are speaking in a engineering / statistical manner. Percent difference is correct.

Apparently you didn’t read the thread. In particular, my post four above this post. Percent difference is certainly not correct. The return value would have to be multiplied by 100 in order to produce percent difference.



Serious about crackers.
 
Posts: 11306 | Location: San Diego | Registered: July 26, 2014Reply With QuoteReport This Post
Member
Picture of dan03833
posted Hide Post
quote:
Originally posted by Pipe Smoker:
Specifically (new - old) / |old|

I created that function and named it rchng (relative change). But I suspect that there’s a common name for it. Does anyone know?


% change
 
Posts: 1605 | Location: Rhode Island | Registered: February 15, 2007Reply With QuoteReport This Post
Baroque Bloke
Picture of Pipe Smoker
posted Hide Post
quote:
Originally posted by dan03833:
quote:
Originally posted by Pipe Smoker:
Specifically (new - old) / |old|

I created that function and named it rchng (relative change). But I suspect that there’s a common name for it. Does anyone know?


% change

No, no, and no.



Serious about crackers.
 
Posts: 11306 | Location: San Diego | Registered: July 26, 2014Reply With QuoteReport This Post
Member
posted Hide Post
quote:
Originally posted by Pipe Smoker:
quote:
Originally posted by dan03833:
quote:
Originally posted by Pipe Smoker:
Specifically (new - old) / |old|

I created that function and named it rchng (relative change). But I suspect that there’s a common name for it. Does anyone know?




% change

No, no, and no.


I've also always called it %change even when I don't convert the decimal to a %, can you explain the difference?

The calculation is the same, the result is a fraction of the 'old'. You can express that fraction as a decimal, percentage or if you want to be really weird, an actual fraction.
Old > New
1 > 2 = 'relative Change of +1' or 'relative change of +100%'
1 > 1.5 = rC of +0.5 or +50%
1 > 0.5 = rC of -0.5 or -50%
 
Posts: 3427 | Location: IN | Registered: January 12, 2007Reply With QuoteReport This Post
Baroque Bloke
Picture of Pipe Smoker
posted Hide Post
^^^^^
The function that I presented in the OP is:
(new - old) / |old|

A percent change function would be:
100 * (new - old) / |old|

The ChatGPT description, 8 posts above, states the same:
“This measure is the signed relative change (commonly called the relative change or fractional change); when multiplied by 100 it is the percent change.“



Serious about crackers.
 
Posts: 11306 | Location: San Diego | Registered: July 26, 2014Reply With QuoteReport This Post
His Royal Hiney
Picture of Rey HRH
posted Hide Post
quote:
Originally posted by Pipe Smoker:
^^^^^
The function that I presented in the OP is:
(new - old) / |old|

A percent difference function would be:
100 * (new - old) / |old|

The ChatGPT description, 8 posts above, states the same:
“This measure is the signed relative change (commonly called the relative change or fractional change); when multiplied by 100 it is the percent change.“


I think you’re playing semantics now or you’re not understanding the math correctly. You’re free to call it whatever you want but you’re not multiplying anything with 100 to get a percent.

You’re multiplying the result with a conversion factor, specifically 100%/1. 100%/1 equals 1; you multiply or divide anything by 1 and you still get the same answer. That’s how you get the % symbol in the answer. Putting it in terms of percentages doesn’t change the mathematical result; it only appends the percent symbol so people can understand the context.

And I can prove this by you entering your formula into an excel spreadsheet to get a number and then using ctrl+i to change the cell format from number to percent. Excel is not adding anything to the formula; it’s converting how the number is displayed for humans. It isn’t multiplying or dividing anything by 100 to get the percent.



"It did not really matter what we expected from life, but rather what life expected from us. We needed to stop asking about the meaning of life, and instead to think of ourselves as those who were being questioned by life – daily and hourly. Our answer must consist not in talk and meditation, but in right action and in right conduct. Life ultimately means taking the responsibility to find the right answer to its problems and to fulfill the tasks which it constantly sets for each individual." Viktor Frankl, Man's Search for Meaning, 1946.
 
Posts: 21704 | Location: The Free State of Arizona - Ditat Deus | Registered: March 24, 2011Reply With QuoteReport This Post
Baroque Bloke
Picture of Pipe Smoker
posted Hide Post
quote:
Originally posted by Rey HRH:
<snip>
I think you’re playing semantics now.
<snip>

If so it’s the same semantics that ChatGPT is playing:
“This measure is the signed relative change (commonly called the relative change or fractional change); when multiplied by 100 it is the percent change.“

Relative change function:
(new - old) / |old|

Percent change function:
100 * (new - old) / |old|



Serious about crackers.
 
Posts: 11306 | Location: San Diego | Registered: July 26, 2014Reply With QuoteReport This Post
  Powered by Social Strata Page 1 2  
 

SIGforum.com    Main Page  Hop To Forum Categories  The Lounge    Looking for the name of a mathematical function

© SIGforum 2026