Tutorials › Physiologically-Based Pharmacokinetics (PBPK) › Nested Sampling for Parameter Uncertainty and Variability

Uncertainty Propagation and Predictive Intervals · Tutorial 752 of 799

Nested Sampling for Parameter Uncertainty and Variability

Build nested simulations that keep uncertainty about population parameters distinct from variability among individuals, and see why that distinction changes population-level predictions.

Advanced 11 min read

What You'll Learn

  • Distinguish population-parameter uncertainty from individual variability in a PBPK prediction.
  • Specify the conditional sampling structure for nested simulation.
  • Estimate individual prediction distributions and distributions of population summaries.
  • Recognize when independently resampling population parameters across individuals gives the wrong joint predictions.
  • Interpret threshold probabilities without confusing an average risk with a precisely known risk.
  • Diagnose common failures, including double-counting uncertainty and treating parameter uncertainty as biological heterogeneity.

Why the Sampling Structure Matters

A PBPK prediction can vary for two fundamentally different reasons. The population-level parameter values may be uncertain because available data do not determine them exactly. Separately, individuals may differ around those population values because of biological variability. For example, uncertainty in a typical clearance parameter is not the same thing as the actual spread of clearance among people. A simulation intended to describe both needs to represent both sources, and to preserve their distinct roles.

The distinction matters especially when predicting several individuals under one model. A population-level parameter represents the same uncertain model quantity for every individual in that simulated population. Individual-level variability is sampled separately for each individual, conditional on that shared parameter draw. Resampling the population parameter independently for every person changes the dependence among predictions and can make a population mean appear more precise than it should.

Definition: Let \(\theta\) denote a vector of uncertain population-level PBPK parameters, with uncertainty distribution \(p_U(\theta)\). Let \(\eta\) denote individual-level variables, such as random effects or physiological characteristics, with conditional distribution \(p(\eta\mid\theta)\). For a PBPK output \(Y=g(\theta,\eta)\), nested sampling first draws \(\theta\), then draws one or more individual values of \(\eta\) conditional on that same \(\theta\), and evaluates the model for each resulting pair.

The uncertainty distribution \(p_U(\theta)\) must have a stated interpretation: for example, it may be a posterior distribution, an elicited distribution for uncertain inputs, or another justified representation of parameter uncertainty. It is not automatically the distribution of values found across individuals. The individual distribution \(p(\eta\mid\theta)\) should represent the intended biological or physiological variability, with relevant dependencies included. These distributions and the PBPK model must be suitable for the population and prediction target being studied.

The Nested Prediction

For a single future individual, nested sampling approximates the predictive distribution by drawing \(\theta\) from \(p_U(\theta)\), then drawing that individual's \(\eta\) from \(p(\eta\mid\theta)\), and evaluating \(Y=g(\theta,\eta)\). For a simulated group, draw \(\theta\) once for the group and draw separate individual values \(\eta_j\) for its members. Conditional independence of individuals given \(\theta\) is a common assumption, but it is not automatic: shared exposures, family structure, or other dependencies may require a joint distribution for the individual-level variables.

The resulting predictive cumulative distribution function for one individual is

$$ P(Y\leq y)=\int\int \mathbb{I}\{g(\theta,\eta)\leq y\}\,p(\eta\mid\theta)\,p_U(\theta)\,d\eta\,d\theta, $$

where \(\mathbb{I}\{\cdot\}\) equals 1 when the condition inside braces holds and 0 otherwise. In a simulation with \(M\) outer draws and \(N\) individuals per outer draw, write the draws as \(\theta^{(m)}\) and \(\eta^{(m,j)}\). The output for individual \(j\) under outer draw \(m\) is

$$ Y^{(m,j)}=g\!\left(\theta^{(m)},\eta^{(m,j)}\right), \qquad m=1,\ldots,M,\quad j=1,\ldots,N. $$

The pooled values \(Y^{(m,j)}\) represent individual predictions across both uncertainty sources. In contrast, the inner average for each outer draw,

$$ \bar{Y}^{(m)}_{\mathrm{pop}}=\frac{1}{N}\sum_{j=1}^{N}Y^{(m,j)}, $$

approximates the model-implied population mean conditional on \(\theta^{(m)}\). The collection of these outer-level averages describes how that conditional population mean changes across plausible parameter values, subject to finite inner-simulation error.

Why the Nesting Is Correct

The essential feature is that every member of a simulated group uses the same outer draw. To see why, consider two individuals whose individual-level variables are conditionally independent given \(\theta\). Conditional on \(\theta\), their outputs are independent under this assumption. But across the full nested simulation, they share uncertainty about \(\theta\). This yields the identity

