Models and their limits

Research Methods — Week 8

Recap

Where we are

You can now test hypotheses, compare groups, and quantify effect sizes.

This week: models.

A model is a simplified story about how the world works. The question is always: how much does it capture, and what does it leave out?

Questions?

Submit questions anonymously:

PollEv.com/geol

text geol to 07480 781235

Linear regression

🎓💻 Concept block 1

What is a model?

A deliberate simplification that captures some features of reality and ignores others.

Every statistical test you’ve run contains an implicit model.

The t-test models data as two normal distributions with equal variance.

Now we make the model explicit.

Linear regression

\[y = \beta_0 + \beta_1 x + \varepsilon\]

“y increases by β₁ for every one-unit increase in x, plus noise.”

That’s the whole model. It’s powerful — and limited.

Live demo

🖥️ Switching to WebR

model <- lm(output ~ windspeed, data = turbine_df)
summary(model)

Reading the output

Element Meaning
Intercept (β₀) Predicted y when x = 0
Slope (β₁) Change in y per unit change in x
Proportion of variance explained
p-value (slope) Is the slope distinguishable from zero?

Fit and interpret

✏️💻 Exercise 1

Solar panels and temperature

Solar panel output vs temperature — counterintuitive.

  1. Make a scatter plot
  2. Fit lm()
  3. Interpret the slope and R²
  4. Plot the fit

Is the relationship linear? Does the model capture the pattern?

Assumptions and diagnostics

🎓 Concept block 2

The four assumptions

  1. Linearity — the relationship is actually linear
  2. Independence — residuals don’t influence each other
  3. Homoscedasticity — constant variance of residuals
  4. Normality of residuals (for inference)

Diagnostic plots

plot(model)

Four plots, two that matter most:

Plot What to look for
Residuals vs Fitted Pattern = non-linearity or heteroscedasticity
QQ plot Departures from the line = non-normal residuals

HolmesCo’s regression

✏️💬 Exercise 2

The scenario

“Geological Solutions Since 2019”

Groundwater Analysis Report

Linear model: groundwater level ~ rainfall. R² = 0.45.

“Rainfall is the dominant control on groundwater levels.”

Now look at the diagnostic plots…

What’s wrong?

  • The residuals show a seasonal pattern — the model is missing a time-dependent structure
  • R² = 0.45 means 55% of the variation is unexplained
  • “Dominant” is a stretch when your model misses more than it captures

The three failures of models

🎓💬 Concept block 3

Failure 1: Overfitting

A model that fits the training data perfectly but fails on new data.

It’s memorised the noise.

Demo: polynomial degree 15

🖥️ Live demo

Fit a degree-15 polynomial to 20 data points. It goes through every point but oscillates wildly between them.

Compare to the straight line: fits worse, predicts better.

More complex ≠ more useful.

Failure 2: Extrapolation

A model that works within the observed range but breaks down outside it.

Example: UK solar capacity has grown roughly exponentially since 2010. Extrapolate to 2050 → solar exceeds the entire UK grid.

What’s the model not capturing?

Planning constraints, grid limits, diminishing suitable sites.

HolmesCo’s extrapolation

“Geological Solutions Since 2019”

“Our linear trend in groundwater decline predicts the aquifer will be empty by 2028.”

They didn’t account for seasonal recharge or the fact that the decline was caused by temporary pumping.

Failure 3: Blind spots

Things the model structurally cannot represent.

  • A single-turbine power curve has no term for wake interference → overpredicts wind farm output by 10–20%
  • A carbon accounting model that counts biomass as zero structurally cannot see the emissions it ignores

You can only fix a blind spot if you know it’s there.

The new refrain

“What is the model not capturing?”

Overfitting: too much faith in your data.

Extrapolation: too much faith in your model.

Blind spots: too much faith in your framework.

Quick reflection

✏️ One sentence

Write one sentence

“In my project, the biggest thing my analysis might be missing is…”

Wrap-up

Key points

  1. A model is a simplification — powerful, but limited
  2. Always check the diagnostics: residuals don’t lie
  3. Three failures: overfitting, extrapolation, blind spots
  4. Always ask: “What is my model not capturing?”

Next time

Application session: “Fitting and breaking models”

You’ll fit models to your data — and deliberately try to break them.