Statistical Approaches II and Modelling: Correlation, Regression, Tests of Hypothesis (t, χ² and ANOVA), Significance and Confidence Limits, Environmental Models, Validation and Forecasting, and the Lotka–Volterra and Leslie Matrix Models

This chapter completes Unit IX. It takes correlation and regression, the logic of testing a hypothesis, the t-test, the χ²-test and one-way and two-way analysis of variance, significance and confidence limits, and then the second half of the unit: approaches to developing environmental models, linear, simple and multiple regression models, validation and forecasting, and models of population growth and interaction. The syllabus spells the last of these "Lotka-Voltera"; the model is named after Alfred Lotka and Vito Volterra, and it is taught here with the Leslie matrix model of an age-structured population. As in the previous chapter, the syllabus's "2-test" is the χ²-test. A correlation coefficient, a confidence interval, a χ² statistic, an F ratio and one step of a Leslie projection are worked.

1. Correlation and regression

Correlation measures the strength and direction of the linear association between two variables. Karl Pearson's product-moment coefficient, r = Σ(x − x̄)(y − ȳ) ÷ √[Σ(x − x̄)² × Σ(y − ȳ)²], lies between −1 and +1: +1 is a perfect positive linear relation, −1 a perfect negative one and 0 no linear relation, although a strong curved relation can still give r near zero. The square of r, the coefficient of determination r², is the proportion of the variation in one variable accounted for by its linear relation with the other. When data are ranks or clearly non-normal, Spearman's rank correlation coefficient, ρ = 1 − 6Σd² ÷ [n(n² − 1)], where d is the difference between the two ranks of each item, is used instead.

Regression describes how one variable changes with another so that one can be predicted from the other. The least-squares line of y on x, y = a + bx, chooses the intercept a and the slope b so that the sum of squared vertical deviations of the points from the line is smallest: b = Σ(x − x̄)(y − ȳ) ÷ Σ(x − x̄)² and a = ȳ − bx̄, so the line always passes through the point (x̄, ȳ). The regression coefficient of y on x is byx = r × sy ÷ sx, and that of x on y is bxy = r × sx ÷ sy; hence r = ±√(byx × bxy), the geometric mean of the two regression coefficients, taking their common sign. Correlation is symmetrical in x and y; regression is not, because it treats one variable as the predictor.

Traffic x (thousand vehicles per hour)NO₂ y (µg/m³)x − x̄y − ȳProduct(x − x̄)²(y − ȳ)²
120−2−20404400
240−10010
35001000100
44010010
550210204100
Mean 3Mean 40Sum 0Sum 0Sum 60Sum 10Sum 600

For these five roadside readings, r = 60 ÷ √(10 × 600) = 60 ÷ √6,000 ≈ 60 ÷ 77.46 ≈ 0.77, and r² = 3,600 ÷ 6,000 = 0.60, so traffic accounts for 60% of the variation in NO₂. The slope is b = 60 ÷ 10 = 6 µg/m³ per thousand vehicles and the intercept a = 40 − 6 × 3 = 22, giving NO₂ = 22 + 6x. A prediction at 4.5 thousand vehicles (49 µg/m³) is interpolation; one at 20 thousand is extrapolation far beyond the data and should not be trusted.

⚠️ Correlation is not causation
A significant correlation shows that two variables vary together, not that one causes the other. Both may respond to a third variable: fish kills and algal blooms may correlate because both follow high temperature and nutrient loading. Causation needs a mechanism, the right time order and preferably an experiment. And r measures only linear association, so r = 0 does not mean the variables are unrelated.

2. Tests of hypothesis: the logic, the t-test and the χ²-test

A test of hypothesis begins with a null hypothesis, H₀, usually of no difference or no effect (the mean nitrate level equals the standard; two sites do not differ), and an alternative hypothesis, H₁. A test statistic is computed from the sample and compared with its sampling distribution under H₀. The level of significance, α, commonly 0.05 or 0.01, is the probability of rejecting H₀ when it is true, a Type I error; accepting H₀ when it is false is a Type II error, with probability β, and 1 − β is the power of the test. The p-value is the probability, if H₀ were true, of a result at least as extreme as the one observed; H₀ is rejected when p is less than α. A two-tailed test looks for a difference in either direction; a one-tailed test, for a difference in one stated direction only.

