2
$\begingroup$

...or midpoint of a midpoint if you will.

I have 2 values: 3.64 and 2.18. I would like to find the value that's 1/4 of the way to 3.64. (as you can tell I'm not very proficient in math)

So far what I've come up with is: $$\frac{\frac{3.64+2.18}{2}+2.18}{2}=2.545$$​​ or $$\frac{\frac{x+y}{2}+y}{2}=2.545$$​​

2.545 is the desired result. My question is if I'm going about this the right way? I feel I might be overcomplicating this, or that my logic is wrong.

  • 0
    Looks good to me! If you could explain to someone *why* this works, you're set. By the way, I *love* the two questions you've asked so far. Showing initiative and demonstrating your own thought. Welcome (again) to the site. Please stick around!2017-02-01

4 Answers 4

2

$$\frac{\frac{x+y}{2}+y}{2}=2.545$$​​

That's correct, and you can also write it as $\cfrac{x+3y}{4}\,$.

Another way to think at it is to take the second value (which is $y$), then add to it $1/4^{th}$ of the difference between the two (which is $x-y$): $\;y+ \cfrac{1}{4}(x-y)\,$ which of course gives the same result.

2

That's a clever way of coming up with a solution and it does work and is valid. But there is an easier way that is more expandable.

The difference is $3.65 - 2.18 = 1.47$

You want one $1/4$ of that: $1.47/4 = .3675$

And you want that much more than $2.18$ so $2.18 = 2.5475$

To generalize: $1/n$ of the way between $y, x; y < x$ is $y + \frac{x - y}n = \frac {y(n-1) + x}n$.

Which is basically the same result that you have. $\frac{\frac {x+y}2 + y}2 = \frac {x + y + 2y}4 = \frac {x + 3y}4$

1

Use a weighted mean: $$\frac{3}{4}\times2.15+\frac{1}{4}\times3.64 = 2.545. $$

The important thing is that the weights add up to one, i.e. $3/4+1/4 = 1.$

0

If you have two values $a$ and $b$, and you want to go a fraction $f$ between $a$ and $b$, where $0 \le f \le 1$, and $f=0$ means you want to be at $a$ and $f=1$ means you want to be at $b$, then choose a value of $fb+(1-f)a =f(b-a)+a $.

This expression does what you want: if $f=0$, it is $a$; if $f=1$, it is $b$; if $0 < f < 1$, it computes a value between $a$ and $b$.

In your case, when you say "1/4 of the way to $a$", I interpret this as being closer to $b$ than to $a$, so that $f$ should be 3/4. The value is thus $(3/4)b+(1/4)a$ or $(3/4)(b-a)+a$ or $(1/4)(a-b)+b$.

These are equivalent ways of writing the same expression.

Note that if $f < 0$ or $f > 1$ then a value outside of the range $[a, b]$ will be computed. This is often called "extrapolation".

If $0 \le f \le 1$, then a value inside the range $[a, b]$ will be computed. This is often called "interpolation".