mathlinear-interpolation

Linear interpolation application/clarification


I am reading a manuscript, and the authors state that variables L2, L3, L4 were calculated using linear interpolations of the first and last measurement occasions (L1 and L5). L1-L5 can be thought of as measurements taken at time points 1-5.

Using the following formula:

enter image description here

They came up with these expressions, where L is lambda.

MODEL CONSTRAINT:
L1 = L1
L2 = (3L1+L5)/4;
L3 = (L1+L5)/2;
L4 = (L1+3L5)/4);
L5 = L5

I am struggling to see how they went from the formula above to the simplified expressions for L2-L4. Would appreciate if anyone could chime in.


Solution

  • I do not fully understand the context of the formula provided, but I do understand how those expressions are obtained. Here is my (lengthy) explanation (more of a derivation, actually):

    Definition of linear equation:

    (1) L(t) = m t + c
    

    Definition of L1 and L5:

    (2) L(t1) = L1
    (3) L(t5) = L5
    

    These definitions simply state that L1 and L5 are the values of the function at t=t1 and t=t5, respectively, and the reason we are defining these (as opposed to L2, L3, and/or L4) is because we wish to perform a linear interpolation about the points (t1, L1), (t5, L5). What this means is that we wish to draw a straight line through those two points (in other words, find m and c in equation (1) using these two points so that we can use (1) as a formula to find any L for any value of t), and then use that line to infer the relationship between t and L (i.e. find L2 in terms of L1 and L5 where L2 = L(t2)).

    Substituting (2) and (3) into (1):

    (4) L1 = m t1 + c
    (5) L5 = m t5 + c
    

    Subtracting (5) from (4):

    (6) L5 - L1 = m (t5 - t1)
    

    Rearranging for m:

    (7) m = (L5 - L1) / (t5 - t1)
    

    Substituting (7) into (1):

    (8) L(t) = t (L5 - L1) / (t5 - t1) + c
    

    Substituting (2) into (8):

    (9) L1 = t1 (L5 - L1) / (t5 - t1) + c
    

    Solving for c:

    (10) c = L1 - t1 (L5 - L1) / (t5 - t1)
    

    Substituting (10) into (8):

    (11) L(t) = t (L5 - L1) / (t5 - t1) + L1 - t1 (L5 - L1) / (t5 - t1)
    

    Rearranging (11):

    (12) L(t) = (t - t1) (L5 - L1) / (t5 - t1) + L1
    

    Notice that (12) is linear and substituting t = t1 yields L1 whilst substituting t = t5 yields L5. Defining L2, L3, L4:

    (13) L(t2) = L2
    (14) L(t3) = L3
    (15) L(t4) = L4
    

    Substituting (13) into (12) yields:

    (16) L2 = (t2 - t1) (L5 - L1) / (t5 - t1) + L1
    

    Now lets make the assumtion that time increments are constant i.e.

    (17) t2-t1 = t3-t2 = t4-t3 = t5-t4
    

    This would mean that:

    (18) t5 - t1 = (t5 - t4) + (t4 - t3) + (t3 - t2) + (t2 - t1)
                 = (t2 - t1) + (t2 - t1) + (t2 - t1) + (t2 - t1)
                 = 4 (t2 - t1)
    

    Hence we can rewrite (16) as:

    (19) L2 = (L5 - L1) / 4 + L1
            = (L5 + 3 L1) / 4
    

    The result shown in (19) can be interpreted as a weighted average of L5 and L1 depending on the distance t2 is from t5 and t1. Since t2 is closer to t5 than t1 (t5-t2 is 3 times larger than t2-t1), there is more weight placed on L5.

    Repeating steps (16) - (19) instead using equations (14) and (15) in place of (13) will yield the results for L3 and L4, respectively.