Tutorials › Marginal Structural Models › Tail Quantiles and Extreme Weight Diagnostics

Diagnostics and Sensitivity to Misspecification · Tutorial 246 of 501

Tail Quantiles and Extreme Weight Diagnostics

Use upper quantiles and exceedance proportions together to assess whether extreme weights are isolated, part of a broad tail, or difficult to interpret because the sample is small.

Advanced 10 min read

What You'll Learn

  • Define empirical upper quantiles and strict-threshold exceedance proportions for weights.
  • Interpret several upper quantiles alongside a tail plot rather than relying on one summary.
  • Derive how sample size affects expected tail counts and the variability of an observed tail proportion.
  • Distinguish a few isolated large weights from a broader upper tail using explicit examples.
  • Recognize how ties, dependence, and estimated weights affect interpretation.
  • Explain why tail diagnostics flag concerns but do not establish their cause.

Why Look Beyond the Center of the Weight Distribution?

A weight distribution can look unremarkable near its center while still having a consequential upper tail. A few observations may carry weights far above the rest, or a sizeable fraction of observations may have moderately large weights. These patterns are different: a single upper quantile or a single maximum cannot describe both well. Upper quantiles and tail plots provide complementary summaries of how many weights are large and how large they are.

Here, \(W_i\) denotes the weight for analysis unit \(i\), for \(i=1,\ldots,n\). In a longitudinal analysis, the unit is typically a person and \(W_i\) may be that person's weight at a specified follow-up time. Interpret diagnostics at a clearly specified time and for a clearly specified weight definition. The summaries describe the observed weights; they do not, by themselves, identify why the tail looks as it does.

Definition: For nonnegative weights \(W_1,\ldots,W_n\), write their ordered values as \(W_{(1)}\le \cdots\le W_{(n)}\). The empirical \(p\)-quantile, using the nearest-rank convention, is \(\hat q_p=W_{(\lceil np\rceil)}\), for \(0<p\le 1\). The empirical strict-threshold exceedance proportion at threshold \(t\) is \(\hat S(t)=n^{-1}\sum_{i=1}^n I(W_i>t)\), where \(I(\cdot)\) is 1 when its condition is true and 0 otherwise.

The strict inequality matters: a weight equal to \(t\) is not counted as an exceedance. Quantile conventions also matter in finite samples; software may interpolate between order statistics rather than use nearest rank. State the convention when reporting quantiles, and apply it consistently when comparing samples.

What Quantiles and Tail Plots Show

An upper quantile answers a magnitude question: how large is a weight near a specified upper rank? For example, \(\hat q_{0.99}\) is the observation at rank \(\lceil 0.99n\rceil\). A tail plot answers a prevalence question: for each threshold \(t\), what fraction of observations have weights strictly greater than \(t\)? A useful plot places \(t\) on the horizontal axis and \(\hat S(t)\) on the vertical axis. It is a nonincreasing step function, dropping when a threshold reaches an observed weight.

Under a continuous weight distribution with strictly increasing distribution function near its \(p\)-quantile \(q_p\), the population quantile is defined by \(F(q_p)=p\), and the fraction above it is \(1-p\). This identity can fail at atoms: if many weights equal \(q_p\), then \(P(W>q_p)\) can be smaller than \(1-p\). The empirical analogue also depends on ties. Thus a quantile and a plotted strict exceedance proportion should be read together, not assumed to match exactly.

Worked Example: One Isolated Large Weight

Suppose \(n=100\): 95 weights equal 1, four equal 4, and one equals 20. The ordered sample has positions 1 through 95 at 1, positions 96 through 99 at 4, and position 100 at 20.

Using nearest rank, \(\hat q_{0.95}=W_{(95)}=1\), \(\hat q_{0.96}=W_{(96)}=4\), \(\hat q_{0.99}=W_{(99)}=4\), and \(\hat q_{0.995}=W_{(100)}=20\). The sharp rise from the 99th to the 99.5th percentile is driven by the one largest observation; that percentile is based on only the last rank in this sample.

