Tutorials › Quantitative Systems Pharmacology (QSP) › Combining Parameter, Residual, and Between-Patient Uncertainty

Propagating Uncertainty to Clinical Predictions · Tutorial 732 of 799

Combining Parameter, Residual, and Between-Patient Uncertainty

Build predictive distributions that include exactly the uncertainty components relevant to the clinical quantity being predicted.

Advanced 12 min read

What You'll Learn

  • Distinguish parameter uncertainty from between-patient variability and residual error.
  • Use the law of total variance to decompose predictive uncertainty across these layers.
  • Decide which components belong in predictions of latent outcomes, observed outcomes, and cohort means.
  • Calculate predictive intervals and threshold probabilities with worked numerical examples.
  • Diagnose omissions, double counting, and inappropriate normal approximations.

Why a Prediction Needs More Than One Uncertainty Layer

A QSP model can be uncertain in several distinct ways. Its parameters may not be precisely known; patients may differ even when they share the same parameter values; and an individual’s measured outcome may depart from the model’s latent expected outcome. These sources are not interchangeable. Whether each belongs in a predictive distribution depends on the clinical quantity being predicted.

For example, a prediction for one future patient’s measured biomarker generally includes uncertainty in the model parameters, variability among patients, and measurement or residual error. A prediction for the average latent response in a hypothetical population has a different target: individual residual error does not describe uncertainty in that population mean. The calculation should begin by defining the target, not by adding every available variance.

Definition: Let \(\Theta\) denote uncertain model parameters, \(B\) a patient-specific effect, and \(Y\) a clinical outcome. Parameter uncertainty describes uncertainty about \(\Theta\); between-patient variability describes variation in \(B\) across patients conditional on the model; and residual error describes variation in an observed outcome around its conditional expectation. These are separate components of a predictive distribution when the model represents them separately.

The parameter distribution represents uncertainty about which model parameter values are compatible with the available evidence. It is not itself a distribution of different biological parameter values across patients. Patient variability is represented separately, often through a distribution for \(B\). Residual error is also distinct: it may represent measurement error, unexplained within-patient variation, or both, depending on the observation model.

A Hierarchical Model and Its Variance Decomposition

A useful general representation is \(Y=m(\Theta,B)+\varepsilon\), where \(m(\Theta,B)\) is the conditional expected outcome for specified parameter values and patient effect, and \(\varepsilon\) has conditional mean zero. Assume first that the predictive distribution is formed by drawing \(\Theta\) from an uncertainty distribution, then drawing \(B\) from its patient distribution conditional on \(\Theta\), then drawing residual error conditional on \(\Theta\) and \(B\). The distributions need not be independent: for example, the distribution of patient effects may depend on parameter values.

Write \(v(\Theta,B)=\operatorname{Var}(Y\mid\Theta,B)\). Applying the law of total variance first across parameter values and then across patients gives the following decomposition:

$$ \begin{aligned} \operatorname{Var}(Y) &=\operatorname{Var}_{\Theta}\!\left(E[Y\mid\Theta]\right) +E_{\Theta}\!\left[\operatorname{Var}(Y\mid\Theta)\right] \\ &=\operatorname{Var}_{\Theta}\!\left(E_{B}[m(\Theta,B)\mid\Theta]\right) +E_{\Theta}\!\left[\operatorname{Var}_{B}(m(\Theta,B)\mid\Theta)\right] +E_{\Theta,B}\!\left[v(\Theta,B)\right]. \end{aligned} $$

The first term is the contribution from parameter uncertainty in the parameter-specific mean prediction. The second is between-patient variability in the latent expected outcome. The third is residual variance for an observed outcome. This decomposition assumes that residual error has conditional mean zero; if it has a nonzero conditional mean, that mean must be included in the conditional expectation rather than treated as zero-mean error.

Key distinction: The three terms above decompose the variance of a single future observed outcome. For a prediction of a latent outcome \(m(\Theta,B)\), omit the residual term. For a prediction of a population-average latent outcome, average over \(B\) within each parameter draw; do not include the variation of individual \(B\) values as if the target were one randomly selected patient.

