Why Density Thresholds Define a Target
A density describes how probability is distributed over a space, but it also lets us ask a geometric question: where is the density at least as large as a chosen value? The answer is a density superlevel set. Such sets are useful descriptions of high-density regions, and their connected components distinguish separate regions from one connected region. The threshold is part of the definition of the target; changing it can change both the region and its connectivity.
It is important to separate the population object from its sample-based counterpart. A population density \(f\) defines a fixed set at a fixed threshold. Given observations, an analyst may instead construct a density estimate and take its superlevel set. That estimated set is random because it depends on the sample. Defining these objects clearly comes before asking how well an estimate performs.
Population Superlevel Sets and Components
Let \(X\) take values in \(\mathbb{R}^d\) and have a density \(f\) with respect to \(d\)-dimensional Lebesgue measure. Thus \(f\) is a nonnegative measurable function and \(\int_{\mathbb{R}^d} f(x)\,dx=1\). For a threshold \(t>0\), define the population superlevel set by including all points where the density is at least \(t\).
The weak inequality is a convention: points at which \(f(x)=t\) belong to \(S_t\). Using a strict inequality would define a different pointwise set at the threshold boundary. A threshold is ordinarily taken to be positive; at \(t=0\), nonnegativity makes the set uninformative, since \(S_0=\mathbb{R}^d\).
There is a subtlety in the phrase “the density \(f\).” A probability distribution determines a density only up to changes on sets of Lebesgue measure zero. Such changes do not alter probabilities, but they can alter the pointwise set \(S_t\) and its topology. For example, changing a density’s value at every rational point in one dimension preserves the distribution, because the rationals have Lebesgue measure zero. Yet it can add or remove those points from a superlevel set. When the geometry of \(S_t\) matters, one must therefore specify a pointwise representative, often a continuous version when one is available. The set \(S_t\) is defined from that representative, not merely from the distribution’s almost-everywhere equivalence class.
Worked Example: Normal Density Thresholds
Let \(X\sim N(0,1)\), with density \(f(x)=(2\pi)^{-1/2}\exp(-x^2/2)\). Write \(c=(2\pi)^{-1/2}\). For \(0<t\leq c\), solve the inequality \(f(x)\geq t\):
Consequently, \(S_t=[-\sqrt{2\log(c/t)},\sqrt{2\log(c/t)}]\), a single connected interval. At \(t=c\), the set is just \(\{0\}\); for \(t>c\), it is empty.
At \(t=ce^{-1/2}\), the radius is \(\sqrt{2(1/2)}=1\), so \(S_t=[-1,1]\). Its probability is \(P(-1\leq X\leq1)=\Phi(1)-\Phi(-1)\), approximately \(0.6827\). At the lower threshold \(t=ce^{-2}\), the radius is \(\sqrt{2(2)}=2\), and \(S_t=[-2,2]\), with probability approximately \(0.9545\). Lowering the threshold enlarges this population target.
What Varying the Threshold Does
The set \(S_t\) depends on the chosen value of \(t\). This dependence is ordered: a point that passes a higher threshold necessarily passes every lower threshold. The resulting containment has a direct implication for connected components.
Proof. If \(x\in S_{t_2}\), then \(f(x)\geq t_2>t_1\), so \(x\in S_{t_1}\). This proves the set containment. Let \(C\) be a connected component of \(S_{t_2}\). Since \(C\subseteq S_{t_1}\), it is a connected subset of \(S_{t_1}\). Every connected subset of a space is contained in a connected component of that space, so \(C\) lies in a component \(D\) of \(S_{t_1}\). It cannot lie in two distinct components: components are disjoint, and \(C\) is nonempty. Thus \(D\) is unique. This containment does not imply that different components at \(t_2\) must belong to different components at \(t_1\); they may be joined in the larger lower-threshold set. \(\square\)
This theorem describes a relationship between targets, not a recipe for selecting a threshold. A threshold is not automatically a probability level: the condition \(f(x)\geq t\) specifies a density value, while the probability of the resulting set is calculated by integrating \(f\) over that set.
Worked Example: A Bridge Between Two High-Density Regions
Define a density on the real line by setting \(f(x)=0.4\) for \(-2\leq x<-1\) and \(1<x\leq2\), \(f(x)=0.1\) for \(-1\leq x\leq1\), and \(f(x)=0\) elsewhere. Its integral is \(0.4(1)+0.1(2)+0.4(1)=1\), so it is a density.
At threshold \(t=0.1\), every point of \([-2,2]\) qualifies, including the lower-density bridge \([-1,1]\). Thus \(S_{0.1}=[-2,2]\), which is connected. At threshold \(t=0.2\), only the two high-density regions qualify:
This set has two connected components. Its probability is \(0.4(1)+0.4(1)=0.8\). Raising the threshold from \(0.1\) to \(0.2\) removes the bridge and separates the target, as the theorem allows. At \(t=0.5\), the set is empty because the density never reaches \(0.5\).
Probability and Volume of a Superlevel Set
The probability of a superlevel set is obtained from the density over the set; it is not determined by the threshold alone. One useful general bound relates that probability to the set’s Lebesgue measure, or volume.
Proof. Since \(f\) is measurable, the inverse image \(S_t=f^{-1}([t,\infty))\) is measurable. By the definition of a density, the probability of any measurable set \(A\) is \(\int_A f(x)\,dx\); taking \(A=S_t\) gives the probability identity. On \(S_t\), \(f(x)\geq t\), so integration over that set gives
Dividing by \(t>0\) proves \(\lambda_d(S_t)\leq1/t\). \(\square\)
The bound says that a positive-threshold region cannot have arbitrarily large volume: every point in it has density at least \(t\), while the total probability is one. It does not say that the region has probability \(1/t\), nor does it determine its number of components.
From a Population Target to a Sample-Based Set
In practice, \(f\) is often unknown. Given observations \(X_1,\ldots,X_n\), an analyst may construct a density estimate \(\hat f_n\). At a specified threshold \(t\), the corresponding estimated superlevel set is
This notation distinguishes two objects: \(S_t\), defined by the population density, and \(\hat S_t\), defined by an estimate from the sample. The latter is data-dependent. Its components are components of the estimated set, not automatically components of the population target. The particular construction of \(\hat f_n\) matters, but defining and evaluating such procedures is separate from defining the target.
Worked Example: A Histogram Set Can Have Different Components
Use the piecewise density from the preceding example and threshold \(t=0.25\). In the population, the middle region has density \(0.1<0.25\), while the two outer regions have density \(0.4\geq0.25\). Hence \(S_{0.25}=[-2,-1)\cup(1,2]\), with two components.
Now suppose \(n=10\) observations fall into the three bins \([-2,-1)\), \([-1,1]\), and \((1,2]\), with counts \(2,6,2\), respectively, and none outside. Form a histogram density estimate that is constant within each bin and zero outside. The bin widths are \(1,2,1\), so the estimated heights are count divided by \(n\) times bin width:
The estimated heights integrate to \(0.2(1)+0.3(2)+0.2(1)=1\), as required for a density estimate. At \(t=0.25\), only the middle bin reaches the threshold, so \(\hat S_{0.25}=[-1,1]\), with one component. This sample-based set is not the population set: in this example it has one component where the population target has two. The calculation illustrates why a set formed from estimated density values must not be treated as the fixed population target.
Common Pitfalls and Interpretation
- Assuming a threshold specifies a probability. The threshold is a density value. The probability \(P(X\in S_t)\) must be computed by integrating \(f\) over \(S_t\); it is not generally fixed in advance.
- Treating a sample-based set as the population target. The set \(\hat S_t\) uses an estimated density and depends on the sample. The population set \(S_t\) uses the population density.
- Assuming the component count stays constant. A higher threshold can remove a low-density bridge and split a connected region. It can also remove an entire region. The threshold nesting result does not promise a fixed number of components.
- Ignoring the density version. Densities that agree almost everywhere describe the same distribution, but their pointwise superlevel sets need not have the same geometry. State which representative defines the target when topology matters.
Threshold values also depend on the units in which coordinates are measured. For example, rescaling a one-dimensional variable changes the numerical height of its density. A threshold must therefore be interpreted in the density scale associated with the chosen coordinates, rather than as a unit-free probability cutoff.
The central distinction is between a fixed-threshold population target and a set computed from a sample-based density estimate. Once the density representative and threshold are specified, the target is precise. Changing the threshold changes the target through nested sets, and can change its connected components as well as its probability.
Check Your Understanding
Try these questions using the definitions and results above.
- For a fixed density, why must \(S_{t_2}\subseteq S_{t_1}\) when \(0<t_1<t_2\)? What does this imply about components?
- Explain why the probability of \(S_t\) is not generally equal to \(t\), or determined by \(t\) alone.
- For the normal density \(N(0,1)\), find the radius of \(S_t\) when \(t=(2\pi)^{-1/2}e^{-9/2}\).
- In the histogram example, calculate the estimated density height in each bin and explain why the estimated set at threshold \(0.25\) has one component.
- How can two densities that define the same probability distribution have different pointwise superlevel sets?