What you will understand
- Choose affine, proportional and exponential models.
- Calculate residuals and interpret fits with units.
- Distinguish association, causality, interpolation and extrapolation.
Before you start
You do not need to know everything by heart. The explanation revisits the necessary ideas and shows how they connect. If a foundation is still unclear, you can return to these lessons:
Start with the question and data
Modelling starts by formulating a concrete question. Do we want to describe what happened, predict a situation or explain a mechanism? These three tasks may require different evidence. Define the population of interest, the variables, units and how each observation was obtained. A collection of numbers without context may allow operations, but not responsible conclusions.
Sample data do not automatically describe the entire population. If we study students' travel times but interview only those arriving early, the selection method may exclude precisely the longest journeys. Increasing this biased sample does not remove the problem. Also distinguish measurement from counting: the number of students is discrete, whereas time is continuous, although a device records it with limited resolution. The collection method influences the meaning of observed differences.
Review functions and parameter units
In an affine model y=a+bx, a is the predicted output at x=0 and b is the output change per input unit. The unit of b is the unit of y divided by that of x. If C=200+15d describes a cost in monetary units and distance d in kilometres, 200 represents a fixed cost and 15 a rate per kilometre. Interpreting x=0 is physical only when that point belongs to the context.
Direct proportionality is the special case y=bx, with a=0. A line not passing through the origin does not express direct proportionality. By contrast, y=y₀rᵗ, for equally spaced discrete times and r>0, models change by a constant factor. Approximately constant differences suggest an affine model; approximately constant ratios suggest an exponential. That suggestion must be tested and make sense for the phenomenon. A short numerical pattern can be compatible with many models.
Build and compare predictions
Two points with distinct x values determine a line: b=(y₂−y₁)/(x₂−x₁), then a=y₁−bx₁. However, measured data rarely all lie on that line. We can estimate parameters using several points, for example through least squares: choose a and b to minimise the sum of squared residuals. Here the aim is to understand the criterion, without requiring its complete derivation.
For an observed point (xᵢ,yᵢ), the prediction is ŷᵢ and the residual is eᵢ=yᵢ−ŷᵢ. A positive residual means an observation above the prediction; negative means below. It has the unit of y. Squares prevent opposite errors from cancelling in the overall measure, but give large deviations substantial weight. A fit with a small sum neither proves a causal mechanism nor makes every individual error negligible.
The residual plot tells a story
A residual plot helps reveal whether the model's form is appropriate. If a line systematically predicts too much at the ends and too little in the middle, there may be curvature it does not describe. If dispersion increases with the input, a single error scale may be insufficient. A point very far away deserves investigation of transcription, the instrument or a different condition; it should not be deleted merely to improve the result.
It is useful to separate data used for fitting from data used to test predictions. A very flexible model may follow every irregularity in the sample and predict poorly outside it. Accuracy must be assessed using errors in the relevant unit: an error of 2 minutes may be small for a journey lasting several hours and decisive for a short connection. An aggregate measure should be accompanied by observations about patterns and context.
Correlation does not demonstrate cause
Linear correlation measures the strength and direction of an approximately linear association. The coefficient r is dimensionless and lies between −1 and 1 when defined; values near ±1 indicate strong linear alignment. If all values of one variable are equal, the usual coefficient is undefined. A strong nonlinear association may have r near zero.
Even high correlation does not demonstrate that changing x will cause the predicted change in y. There may be a third variable, reverse causality or data selection. For example, sales of two products may rise simultaneously on warmer days because both depend on temperature. Investigating causal effects requires appropriate study design, control of factors and arguments beyond a graph. Randomisation in an experiment helps, but each conclusion retains its scope of validity.
Predictions, boundaries and honesty
Interpolation means predicting within the observed range; extrapolation means predicting outside it. The second operation usually requires stronger assumptions, since the trend may change. An exponential growth model may describe an initial stage and fail when resource limits appear. A cost line may work between 1 and 20 km and fail after a tariff change.
When communicating a result, separate data, model choices, calculation and conclusion. State the observed range and the degree of uncertainty actually assessed. Do not invent a confidence interval simply because there is a decimal prediction. Explain conditions that could invalidate the model and which new data would allow testing. Modelling does not mean finding a definitive formula for reality: it means building a testable relationship that helps answer a bounded question.
Worked examples, without skipping steps
Follow the reasoning first. Then cover the solution and try to reconstruct it in your own words.
Example 1
Build a cost model
A 2 km journey costs 230 monetary units and a 6 km journey costs 350. Assume an affine model and estimate the cost of 4 km.
- The slope is (350−230)/(6−2)=30 monetary units per kilometre.
- The fixed cost is a=230−30·2=170. Therefore C(d)=170+30d.
- At 4 km, C(4)=170+120=290. The input is within the range from 2 to 6 km.
Prediction: 290 monetary units.
The model reproduces both data points. This does not establish that the tariff remains affine at other distances or that the actual cost is accurate to one unit.
Example 2
Calculate signed residuals
For the model y=2+3x, the pairs (1,6), (2,7) and (3,12) are observed. Calculate residuals and the sum of squares.
- The predictions are 5, 8 and 11, respectively.
- The residuals, observed minus predicted, are 1, −1 and 1. The second point lies below the line.
- The sum of squares is 1²+(−1)²+1²=3. The mean residual is 1/3.
Residuals 1, −1, 1; sum of squares 3 in the unit of y squared.
Adding only residuals would give 1 and conceal some deviations. This line was proposed; we do not claim it is the optimal least-squares fit.
Example 3
Choose a multiplicative structure
A quantity measured at equally spaced instants is 80, 100 and 125. What simple model describes these three data points exactly?
- The differences are 20 and 25, so they are not constant.
- The ratios are 100/80=1,25 and 125/100=1,25. Growth by a constant factor is compatible.
- Defining t=0 at the first instant, propose N(t)=80·1,25ᵗ. The prediction for t=3 is 156,25.
Exponential model N(t)=80·1,25ᵗ, with an increase of 25% per interval.
The prediction at t=3 is extrapolation. If N is a count, 156,25 represents a mean prediction, not an exact count of objects.
Now try it yourself
There is no timer. Write what you know, choose a relationship and justify each step. Hints and solutions are available whenever you need them.
Exercise 1
A hint
See the worked solution
Exercise 2
A hint
See the worked solution
Exercise 3
A hint
See the worked solution
Exercise 4
A hint
See the worked solution
Exercise 5
A hint
See the worked solution
Mistakes worth avoiding
- A perfect fit guarantees future predictions.
- It may describe only the observed points; mechanisms and conditions may change.
- Zero correlation means no relationship of any kind.
- A strong nonlinear relationship may exist.
- More data remove every bias.
- Collection needs to represent the population; repeating biased selection does not correct the method.
The essentials to take with you
- Define the question, variables, units and sample.
- Choose a meaningful model form.
- Analyse residuals and test predictions.
- Separate association from cause and interpolation from extrapolation.
If you still cannot explain one of these ideas, return to the corresponding section and work through an example again. Recognising the difficulty is part of studying.
References for further study
Text and examples prepared for this learning path. These sources help check the principles and continue studying:
- OpenStax Introductory Statistics 2e — data sampling and variation in data and sampling
The nature of data, sampling and variability.
- OpenStax Introductory Statistics 2e — the regression equation
Regression equation, residuals and fitting criteria; original numerical data.
- OpenStax Calculus Volume 1 — review of functions
Representations and function parameters used in the models.
The grade organization is a suggested study sequence. Grade 13 provides general extension and preparation for higher education. Pedagogical review by teachers remains a stage of the project.