The strict-threshold plot is equally explicit. If \(t<1\), all 100 weights exceed \(t\), so \(\hat S(t)=100\%\). For \(1\le t<4\), only the four weights equal to 4 and the weight equal to 20 exceed \(t\), so \(\hat S(t)=5\%\). For \(4\le t<20\), only the weight equal to 20 exceeds \(t\), so \(\hat S(t)=1\%\). At and above \(20\), no weight exceeds \(t\), so \(\hat S(t)=0\%\). In particular, at \(t=20\) the proportion is 0%, not 1%.

The plateau at 1% over thresholds from 4 up to, but not including, 20 shows that the observation at 20 is isolated from the other large weights. It does not show whether that observation resulted from a data error, an unusual history, or a genuine feature of the weighting procedure; those possibilities require investigation of the analysis and data.

Worked Example: A Broader Upper Tail

Now suppose \(n=100\): 80 weights equal 1, 15 equal 2, and five equal 4. The upper quantiles are \(\hat q_{0.80}=W_{(80)}=1\), \(\hat q_{0.90}=W_{(90)}=2\), \(\hat q_{0.95}=W_{(95)}=2\), and \(\hat q_{0.96}=W_{(96)}=4\).

For thresholds \(1\le t<2\), 20 observations exceed \(t\), giving \(\hat S(t)=20\%\). For \(2\le t<4\), five exceed \(t\), giving \(\hat S(t)=5\%\). At and above 4, the strict exceedance proportion is zero. Unlike the preceding example, the plot shows a substantial fraction above 1 before it reaches the highest weights. This is evidence of a broader upper tail in this sample, not just one isolated observation.

Neither pattern is automatically acceptable or unacceptable. Interpretation depends on the analysis, the time point, and how the weights were constructed. The diagnostic distinction is descriptive: one pattern concentrates the observed tail in a very small number of units, while the other has more observations exceeding moderate thresholds.

How Sample Size Changes Tail Summaries

At a fixed population exceedance probability, larger samples tend to contain more tail observations. They also make the observed tail proportion less variable. This matters especially for very high quantiles: their ranks may correspond to only a handful of units in a modest sample.

Result: Suppose \(W_1,\ldots,W_n\) are independent and identically distributed, and let \(p_t=P(W_i>t)\). Then the number \(C(t)=\sum_{i=1}^n I(W_i>t)\) has a binomial distribution with parameters \(n\) and \(p_t\). Consequently, \(E[\hat S(t)]=p_t\), \(\operatorname{Var}(\hat S(t))=p_t(1-p_t)/n\), and \(P(C(t)=0)=(1-p_t)^n\).

To derive these statements, set \(I_i=I(W_i>t)\). Each \(I_i\) is Bernoulli with success probability \(p_t\), and independence of the weights implies independence of the indicators. Thus \(C(t)\) is the sum of \(n\) independent Bernoulli variables, so it is binomial. Since \(\hat S(t)=C(t)/n\), linearity of expectation gives \(E[\hat S(t)]=np_t/n=p_t\). Independence makes the covariances between distinct indicators zero, so

$$ \operatorname{Var}(\hat S(t)) =\frac{1}{n^2}\sum_{i=1}^n\operatorname{Var}(I_i) =\frac{np_t(1-p_t)}{n^2} =\frac{p_t(1-p_t)}{n}. $$

Finally, \(C(t)=0\) exactly when every indicator is zero. Independence gives \(P(C(t)=0)=(1-p_t)^n\). This proves the result. \(\square\)

Worked Example: The Same Tail Probability at Two Sample Sizes

Suppose a fixed threshold has population exceedance probability \(p_t=0.01\). With \(n=100\), the expected number of exceedances is \(np_t=1\), and the standard deviation of the observed proportion is

$$ \sqrt{\frac{0.01(0.99)}{100}}\approx 0.00995. $$

The probability of seeing no exceedances is \(0.99^{100}\approx 0.366\). Thus, even when the underlying exceedance probability is one percent, a sample of 100 will show no observations above that threshold more than one-third of the time.

With \(n=1000\), the expected number is 10, the standard deviation of the observed proportion is \(\sqrt{0.0099/1000}\approx 0.00315\), and the probability of no exceedances is \(0.99^{1000}\approx 0.000043\). The larger sample gives a more informative view of this rare tail event. It does not guarantee that the empirical tail curve will be smooth: it remains a step function, and its appearance depends on the observed weights.

