Tutorials › Pharmacometric Workflows and Reproducible Modeling › Summarizing Population Profiles And Quantiles

Simulation Pipelines · Tutorial 266 of 399

Summarizing Population Profiles And Quantiles

Build and interpret population profiles and pointwise quantile bands while preserving the intended target covariate distribution.

Advanced 11 min read

What You'll Learn

  • Define time-specific population means, medians, and quantiles from simulated individual profiles.
  • Calculate empirical and weighted quantiles across subjects at each time.
  • Explain why the target covariate distribution determines the population summary.
  • Distinguish pointwise percentile bands from intervals for complete trajectories.
  • Diagnose aggregation, weighting, and simulation-size problems in population profiles.

From Individual Profiles to a Population Summary

A simulation pipeline can produce a time-varying profile for every virtual subject. A population profile compresses those individual results into summaries that can be compared across time or scenarios. That compression is useful only when the summary matches the question: an average concentration profile and a median concentration profile can differ substantially, and both depend on which covariate population the simulation represents.

Let \(Y_i(t)\) denote the simulated value for subject \(i\) at time \(t\), for \(i=1,\ldots,n\). The value might be a model-predicted concentration, response, or another endpoint. At any fixed time, the \(n\) values \(Y_1(t),\ldots,Y_n(t)\) form a simulated cross-section of the population. Summarizing that cross-section separately at each time produces a population profile.

Definition: The empirical population mean profile at time \(t\) is \(\bar{Y}(t)=n^{-1}\sum_{i=1}^{n}Y_i(t)\). The empirical population median profile is the median of \(Y_1(t),\ldots,Y_n(t)\) at each \(t\). A pointwise percentile band is formed by calculating specified quantiles, such as the 10th and 90th percentiles, separately at each time.

These are summaries across subjects, not summaries across time within a subject. For example, the 90th percentile at hour 4 is calculated from the subjects’ hour-4 values; it is not the 90th percentile of each subject’s whole trajectory. The word pointwise matters: a band made from time-specific quantiles describes the distribution at each displayed time, not a range guaranteed to contain a chosen proportion of complete trajectories.

The Target Population Defines the Summary

A simulated profile is a function of subject characteristics and model variation. Write \(Z\) for the covariates and other subject-level inputs drawn from the intended target population, and write \(Y(t;Z)\) for the resulting value at time \(t\). The target population mean is the expected profile value under the target distribution of \(Z\), while the target median and other quantiles are quantiles of that same distribution of profile values.

$$ \mu_Y(t)=E_G[Y(t;Z)], \qquad Q_p(t)=\inf\{y:F_{Y(t;Z),G}(y)\ge p\}. $$

Here \(G\) denotes the target distribution of covariates and any other simulated subject-level variation included in the estimand. \(F_{Y(t;Z),G}\) is the cumulative distribution of values at time \(t\) when subjects follow that target distribution. Thus, changing \(G\) can change the mean, median, and percentile band even if the model and dose are unchanged. The earlier material on standardizing predictions to a reference population provides the relevant distinction: summaries describe the population over which predictions are averaged, not an abstract population independent of the covariate mix.

If subjects are sampled independently from \(G\) and all are equally weighted, ordinary sample summaries approximate these target summaries. If the simulated subjects instead come from a proposal distribution or a deliberately different set of stratum proportions, unweighted summaries describe that simulated mix—not necessarily the target population. For target strata \(h=1,\ldots,H\) with target proportions \(\pi_h\), a stratum-standardized mean can be formed as \(\sum_h\pi_h\bar{Y}_h(t)\). For quantiles, the target distribution must likewise be reconstructed using the target stratum proportions; simply averaging stratum-specific quantiles generally does not produce the target quantile.

Worked Example: Calculating Pointwise Means and Quantiles

Suppose five hypothetical virtual subjects have the following predicted values at three times. The values are in mg/L.

SubjectTime 0 hTime 2 hTime 4 h
A084
B0126
C0168
D02412
E04020

At 2 h, the arithmetic mean is

$$ \bar{Y}(2)=\frac{8+12+16+24+40}{5} =\frac{100}{5}=20\text{ mg/L}. $$

The sorted values are 8, 12, 16, 24, and 40 mg/L, so the median is 16 mg/L. Using the nearest-rank empirical quantile convention, the \(p\)th quantile is the observation with rank \(\lceil np\rceil\) in the sorted values. The 10th percentile has rank \(\lceil5(0.10)\rceil=1\), or 8 mg/L; the 90th percentile has rank \(\lceil5(0.90)\rceil=5\), or 40 mg/L. At 4 h, the mean is \((4+6+8+12+20)/5=10\) mg/L, the median is 8 mg/L, and the nearest-rank 10th and 90th percentiles are 4 and 20 mg/L.