$$ \operatorname{Cov}(Y_1,Y_2) = \operatorname{Cov}\!\left(E[Y_1\mid\theta],E[Y_2\mid\theta]\right), $$

when their conditional covariance given \(\theta\) is zero. The identity follows by writing each output as its conditional mean plus a residual: \(Y_j=E[Y_j\mid\theta]+(Y_j-E[Y_j\mid\theta])\). The conditional residuals have mean zero given \(\theta\), so their covariances with functions of \(\theta\) are zero. Taking the covariance leaves the covariance between the two conditional means. Thus shared parameter uncertainty induces dependence in joint predictions, even when individual variability is conditionally independent.

A one-stage simulation can be equivalent to nested sampling for a single individual's marginal prediction if it draws from exactly the same joint distribution \(p_U(\theta)p(\eta\mid\theta)\). The problem is not whether the code uses one loop or two. It is whether the sampling represents the intended joint structure—particularly whether a population parameter is shared across individuals when it should be.

Worked Example: Separating the Two Distributions

Hypothetical model. Suppose a simplified PBPK endpoint \(Y\), in mg/L, is \(Y=\theta+\eta\). The uncertain population-level value \(\theta\) is 10 or 14 mg/L, each with probability 0.5. Conditional on either value, individual variability is represented by \(\eta=-2\) or \(+2\) mg/L, each with probability 0.5. These small discrete distributions are for illustrating the sampling structure; they are not proposed as general physiological models.

Outer draw \(\theta=10\) mg/L. The two inner draws give \(Y=10+(-2)=8\) mg/L and \(Y=10+2=12\) mg/L. Their conditional mean is \((8+12)/2=10\) mg/L.

Outer draw \(\theta=14\) mg/L. The inner outputs are \(14+(-2)=12\) mg/L and \(14+2=16\) mg/L. Their conditional mean is \((12+16)/2=14\) mg/L.

Pooling the four equally likely individual outputs gives 8, 12, 12, and 16 mg/L, with mean \((8+12+12+16)/4=12\) mg/L. The inner means, 10 and 14 mg/L, instead show the variation in the conditional population mean across the two outer parameter draws. These are different summaries: the pooled outputs describe individuals across both sources, while the outer-level means track parameter uncertainty in the population mean.

Worked Consequences for a Simulated Group

Worked Example: Shared Parameter Draws and Cohort Averages

Hypothetical model. Let the predicted concentration be \(Y=\theta V\), where the uncertain population-level value \(\theta\) is 8 or 12 mg/L with equal probability. Individual variability is represented by \(V=0.8\) or \(1.2\), also equally likely, independently across individuals conditional on \(\theta\). The factor \(V\) is dimensionless. Consider a simulated group of two individuals.

For one individual, the mean of \(V\) is 1 and its variance is 0.04. The two possible values of \(\theta\) give \(E[\theta]=10\) mg/L and \(E[\theta^2]=(8^2+12^2)/2=104\;(\mathrm{mg/L})^2\). The individual mean is therefore

$$ E[Y]=E[\theta]E[V]=10\ \mathrm{mg/L}. $$

Conditional on \(\theta\), the individual variance is \(\theta^2(0.04)\). Thus the variance of a single individual's prediction across both sources is

$$ \operatorname{Var}(Y) = \operatorname{Var}(\theta)+E[\operatorname{Var}(Y\mid\theta)] = 4+0.04(104) = 8.16\;(\mathrm{mg/L})^2. $$

For the average of two individuals sharing the same \(\theta\), the conditional variance is \(\theta^2(0.04)/2\), because the individual factors are conditionally independent. The variance of the simulated group average across parameter draws and individual draws is consequently

$$ \operatorname{Var}(\bar{Y}_{\mathrm{group}}) = \operatorname{Var}(\theta)+E\!\left[\frac{\theta^2(0.04)}{2}\right] = 4+2.08 = 6.08\;(\mathrm{mg/L})^2. $$

If instead \(\theta\) is independently redrawn for each person, the two individual predictions become independent draws from the marginal distribution. The variance of their average would then be \(8.16/2=4.08\;(\mathrm{mg/L})^2\). That smaller value reflects a different model: it lets parameter uncertainty average away across people as though each person had a different population parameter. In the nested simulation, uncertainty about the shared population-level value remains in the group average.

Threshold Probabilities and Their Interpretation

Worked Example: Average Risk Versus Conditional Risk

