Why Weight Candidate Patients?
A candidate population is a finite set of mechanistic parameter vectors generated under some sampling distribution. Its distribution may not resemble the population distribution that the virtual patients are intended to represent. Rejection sampling can retain or discard candidates according to target ranges, but it may be inefficient when only a small fraction qualify. Weighted resampling offers another route: assign each candidate a nonnegative weight reflecting how much it should contribute, then draw the virtual population with probability proportional to those weights.
The weights do not alter the mechanistic parameters of a candidate. They alter the chance that the candidate is selected, so a patient may appear more than once in a resampled population. The method can improve representation of a specified target distribution, but it cannot create patient types absent from the candidate set.
Target-Relative Weights
The ratio corrects for how frequently the candidate-generation process produces a type of patient relative to how frequently that type occurs in the target. If candidates are too common in a region compared with the target, their weights are reduced; if they are underrepresented but present, their weights increase. A common multiplicative constant applied to all weights has no effect on normalized weights.
This ratio has a precise justification when the candidate and target distributions are specified. For any function \(f\) whose target expectation exists,
With a finite candidate set, the corresponding self-normalized estimate is \(\sum_i\tilde{w}_i f(x_i)\). Resampling makes an equal-weight set of patient records whose empirical distribution approximates this weighted candidate distribution. It does not make every realized resample match the target exactly.
The key support assumption is that every patient type with positive target probability can also occur under the candidate distribution. If \(\pi(x)>0\) but \(q(x)=0\), the ratio is undefined and no reweighting of the available candidates can repair the omission. For stable estimates, very large weights should also be uncommon; formally, a useful sufficient condition for variance control is \(E_q[w(X)^2 f(X)^2]<\infty\) for the quantity being estimated. With candidates generated by a stratified or otherwise unequal-probability design, the candidate-generation probabilities must reflect that design rather than being treated as if candidates came from a simple random sample.
Assigning Weights and Drawing Patients
When target and candidate distributions are available as probabilities, use their ratio. In a discrete example with strata \(k\), if the candidate proportion is \(q_k\) and the desired proportion is \(\pi_k\), each candidate in stratum \(k\) receives weight proportional to \(\pi_k/q_k\). The overall weight mass assigned to the stratum is then proportional to its desired target mass, provided candidates are present in that stratum.
In practice, target information may be expressed as distributions or constraints rather than complete density functions. A weighting rule must then be justified by how it represents that information. For example, a target density can assign greater weights to candidates in more plausible regions; an indicator weight can give zero weight to candidates outside a required range. A convenient score is not automatically a probability ratio, and its resulting population should be described as matching the score-based weighting scheme, not as an exact draw from a known target distribution.
After normalizing the weights, common resampling procedures include multinomial resampling, in which each draw independently selects candidate \(i\) with probability \(\tilde{w}_i\), and systematic resampling, which uses one random starting point and evenly spaced positions through cumulative weight. Both produce a sample with expected count \(m\tilde{w}_i\) for candidate \(i\) when the resampled population size is \(m\). The realized counts vary, and resampling with replacement allows duplicates.
Worked Example: Correcting Candidate Stratum Frequencies
Suppose a candidate set has 100 virtual patients: 50 in stratum A, 30 in B, and 20 in C. The target proportions are 0.20, 0.50, and 0.30, respectively. Assume these strata exhaust the target population, every target stratum is represented among candidates, and candidates within each stratum are equally eligible. Calculate the weights and assess concentration.
The candidate proportions are \(q_A=0.50\), \(q_B=0.30\), and \(q_C=0.20\). The target-to-candidate ratios are
The total weight is \(50(0.4000)+30(1.6667)+20(1.500)\), approximately \(20+50+30=100\). Thus the normalized weight of each candidate in A is \(0.4000/100=0.004000\); in B it is approximately \(1.6667/100=0.01667\); and in C it is \(1.500/100=0.01500\). The total normalized weight in each stratum is 0.20, 0.50, and 0.30, as intended.
For a resample of 100 patients, the expected stratum counts are \(100(0.20)=20\), \(100(0.50)=50\), and \(100(0.30)=30\). These are expectations, not guaranteed realized counts. Under the stated assumptions, the candidate set covers all three target strata, so the ratio calculation is defined. It adjusts their frequencies but does not verify or correct any differences within a stratum.
Weight Concentration and Effective Sample Size
A large candidate set can still represent the target poorly if most normalized weight sits on a few patients. A standard concentration diagnostic is the effective sample size (ESS):
The bounds follow from basic inequalities. Since the normalized weights sum to one, \(0\leq\tilde{w}_i\leq1\), so \(\sum_i\tilde{w}_i^2\leq\sum_i\tilde{w}_i=1\), giving \(N_{\mathrm{eff}}\geq1\). By the Cauchy–Schwarz inequality, \((\sum_i\tilde{w}_i)^2\leq N\sum_i\tilde{w}_i^2\); the left side is one, so \(\sum_i\tilde{w}_i^2\geq1/N\) and \(N_{\mathrm{eff}}\leq N\). Equality at the upper bound occurs for equal weights.
ESS is a summary of weight concentration, not the literal number of unique patients in a resample, nor a guarantee of independent information. Resampling cannot restore information lost through concentrated weights; it can instead create repeated copies of the few dominant candidates.
Worked Example: Systematic Resampling From Unequal Weights
Four candidate patients have raw weights 1, 2, 3, and 4. Assume each weight is a valid relative contribution to the target, and draw a resample of size \(m=5\) using systematic resampling. For this worked draw, let the random starting offset be \(U=0.40\), where \(U\) is uniform on \([0,1)\).
The total weight is \(1+2+3+4=10\), so the normalized weights are \(0.10, 0.20, 0.30,\) and \(0.40\). Their cumulative sums are \(0.10, 0.30, 0.60,\) and \(1.00\). Systematic positions are \((U+j)/m\), for \(j=0,\ldots,4\):
The first position lies in candidate 1's cumulative interval, from 0 to 0.10; the second lies in candidate 2's interval, from 0.10 to 0.30; the third lies in candidate 3's interval, from 0.30 to 0.60; and the last two lie in candidate 4's interval, from 0.60 to 1.00. The resample therefore contains one copy each of candidates 1, 2, and 3, and two copies of candidate 4. The expected counts are \(5(0.10)=0.5\), \(5(0.20)=1\), \(5(0.30)=1.5\), and \(5(0.40)=2\); this particular draw differs from those expectations, as a realized resample can.
Worked Example: Diagnosing a Dominant Candidate
Suppose four candidates have raw weights 1, 1, 1, and 7. Assume the weights are correctly calculated, but the team needs to decide whether the candidate pool represents the target adequately. Compute the normalized weights and ESS.
The total weight is \(1+1+1+7=10\), so the normalized weights are \(0.10, 0.10, 0.10,\) and \(0.70\). Therefore
Although there are four candidates, the weight concentration is comparable by this diagnostic to fewer than two equally weighted candidates. Candidate 4 holds 70% of the total weight. A resample of four has expected counts \(0.4, 0.4, 0.4,\) and \(2.8\), so repeated copies of candidate 4 are likely. This is a warning to inspect support and the weight construction; it does not by itself establish that the weights are wrong. If all four weights were equal instead, the ESS would be \(1/(4(0.25^2))=4\).
Diagnostics, Alternatives, and Limitations
Before accepting a weighted virtual population, check both the calculation and what it can represent. Useful diagnostics include the largest normalized weight, the ESS, the number of distinct candidates selected, and whether target-relevant regions are absent from the candidate pool. Compare target and weighted candidate distributions on the quantities the weighting was designed to address, then inspect important features that were not directly used in weighting. Such checks can reveal a plausible-looking weighted marginal alongside poor coverage elsewhere.
A small ESS or a dominant maximum weight signals sensitivity to a few candidates. First verify the target and candidate probability definitions, the normalization, and any sampling-design correction. Then assess whether the candidate-generation process needs broader or more efficient coverage. Raising a weight cap or clipping extreme weights may reduce concentration, but it changes the weighting rule and introduces bias relative to the original target ratio; it is not a cost-free repair. Thresholds for “too small” an ESS depend on the intended use and should be justified rather than treated as universal.
Rejection sampling is a useful alternative when the target is expressed as clear acceptance criteria and enough candidates meet them; accepted candidates can then remain equally weighted. Weighted resampling can use information more gradually, but may retain few effective candidates when target and candidate distributions differ greatly. Keeping the original candidates with their weights avoids additional resampling randomness for weighted summaries, while producing an equal-weight virtual population is convenient for downstream workflows that require patient records. Neither approach repairs missing support, and neither guarantees that finite-sample summaries equal their targets.
Common failures include interpreting relative weights as probabilities before normalizing, treating expected resampling counts as exact, and assuming a large raw candidate count implies a large effective sample. Most importantly, a very high weight cannot compensate for a target patient type that the candidate generator never produced. Weighted resampling is a finite-pool representation method, not a substitute for a well-designed candidate population or a validation of its biological plausibility.
State the target and candidate-generating distributions, including the sampling design when it is not uniform.
Confirm target-relevant patient types can occur among candidates, calculate the target-relative contributions, and normalize them.
Inspect ESS and the largest normalized weight; investigate extreme concentration rather than hiding it by resampling.
Draw the required number of patients, then check realized counts, duplicates, and target-relevant features in the resulting population.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions below.
- A target stratum has proportion 0.30, while its candidate proportion is 0.60. What ratio weight does a candidate in that stratum receive?
- Why can weighting fail when the candidate distribution assigns zero probability to a patient type with positive target probability?
- Four candidates have normalized weights \(0.25,0.25,0.25,0.25\). Calculate ESS.
- For the weights \(0.10,0.10,0.10,0.70\), what is the largest weight, and what does an ESS of approximately 1.923 indicate?
- A resample of size 20 is drawn with replacement from normalized weights. Is a candidate's expected count necessarily its realized count? Explain.
Solutions. (1) The ratio is \(0.30/0.60=0.5000\); the stratum is downweighted because candidates there are twice as common as in the target. (2) The ratio \(\pi(x)/q(x)\) is undefined when \(q(x)=0\) and \(\pi(x)>0\), and no available candidate represents that target type. (3) \(N_{\mathrm{eff}}=1/[4(0.25^2)]=4\), the maximum for four candidates. (4) The largest weight is 0.70. The ESS indicates substantial concentration, with weight-based information comparable to fewer than two equally weighted candidates; it is not a literal count of unique patients. (5) No. Its expected count is \(20\tilde{w}_i\), but random resampling produces a realized integer count that can differ from that expectation.