These calculations define summaries at each sampled time. The resulting 10th-to-90th percentile band spans 8–40 mg/L at 2 h and 4–20 mg/L at 4 h. With only five subjects, these empirical quantiles are coarse; the example illustrates the calculation, not a recommendation for a virtual-population size.

Why the Calculations Approximate the Target

The justification for ordinary aggregation is direct. Suppose, at a fixed time \(t\), the simulated subjects are independent draws from the target population and \(E[|Y(t;Z)|]\) is finite. Each \(Y_i(t)\) then has the target mean \(\mu_Y(t)\). Linearity of expectation gives

$$ E[\bar{Y}(t)] =E\left[\frac{1}{n}\sum_{i=1}^{n}Y_i(t)\right] =\frac{1}{n}\sum_{i=1}^{n}E[Y_i(t)] =\mu_Y(t). $$

If the variance is finite and equals \(\sigma_Y^2(t)\), independence also gives \(\operatorname{Var}[\bar{Y}(t)]=\sigma_Y^2(t)/n\). Thus the sample mean is centered on the target mean, and its Monte Carlo variation decreases as \(n\) grows. For quantiles, the empirical cumulative distribution at a fixed \(t\) is the fraction of simulated values no greater than a given value. Under independent sampling from the target distribution, that fraction estimates the target cumulative probability; the empirical quantile locates where that estimated cumulative distribution reaches \(p\). Quantile estimates can be unstable when the distribution has sparse data near the quantile, has substantial ties, or has a sharp change in its cumulative distribution.

This argument is pointwise in time. Values at different times for the same subject are usually dependent, but that dependence does not prevent calculating a valid mean or quantile at each time. It does matter for interpreting the entire profile: pointwise summaries do not preserve which subjects occupy the upper or lower part of the distribution at all times.

Weighted Summaries for a Target Covariate Mix

When a simulated set does not reproduce target proportions, subject weights can restore the intended mixture. Let \(w_i\ge0\) be weights proportional to each subject’s contribution to the target distribution, with \(\sum_i w_i=1\). The weighted mean is \(\sum_iw_iY_i(t)\). A weighted empirical distribution assigns mass \(w_i\) to the value \(Y_i(t)\); its \(p\)th quantile is the smallest value at which the cumulative weight in the sorted observations is at least \(p\). This is a discrete weighted quantile convention. Software can use other interpolation rules, so the convention should be documented when exact reproducibility matters.

Worked Example: Correcting a Stratum Imbalance

Suppose the target population is 75% in a low-clearance stratum and 25% in a high-clearance stratum. At 4 h, the simulated stratum means are 4 mg/L and 12 mg/L, respectively. The simulated set happens to contain equal numbers from the two strata.

The unweighted mean describes a 50:50 mixture:

$$ \bar{Y}_{\text{unweighted}}(4) =\frac{4+12}{2}=8\text{ mg/L}. $$

For the target mixture, standardize the stratum means using the target proportions:

$$ \bar{Y}_{G}(4)=0.75(4)+0.25(12)=3+3=6\text{ mg/L}. $$

For a simple illustration of the quantiles, suppose values within each stratum are constant at those respective means. The target distribution then puts 0.75 of its mass at 4 mg/L and 0.25 at 12 mg/L. Its median is 4 mg/L, because the cumulative target mass reaches 0.50 at 4 mg/L; its 90th percentile is 12 mg/L, because the cumulative mass at 4 mg/L is only 0.75. In this example the unweighted mixture would instead put half its mass at each value, so its 90th percentile is 12 mg/L as well, but its median depends on the selected empirical median convention. The mean clearly changes, and other mixtures need not preserve either quantile. Reweighting is therefore required to represent the target mix, not merely to adjust the mean.

Worked Example: Calculating a Weighted Quantile

At a selected time, four hypothetical subjects have values 5, 7, 11, and 20 mg/L, with normalized target weights 0.10, 0.20, 0.50, and 0.20. The weighted mean is

$$ 0.10(5)+0.20(7)+0.50(11)+0.20(20) =0.5+1.4+5.5+4.0=11.4\text{ mg/L}. $$

The values are already sorted. Their cumulative weights are 0.10 at 5 mg/L, 0.30 at 7 mg/L, 0.80 at 11 mg/L, and 1.00 at 20 mg/L. Under the stated weighted empirical convention, the median is 11 mg/L, since cumulative weight first reaches 0.50 there. The 90th percentile is 20 mg/L, since cumulative weight at 11 mg/L is only 0.80. This calculation illustrates why a quantile should be computed from the weighted distribution itself, rather than by applying weights to already-calculated quantiles.