TestStatisticDegrees of freedomEnvironmental use
One-sample tt = (x̄ − µ₀) ÷ (s ÷ √n)n − 1Does the mean concentration at a site differ from a standard?
Independent two-sample tDifference of means over its pooled standard errorn₁ + n₂ − 2Upstream against downstream BOD
Paired tMean of the paired differences over its standard errorn − 1 (pairs)The same wells before and after a treatment
χ² goodness of fitχ² = Σ(O − E)² ÷ Ek − 1, less one for each parameter estimated from the dataDo observed counts fit an expected ratio or distribution?
χ² test of independenceχ² = Σ(O − E)² ÷ E, with E = row total × column total ÷ grand total(r − 1)(c − 1)Is species presence independent of habitat type?

Two worked cases. Sixteen nitrate samples from a well field have a mean of 52 mg/L and a standard deviation of 4 mg/L; testing against 50 mg/L, t = (52 − 50) ÷ (4 ÷ √16) = 2 ÷ 1 = 2.0 with 15 degrees of freedom. The two-tailed 5% critical value for 15 degrees of freedom is 2.131, so the difference is not significant at the 5% level, although it would exceed the normal value of 1.96; small samples need the wider t limits. Next, 100 nests are counted in four equal-sized habitat patches, 30, 20, 25 and 25, against 25 expected in each if nesting were uniform: χ² = (25 + 25 + 0 + 0) ÷ 25 = 2.0 with 3 degrees of freedom, well below the 5% critical value of 7.815, so the counts do not depart significantly from uniformity. The χ²-test is applied to frequencies, not to percentages or measurements, and each expected frequency should generally be at least 5.

⚠️ "Not significant" does not prove the null hypothesis
Failing to reject H₀ means the data are not strong enough to show a difference at the chosen level, not that no difference exists; a small sample may simply lack power. Conversely a very large sample can make a trivial difference statistically significant, so significance must be read alongside the size of the effect.

3. Analysis of variance, significance and confidence limits

Analysis of variance (ANOVA), developed by R. A. Fisher, compares the means of three or more groups in one test, avoiding the inflated Type I error of many pairwise t-tests. In one-way ANOVA the total sum of squares is partitioned into a between-groups part and a within-groups (error) part; each is divided by its degrees of freedom, k − 1 and N − k for k groups and N observations, to give mean squares, and F = mean square between ÷ mean square within is compared with the F-distribution. Two-way ANOVA examines two factors at once, such as site and season: without replication it tests the two main effects against the residual, with (r − 1)(c − 1) error degrees of freedom; with replication it also tests their interaction, whether the effect of site differs from season to season. ANOVA assumes independent observations, normally distributed errors and equal variances in the groups; a significant F says only that not all means are equal, and a post hoc test such as Tukey's then shows which pairs differ.

Source of variationSum of squaresDegrees of freedomMean squareF
Between sites403 − 1 = 240 ÷ 2 = 2020 ÷ 5 = 4.0
Within sites (error)6015 − 3 = 1260 ÷ 12 = 5—
Total10015 − 1 = 14——

The table is a one-way ANOVA of turbidity at three sites with five samples each. The critical F for 2 and 12 degrees of freedom at the 5% level is about 3.89, so F = 4.0 is significant: the sites do not all have the same mean turbidity.

Confidence limits give a range that is likely to contain the population parameter. For a mean, the 95% confidence interval is x̄ ± t × SE, where t is the two-tailed 5% value for n − 1 degrees of freedom; for large samples t approaches 1.96, and 2.58 gives 99% limits. For the five dissolved-oxygen readings of the previous chapter, with mean 6 mg/L and SE about 0.707 mg/L, t for 4 degrees of freedom is 2.776, so the interval is 6 ± 1.96, about 4.04 to 7.96 mg/L. The meaning is that 95% of intervals built this way would contain the true mean; a wider interval comes from a smaller sample, a more variable one or a higher confidence level. A confidence interval and a two-tailed test agree: a hypothesised value outside the 95% interval would be rejected at the 5% level.

4. Environmental models: approaches, regression models, validation and forecasting

