English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Thanks for taking a look at my question. This has been puzzling me for days. I need a formula to plug three numbers in to. Let's say X, Y, and Z, where X > Y, but either X or Y may be positive or negative. The third variable, Z, falls somewhere between X and Y.

I need a formula to figure where, in percentage-point terms, Z falls between X and Y. For example, if X = -100, Y = +100, and Z = 0, then the result would be 50. Keep in mind that this needs to work when X and/or Y are positive and/or negative.

I look forward to what you folks think about this problem. Thanks a lot!

Dougal
Madison, WI

2007-06-20 14:13:16 · 5 answers · asked by Anonymous in Science & Mathematics Mathematics

5 answers

You asked the question with X > Y but gave an example with X < Y.

The formula is either 100 * (Z - X) / (Y - X), or 100 * (Z - Y) / (X - Y), both of which give the same answer. The first one avoids negative intermediate values with your example, and the second one avoids negative numbers when X > Y.

2007-06-20 23:47:53 · answer #1 · answered by Anonymous · 0 0

First of all, based on your example, X < Y, not greater than. So I'm guessing this was just a typo.

I believe this is how it would go. First of all, we know that Y is greater than X and also that Z falls between these two numbers. So, your numbers would be something like this...

X .............. Z ............................. Y

And you want to know the percentage of the total distance from X to Y that Z is away from X.

The formula for this percentage is as follows:

Percentage = (Z - X) / (Y - X) * 100

See how this works with your example, where X = -100, Y = +100, and Z = 0:

Percentage = (Z - X) / (Y - X) * 100
Percentage = (0 - (-100)) / (100 - (-100)) * 100
Percentage = (0 + 100) / (100 + 100) * 100
Percentage = (100) / (200) * 100
Percentage = (1/2) * 100
Percentage = 50

2007-06-20 21:17:32 · answer #2 · answered by C-Wryte 3 · 0 0

I hope you're familiar with the concept of absolute value:
|A| is just A without the sign. Absolute value is always positive.

The required ratio would be :
|X - Z|/|X - Y|
To express that in percent multiply by 100 and add a percent sign.

2007-06-20 21:26:01 · answer #3 · answered by jsardi56 7 · 0 1

100(z-y)/(x-y)
try it
and by the way -100 is not bigger than 100

2007-06-20 21:25:11 · answer #4 · answered by Alberd 4 · 0 0

assuming they are in order y < z < x then it is:

(z-y)/(x-y)

2007-06-20 21:19:05 · answer #5 · answered by Anonymous · 0 1

fedest.com, questions and answers