Choosing and Reading a Profile Summary

The mean is sensitive to large values and retains the arithmetic balance of the population. The median is less affected by a small number of extreme values and identifies the middle of the distribution at each time. Percentile bands show distributional spread beyond a single center. These summaries answer different questions; none is universally preferable. For a strongly skewed distribution, for example, the mean may lie above the median because a small number of subjects have high values.

The band is not a confidence interval for the mean, and it is not an interval for parameter uncertainty. It describes the simulated distribution of individual values at each time under the model and target population represented by the simulation. Whether residual error is included also changes the estimand: a band of model-predicted values and a band of simulated observations need not have the same width. State which kind of profile is being summarized.

A pointwise 10th-to-90th percentile band means that, at each time considered separately, the specified lower and upper quantiles are intended to enclose the central 80% of the target distribution. It does not mean that 80% of subjects’ complete trajectories remain inside the band at every time. Quantiles at adjacent times may also be determined by different subjects; joining them with lines does not turn those boundaries into individual trajectories.

Diagnostics, Alternatives, and Limitations

Before interpreting a profile, check that every subject’s value is aligned to the same intended time, dose history, endpoint definition, and units. A row shift or mismatched time grid can create a smooth-looking but invalid summary. Inspect the number of simulated subjects, the mean and quantiles at selected times, and the distribution across target strata. If the weighted and unweighted summaries differ markedly, determine whether that difference is expected from the target mix or signals incorrect weights. Also examine extreme values and ties: a few extreme values can pull the mean, while many ties or a small effective representation of a stratum can make empirical quantiles jump abruptly.

The main alternatives are not competing formulas for the same estimand. An unweighted summary is appropriate when the simulated subjects represent the target population with the intended proportions. A weighted summary or stratum-standardized result is appropriate when the simulation design differs from those proportions but target weights are available. Separate stratum profiles are useful when the subgroup distributions themselves matter; they should not be mistaken for an overall target profile. If the question concerns complete subject trajectories rather than cross-sectional distributions at each time, inspect and summarize trajectories directly rather than treating pointwise bands as simultaneous trajectory bounds.

All summaries remain conditional on the model, inputs, simulated population, and included sources of variation. A finite set can approximate its target imperfectly, especially in the tails; a larger virtual population reduces Monte Carlo noise but cannot correct an incorrect target distribution or model. Quantile interpolation conventions can also produce slightly different values from the same finite sample. Report the population definition, weighting approach, time grid, quantile convention, and whether residual variation is included.

Common pitfall: “The simulation contains equal numbers from the two covariate strata, so its unweighted profile is the target population profile.” This is correct only if the target population is also 50:50. Otherwise, the unweighted summary describes the simulated allocation; use target weights or target-proportion standardization to estimate the intended population summary.
1
Define the estimand.
Specify the endpoint, whether values are predictions or observations, the target population, and the desired mean, median, or quantiles.
2
Check the simulation representation.
Confirm aligned times and determine whether equal subject weights represent the target covariate distribution.
3
Aggregate at each time.
Calculate the requested summary across subjects at each time, applying target weights where needed.
4
Interpret and report.
Label pointwise bands as population-distribution quantiles, and document the population, units, weights, and quantile convention.

Check Your Understanding

Answer each question, then compare your work with the solutions below.

  1. At one time, the simulated values are 2, 4, 6, and 20 mg/L. Calculate the mean and median. Which summary is more affected by the largest value?
  2. A target population is 60% in stratum A and 40% in stratum B. The stratum means are 5 and 15 mg/L. Calculate the target-standardized mean.
  3. Explain why a pointwise 10th-to-90th percentile band is not necessarily an interval containing 80% of complete subject trajectories throughout the dosing interval.
  4. For sorted weighted values 3, 8, and 14 mg/L with weights 0.20, 0.55, and 0.25, calculate the weighted median using the cumulative-weight convention in this tutorial.

Solutions. (1) The mean is \((2+4+6+20)/4=32/4=8\) mg/L. The median is \((4+6)/2=5\) mg/L. The mean is more affected by the value 20 mg/L. (2) The target-standardized mean is \(0.60(5)+0.40(15)=3+6=9\) mg/L. (3) The band is calculated separately at each time, and the subjects defining a boundary can differ over time; pointwise coverage does not imply that the same proportion of entire trajectories stays inside the band at every time. (4) Cumulative weights are 0.20 at 3 mg/L and 0.75 at 8 mg/L, so the weighted median is 8 mg/L.

Clinical Biostats