A model is a simplified representation of a system used to understand it or to predict its behaviour. Environmental models are classed in several ways: empirical or statistical models, built from observed relations such as a regression, against mechanistic or process-based models, built from physical, chemical and biological laws such as the Streeter–Phelps oxygen-sag and Gaussian plume models met in earlier chapters; deterministic models, which give one output for a given input, against stochastic models, which include random variation and give a distribution of outcomes; static against dynamic models, which follow change through time; and lumped models, which treat a system as uniform, against distributed models, which divide it in space.

  • Define the problem and the purpose: what question the model must answer, at what scale and with what accuracy.
  • Build a conceptual model: the components, the flows between them and the boundaries of the system, often as a box-and-arrow diagram.
  • Formulate it mathematically, as equations, and write it as a computer program; verification then checks that the program solves the equations correctly.
  • Calibrate it: adjust the parameters until the output fits one set of observed data.
  • Validate it: compare the output with independent data not used in calibration, using measures such as the coefficient of determination, the root mean square error and the bias.
  • Carry out sensitivity analysis, finding which parameters most affect the output, and then apply the model to scenarios and forecasts.

Linear regression models are the commonest empirical models. A simple linear regression model, y = a + bx + e, relates a response to one predictor, e being the random error. A multiple regression model, y = a + b₁x₁ + b₂x₂ + … + bₖxₖ + e, uses several predictors, such as predicting ozone from temperature, solar radiation and wind speed; each partial regression coefficient gives the change in y per unit change in that predictor with the others held constant. Its fit is judged by the coefficient of multiple determination R² and, because R² never falls when a predictor is added, by the adjusted R², which penalises needless predictors. Strongly intercorrelated predictors, multicollinearity, make individual coefficients unstable. A relation that is not linear can often be made linear by transformation, for example by taking logarithms of a power law or an exponential decay.

Forecasting uses a validated model to predict future states or the response to a scenario, such as air quality under a new emission inventory or river quality under a new discharge. Forecasts are most reliable within the range of conditions used to build and test the model; extrapolation beyond it, including into a changed climate, carries growing uncertainty, which is why forecasts should be given with confidence or prediction intervals and why models are re-validated as new data arrive.

ℹ️ Calibration, verification and validation are different steps
Calibration tunes the parameters to fit data; verification checks that the model's code does what its equations say; validation tests the calibrated model against data it has not seen. A model that fits its calibration data closely has not thereby been validated, since with enough parameters almost any data can be fitted.

5. Models of population growth and interaction: Lotka–Volterra and the Leslie matrix

The simplest population models, met in Unit III, are exponential growth, dN/dt = rN, and logistic growth, dN/dt = rN(1 − N/K), in which growth slows as the population N approaches the carrying capacity K. The Lotka–Volterra models, proposed independently by Alfred Lotka (1925) and Vito Volterra (1926), extend these to two interacting species. The syllabus's "Lotka-Voltera" is a misspelling of Volterra.

In the predator–prey model, prey N grow exponentially without predators and are removed in proportion to encounters, dN/dt = rN − αNP, while predators P convert captured prey into offspring and die at a constant rate, dP/dt = βNP − mP, where α is the attack rate, β the conversion of prey captured into predator growth and m the predator death rate. Setting both rates to zero gives the equilibrium N* = m ÷ β and P* = r ÷ α: the prey equilibrium is set by the predator's parameters and the predator equilibrium by the prey's growth rate. Away from equilibrium the two populations oscillate in neutral cycles, the predator peak lagging a quarter-cycle behind the prey peak, a pattern often compared with the long Hudson's Bay Company fur records of lynx and snowshoe hare.

The competition model adds to each species' logistic equation the effect of the other: dN₁/dt = r₁N₁(K₁ − N₁ − α₁₂N₂) ÷ K₁ and dN₂/dt = r₂N₂(K₂ − N₂ − α₂₁N₁) ÷ K₂, where α₁₂ is the competition coefficient, the effect of one individual of species 2 on species 1 in units of species 1. Plotting the zero-growth isoclines gives four outcomes: either species can win outright, the winner can depend on starting numbers (unstable equilibrium), or the two can coexist stably when K₁ < K₂ ÷ α₂₁ and K₂ < K₁ ÷ α₁₂, that is, when each species limits itself more than it limits the other. Competitive exclusion, Gause's principle, is the outcome when the species are too similar.

The Leslie matrix model (P. H. Leslie, 1945) projects an age-structured population in discrete time steps. The population is a vector of numbers in each age class, n(t), and the matrix L has the age-specific fecundities in its top row and the survival probabilities from each class to the next on the sub-diagonal, zeros elsewhere; then n(t + 1) = L × n(t). Repeated projection settles into a stable age distribution, given by the dominant eigenvector of L, growing each step by the dominant eigenvalue λ: λ > 1 means growth, λ = 1 a stationary population and λ < 1 decline. It is used for harvest planning, for projecting the recovery of endangered species and for asking which life stage most affects λ.

