Tutorials › Group Sequential Methods and Sample Size Re-Estimation › Interpolating Density Values at Boundary Locations

Computing Boundaries and Power · Tutorial 237 of 699

Interpolating Density Values at Boundary Locations

You will compute survivor mass when a stopping boundary cuts a grid interval and understand the accuracy limits of nearest-cell and linear-interpolation approximations.

Advanced 11 min read

What You'll Learn

  • Define a grid-based survivor density and identify a boundary-cut interval.
  • Interpolate the density at a boundary and integrate the partial interval.
  • Compare linear partial-cell mass with nearest-node snapping.
  • Extend the calculation to lower and two-sided continuation boundaries.
  • Diagnose interpolation problems near truncation edges and sharp changes.
  • Explain how a boundary-mass error can affect later sequential calculations.

Why the Boundary’s Position Within a Cell Matters

In a sequential calculation, the density at an interim look is retained only over the states that have not crossed a stopping boundary. A numerical grid represents that density at discrete locations, but the boundary need not coincide with one of them. Treating a boundary-cut interval as wholly surviving or wholly stopped can therefore change the survivor mass passed to the next look. The size and direction of that change depend on where the boundary falls within the interval and on the density there.

The earlier material on representing interim looks as numerical states and on the survivor-density recursion supplies the setting: at a look, a subdensity describes probability mass among paths that have not stopped. Here the focus is narrower. We compare snapping a boundary to a nearby grid point with estimating the mass up to the actual boundary by linearly interpolating the density.

Definition: Let \(g(x)\) be a nonnegative survivor subdensity at a given look. Its integral over a continuation region is the probability mass that remains eligible to continue. A boundary-cut interval is a grid interval whose interior contains a stopping boundary. Nearest-cell snapping assigns the cut interval according to its nearest grid node, while linear boundary interpolation estimates the density at the boundary by linear interpolation and integrates only the portion of the interval inside the continuation region.

A subdensity need not integrate to one: probability mass may already have been removed at earlier looks. If \(x\) is measured in standardized-statistic units, for example, \(g(x)\) has units of probability per standardized-statistic unit, and its integral is dimensionless probability mass. The calculations below assume the grid values represent the same subdensity at the current look, are nonnegative, and are sufficiently local that a straight-line approximation across a cut interval is a reasonable numerical approximation.

Interpolating and Integrating a Cut Interval

Consider adjacent grid nodes \(x_k\) and \(x_{k+1}\), with spacing \(h=x_{k+1}-x_k\), and density values \(g_k=g(x_k)\) and \(g_{k+1}=g(x_{k+1})\). Suppose an upper stopping boundary \(b\) lies between them. Write \(t=(b-x_k)/h\), so \(0<t<1\). Linear interpolation estimates the boundary density as a weighted average of the two node values.

$$ \widehat g(b)=(1-t)g_k+t g_{k+1}. $$

For the continuation region below the upper boundary, the cut portion runs from \(x_k\) to \(b\). Under the piecewise-linear density approximation, its area is a trapezoid: its width is \(th\), and its endpoint heights are \(g_k\) and \(\widehat g(b)\). This gives the partial-interval mass.

$$ \widehat M_{\mathrm{partial}} =\frac{th}{2}\{g_k+\widehat g(b)\} =h\left(tg_k+\frac{t^2}{2}(g_{k+1}-g_k)\right). $$

The full interval from \(x_k\) to \(x_{k+1}\), by the same trapezoidal rule, has mass \(M_{\mathrm{full}}=h(g_k+g_{k+1})/2\). Thus the linear method keeps complete intervals on the continuation side, adds the appropriate partial area, and excludes the portion beyond the boundary. The formula is a direct integration of the line joining the two density values; it is not an assumption that the unknown true density is exactly linear.

For comparison, define the nearest-node version of nearest-cell snapping precisely: represent each interval by its grid nodes, and snap \(b\) to whichever of \(x_k\) and \(x_{k+1}\) is closer. If \(t\leq 1/2\), the snapped boundary is \(x_k\) and none of the cut interval is retained. If \(t>1/2\), it is \(x_{k+1}\) and the whole interval is retained. This convention makes the comparison reproducible; implementations using cell edges or another tie rule should state that convention, because it can change the result.

Result: For a nonnegative density, nearest-node snapping underestimates the linear partial mass when \(t\leq 1/2\), by the amount \(\widehat M_{\mathrm{partial}}\). When \(t>1/2\), it overestimates the linear mass by \(M_{\mathrm{full}}-\widehat M_{\mathrm{partial}}\), the mass in the part beyond \(b\). The two methods agree when the boundary is at a grid node; at a midpoint, the stated tie rule snaps down.

