Sensitivity analysis
Sensitivity analysis studies how changes in model parameters or inputs change outputs of interest. It helps identify which quantities strongly influence predictions and which have relatively little effect within a stated parameter region.
Choose the output first
A model may produce many outputs: equilibrium population, epidemic peak, final epidemic size, time to peak, extinction probability or a complete trajectory.
The sensitivity ranking can change when the output changes.
Local sensitivity
For a scalar output \(Y(\boldsymbol\theta)\), local sensitivity to parameter \(\theta_j\) is
\[\boxed{S_j=\frac{\partial Y}{\partial\theta_j}}.\]This derivative measures the instantaneous rate at which the output changes when \(\theta_j\) changes while the other parameters are held fixed.
First-order approximation
For a small parameter perturbation \(\Delta\theta_j\),
\[\boxed{\Delta Y\approx\frac{\partial Y}{\partial\theta_j}\Delta\theta_j}.\]This is a local linear approximation. It becomes less reliable when the perturbation is large or the response is strongly nonlinear.
Sign of a sensitivity
If
\[\frac{\partial Y}{\partial\theta_j}>0,\]increasing \(\theta_j\) locally increases the output. If the derivative is negative, increasing the parameter locally decreases the output.
The sign can change across parameter values or through time.
Magnitude and units
The raw derivative has units
\[\frac{\text{units of }Y}{\text{units of }\theta_j}.\]Therefore raw sensitivities for differently scaled parameters cannot always be compared directly.
Normalised sensitivity
A dimensionless local sensitivity is
\[\boxed{S_j^*=\frac{\theta_j}{Y}\frac{\partial Y}{\partial\theta_j}},\]provided the quantities in the denominator are non-zero.
This is an elasticity: approximately the percentage change in \(Y\) produced by a 1% change in \(\theta_j\) for sufficiently small perturbations.
Example interpretation
If
\[S_j^*=0.8,\]then locally a 1% increase in \(\theta_j\) produces approximately a 0.8% increase in \(Y\), with the other parameters fixed.
If \(S_j^*=-2\), a 1% increase produces approximately a 2% decrease.
Sensitivity of a trajectory
If the output changes through time,
\[Y=Y(t;\boldsymbol\theta),\]then sensitivity is also time-dependent:
\[\boxed{S_j(t)=\frac{\partial Y(t;\boldsymbol\theta)}{\partial\theta_j}}.\]A parameter may strongly influence early dynamics but have little effect later, or vice versa.
Sensitivity of several states
For a state vector
\[\mathbf x(t)=(x_1(t),\ldots,x_m(t))^T,\]the sensitivity matrix with respect to \(p\) parameters can be written
\[\boxed{S(t)=\frac{\partial\mathbf x(t)}{\partial\boldsymbol\theta^T}}.\]Its entry \(S_{ij}(t)\) is the sensitivity of state \(x_i\) to parameter \(\theta_j\).
Finite-difference sensitivity
A derivative can be approximated numerically using
\[\boxed{\frac{\partial Y}{\partial\theta_j}\approx\frac{Y(\theta_j+h)-Y(\theta_j-h)}{2h}}.\]This centred difference is often more accurate than a one-sided difference for a suitable step size \(h\).
Choosing the finite-difference step
If \(h\) is too large, the approximation no longer represents a local derivative. If \(h\) is too small, floating-point round-off and numerical solver error can dominate.
Checking sensitivity estimates across several reasonable step sizes is a useful diagnostic.
Relative perturbations
When parameters have very different scales, a relative step such as
\[h_j=\varepsilon|\theta_j|\]can be more meaningful than using the same absolute step for every parameter.
Special handling is needed when \(\theta_j=0\) or lies near a boundary.
Sensitivity equations for ODEs
Consider
\[\frac{d\mathbf x}{dt}=\mathbf f(\mathbf x,\boldsymbol\theta).\]For parameter \(\theta_j\), define
\[\mathbf s_j(t)=\frac{\partial\mathbf x(t)}{\partial\theta_j}.\]Differentiating the ODE with respect to \(\theta_j\) gives
\[\boxed{\frac{d\mathbf s_j}{dt}=\frac{\partial\mathbf f}{\partial\mathbf x}\mathbf s_j+\frac{\partial\mathbf f}{\partial\theta_j}}.\]These sensitivity equations can be solved alongside the original ODE.
Initial sensitivity
If the initial condition does not depend on \(\theta_j\), then
\[\mathbf s_j(0)=\mathbf0.\]If it does depend on the parameter,
\[\mathbf s_j(0)=\frac{\partial\mathbf x(0)}{\partial\theta_j}.\]This term should not be omitted.
Sensitivity of an observed quantity
If observations depend on the state through
\[\mu(t)=h(\mathbf x(t),\boldsymbol\theta),\]then the chain rule gives
\[\boxed{\frac{\partial\mu}{\partial\theta_j}=\frac{\partial h}{\partial\mathbf x}\mathbf s_j+\frac{\partial h}{\partial\theta_j}}.\]This connects dynamical sensitivities directly to parameter estimation.
Sensitivity and identifiability
If an observed output barely changes with a parameter, that parameter may be difficult to estimate from those observations.
However, strong sensitivity does not guarantee identifiability. Two parameters can produce almost the same pattern of change and therefore remain difficult to distinguish.
Local methods depend on the reference point
A derivative evaluated at \(\boldsymbol\theta_0\) describes behaviour near \(\boldsymbol\theta_0\).
For nonlinear models, the ranking of parameters can change elsewhere in parameter space.
This motivates global sensitivity analysis.
One-at-a-time analysis
A simple approach varies one parameter while fixing all others.
This can illustrate direct local or regional effects but cannot reveal interactions that occur when several parameters change together.
Global sensitivity analysis
Global methods vary parameters across specified ranges or probability distributions and quantify their influence across that wider uncertainty space.
The result therefore depends on the chosen ranges or distributions as well as the mathematical model.
Parameter ranges matter
A parameter allowed to vary over a very wide range may appear more influential simply because more uncertainty was assigned to it.
Global sensitivity results should always be reported together with the input ranges or distributions used.
Sampling parameter space
Monte Carlo sampling draws parameter vectors
\[\boldsymbol\theta^{(1)},\ldots,\boldsymbol\theta^{(M)}\]from specified distributions, runs the model for each draw and compares input variation with output variation.
Latin hypercube and quasi-random designs can cover parameter space more efficiently than naive independent sampling in some settings.
Rank-based sensitivity
Spearman rank correlation measures monotonic association between an input parameter and an output using ranks rather than raw values.
Partial rank correlation coefficients can attempt to measure the association of one parameter with the output after accounting for other sampled parameters.
These methods are most informative when relationships are approximately monotonic.
Variance-based sensitivity
Suppose model output variance is
\[\operatorname{Var}(Y).\]Variance-based methods partition this variation among uncertain inputs and their interactions.
The first-order Sobol index for parameter \(\theta_j\) is
\[\boxed{S_j=\frac{\operatorname{Var}_{\theta_j}\!\left(E[Y\mid\theta_j]\right)}{\operatorname{Var}(Y)}}.\]It measures the fraction of output variance attributable to \(\theta_j\) alone under the specified input distributions.
Total-effect index
A total-effect index includes the parameter's own contribution and all interactions involving that parameter. One representation is
\[\boxed{S_{T_j}=1-\frac{\operatorname{Var}_{\boldsymbol\theta_{-j}}\!\left(E[Y\mid\boldsymbol\theta_{-j}]\right)}{\operatorname{Var}(Y)}}.\]A large difference between total and first-order indices indicates substantial interaction effects.
Parameter interactions
Suppose neither \(\theta_1\) nor \(\theta_2\) has a large effect alone, but changing them together strongly alters the output.
One-at-a-time methods can miss this behaviour. Global methods that include interaction terms are designed to detect it.
Morris screening
The Morris method perturbs inputs across parameter space and calculates elementary effects.
It is often used as a relatively economical screening method when a model has many uncertain parameters and full variance decomposition would be expensive.
Sensitivity of thresholds
Biological conclusions often depend on derived thresholds rather than raw states.
For example, if
\[R_0=\frac{\beta}{\gamma},\]then
\[\frac{\partial R_0}{\partial\beta}=\frac1\gamma,\qquad\frac{\partial R_0}{\partial\gamma}=-\frac{\beta}{\gamma^2}.\]This directly shows the local effects of transmission and recovery parameters on the threshold quantity.
Sensitivity of an epidemic peak
If
\[I_{\max}(\boldsymbol\theta)=\max_t I(t;\boldsymbol\theta),\]sensitivity analysis can ask how the peak changes with transmission, recovery or intervention parameters.
Peak-based outputs can be less smooth than state values at fixed times, so numerical derivatives should be checked carefully.
Sensitivity of event times
An output may be a time such as the epidemic peak time \(t_{\mathrm{peak}}\). Its parameter sensitivity can differ greatly from the sensitivity of peak magnitude.
This reinforces why the output of interest must be stated before ranking parameters.
Stochastic models
For stochastic models, a single simulated trajectory contains Monte Carlo variation. Sensitivity may instead be defined for quantities such as
\[E[Y],\qquad\operatorname{Var}(Y),\qquad P(Y>c).\]Repeated simulations are usually required to estimate how these summaries change with parameters.
Monte Carlo noise
If two parameter settings are compared using independent random simulations, simulation noise can obscure small sensitivity effects.
Increasing the number of simulations or using carefully designed common-random-number methods can improve comparisons.
Sensitivity is not uncertainty
A parameter can have high sensitivity but be known very precisely, producing little contribution to predictive uncertainty.
Another parameter can have moderate sensitivity but be highly uncertain and therefore contribute substantially to uncertainty in predictions.
Sensitivity and uncertainty should therefore be analysed together.
Sensitivity is not importance in every sense
A highly sensitive parameter is mathematically influential for the chosen output, but it is not automatically the most biologically controllable or the best intervention target.
Feasibility, uncertainty, causal interpretation and intervention cost also matter.
Local versus global methods
| Local sensitivity | Global sensitivity |
|---|---|
| near one parameter vector | across specified ranges or distributions |
| often derivative-based | often sampling-based |
| computationally efficient | usually more computationally expensive |
| may miss nonlinear interactions away from the reference point | can quantify wider nonlinear and interaction effects |
A practical workflow
Choose the biological output, specify parameter values or uncertainty ranges, select local or global methods, compute sensitivity measures, check numerical stability, interpret signs and magnitudes, and repeat for other important outputs.
Results should be reported with the reference parameter set or input distributions used.
Transition to uncertainty quantification
Sensitivity analysis tells us how model outputs respond to changes in inputs. The next question is how uncertainty in those inputs propagates into uncertainty in biological predictions. The next lesson develops uncertainty quantification.