Leslie matrix rowAge class 0Age class 1Age class 2n(0)n(1) = L × n(0)
Fecundities (to class 0)043100 × 10 + 4 × 10 + 3 × 10 = 70
Survival to class 10.500100.5 × 10 = 5
Survival to class 200.250100.25 × 10 = 2.5

Starting from 10 individuals in each of three age classes, one step gives 70 newborns, 5 one-year-olds and 2.5 two-year-olds, a total of 77.5 against 30. The age structure is far from stable at first; only after several steps does the ratio between classes settle and the total grow by the constant factor λ.

Key takeaways

  • Pearson's r runs from −1 to +1 and r² is the share of variation explained; Spearman's ρ = 1 − 6Σd² ÷ [n(n² − 1)] serves ranks; r = ±√(byx × bxy), and regression lines pass through (x̄, ȳ). Correlation is not causation.
  • α is the probability of a Type I error (rejecting a true H₀) and 1 − β the power; t tests means (df n − 1 for one sample, n₁ + n₂ − 2 for two), and χ² = Σ(O − E)² ÷ E tests frequencies (df k − 1 for fit, (r − 1)(c − 1) for independence).
  • ANOVA compares three or more means with F = MS between ÷ MS within (df k − 1 and N − k); two-way ANOVA with replication tests interaction; 95% confidence limits are x̄ ± t × SE, approaching ± 1.96 SE for large samples.
  • Models are empirical or mechanistic, deterministic or stochastic, static or dynamic, lumped or distributed; they are formulated, verified, calibrated, validated on independent data and tested for sensitivity before forecasting, and multiple regression is judged by adjusted R².
  • Lotka–Volterra (not "Voltera") predator–prey equilibrium is N* = m ÷ β, P* = r ÷ α, with predator peaks lagging prey peaks; competitors coexist when each limits itself more than the other; the Leslie matrix projects n(t + 1) = L × n(t), with λ > 1 meaning growth.

Practice questions (10)