This calculation also explains why a high sample quantile can be unstable in a small sample. For instance, the nearest-rank 99th percentile in a sample of 100 is the 99th ordered observation; in a sample of 1,000 it is the 990th. Those ranks represent very different numbers of observations in the upper tail. Reporting the percentile without \(n\), the quantile convention, and the corresponding upper-tail count can make the summary hard to assess.

Result: If \(W\) has a continuous distribution with distribution function \(F\) strictly increasing at \(q_p\), and \(q_p\) satisfies \(F(q_p)=p\), then \(P(W>q_p)=1-p\).

By definition, \(F(q_p)=P(W\le q_p)=p\). The events \(W\le q_p\) and \(W>q_p\) are disjoint and together cover all possible values of \(W\). Therefore \(P(W>q_p)=1-P(W\le q_p)=1-p\). Continuity rules out a positive probability mass at the quantile; strict increase ensures the specified quantile is not ambiguous over an interval. With a discrete distribution, the complement identity still holds, but \(P(W\le q_p)\) need not equal \(p\), so the final value need not be \(1-p\). \(\square\)

Practical Reading, Comparisons, and Failure Modes

A useful summary pairs several upper quantiles with exceedance proportions at thresholds chosen for the analysis. Quantiles make it easy to compare magnitudes at selected ranks. A tail plot shows how the proportion changes across a range of thresholds and makes plateaus or abrupt drops visible. A histogram can give a broader view of the distribution, but its appearance depends on bin choices and may conceal a small number of very large observations. These summaries are complementary; none explains the cause of a tail pattern.

Use comparable definitions when comparing time points or analyses: the same type of weight, unit of analysis, quantile convention, and thresholds. If a tail plot is based on observed weights, its empirical steps are exact for those observations. Claims about the underlying population tail require additional assumptions, including an appropriate sampling model. The independent, identically distributed calculation above is a useful reference, but repeated records from the same person are not independent units. If weights are dependent across units or arise from a complex sampling design, the stated variance calculation may not apply as written.

  • Do not infer a broad tail from one high quantile alone. Check nearby upper quantiles and how many observations exceed relevant thresholds.
  • Do not treat a zero observed tail proportion as proof of no tail risk. In a finite sample, rare exceedances may simply be absent; the sample-size calculation shows why.
  • Respect ties and strict thresholds. If many weights equal a threshold, they are not counted by \(\hat S(t)\). At the largest observed value, the strict exceedance proportion is zero.
  • Do not interpret a tail shape as a diagnosis of cause. The pattern may prompt checks of weight construction, data, and histories, but does not establish model misspecification or a positivity violation.
  • Do not compare summaries with different sample sizes or conventions without noting the difference. A percentile can correspond to very few observations, and interpolation rules can change its reported value.

These diagnostics have limits. They summarize the marginal distribution of the weights, not their relationship to outcomes or to specific covariate histories. Similar tail plots can arise for different reasons, and a benign-looking plot cannot verify the assumptions of a weighted analysis. Treat an unusual tail as a signal for further examination rather than a pass-or-fail test.

Check Your Understanding

Answer each question using the definitions and calculations above. Short solutions follow.

  1. In a sample of 200, 12 weights are strictly greater than 3. What is \(\hat S(3)\)?
  2. Five weights equal 8, and all other weights are below 8. What is the strict-threshold exceedance proportion at \(t=8\)?
  3. If \(p_t=0.02\), what is the expected number of exceedances in a sample of 500?
  4. Why is a single very high empirical quantile insufficient to determine whether a tail is broad?
  5. Under what key sampling condition does the binomial variance result for \(\hat S(t)\) apply?

Solutions. (1) \(\hat S(3)=12/200=0.06\), or 6%. (2) It is 0%, because the five weights equal 8 and are not strictly greater than 8. (3) The expected count is \(np_t=500(0.02)=10\). (4) It reports a magnitude at one rank but not how many observations exceed moderate or other relevant thresholds; nearby quantiles and the exceedance curve supply that prevalence information. (5) The weights for the analysis units must be independent and identically distributed under the stated model; dependence or a different sampling design requires an appropriate variance calculation.

Clinical Biostats