1
$\begingroup$

Imagine a number line that contains every value that is greater then (but not inclusive of) 0. The center of the line is 1. On the right side of the center(1), obviously, are all the whole and non-whole numbers greater then 1. On the left side is everything between 0 and 1.

The numbers are spaced so that every multiple of 1 is equally distant from 1 as it's corresponding fraction. e.g. 3 is exactly the same distance to the right of 1 as 1/3 is to the left. 10 is exactly the same distance to the right of 1 as 1/10 is to the left, ect, ect.

Diagram

Now supposing I have a heap of values that are greater then 0, all of which must lie somewhere upon this line. How do I calculate their average position upon this line?

I don't think think it can be solved by the traditional averaging equation, i.e. adding everything together then dividing by the amount of values. I think this problem needs a different equation, but I haven't been able to figure out what it is.

Here are 2 diagrams I hope will make the problem clearer:

Calculating the average of 2 numbers, 1/3 and 2


Calculating the average of 2 numbers, 1/4 and 8 (Forgive the poor resolution of this last image. The 2nd & 3rd lines are supposed to show a wavy-lines equals at the end, not proper equals.)

Making diagrams to depict the averaging of only 2 values is easy, making a diagram to depict the accuarate averaging of larger groups of numbers is more difficult, so I haven't made any. But that doesn't mean my needs are limited to the calculation of the averages of groups that only have 2 numbers in them.

These are the conditions that I'm convinced the solution must have:
1. A group that contains only one number, (i.e. A group of 3 12s) must average out at that number (12, in my example).
2. The average must be somewhere between the highest and lowest numbers in the group, inclusive.
3. In a group that only contains 2 numbers, the average will be exactly halfway between them on this number line.
4. The average of x and 1/x must always be 1.
5. If you calculate the correct average for a group of numbers, then create a new group composed of the numbers that are 1 divided by the original numbers, the average of this new group will be 1 divided by the average of the first group. In other words, if all the values of a group are rotated 180 degrees around the central 1 value, the average point of this group will also be rotated around 1 by 180 degrees, making it 1 divided by it's original value.

$\endgroup$
1
$\begingroup$

From your description, it sounds as if you were looking at the image of $\mathbb{R}_{\geq 0}$ (there's no need to exclude $0$ here!) under the function $$ p \,:\, \mathbb{R}_{\geq 0} \to [0,2) \,:\, x \mapsto \begin{cases} x &\text{if $x \geq 1$} \\ 2-\frac{1}{x} &\text{if $x < 1$.} \end{cases} $$ You then have $p(n) - p(1) = n - 1 = 1 - (2 - n)= p(1) - p\left(\frac{1}{n}\right)$, which seems to match your requirement. $p$ is also bijective, it's inverse is $$ p^{-1} \,:\, [0,2) \to \mathbb{R}_{\geq 0} \,:\, x \mapsto \begin{cases} x &\text{if $x \geq 1$} \\ \frac{1}{2-y} &\text{if $x < 1$.} \end{cases} $$

It seems that your idea of an average means mapping all values to their positions, then computing the average of these positions, and finally translating back. Thus, for a finite sequence of values $c_1,\ldots,c_n$, $c_i \geq 0$ you modified average is $$ \textrm{Avg } \left((c_i)_{1\leq i \leq n}\right)= p^{-1}\left(\frac{1}{n} \sum_{k=1}^n p(c_k)\right) \text{.} $$

If all $c_i$ are greater or equal than one, this will produce the normal average, since $p(x) = x$ for $x \geq 1$. The average of $x$ and $\frac{1}{x}$ is $$ p^{-1}\left(\frac{1}{2}p(x) + \frac{1}{2}p\left(\frac{1}{x}\right)\right) = p^{-1}\left(\frac{1}{2}x + \frac{1}{2}\left(2 - x\right)\right) = p^{-1}(1) = 1 \text{.} $$

$\endgroup$
12
  • $\begingroup$ Okay, so my understanding is that to solve this problem, what I have to do is calculate the value "2 - (1/x)" for each number in my sequence (with "x" being the number) and tally up the results of all these calculations. Then, when I'm finished, I divide the final tally by the amount of numbers in the sequence and this should give me the average position that I'm looking for? $\endgroup$
    – Cambot
    Apr 14 '14 at 16:41
  • $\begingroup$ @Cambot Yes. You first compute the position of each number in the sequence, and then compute the usual average of those positions. $\endgroup$
    – fgp
    Apr 14 '14 at 16:42
  • $\begingroup$ Sorry, I think I've made a mistake somewhere. Say my "sequence" consists of a single number, 10. Of course the average value of any single number sequence should be the number itself, but when I run it through your equation I get [2-(1/10)] / 1 = 1.9 $\endgroup$
    – Cambot
    Apr 14 '14 at 18:43
  • $\begingroup$ @Cambot Why would it be? You asked for the average position the numbers, not for the average of then numbers! You can, of course, map the average back to the normal real line, i.e. compute $p^{-1}(\textrm{Avg }(x_1,\ldots,x_n))$. $\endgroup$
    – fgp
    Apr 14 '14 at 18:49
  • $\begingroup$ @Cambot BTW, re-reading your question, I realized it's ambiguous. You asked for $p(n)-1 = 1-p(\frac{1}{n}$. I gave you a solution where the positive real line is compressed to $[0,2)$. But maybe you instead wanted to map the whole positive real line to the whole real line, i.e. have $\frac{1}{n} \mapsto 1-n$ (for $n \geq 1$), $n \mapsto n-1$ (for $x \geq 1)$. You'd then have $0 \mapsto -\infty$, $1 \mapsto 1$. $\endgroup$
    – fgp
    Apr 14 '14 at 18:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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