Modelling and critical reading of data

6 visual steps · 3 worked examples · 5 exercises with solutions

First, let’s see the idea.

Does a good fit to the data guarantee the prediction beyond them?

Move forward one step at a time. Change the values and observe what happens.

A line against the datat (min)T (°C)02,14,26,38,419253137
Drawing description

Five points represent temperatures measured between 0 and 4 min; the region afterwards is shaded.

Step 1 of 6

Start with what was measured

Count the green points and locate the start of the shaded region.

Each green point combines a time and a temperature. There are five measurements, from 0 to 4 min; beyond that interval we do not yet have data.

Measurements
5
Measured data
0–4 min

What if you change this?

0,5 °C/min2 °C/min
4 min8 min

Before moving on

Change the prediction from 4 to 8 min. Have new measurements appeared?

Compare with the explanation

No. Only the prediction range has increased; the observed basis remains 0–4 min.

You decide when to mark this lesson as studied.

A line against the data

Slide the drawing to see the details.

Explore the full explanationThe foundations, principles, worked examples and all the exercises, at your own pace.

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.

  1. The slope is (350−230)/(6−2)=30 monetary units per kilometre.
  2. The fixed cost is a=230−30·2=170. Therefore C(d)=170+30d.
  3. At 4 km, C(4)=170+120=290. The input is within the range from 2 to 6 km.
Result

Prediction: 290 monetary units.

Check the result

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.

  1. The predictions are 5, 8 and 11, respectively.
  2. The residuals, observed minus predicted, are 1, −1 and 1. The second point lies below the line.
  3. The sum of squares is 1²+(−1)²+1²=3. The mean residual is 1/3.
Result

Residuals 1, −1, 1; sum of squares 3 in the unit of y squared.

Check the result

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?

  1. The differences are 20 and 25, so they are not constant.
  2. The ratios are 100/80=1,25 and 125/100=1,25. Growth by a constant factor is compatible.
  3. Defining t=0 at the first instant, propose N(t)=80·1,25ᵗ. The prediction for t=3 is 156,25.
Result

Exponential model N(t)=80·1,25ᵗ, with an increase of 25% per interval.

Check the result

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 line is y=5+2x. Is there direct proportionality?
A hint
Check the output at zero.
See the worked solution
No: y(0)=5, not zero. There is a constant rate of 2 and a fixed term of 5. Direct proportionality would require y=kx on the relevant domain.

Exercise 2

The observed value is 18 and the predicted value 21. What is the residual?
A hint
Residual is observed minus predicted.
See the worked solution
e=18−21=−3, in the output unit. The sign indicates that the model overestimated this value by 3 units.

Exercise 3

Data between 10 and 30 °C fit a line. Is predicting at 80 °C interpolation?
A hint
Compare the new input with the measured range.
See the worked solution
It is extrapolation, because 80 lies outside [10,30]. The line can be calculated, but physical validity needs further evidence and may fail because the material or mechanism changes.

Exercise 4

Two variables have r=0,95. Can we conclude that one causes the other?
A hint
A measure of association does not identify the mechanism.
See the worked solution
No. Linear alignment is strong, but a common variable, selection or reverse causality may exist. A causal conclusion requires information about study design and control of alternative explanations.

Exercise 5

A model predicts 102 and 100 is observed. Calculate the absolute relative error using the observation.
A hint
State the reference value.
See the worked solution
The absolute error is |102−100|=2. Dividing by the observed 100 gives 0,02, or 2%. Another denominator would produce another convention, which would need to be stated.

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:

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.