Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

$\def\prop#1#2#3{#1:#2:#3}$Let's say I have a proportion, $\prop 135$

And then a set of other ones, $$ \begin{array}{l} \prop 235\\ \prop 145 \\ \prop 136 \end{array} $$

Which one is closer to $\prop 135$?

How to define it closer with mathematics?

(If you think it needs editing, edit away or comment)

share|cite|improve this question
You can define a distance in many ways, which one depends on what you are trying to do. The sum of the absolute differences is a simple one. – copper.hat Sep 19 '13 at 7:13
@copper.hat sum of absolute difference, I will think about that. But how? For example 1 : 3 : 5 and 3 : 4 : 5, one can say their absolute difference is 2 + 1 + 0 = 3 but if we take 1 : 3 : 5 and multiply it by 4/3, we get 4/3 : 4 : 20/3, and their difference will become 5/3 + 0 + 5/3 = 10 / 3, a bit larger than 3. So there will be cases where there are different difference for two proportions. – Shane Hsu Sep 19 '13 at 7:43
up vote 1 down vote accepted

This depends on which metric you define. Possible metrics would, for example, result in converting the $a:b:c$ to a vector $$\left( \begin{matrix}a\\b\\c\end{matrix} \right)$$ And using some standard $\mathbb R^3$ metrics, like $$d(x,y) := \Vert x-y \Vert_p$$ For $1\leq p\leq \infty$. The results vary with the choice of $p$. For $p=\infty$, for example we have with enumeration $y_1, y_2, y_3$ of your alternatives and $x$ the first: $$\begin{align*} d(x,y_1) & = 1 \\ d(x,y_2) & = 1 \\ d(x,y_3) & = 1 \end{align*}$$ so they are all "equally close".

However, any of these $p$ will yield a distance of $1$, since the changes are always to add one to one "component".

Another choice for converting $a:b:c$ to a vector containing "proportions", would be $$\vec{x} = \left(\begin{matrix}a/b\\b/c\\c/a\end{matrix}\right)$$

With the second option and $p=2$ we get, according to MATLAB with the code
x = [1 3 5];
Y = [x;x;x] + eye(3);
xx = x./x([2 3 1]);
YY = Y./Y(:,[2 3 1]);
Z = [norm(xx - YY(1,:)); norm(xx - YY(2,:)); norm(xx - YY(3,:))]

we have $$Z \approx \left(\begin{matrix}2.5221\\0.2167\\1.0050\end{matrix}\right)$$ So $y_2$ is "closest" in this interpretation.

share|cite|improve this answer
So the idea is to turn my proportion into vector for calculation. And use Uniform Norm? – Shane Hsu Sep 19 '13 at 15:27
Well, essentially you can use any $\mathbb R^3$ norm you are fond of. $p=\infty$ or $p=2$ should yield the most intuitive results. I recommend the euclidean norm ($p=2$) because it "punishes" all deviations and not only the highest. – AlexR Sep 19 '13 at 20:04
@ShaneHsu I've added MATLAB code for my recommended example and given the output. That seems an "intuitive" result to me... – AlexR Sep 19 '13 at 20:14
I see. Thanks a lot! – Shane Hsu Sep 22 '13 at 5:20

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.