3  Terminology: variables, parameters, states and rates

Variable, parameter, state and rate are important words in the language of a modeller. But these words often get used loosely, or in subtly different ways in different fields.

Below I give pretty general definitions of these words.

3.1 States and rates

A state is just the amount of something: number of fish on a transect, number of plants in a quadrat, biomass of trees in a forest. We need to measure and model it to know how much of something exists.

A state will often have units that are just the amount of something, like number of animals or kilograms.

A rate measures how something changes. It will have units that are a fraction, like fish per year (\(fish/year\) or \(fish * year^{-1}\)). If we are moving somewhere we can even use the distance dimension, such as trees per km (\(trees/km\) or \(trees * km^{-1}\)). Or even an arbitrary dimension like leaves per bite (i.e. a rate of herbivory).

We can have rates of states and rates of rates. For example, take biomass of phytoplankton with units of kilograms. Now we can have production of plankton with units kilograms per year. This is the total primary production of all our little plankton cells in a single year. Now we can have productivity which has units kilograms per year per gram of plankton. This is the productivity per g of biomass.

Now we need to be a bit careful. A state can have fractional units too if it is a density, like trees per km[^2].

Rate variables are often more informative for our models, but harder to measure.Consider counting the number of lions and gazelle (both states), compared to counting how many gazelle the lions eat in a year (a rate).

Modellers frequently normalize by the size of the system under study (e.g. use percentages or look at differences among different scenarios). In these cases the state is often less important, whereas the rate is critical to the size of the differences.

The other reason rates matter is the compounding you get when you repeatedly multiple a constant rate by a state (e.g. exponential growth or decline). A small rate of change can add up to a big difference in a short number of years.

I said states are often less important in modelling, but not always. Sometimes the state is what we want to know (how many fish in the sea?). Rates are also often state-dependent. A leading example is when population size approaches zero and we see accelerating decline.

3.2 Parameters and variables

A key distinction is between the things that vary within a single run of your model and the things that are fixed across that run.

A variable is a quantity that changes across observations, over time, or across space. In a population model, the population size at each time step is a variable; so are the covariates you measured (temperature, rainfall, site).

So a variable will always be a vector (column of numbers) and have an index like N[i] number of herbs at site i or B[t] biomass of fish at time t.

Variables split further into a few roles:

  • Response (or dependent) variables: what you’re trying to explain or predict.
  • Predictor (or independent, explanatory, covariate) variables: what you use to do the explaining.
  • State variables: in a dynamic model, the quantities that describe the system at a moment in time and get updated at each step (e.g. abundance, biomass). The distinction between a state variable and a parameter is the one people most often blur: the state evolves as the model runs, the parameters do not.
  • Rate variables: the instantaneous rate of change of a state variable, typically a derivative (dN/dt) or a flux term, and usually itself a function of state variables and parameters. In the Lotka-Volterra predator-prey model, the predation rate aNP is a rate variable built from the state variables N and P and the parameter a.

A parameter is usually a quantity that is fixed for a given run and governs how the variables relate: the knobs of the model. So it is typically a single value, not a vector.

In logistic growth, the growth rate r and carrying capacity K are parameters; the population size is a state variable. Some parameters are set by you from theory or prior knowledge; others are what you estimate from data (this is exactly where the identifiability and confounding issues of the previous section bite).

Now parameters can also vary, and then it’s debatable whether they should remain named “parameters” or become “variables”.

For example, r could be indexed r[t] and vary over time to represent changes in population growth rate. One way to get around the potential contradiction would be to say r is a parameter, whereas r[t] is a rate variable.

A hyperparameter is a parameter of a distribution over other parameters, and it shows up in two related but distinct settings:

  • In statistical modelling, we have hierarchical (multilevel) models: when parameters are themselves treated as draws from a higher-level distribution, that higher-level distribution has its own parameters, and those are the hyperparameters. If each site has its own growth rate rᵢ, and you model those site-level rates as coming from a common distribution with mean μ and spread σ, then μ and σ are hyperparameters. This is the machinery behind the “students in schools in districts / quadrats in sites in regions” nesting from earlier.
  • In machine learning: the term is used more loosely for settings you choose rather than fit, such as a learning rate, the number of layers, or a regularisation strength. Same idea (a quantity one level up that governs the fitting), different flavour.

Two more words you’ll meet frequently. A constant is a fixed quantity you never estimate and never vary (a known conversion factor, π). And data are the observed values you condition on: the realised measurements of your variables, as opposed to the model quantities you infer. Keeping “the thing I measured” (data), “the thing that evolves” (state variable), and “the knob I’m estimating” (parameter) firmly separated in your own head will save you from a surprising share of modelling errors.

In statistical modelling we also talk about latent variables. These are variables we haven’t observed, but are estimated by the model.

3.3 Definitions and modelling language

Some people may quibble with my definitions of modelling terms. The thing is, human language is imprecise (see linguistic uncertainty in Chapter 6). Common use of terms vary across discplines. All of the definitions I use here are used somewhere in the sciences.

I’ve hedged my definitions. That might be annoying to you if you like precision. But, I’m more of a biologist and statistician than I am a physicist and mathematician. So hedging runs in my veins.

There’s always exceptions in biology. If you notice one I missed, well done. The important thing to do now is to explain that exception when you explain your science. The exceptions don’t matter so much as the misunderstandings that occur when someone sees the exception, but someone else doesn’t notice it.

So try to be comfortable with slightly fuzzy definitions, and always be clear about what you mean in your jargon when talking to a new audience.