Use the same hypothetical model \(Y=\theta V\), with \(\theta=8\) or \(12\) mg/L equally likely and \(V=0.8\) or \(1.2\) equally likely. Suppose the event of interest is \(Y>10\) mg/L. The four equally likely combinations produce 6.4, 9.6, 9.6, and 14.4 mg/L. Only the last exceeds 10 mg/L, so the predictive probability for one individual, averaged over both uncertainty sources, is \(1/4=0.25\).

The conditional event probability differs by outer draw. At \(\theta=8\) mg/L, neither value of \(V\) exceeds the threshold, so the conditional probability is 0. At \(\theta=12\) mg/L, only \(V=1.2\) exceeds it, so the conditional probability is \(1/2=0.5\). Averaging the two conditional probabilities gives \((0+0.5)/2=0.25\), the same overall predictive probability.

The value 0.25 is an average predictive probability under the specified uncertainty and variability distributions. It does not mean that the conditional risk is 0.25 for every plausible population parameter: in this example, it is either 0 or 0.5. In a cohort simulation, the same outer draw should be used for all members when estimating the cohort's conditional event rate.

Practical Checks and Common Failure Modes

Before interpreting simulation output, verify that the sampling design matches the prediction target. A prediction for one new individual requires one draw from the population-parameter uncertainty distribution and one conditional individual draw. A group prediction requires a shared outer draw for the group, followed by individual-level draws. If the target is the distribution of a population mean across plausible parameters, calculate an inner mean for each outer draw rather than treating every pooled individual output as a separate population mean.

  • Check conditional distributions. For selected outer draws, inspect the range and plausibility of inner outputs. An unexpected shift can reveal a coding error, an incorrect conditional distribution, or a model response to \(\theta\) that was not anticipated.
  • Check parameter sharing. Confirm that a population-level draw is reused where the simulated individuals represent one population under one uncertain model. Accidental redrawing per individual can suppress shared uncertainty in group summaries.
  • Check for double-counting. If a population parameter distribution already includes between-individual variation, adding a separate individual variability distribution for the same source can exaggerate spread.
  • Check the target of every summary. A pooled quantile describes individual predictions across the chosen mixture of sources; an outer distribution of inner means describes uncertainty in a conditional population summary. They answer different questions.
  • Check support and dependence. Outer draws must be valid for the PBPK model, and conditional individual draws must respect required bounds and dependencies. Invalid or implausible inputs can produce misleading outputs even when the simulation loops are implemented correctly.

A common mistake is to combine parameter uncertainty and individual variability into one undifferentiated distribution, draw a value from it independently for each person, and interpret the resulting spread as biological heterogeneity. That may reproduce a single-individual marginal distribution in some cases, but it generally loses the shared-parameter structure for groups. The correction is to state what each distribution represents and preserve the conditional relationship in the joint simulation.

Nested Monte Carlo is not the only valid computational approach. A joint sampler can give the same result if it preserves the same joint distribution and shared outer draws. Deterministic integration or other sampling designs can also approximate the required integrals, especially when simulation cost is high. These alternatives change how the integrals are evaluated, not which uncertainty and variability structure the model should represent. No sampling design can compensate for unsupported distributions, a misspecified PBPK model, or an unclear prediction target.

Check Your Understanding

Answer each question, then compare with the solutions.

  1. A population clearance parameter is uncertain, and individual clearance varies conditionally around it. For a simulated cohort of 20 individuals, which draw is shared and which draws are individual-specific?
  2. In a nested simulation, an outer draw gives a conditional mean concentration of 5 mg/L, and another gives 9 mg/L. What does the difference describe, and what does it not describe?
  3. Suppose a single-individual predictive variance is 12 \((\mathrm{mg/L})^2\). If 4 individuals are simulated with independent outputs and independently resampled population parameters, what is the variance of their average? Why might that not be the right cohort variance?
  4. For a threshold event, conditional probabilities across outer draws are 0.1 and 0.5, with equal outer probabilities. What is the overall predictive event probability, and why should it not be reported as the conditional risk for every parameter draw?

Solutions. 1. Draw the population clearance parameter once for the cohort; draw a separate individual-level value for each of the 20 people conditional on that parameter. 2. It describes how the model-implied conditional population mean changes across parameter uncertainty; it is not the spread among individuals within either parameter draw. 3. Under the stated independent marginal-draw setup, the variance is \(12/4=3\;(\mathrm{mg/L})^2\). It may not be the right variance if the individuals share one uncertain population parameter, because shared parameter uncertainty does not average away in the same way. 4. The overall predictive probability is \((0.1+0.5)/2=0.3\). The conditional risk is 0.1 or 0.5 depending on the outer draw, so 0.3 is their average, not the risk at every parameter value.