The Central Idea
Suppose we know that a quantity has value
\[ 10 \]when
\[ x=2 \]and value
\[ 34 \]when
\[ x=8. \]If we assume the relationship is affine between these observations, the slope is
\[ m= \frac{34-10}{8-2} = \frac{24}{6} = 4. \]So the line through the points is
\[ y-10=4(x-2). \]At
\[ x=5, \]we estimate
\[ y-10=4(3)=12, \]so
\[ \boxed{y=22}. \]Because \(5\) lies between \(2\) and \(8\), this is interpolation.
If we used the same model to estimate \(y\) at \(x=12\), that would be extrapolation.
Interpolation
Interpolation estimates an unknown value within the range of known data.
If observations are available at
\[ x=a \]and
\[ x=b, \]then estimating a value for
\[ aIt fills in information between known points.
Extrapolation
Extrapolation estimates a value outside the observed range.
If data are available only for
\[ a\le x\le b, \]then predicting at
\[ xor \[ x>b \]is extrapolation.
It extends the observed pattern beyond where it has been directly checked.
Why Interpolation Is Usually Safer
Interpolation stays between observed data points.
If the relationship changes gradually, nearby observations provide some evidence for the behavior between them.
Extrapolation is more risky because the model may change outside the observed range.
A straight-line pattern that works locally may fail when extended too far.
Linear Interpolation
Suppose we know two points
\[ (x_1,y_1) \]and
\[ (x_2,y_2), \]with
\[ x_1\ne x_2. \]The slope between them is
\[ m= \frac{y_2-y_1}{x_2-x_1}. \]A linear interpolation model is
\[ \boxed{ y-y_1 = \frac{y_2-y_1}{x_2-x_1} (x-x_1) }. \]Interpolation as Proportional Change
Linear interpolation can also be understood by comparing fractions of the total change.
If \(x\) lies between \(x_1\) and \(x_2\), then
\[ \frac{x-x_1}{x_2-x_1} \]tells us how far \(x\) lies from \(x_1\) toward \(x_2\).
Apply the same fraction to the output change:
\[ \boxed{ y = y_1+ \frac{x-x_1}{x_2-x_1}(y_2-y_1) }. \]Example: Halfway Interpolation
Suppose
\[ (2,10) \]and
\[ (8,34) \]are known.
The input \(5\) lies halfway between \(2\) and \(8\):
\[ \frac{5-2}{8-2} = \frac36 = \frac12. \]So the output lies halfway between \(10\) and \(34\):
\[ 10+\frac12(34-10) = 10+12 = \boxed{22}. \]Interpolation Does Not Require the Midpoint
Suppose the same points are known, but we want the value at
\[ x=3.5. \]The fraction across the interval is
\[ \frac{3.5-2}{8-2} = \frac{1.5}{6} = \frac14. \]So move one-fourth of the way through the output change:
\[ 10+\frac14(24) = 10+6 = \boxed{16}. \]Weighted-Average Form
Linear interpolation may also be written as a weighted average:
\[ \boxed{ y= \frac{x_2-x}{x_2-x_1}y_1 + \frac{x-x_1}{x_2-x_1}y_2 }. \]The weights add to \(1\).
As \(x\) moves from \(x_1\) to \(x_2\), the weight on \(y_1\) decreases while the weight on \(y_2\) increases.
Why the Weighted-Average Formula Works
At
\[ x=x_1, \]the formula becomes
\[ y=1\cdot y_1+0\cdot y_2=y_1. \]At
\[ x=x_2, \]it becomes
\[ y=0\cdot y_1+1\cdot y_2=y_2. \]Between the endpoints, the result blends the two values linearly.
Example: Temperature Between Measurements
A sensor records
\[ 20^\circ\text{C} \]at \(2{:}00\) PM and
\[ 26^\circ\text{C} \]at \(5{:}00\) PM.
If we assume temperature changed linearly between the readings, the rate is
\[ \frac{26-20}{5-2} = 2^\circ\text{C per hour}. \]At \(3{:}30\) PM, \(1.5\) hours after \(2{:}00\),
\[ T=20+2(1.5). \]So
\[ \boxed{T=23^\circ\text{C}}. \]The Assumption Matters
The calculation above is exact for the chosen affine model.
But the real temperature may not have changed at a perfectly constant rate.
Interpolation gives a model-based estimate, not necessarily an observed fact.
Interpolation from a Table
Suppose a table contains:
| \(x\) | \(y\) |
|---|---|
| 10 | 45 |
| 20 | 65 |
To estimate \(y\) at \(x=14\), first compute the slope:
\[ m= \frac{65-45}{20-10} = 2. \]Then
\[ y-45=2(14-10). \]So
\[ \boxed{y=53}. \]Interpolation Across Unequal Input Spacing
Suppose data are
\[ (3,12) \]and
\[ (11,28). \]The slope is
\[ m= \frac{28-12}{11-3} = \frac{16}{8} = 2. \]At \(x=7\):
\[ y-12=2(7-3), \] \[ y=20. \]The method works regardless of whether the input spacing is convenient.
Extrapolation from a Linear Model
Suppose the observed points are
\[ (2,10) \]and
\[ (8,34). \]The linear model is
\[ y=4x+2. \]At
\[ x=12, \]the extrapolated value is
\[ y=4(12)+2. \]So
\[ \boxed{y=50}. \]Why Extrapolation Requires Caution
The calculation
\[ y=50 \]is correct for the line
\[ y=4x+2. \]But whether \(50\) is a good real-world prediction depends on whether the same relationship continues beyond the observed data.
The farther we extrapolate, the more opportunity there is for the real process to diverge from the model.
Local Linearity Does Not Guarantee Global Linearity
A nonlinear curve may look almost straight over a short interval.
For example,
\[ f(x)=x^2 \]between \(x=10\) and \(x=11\) may be approximated by a line over that narrow interval.
But extending that local line far beyond the interval would not reproduce the quadratic behavior.
Example of Dangerous Extrapolation
Suppose a young plant grows about \(3\) centimeters per week during its first month.
A linear model might be useful for a short time.
But extrapolating the same rate for decades would predict an impossible height.
The problem is not the algebra. The problem is extending the model beyond where its assumptions remain credible.
Observed Range
The observed range is the region of input values actually represented by the data.
If measurements were collected for
\[ 5\le x\le20, \]then:
- estimates inside that interval are interpolation;
- estimates outside that interval are extrapolation.
Trends
A trend is a general direction or pattern in data.
Data may show:
- an increasing trend;
- a decreasing trend;
- little or no overall trend;
- an approximately linear trend;
- a clearly nonlinear trend.
A trend describes broad behavior rather than requiring every point to lie exactly on one line.
Exact Line Versus Trend Line
An exact affine relationship satisfies
\[ y=mx+b \]for every point in the model.
A trend line is usually approximate:
\[ \boxed{ y\approx mx+b }. \]Observed data may lie above or below the line.
Example of an Approximate Linear Trend
Suppose observations are
\[ (0,4.1), \qquad (1,6.2), \qquad (2,7.9), \qquad (3,10.1). \]These points do not lie exactly on one line.
But they are close to
\[ \boxed{ y\approx2x+4 }. \]This line summarizes the overall trend.
A Trend Line Is a Model
A trend line compresses many data points into a simpler relationship.
Its purpose may be to:
- summarize direction;
- estimate average change;
- compare data sets;
- interpolate missing values;
- make cautious predictions.
Slope of a Trend Line
For
\[ y\approx mx+b, \]the slope \(m\) represents the estimated average change in output per unit increase in input.
It is not necessarily the exact rate between every pair of observations.
Intercept of a Trend Line
The intercept \(b\) represents the model's estimated output at
\[ x=0. \]If \(x=0\) lies far outside the observed range, that intercept may have little practical meaning.
It remains algebraically part of the line, but interpretation requires context.
Residuals
A residual measures the difference between an observed value and the value predicted by a model.
If the observed output is \(y\) and the model predicts \(\hat y\), then
\[ \boxed{ \text{residual}=y-\hat y }. \]Positive and Negative Residuals
If
\[ y>\hat y, \]the residual is positive and the observed point lies above the model line.
If
\[ y<\hat y, \]the residual is negative and the point lies below the line.
Example: Residual
Suppose the trend model is
\[ \hat y=2x+4. \]At
\[ x=3, \]the model predicts
\[ \hat y=10. \]If the observed value is
\[ 10.6, \]then the residual is
\[ 10.6-10 = \boxed{0.6}. \]Residuals Help Evaluate a Model
A useful trend line should generally leave relatively small residuals compared with the scale of the data.
If residuals are large or show a systematic curved pattern, the affine model may be inappropriate.
Random-Looking Residuals
If residuals are scattered above and below zero without a clear pattern, a linear model may be reasonable.
The model is not exact, but the deviations may behave like ordinary measurement variation or noise.
Patterned Residuals Suggest Missing Structure
If residuals are mostly positive at both ends and negative in the middle, the data may curve away from the line.
A nonlinear model may describe the pattern better.
This idea becomes more important later in regression and model diagnostics.
Choosing a Trend Line by Eye
For an informal visual trend line:
- follow the overall direction of the data;
- place roughly balanced numbers of points above and below the line;
- avoid letting one unusual point dominate the line;
- use points on the chosen trend line—not necessarily observed points—to estimate its slope.
This is an approximation method, not a formal regression procedure.
Best-Fit Lines Preview
A formal best-fit line can be computed from data rather than drawn by eye.
One common method chooses the line that minimizes the sum of squared residuals.
This is called least-squares linear regression.
The full method belongs later in statistics and modeling, but the resulting equation still has affine form:
\[ \hat y=mx+b. \]Interpolation from a Trend Line
Suppose a fitted trend model is
\[ \hat y=1.8x+12. \]If the observed \(x\)-values range from \(0\) to \(10\), estimating at
\[ x=6 \]is interpolation.
The model predicts
\[ \hat y=1.8(6)+12 = 22.8. \]So
\[ \boxed{\hat y=22.8}. \]Extrapolation from a Trend Line
Using the same model and observed range
\[ 0\le x\le10, \]predicting at
\[ x=15 \]is extrapolation.
The model gives
\[ \hat y=1.8(15)+12 = 39. \]The numerical prediction is easy; judging whether it is reliable is the harder question.
How Far Is Too Far?
There is no universal distance beyond which extrapolation becomes invalid.
Reliability depends on:
- the physical process;
- how stable the rate is;
- the width of the observed range;
- how far beyond that range the prediction goes;
- whether other constraints eventually become important.
Domain Knowledge Matters
Two data sets may look equally linear, but extrapolation may be much safer in one context than another.
For example:
- a rigid machine moving at constant speed may support short-term linear extrapolation well;
- population growth may change as resources become limited;
- prices may respond to market shocks;
- temperatures may change with weather conditions.
Mathematical form does not replace knowledge of the system being modeled.
Physical Bounds
Some quantities have natural bounds.
For example:
- a probability must remain between \(0\) and \(1\);
- a percentage may be limited to \(0\%\) through \(100\%\);
- a physical inventory cannot fall below zero;
- a finite capacity cannot be exceeded indefinitely.
If linear extrapolation violates a known bound, the model has been extended too far.
Example: Inventory Extrapolation
Suppose inventory is modeled by
\[ I(t)=500-40t. \]The model reaches zero when
\[ 500-40t=0, \]so
\[ t=12.5. \]Extrapolating to
\[ t=20 \]would give
\[ I(20)=-300. \]The arithmetic is correct, but negative physical inventory may be meaningless.
Interpolation and Units
Units should remain visible when interpreting estimates.
If slope is
\[ 5\frac{\text{dollars}}{\text{hour}}, \]and the input change is
\[ 3\text{ hours}, \]then the output change is
\[ 15\text{ dollars}. \]Dimensional reasoning helps catch setup errors.
Example: Cost Interpolation
A service costs \$80 at \(2\) hours and \$140 at \(5\) hours.
Assume a linear relationship.
The rate is
\[ m= \frac{140-80}{5-2} = 20\frac{\text{dollars}}{\text{hour}}. \]At \(4\) hours:
\[ C-80=20(4-2). \]So
\[ \boxed{C=120\text{ dollars}}. \]Interpolation in Percentage Terms
Suppose a quantity is \(40\) at \(x=2\) and \(70\) at \(x=8\).
At \(x=5\), we are halfway across the input interval.
So the linear interpolation is halfway across the output interval:
\[ 40+\frac12(30)=55. \]Thus,
\[ \boxed{55}. \]Do Not Confuse Linear Interpolation with Percentage Growth
Linear interpolation assumes equal additive change per unit input.
Percentage growth assumes multiplicative change.
For example, a quantity increasing by \(10\%\) each period follows an exponential pattern rather than an affine one.
Trend Versus Proportion
A line
\[ y\approx mx+b \]may describe an approximate trend even when
\[ b\ne0. \]That is not direct proportion.
Direct proportion requires
\[ y=kx \]and passes through the origin.
Trend Versus Causation
A linear trend shows association between variables in the data.
It does not automatically prove that changes in one variable cause changes in the other.
Causal conclusions require additional evidence, study design, and subject knowledge.
Outliers
An outlier is an observation unusually far from the main pattern.
An outlier may:
- reflect measurement error;
- represent a rare but valid event;
- indicate a change in the process;
- strongly affect a fitted trend line.
Outliers should be investigated rather than automatically discarded.
Example: Outlier Awareness
Suppose most points lie close to
\[ y=3x+2, \]but one point lies far above the pattern.
A visually chosen trend line that bends toward the unusual point may poorly represent the majority of the data.
A good analysis asks why the point is unusual before deciding how to model it.
Interpolation with Multiple Data Intervals
Suppose data are recorded at several inputs:
\[ (0,2),\quad (5,12),\quad (10,17). \]If estimating at \(x=3\), use the interval between
\[ 0 \]and
\[ 5. \]If estimating at \(x=8\), use the interval between
\[ 5 \]and
\[ 10. \]This creates a piecewise-linear interpolation rather than one global line.
Piecewise-Linear Interpolation Preview
When several data points are connected by straight segments, each interval gets its own slope.
The overall graph may therefore be continuous but not have one constant rate everywhere.
This idea leads naturally into piecewise-linear functions.
Example: Piecewise Interpolation
Suppose
\[ (0,2),\quad (5,12),\quad (10,17) \]are known.
Between \(0\) and \(5\), the slope is
\[ \frac{12-2}{5-0}=2. \]Between \(5\) and \(10\), the slope is
\[ \frac{17-12}{10-5}=1. \]So one global affine model would miss the rate change.
Interpolation as a Local Model
Even when the overall process is not affine, a straight segment between nearby data points can be useful as a local approximation.
This is one reason interpolation appears in numerical methods, computer graphics, engineering tables, and scientific computing.
Extrapolation and Error Growth
Suppose the true slope differs from the model slope by
\[ \varepsilon. \]After an additional input distance
\[ \Delta x, \]the prediction error caused by the slope mismatch can grow approximately like
\[ \varepsilon\Delta x. \]This helps explain why small modeling errors can become large when extrapolated far from observed data.
Choosing Between Exact and Approximate Language
If the relationship is known to be exactly affine, write
\[ y=mx+b. \]If the line summarizes noisy data, write
\[ y\approx mx+b \]or explicitly call it a trend model.
Precise language communicates the strength of the claim.
A Reliable Interpolation Workflow
- Identify the two surrounding data points.
- Confirm the target input lies between them.
- Compute the local slope.
- Use point-slope or proportional-change form.
- Attach units.
- State the linearity assumption when the relationship is not known to be exact.
A Reliable Extrapolation Workflow
- Identify the observed input range.
- Construct or identify the linear model.
- Evaluate the model at the outside input.
- Measure how far the prediction extends beyond the observed range.
- Check physical and contextual bounds.
- Describe the result as a prediction rather than an observed fact.
A Reliable Trend-Analysis Workflow
- Plot or inspect the data.
- Determine whether an approximately linear trend is plausible.
- Estimate or compute a trend line.
- Interpret its slope and intercept.
- Inspect residuals or deviations.
- Identify outliers or curvature.
- Use interpolation more confidently than distant extrapolation.
A Reliable Model-Checking Workflow
- Compare predictions with observed values.
- Compute or inspect residuals.
- Look for systematic patterns.
- Check whether the model violates known bounds.
- Ask whether the process is expected to maintain a constant rate.
- Revise the model if the assumptions fail.
Common Errors
Calling Extrapolation Interpolation
Interpolation stays inside the observed range. Extrapolation goes outside it.
Assuming Two Points Prove a Global Linear Law
Two points determine a line, but the real process may still be nonlinear.
Treating a Trend Line as Exact
A trend model summarizes data and may have residuals.
Ignoring the Observed Range
Always identify whether the prediction is inside or outside the data range.
Extending a Model Past Physical Limits
A mathematically valid line may produce impossible real-world values when extrapolated too far.
Interpreting the Intercept Without Context
If \(x=0\) lies outside the observed range, the intercept may be an extrapolated model feature rather than a meaningful starting value.
Ignoring Outliers
Unusual points can reveal errors, exceptional events, or model failure.
Confusing Linear Change with Percentage Change
Constant additive change is affine; constant percentage change is generally exponential.
Practice
1. Interpolate Between Two Points
Assume a linear relationship through
\[ (2,8) \]and
\[ (6,20). \]Estimate \(y\) at \(x=4\).
Check Answer
\[ m= \frac{20-8}{6-2} = \frac{12}{4} = 3. \] \[ y-8=3(4-2). \] \[ y=14. \]So
\[ \boxed{y=14}. \]2. Quarter-Way Interpolation
A quantity is \(40\) at \(x=10\) and \(80\) at \(x=30\). Estimate the value at \(x=15\) using linear interpolation.
Check Answer
The target is
\[ \frac{15-10}{30-10} = \frac5{20} = \frac14 \]of the way across the input interval.
So
\[ 40+\frac14(80-40) = 40+10 = \boxed{50}. \]3. Identify Interpolation or Extrapolation
Data are observed for
\[ 5\le x\le12. \]Classify a prediction at \(x=9\).
Check Answer
Since
\[ 5\le9\le12, \]the prediction is
\[ \boxed{\text{interpolation}}. \]4. Identify Extrapolation
Data are observed for
\[ 5\le x\le12. \]Classify a prediction at \(x=18\).
Check Answer
Since \(18\) lies outside the observed range, the prediction is
\[ \boxed{\text{extrapolation}}. \]5. Extrapolate from Two Points
Assume the line through
\[ (1,5) \]and
\[ (4,14) \]continues. Predict \(y\) at \(x=7\).
Check Answer
\[ m= \frac{14-5}{4-1} = 3. \]The line is
\[ y-5=3(x-1). \]At \(x=7\):
\[ y-5=18, \] \[ \boxed{y=23}. \]6. Residual
A model predicts
\[ \hat y=2x+3. \]At \(x=4\), the observed value is \(12\). Find the residual.
Check Answer
\[ \hat y=2(4)+3=11. \] \[ \text{residual}=12-11. \] \[ \boxed{1}. \]7. Trend Interpretation
A trend model is
\[ y\approx5x+20. \]Interpret the slope.
Check Answer
The model estimates that \(y\) increases by about
\[ \boxed{5} \]units for each increase of \(1\) unit in \(x\).
8. Intercept Caution
A fitted trend line is
\[ y\approx4x+100, \]but data were collected only for
\[ 50\le x\le80. \]Should \(100\) automatically be interpreted as an observed starting value?
Check Answer
No.
The intercept corresponds to \(x=0\), far outside the observed range. It is an algebraic feature of the fitted line and may not have a reliable practical interpretation.
9. Piecewise Interpolation
Data are
\[ (0,0),\quad(4,8),\quad(10,14). \]Estimate \(y\) at \(x=7\) using the surrounding points.
Check Answer
Use
\[ (4,8) \]and
\[ (10,14). \]The slope is
\[ m= \frac{14-8}{10-4} = 1. \]So
\[ y-8=1(7-4), \] \[ \boxed{y=11}. \]10. Physical-Limit Check
A model is
\[ V(t)=200-20t \]for liquid volume in liters. What warning should accompany a prediction at \(t=15\)?
Check Answer
\[ V(15)=200-300=-100. \]The arithmetic is correct for the line, but negative physical volume is not meaningful. The model should not be extrapolated past the time when volume reaches zero.
11. Linear or Percentage Growth?
A quantity increases by \(8\%\) each year. Is a linear trend necessarily the natural exact model?
Check Answer
No.
A constant percentage increase is multiplicative and is naturally modeled exponentially rather than by exact affine change.
12. Model Reliability
Why is predicting one year beyond a ten-year data set generally less risky than predicting fifty years beyond it, all else equal?
Check Answer
A nearby extrapolation extends the model only slightly beyond where it has been tested. A distant extrapolation gives more opportunity for the true process to change and for small modeling errors to accumulate.
Key Ideas
- Interpolation estimates within the observed input range.
- Extrapolation estimates outside the observed input range.
- Linear interpolation assumes constant rate between two points.
- The interpolation fraction \(\frac{x-x_1}{x_2-x_1}\) measures how far the target lies between the inputs.
- Interpolation can be written in point-slope, proportional-change, or weighted-average form.
- Extrapolation is generally less reliable because it extends assumptions beyond observed data.
- A trend describes an overall direction and need not pass through every point.
- Trend lines are often written with \(\approx\) rather than \(=\).
- A residual is observed value minus predicted value.
- Residual patterns can reveal whether a linear model is appropriate.
- Outliers should be investigated rather than automatically ignored.
- Piecewise-linear interpolation can use different slopes on different intervals.
- Physical bounds, domain knowledge, and observed range limit sensible extrapolation.
- Constant additive change is linear or affine; constant percentage change is generally exponential.
- A mathematical prediction should be distinguished from an observed fact.
Where This Leads
Interpolation, extrapolation, and trend analysis show how affine relationships move from exact algebra into modeling and estimation. A line can summarize data, fill gaps, predict nearby values, and reveal average rates—but only when its assumptions are understood and checked.
From here, the course continues into piecewise-linear and absolute-value graphs and then linear modeling more broadly. These ideas also prepare for regression, numerical approximation, finite differences, tangent-line approximations, and more advanced methods for choosing models that match real data.