The direction statement follows because the interpolated density is nonnegative throughout the interval: the partial area and the omitted remainder are both nonnegative. This establishes the sign of the snapping error, not which method is closer to the true, continuous-density mass. That depends on how well the grid values and the piecewise-linear shape approximate the actual density.

Worked Calculations

Worked Example: An Upper Boundary Within One Grid Interval

Suppose a hypothetical survivor subdensity is tabulated at \(x=0,1,2,3\), with values \(0.10, 0.20, 0.10, 0.02\) probability per state unit. An upper stopping boundary is \(b=1.4\), and continuation requires \(x<b\). Use the trapezoidal rule on complete intervals and compare the two boundary treatments.

The complete interval from 0 to 1 contributes \(1(0.10+0.20)/2=0.15\). The boundary is in the interval from 1 to 2, with \(t=(1.4-1)/1=0.4\). The interpolated density is \(\widehat g(1.4)=(1-0.4)(0.20)+0.4(0.10)=0.16\). Therefore the retained partial interval contributes \(0.4(0.20+0.16)/2=0.072\), and the linear survivor-mass estimate is \(0.15+0.072=0.222\).

The boundary is closer to node 1 than node 2, so nearest-node snapping retains none of the cut interval. Its estimate is \(0.15\). It is lower than the linear estimate by \(0.222-0.15=0.072\), exactly the partial-interval mass omitted by snapping. Both estimates use the same complete-interval calculation; their difference is due only to treatment of the cut interval.

Worked Example: A Lower Continuation Boundary

Use hypothetical grid values \(g(0)=0.05\), \(g(1)=0.15\), \(g(2)=0.25\), and \(g(3)=0.15\), again in probability per state unit. A lower stopping boundary is \(b=1.3\); paths continue when \(x>b\). Find the survivor mass from \(b\) to 3 using linear interpolation, then compare with nearest-node snapping.

The boundary lies between 1 and 2, and \(t=(1.3-1)/1=0.3\). The estimated density at the boundary is \(0.7(0.15)+0.3(0.25)=0.18\). The partial mass from 1.3 to 2 is \(0.7(0.18+0.25)/2=0.1505\). The complete interval from 2 to 3 contributes \((0.25+0.15)/2=0.20\). Thus the linear estimate is \(0.1505+0.20=0.3505\).

Since \(b=1.3\) is closer to node 1, snapping the lower boundary to node 1 retains the entire interval from 1 to 2. Its mass is \((0.15+0.25)/2=0.20\); adding the interval from 2 to 3 gives \(0.40\). The snapped estimate exceeds the linear estimate by \(0.40-0.3505=0.0495\), the mass between 1 and 1.3 under the linear density. For a lower boundary, snapping down includes this extra region in the continuation set.

Worked Example: Two Boundaries Cut the Grid

Suppose hypothetical density values at \(x=-2,-1,0,1,2\) are \(0.04,0.12,0.20,0.12,0.04\). The continuation region is \(-0.6<x<0.7\). Estimate its mass using linear interpolation at both boundaries, then use nearest-node snapping as a comparison. The density values are in probability per state unit.

For the lower boundary, the interval is \([-1,0]\) and the fraction from \(-1\) to \(-0.6\) is \(0.4\). Linear interpolation gives \(g(-0.6)=0.12+0.4(0.20-0.12)=0.152\). The mass from \(-0.6\) to 0 is \(0.6(0.152+0.20)/2=0.1056\).

For the upper boundary, the interval is \([0,1]\). The interpolated value is \(g(0.7)=0.20+0.7(0.12-0.20)=0.144\), so the mass from 0 to 0.7 is \(0.7(0.20+0.144)/2=0.1204\). Together, the linear survivor-mass estimate is \(0.1056+0.1204=0.2260\).

For nearest-node snapping, \(-0.6\) is closer to \(-1\) and \(0.7\) is closer to 1. Snapping both boundaries outward retains the complete intervals \([-1,0]\) and \([0,1]\). Each has mass \((0.12+0.20)/2=0.16\), for a total of \(0.32\). The excess over the linear estimate is \(0.32-0.2260=0.0940\): it consists of the two pieces outside the actual continuation region but inside the snapped one.

Using the Approximation in a Survivor-Mass Update

At each look, the survivor mass is the integral of the current subdensity over the continuation region. In a grid calculation, each full interval and each boundary-cut interval must be handled consistently. The following steps describe the local boundary calculation; they do not replace the transition-density calculation that produced the grid values.

1
Locate each boundary-cut interval.
Identify the adjacent grid nodes around each stopping boundary and verify that the boundary lies within the represented grid range.
2
Estimate boundary density.
Use the linear weight \(t\) within that interval to interpolate from the two grid values. Do not extrapolate this formula beyond the grid.
3
Integrate the actual continuation portion.
Use a partial trapezoid at each cut interval and ordinary interval contributions between the boundaries. Sum the resulting nonnegative masses.
4
Check the mass accounting.
Compare the retained mass with the mass before applying the current stopping rule. The retained mass cannot exceed the pre-boundary mass if both are calculated on the same domain and with consistent weights.

