From Parameter Samples to Clinical Outcomes
A QSP model links a set of mechanistic parameters to a clinical prediction under a specified regimen and target. When the parameters are represented by an ensemble rather than one selected estimate, each ensemble member can be run through the same model and scenario. The resulting outcomes form an empirical predictive distribution: a finite representation of the outcomes implied by that ensemble.
The key operation is not merely to collect model outputs. If parameter samples have unequal weights, those weights describe how much each sample contributes to the ensemble’s represented distribution. Dropping them changes the distribution being summarized. The introductory material on defining the predictive target establishes the need to specify the outcome and scenario; here, assume that target is fixed and focus on mapping and summarizing its outcomes.
The outcome \(y_i\) might be a biomarker concentration at a prespecified visit, a change from baseline, or another scalar endpoint defined for the scenario. It carries the endpoint’s units. If two parameter samples produce the same outcome, their masses accumulate at that outcome. For an unweighted ensemble, the empirical distribution is the ordinary distribution of the simulated values. For a weighted ensemble, it is the distribution of those values after assigning each sample its normalized mass.
Assumptions Before Summarizing
A weighted empirical distribution is meaningful only relative to a clear interpretation of the ensemble. The weights must be nonnegative, have a positive total, and correspond to the distribution the ensemble is intended to represent. They may be supplied already normalized or may be relative weights that need normalization. An unweighted ensemble assumes equal contribution from every sample.
The mapping also requires a consistent forward simulation. Use the same clinical scenario, endpoint definition, units, and model implementation for every sample. If the scenario changes between runs, differences among outputs no longer represent the effect of mapping the given ensemble to one common target. Numerical solver settings should be accurate enough that solver error is not mistaken for meaningful variation among samples.
This tutorial treats the model output as a deterministic function of each parameter sample and the fixed scenario. Thus the empirical distribution described here is the distribution of mapped ensemble outputs. If a modeling workflow includes additional stochastic outcome generation, that needs a clearly specified sampling design; it should not be mixed into these summaries without accounting for how those additional draws are weighted.
Constructing the Empirical Distribution
For a scalar outcome, the weighted empirical cumulative distribution function (CDF) at any value \(z\) is the total normalized weight on outcomes no greater than \(z\). This definition gives both the distribution itself and a direct way to calculate probabilities of ranges of outcomes.
Here, \(\mathbf{1}(y_i\le z)\) equals 1 when the condition is true and 0 otherwise. For example, \(\widehat{F}(z)\) is the ensemble weight assigned to outcomes at or below \(z\). When all samples are unweighted, substituting \(w_i=1/n\) gives the fraction of simulated outcomes at or below \(z\).
A weighted mean is the average outcome under this finite distribution. The corresponding variance is the weighted average squared distance from that mean. These are summaries of the empirical distribution, not a replacement for it: distinct distributions can share the same mean.
The variance formula above describes spread under the normalized empirical distribution; it is not an unbiased sample-variance correction. For equal weights, it divides the sum of squared deviations by \(n\). A weighted median can also be defined as the smallest observed outcome at which the cumulative weight reaches or exceeds 0.5. Which summaries are useful depends on the clinical question, but all must retain the same weights used to define the distribution.
Worked Example: An Unweighted Ensemble
Suppose four parameter sets are simulated for the same hypothetical treatment scenario. The model predicts a reduction in a biomarker at week 12 of 10, 14, 16, and 20 percentage points, respectively. The ensemble is unweighted, so each output has mass \(1/4=0.25\).
The empirical CDF at 14 percentage points is the weight on outcomes less than or equal to 14:
Thus half of the ensemble mass predicts a reduction no greater than 14 percentage points. The mean is:
For the variance, the deviations from 15.0 are \(-5,-1,1,5\) percentage points. Therefore:
These calculations describe the four equally weighted model outputs. They do not imply that every possible outcome lies between 10 and 20 percentage points; the empirical distribution has mass only at the four simulated values.
Retaining Unequal Weights
For relative weights \(a_i\), normalize once and then use \(w_i\) consistently. Multiplying every relative weight by the same positive constant does not change the normalized distribution. By contrast, replacing unequal weights with equal weights generally does change it.
Worked Example: Normalize Weights Before Summarizing
Consider three hypothetical parameter samples with predicted week-12 biomarker concentrations of 8, 12, and 24 nanograms per milliliter. Their supplied relative weights are 2, 5, and 3. The total weight is \(2+5+3=10\), so the normalized weights are 0.20, 0.50, and 0.30.
The weighted mean concentration is:
The CDF at 12 ng/mL includes the first two samples, so \(\widehat{F}(12)=0.20+0.50=0.70\). In words, 70% of the ensemble’s represented mass predicts a concentration at or below 12 ng/mL. The weighted median is 12 ng/mL, because the cumulative mass reaches 0.20 at 8 ng/mL and 0.70 at 12 ng/mL.
For the weighted variance, the squared deviations from 14.8 are 46.24, 7.84, and 84.64 \((\text{ng/mL})^2\):
The weighted standard deviation is \(\sqrt{38.56}=6.210\) ng/mL. Each result follows from the normalized masses, not from the number of parameter samples alone.
Why the Weighting Choice Changes the Prediction
The weighted empirical distribution can be viewed as a finite approximation to a distribution over parameter values. If \(P\) denotes the distribution that the ensemble is intended to represent, the predictive distribution is obtained by mapping parameter values through the model outcome function. In particular, the probability of an outcome no greater than \(z\) is the probability that the corresponding parameter value maps to an outcome no greater than \(z\). The weighted sample replaces that probability with a sum over its sample points.
This approximation is the justification for carrying weights through the simulation summary: each outcome inherits the mass of the parameter sample that generated it. The same logic applies to averages. The expectation of the mapped outcome is approximated by weighting each simulated value by its normalized mass, giving \(\bar{y}_w\).
Worked Example: Comparing Weighted and Unweighted Summaries
Suppose three hypothetical samples predict a change in a clinical biomarker of 4, 10, and 30 units. Their normalized weights are 0.80, 0.15, and 0.05. These weights may arise from a weighted ensemble; their interpretation depends on how that ensemble was constructed.
The weighted mean change is:
If the weights were incorrectly discarded, the unweighted mean would be:
The difference is not a rounding detail. The unweighted calculation gives the high outcome the same mass as the other two outcomes, whereas the weighted distribution assigns it only 0.05. The appropriate summary is 6.2 units if the supplied weights represent the target ensemble distribution; it is 14.67 units only under an equal-weight interpretation.
Practical Checks and Alternatives
Before interpreting a mapped distribution, check the inputs and the mapping. These checks help detect errors that can produce plausible-looking but incorrect summaries.
- Check weight validity. Confirm that weights are nonnegative, their sum is positive, and normalized weights sum to 1 within numerical tolerance.
- Check the scenario and endpoint. Confirm that each output refers to the same regimen, population target, visit, endpoint definition, and unit.
- Check sample-to-output alignment. Preserve the association between each parameter sample, its weight, and its simulated outcome. A sort or join error can attach a valid weight to the wrong prediction.
- Check model execution. Review failed simulations, non-finite outputs, and solver warnings. Silently removing failed runs changes the represented ensemble unless their treatment is justified and documented.
- Check the effect of weights. Compare weighted and unweighted summaries as a diagnostic. A difference signals that weights matter; it does not, by itself, identify which summary is appropriate.
A single best-fit parameter set is a useful alternative when the question is specifically about the model prediction at that selected set. It does not describe the distribution induced by the full ensemble. Unweighted simulation is appropriate when equal mass is intended; it is not a harmless shortcut for an ensemble with meaningful unequal weights. Resampling parameter sets in proportion to their weights is another way to form an approximately weighted sample, but it introduces resampling variation and may repeat some samples while omitting others. Direct weighted summaries use the supplied masses without that extra sampling step.
The empirical distribution is limited by the ensemble supplied to it. It cannot represent parameter regions absent from the samples, and it does not correct a misspecified model, an unsuitable scenario, or incorrectly assigned weights. Weighted summaries also do not explain why the ensemble has its particular spread. Their defensible interpretation is conditional: they describe model outputs under the chosen scenario, given the represented parameter samples and their weights.
Check Your Understanding
Answer each question, then compare with the solutions below.
- Three outcomes are 5, 9, and 15 milligrams per liter, with normalized weights 0.2, 0.5, and 0.3. What is the weighted mean?
- For the same outcomes and weights, what is the empirical CDF at 9 milligrams per liter?
- Relative weights are 1, 2, and 5. What normalized weights should be used?
- Why can an unweighted mean be inappropriate when parameter samples have unequal weights?
Solutions. (1) The weighted mean is \(0.2(5)+0.5(9)+0.3(15)=1+4.5+4.5=10.0\) mg/L. (2) Outcomes at or below 9 mg/L have weights 0.2 and 0.5, so \(\widehat{F}(9)=0.70\). (3) The total relative weight is 8, giving normalized weights \(1/8=0.125\), \(2/8=0.250\), and \(5/8=0.625\). (4) An unweighted mean assigns equal mass to every sample and therefore generally represents a different distribution from one defined by unequal weights.