Attempt each one before opening the answer. Every explanation names the tempting wrong option as well as the right one, because that is where marks are lost.

  1. A study finds a correlation coefficient of r = 0.8 between vehicle density and roadside carbon monoxide. What proportion of the variation in carbon monoxide is accounted for by its linear relation with vehicle density?

    1. 64%
    2. 80%
    3. 40%
    4. 89%
    Show answer

    Answer: A — 64%

    The coefficient of determination is r² = 0.8 × 0.8 = 0.64, so 64% of the variation is explained by the linear relation and 36% is left to other factors. Reading r itself as the proportion gives 80%, and 89% would be the square root of r rather than its square.
  2. Five lakes are ranked by two observers for the severity of eutrophication, and the sum of the squared differences between their ranks, Σd², is 4. What is Spearman's rank correlation coefficient? Give the answer to one decimal place.

    Numerical answer — type the value.

    Show answer

    Answer: 0.8

    ρ = 1 − 6Σd² ÷ [n(n² − 1)] = 1 − (6 × 4) ÷ (5 × 24) = 1 − 24 ÷ 120 = 1 − 0.2 = 0.8, a strong agreement between the observers. Using n² instead of n² − 1 in the denominator, or forgetting the factor of 6, gives a wrong value.
  3. Sixteen nitrate samples have a mean of 52 mg/L and a standard deviation of 4 mg/L. Tested against a value of 50 mg/L, t = 2.0 with 15 degrees of freedom, and the two-tailed 5% critical value is 2.131. The correct conclusion is that

    1. the null hypothesis is rejected, because 2.0 exceeds 1.96
    2. the mean is proved to equal 50 mg/L
    3. the test is invalid, because a t-test needs at least 30 samples
    4. the null hypothesis is not rejected at the 5% level, because 2.0 is less than 2.131
    Show answer

    Answer: D — the null hypothesis is not rejected at the 5% level, because 2.0 is less than 2.131

    With 15 degrees of freedom the t limit, 2.131, is wider than the normal 1.96, and 2.0 falls inside it, so H₀ is not rejected. That does not prove the mean is exactly 50; it only means the evidence is insufficient. The t-test exists precisely for small samples.
  4. A one-way ANOVA compares turbidity at three sites with five samples at each. Which statements are correct? Select all that apply.

    1. A significant F shows that every site differs from every other site
    2. F is the between-sites mean square divided by the within-sites mean square
    3. ANOVA makes no assumption about the variances of the groups
    4. The between-sites and within-sites degrees of freedom are 2 and 12
    Show answer

    Answer: B — F is the between-sites mean square divided by the within-sites mean square; D — The between-sites and within-sites degrees of freedom are 2 and 12

    With k = 3 and N = 15, the degrees of freedom are k − 1 = 2 and N − k = 12, and F is the ratio of the two mean squares. A significant F means only that not all means are equal; a post hoc test shows which differ. ANOVA assumes equal variances, normal errors and independence.
  5. A χ²-test of independence is applied to a contingency table of 3 habitat types by 4 bird species. The degrees of freedom are

    1. 7
    2. 11
    3. 12
    4. 6
    Show answer

    Answer: D — 6

    For a test of independence df = (r − 1)(c − 1) = (3 − 1)(4 − 1) = 2 × 3 = 6. 12 is the number of cells, 11 is the number of cells less one, which would apply to a goodness-of-fit test over 12 categories, and 7 adds the two reduced dimensions instead of multiplying them.
  6. Assertion (A): A statistically significant correlation between two environmental variables does not by itself show that one causes the other. Reason (R): Both variables may be responding to a third variable, such as temperature or season. Choose the correct option.

    1. Both A and R are true, and R is the correct explanation of A
    2. Both A and R are true, but R is not the correct explanation of A
    3. A is true, but R is false
    4. A is false, but R is true
    Show answer

    Answer: A — Both A and R are true, and R is the correct explanation of A

    Both are true and R explains A. A confounding third variable is the classic reason correlation cannot establish causation: algal blooms and fish kills may correlate because both follow warm, nutrient-rich conditions. Causation needs a mechanism, the right time order and ideally an experiment.
  7. In the Lotka–Volterra predator–prey model, dN/dt = rN − αNP and dP/dt = βNP − mP, with r = 0.5, α = 0.01, β = 0.002 and m = 0.2. The equilibrium populations of prey N* and predators P* are

    1. N* = 20 and P* = 250
    2. N* = 250 and P* = 20
    3. N* = 100 and P* = 50
    4. N* = 50 and P* = 100
    Show answer

    Answer: C — N* = 100 and P* = 50

    Setting dP/dt = 0 gives N* = m ÷ β = 0.2 ÷ 0.002 = 100, and setting dN/dt = 0 gives P* = r ÷ α = 0.5 ÷ 0.01 = 50. The prey equilibrium depends on the predator's parameters and vice versa; the other options pair the parameters wrongly.
  8. Which statements about developing and testing an environmental model are correct? Select all that apply.

    1. Sensitivity analysis identifies the parameters that most affect the output
    2. Forecasts far outside the range of the calibration data carry growing uncertainty
    3. A model that fits its calibration data closely is thereby validated
    4. Validation compares model output with independent data not used in calibration
    Show answer

    Answer: A — Sensitivity analysis identifies the parameters that most affect the output; B — Forecasts far outside the range of the calibration data carry growing uncertainty; D — Validation compares model output with independent data not used in calibration

    Validation needs data the model has not seen, sensitivity analysis ranks the influence of parameters, and extrapolation beyond the tested range is increasingly uncertain. A close fit to calibration data is expected by construction and proves little, since enough parameters can fit almost anything.
  9. A Leslie matrix has fecundities of 0, 4 and 3 for age classes 0, 1 and 2, survival of 0.5 from class 0 to class 1 and 0.25 from class 1 to class 2. If there are 10 individuals in each class now, how many newborns (class 0) are there after one time step?

    Numerical answer — type the value.

    Show answer

    Answer: 70

    The top row of the Leslie matrix gives the newborns: 0 × 10 + 4 × 10 + 3 × 10 = 70. The survival terms fill the older classes instead, 0.5 × 10 = 5 in class 1 and 0.25 × 10 = 2.5 in class 2, for a total of 77.5.
  10. The syllabus lists the "Lotka-Voltera model". Which statement about the classical Lotka–Volterra predator–prey model is correct?

    1. The prey population grows logistically to a fixed carrying capacity and stays there
    2. The predator peak always comes before the prey peak
    3. Predator and prey populations oscillate, with the predator peak lagging behind the prey peak
    4. It divides each population into age classes
    Show answer

    Answer: C — Predator and prey populations oscillate, with the predator peak lagging behind the prey peak

    The model, named after Lotka and Volterra (the syllabus drops an "r"), gives neutral cycles in which predators increase after prey become abundant, so the predator peak lags. Its prey grow exponentially without predators, not logistically, and age classes belong to the Leslie matrix model.