For a two-sided continuation region \(\ell<x<u\), there may be two cut intervals, one at each end. The lower partial interval is integrated from \(\ell\) up to the next node; the upper partial interval is integrated from the preceding node up to \(u\). Complete intervals between them are included once. If a boundary coincides with a node, the corresponding partial interval has zero width or is a complete interval, so no special extrapolation is needed.

Diagnostics, Alternatives, and Limitations

A useful diagnostic is to calculate both methods at a few representative cut intervals. A large difference warns that snapping is materially affecting the mass at the current grid spacing. Also inspect the interpolated boundary density: it must lie between the two endpoint values, and it must be nonnegative when both endpoint values are nonnegative. For a two-sided region, check that the integrated survivor mass is nonnegative and does not exceed the pre-boundary mass.

These checks can expose implementation errors, but they do not prove that interpolation is accurate. A straight line can poorly approximate a curved density, especially where the density changes rapidly. Interpolation can also be misleading if an interval straddles a discontinuity—for example, if a previous truncation makes one side of the interval zero while the other side has positive density. In that case, values on opposite sides do not describe one smooth segment, so interpolating across them can invent density in a region where the model says none exists. Keep truncation locations explicit and do not interpolate across known jumps.

ApproachBoundary treatmentMain strengthMain limitation
Nearest-node snappingRetains or removes the whole cut interval, based on the nearest nodeSimple and inexpensiveIntroduces a position-dependent mass error that can be large relative to a narrow continuation region
Linear interpolationEstimates density at the boundary and integrates the partial intervalUses the actual boundary location and avoids whole-cell inclusion or exclusionAssumes the density is adequately approximated by a line within the cut interval
Direct integration of a known densityIntegrates the density only over the actual continuation regionAvoids the piecewise-linear boundary approximation when the density is available analyticallyMay not be available or convenient in a recursive numerical calculation

Linear interpolation is generally preferable to snapping when the grid values vary smoothly and the boundary lies inside the grid. It remains an approximation: errors in the grid density values, transition calculation, or integration over other intervals are not corrected by handling the boundary more carefully. Conversely, nearest-cell snapping can be adequate when its possible mass discrepancy is negligible for the calculation’s purpose, but that should be checked rather than assumed.

A common mistake is to say, “The boundary is closer to the upper node, so I should keep the whole interval; that is the mass below the boundary.” Closeness is only the snapping rule, not an integration argument. It may retain states beyond the boundary and overstate survivor mass, as in the two-sided example. The correction is to distinguish the approximation from the target: the target integrates only over the true continuation region, and linear interpolation estimates the cut portion of that region.

The impact can carry forward. Survivor mass at one look supplies the mass available for later transitions, so an error at a cut boundary may affect subsequent crossing probabilities. But a local discrepancy does not by itself determine the final error: later transition and boundary calculations also matter. Report the boundary treatment and interpret computed probabilities with the numerical approximation in view.

Key takeaway: A boundary inside a grid interval cuts off only part of that interval. Linear interpolation estimates the boundary density and integrates that partial area; nearest-node snapping includes or excludes the whole interval. Compare their mass contributions, verify smoothness across the cut interval, and keep known truncation discontinuities out of the interpolation.

Check Your Understanding

Answer each question using the stated nearest-node convention. Solutions follow the questions.

  1. On a unit-spaced grid, a boundary lies at fraction \(t=0.25\) of an interval. For continuation below an upper boundary, does nearest-node snapping retain none or all of the cut interval?
  2. Suppose \(g_k=0.10\), \(g_{k+1}=0.30\), \(h=2\), and \(t=0.5\). Find the interpolated boundary density and the linear partial mass from \(x_k\) to the boundary.
  3. For continuation above a lower boundary, explain why snapping a boundary to the lower of its two neighboring nodes can overstate survivor mass.
  4. Name one diagnostic that can reveal a problem with linear interpolation across a cut interval.

Solutions. (1) Since \(0.25\leq 0.5\), the nearest node is \(x_k\), so snapping retains none of the cut interval for continuation below the boundary. (2) The boundary density is \((1-0.5)(0.10)+0.5(0.30)=0.20\). The partial mass is \(th(g_k+\widehat g(b))/2=(0.5)(2)(0.10+0.20)/2=0.20\). (3) For continuation above the boundary, snapping down includes the region between the lower grid node and the actual boundary, even though that region is outside the true continuation set; its nonnegative mass is added. (4) For example, check whether the interval crosses a known discontinuity from truncation. Interpolating across such a jump can assign an inappropriate density to the boundary.

Clinical Biostats