This is a variance identity, not a claim that the predictive distribution is normal. Even if each conditional distribution is normal, mixing over uncertain parameters or patient effects can produce skewed or multimodal predictions. In such cases, predictive quantiles from the full distribution are usually more informative than an interval constructed from the total variance alone.

Worked Example: One Patient’s Latent and Observed Biomarker

Worked Example: One Patient’s Latent and Observed Biomarker

Suppose a hypothetical QSP prediction for a biomarker in mg/L is \(Y=\Theta+B+\varepsilon\). Let \(\Theta\sim N(10,4)\), \(B\sim N(0,9)\), and \(\varepsilon\sim N(0,4)\), with the three terms independent. The second argument of each normal distribution is its variance. Find central 95% normal predictive intervals for (a) the latent expected biomarker in a randomly selected patient and (b) that patient’s observed biomarker.

For the latent expected biomarker, \(Y_{\mathrm{latent}}=\Theta+B\). Its mean is \(10+0=10\) mg/L. Independence means the parameter and patient-effect variances add:

$$ \operatorname{Var}(Y_{\mathrm{latent}})=4+9=13\;(\mathrm{mg/L})^2. $$

Because the sum of independent normal variables is normal, a central 95% interval is the mean plus or minus \(1.96\) standard deviations:

$$ 10\pm1.96\sqrt{13} \approx(2.93,\ 17.07)\ \mathrm{mg/L}. $$

For the observed biomarker, residual variance is also included. Its mean remains 10 mg/L, and its variance is \(4+9+4=17\;(\mathrm{mg/L})^2\). Thus:

$$ 10\pm1.96\sqrt{17} \approx(1.92,\ 18.08)\ \mathrm{mg/L}. $$

These intervals describe model-based predictive distributions under the stated assumptions, not confidence intervals for a fixed unknown mean. The observed-outcome interval is wider because it includes residual error as well as parameter uncertainty and patient variability.

Worked Example: A Threshold Probability Under Parameter Uncertainty

Worked Example: A Threshold Probability Under Parameter Uncertainty

Consider a second hypothetical prediction in which the uncertain parameter draw gives a conditional mean of either 10 or 6 mg/L, each with probability 0.5. For a patient, let \(B\sim N(0,9)\) and \(\varepsilon\sim N(0,4)\), independent of each other and of the parameter draw. Find the probability that the observed biomarker exceeds 3 mg/L.

Conditional on either parameter draw, the combined patient and residual variance is \(9+4=13\;(\mathrm{mg/L})^2\). If the conditional mean is 10, the standardized threshold is \((3-10)/\sqrt{13}=-7/\sqrt{13}\), so the exceedance probability is \(\Phi(7/\sqrt{13})\). If the conditional mean is 6, it is \(\Phi(3/\sqrt{13})\). Averaging the conditional probabilities using the parameter-draw probabilities gives:

$$ \begin{aligned} P(Y>3) &=0.5\,\Phi(7/\sqrt{13})+0.5\,\Phi(3/\sqrt{13})\\ &\approx0.5(0.9739)+0.5(0.7973)\\ &\approx0.8856. \end{aligned} $$

Under this predictive model, the probability that one future patient’s observed biomarker exceeds 3 mg/L is approximately 0.8856. The parameter uncertainty is represented by the mixture of conditional distributions. Replacing that mixture with a single normal distribution having the same mean and variance may give a convenient approximation, but it need not preserve this threshold probability.

Worked Example: Predicting a Cohort Mean

Worked Example: Predicting a Cohort Mean

Suppose 25 new patients are simulated under the model \(Y_i=\Theta+B_i+\varepsilon_i\), with the same hypothetical distributions as in the first example. Assume one common parameter draw \(\Theta\) applies to all 25 patients, while patient effects and residual errors are mutually independent across patients and independent of \(\Theta\). Find the predictive variance and an approximate central 95% interval for the mean observed biomarker across the 25 patients.

The cohort mean is \(\bar{Y}_{25}=\Theta+\bar{B}+\bar{\varepsilon}\). Because the parameter draw is common to all patients, its variance remains 4; it is not divided by 25. The independent patient effects and residual errors average across patients, so their variances are divided by 25:

$$ \operatorname{Var}(\bar{Y}_{25}) =4+\frac{9}{25}+\frac{4}{25} =4.52\;(\mathrm{mg/L})^2. $$

The expected cohort mean is 10 mg/L. Under the normal and independence assumptions, the predictive distribution is normal, so the interval is:

$$ 10\pm1.96\sqrt{4.52} \approx(5.83,\ 14.17)\ \mathrm{mg/L}. $$

The interval is much narrower than the single-patient observed-outcome interval for the patient-specific components, because independent patient effects and residual errors average out. Parameter uncertainty remains shared across the cohort. If patients share additional correlated effects, their contribution will not in general shrink by a factor of 25.

Constructing the Prediction and Checking It

A practical simulation should follow the hierarchy represented in the model. For each predictive replicate, draw a parameter set, then generate the patient-level quantities relevant to the target, and finally generate residual error only when predicting an observed outcome. Preserve any dependence specified by the model: for example, draw correlated parameters jointly rather than independently, and use the appropriate conditional patient-effect distribution.

1
Define the target.
State whether the prediction is for a latent individual response, an observed individual outcome, a population mean, or another clinical quantity.
2
Identify the uncertainty layers.
List parameter uncertainty, patient variability, and residual error separately; include a layer only if it contributes to the defined target.
3
Propagate the joint model.
Draw or calculate across layers in their specified conditional structure, keeping shared quantities shared across patients where appropriate.
4
Summarize the predictive distribution.
Report a mean or median and suitable predictive quantiles or a clinically relevant probability, with units and the target population stated.

Useful diagnostics include checking that conditional means and variances match the model, confirming that each uncertainty source is included exactly once, and comparing simulated component variances with analytic values in simple cases. For simulated intervals, assess Monte Carlo precision by repeating the calculation with more replicates or independent runs. Unstable tail quantiles can indicate too few replicates, while unexpected shifts in the mean can signal coding errors or an incorrect weighting of parameter draws.

A common mistake is to treat the standard error for a cohort average as though it were the uncertainty of one patient’s outcome. Dividing every variance by the cohort size incorrectly shrinks uncertainty in a common parameter draw. The reverse mistake is to include full individual patient and residual variances in a cohort mean without accounting for averaging. The correct calculation follows the sampling structure: shared parameter uncertainty remains, while independent patient-level contributions shrink with cohort size.

Another pitfall is to add standard deviations rather than variances. For independent additive components, variances add; standard deviations are obtained by taking the square root of the total variance. If components are dependent, covariance terms also matter, so simply summing variances is not justified. Finally, a normal interval based on the total variance can misrepresent skewed or multimodal predictions. In that case, summarize the simulated or otherwise calculated predictive distribution directly rather than assuming a normal shape.

Key takeaway: Predictive uncertainty belongs to a defined target. Parameter uncertainty describes uncertainty in model inputs; patient variability describes differences among patients; residual error describes the observed outcome conditional on the latent model prediction. Include, average, or omit each component according to how the clinical prediction is defined.

Check Your Understanding

Answer each question using the target and assumptions stated.

  1. A latent individual response has parameter variance 2 and between-patient variance 5, in squared outcome units. What is its predictive variance if these components are independent?
  2. For an observed individual outcome, add residual variance 3 to the components in Question 1. What is the total variance?
  3. For a mean of 10 independent patients, parameter uncertainty is common across patients, while patient variance is 5 and residual variance is 3 per patient. Give the predictive variance of the cohort mean, assuming independence across patients for the latter two components.
  4. Why should residual variance usually be excluded when predicting a latent expected response?

Solutions. (1) \(2+5=7\) squared units. (2) \(2+5+3=10\) squared units. (3) The common parameter contribution remains 2, while the independent patient and residual contributions are divided by 10: \(2+5/10+3/10=2.8\) squared units. (4) Residual error describes deviation of an observed outcome from its conditional expectation; the latent expected response is that expectation, so residual error is not part of its predictive target.

Clinical Biostats