---
title: Green-Enrichment & Red-Depletion Statistics
url: https://www.emergentmind.com/topics/green-enrichment-and-red-depletion-statistics
type: topic
---

# Green-Enrichment & Red-Depletion Statistics

Green-enrichment and red-depletion statistics quantify the degree to which objects, events, or entities labeled as "green" or "red" are over- or under-represented relative to a null expectation. The terminology, context-specific but found across spatial statistics, genomics, signal detection, network science, and photochemistry, demarcates statistical paradigms where enrichment (excess relative to null) and depletion (deficit relative to null) are critical for quantitative analysis. The operational definitions and analytical machinery for these statistics span closed-form z-score expressions, hypergeometric and saddlepoint approximations, intersection testing, and physically explicable emission ratios.

## 1. Statistical Definitions and Conceptual Framework

The term "green-enrichment" signifies an observed excess of "green" category interactions or events compared to what would be expected under a suitable null model; "red-depletion" denotes a statistically significant deficit of "red" events. Statistical significance is typically established either via analytic approximations (z-scores), permutation or Monte Carlo resampling, or, for exact calculations, hypergeometric or generalized urn models.

Let $o_{A,B}$ denote the observed count of interactions (or features) of type $A$ linked to type $B$. Analytical frameworks specify the null expectation $\mu_{A,B}$ and variance $\sigma_{A,B}^2$ under random assignment or sampling. The canonical test statistic is the standardized z-score:
\[
z_{A,B} = \frac{o_{A,B} - \mu_{A,B}}{\sqrt{\sigma_{A,B}^2}}
\]
A z-score $z_{G,G} \gg 0$ signals green-enrichment; $z_{R,R} \ll 0$ signals red-depletion. Tail probabilities (p-values) further quantify the statistical evidence against the null [2506.18692][2512.19378][1305.0717][1004.5088].

## 2. Analytical Neighborhood Enrichment in Spatial Omics

In spatial omics, green-enrichment and red-depletion statistics test whether cells or transcripts labeled "green" are spatially clustered more than expected, and whether "red" labels are under-clustered, respectively [2506.18692]. The data consist of $N$ spatial points each labeled green or red; a neighborhood graph $W$ encodes topological proximity.

Key steps:
- Compute the neighbor-count vectors $y^G = W b^G$, $y^R = W b^R$, where $b^G$, $b^R$ are indicator vectors.
- Null model: labels are randomly reassigned with replacement, yielding expected neighbor-counts $\mu_B$ and variances $\nu_B$.
- For $n_A$ points of type $A$, the expected $B$-neighbor count is $\mu_{A,B} = n_A \mu_B$; variance $\sigma^2_{A,B} = n_A \nu_B$.
- The observed counts $o_{A,B}$ and analytical z-scores $z_{A,B}$ are computed as above.
- Positive $z_{G,G}$: more green-green edges; negative $z_{R,R}$: fewer red-red edges.

The analytical method substantially outperforms permutation-based approaches in efficiency (O(E+N) vs O(E·N_MC)), with empirical correlation ≥0.95 to Monte Carlo z-scores [2506.18692].

## 3. Enrichment and Depletion in Combinatorial, Genomic, and Intersection Analysis

In combinatorial settings, such as genomics or co-localization, green-enrichment and red-depletion describe the probability of observing intersections (e.g., genes or features) among categories exceeding or falling below the null hypothesis. The null distribution for the size $X$ of the intersection of two random samples (green and red channels) from a universe of $n$ items is given by the hypergeometric probability:
\[
P(X=k) = \frac{{n_{green} \choose k} {n-n_{green} \choose n_{red}-k}}{{n \choose n_{red}}}
\]
One-tailed p-values for enrichment ($P_{\rm enrich} = Pr[X \geq k_{obs}]$) and depletion ($P_{\rm deplete} = Pr[X \leq k_{obs}]$) directly quantify statistical significance [1305.0717]. This framework generalizes to $N$ channels/urns, with the intersection PMF computed via nested sums [1305.0717].

The widely used R package "hint" provides these calculations for both enrichment and depletion, including for more than two channels.

## 4. Weighted-Sum Methods and Saddlepoint Approximation

Weighted-sum approaches, such as the SaddleSum method, extend enrichment/depletion metrics to cases where the entities possess real-valued weights (e.g., expression levels). For a term $T$ of size $m$ with weights $w_i$, the sum $S_T = \sum_{i\in T} w_i$ is compared to the null distribution of sums of $m$ random weights. Using empirical cumulant-generating functions and saddlepoint approximation, the tail probability for green-enrichment ($P[S_T \ge s]$) or red-depletion ($P[S_T \le s]$) is efficiently estimated:
\[
P(S_T \ge s) \approx \Phi(\hat{z}) + \phi(\hat{z})\left(\frac{1}{\hat{z}} - \frac{1}{\hat{y}}\right)
\]
where $\hat{\theta}$, $\hat{y}$, and $\hat{z}$ are derived from saddlepoint equations [1004.5088]. This approach achieves accurate statistical significance even for small term sizes and does not require arbitrary dichotomization of weights.

## 5. Signal Detection and Watermarking in Language Models

In the context of digital watermarking, green-enrichment and red-depletion statistics serve as detection metrics for the presence of a "triple-set" watermark in large language model (LLM) outputs [2512.19378]. Tokens are classified into Green, Yellow, and Red sets via context-dependent partitioning; only Green and Yellow sets are sampled during watermarking.

For a generated text $x_1,\ldots,x_L$:
- Green and Red hit rates $\hat{p}_G = S_G / L$, $\hat{p}_R = S_R / L$ are computed.
- Under the null (no watermark), hits are binomially distributed with target ratios $\gamma_g,\,\gamma_r$.
- Green-enrichment z-score: $Z_G = (\hat{p}_G - \gamma_g) / \sqrt{\gamma_g (1-\gamma_g)/L}$
- Red-depletion z-score: $Z_R = (\gamma_r - \hat{p}_R) / \sqrt{\gamma_r (1-\gamma_r)/L}$
- One-sided p-values $p_G = 1-\Phi(Z_G)$, $p_R = 1-\Phi(Z_R)$ are aggregated by Fisher's method.

This statistical pipeline yields high detection accuracy at low false-positive rates (≈0.5%) [2512.19378].

## 6. Physical and Photochemical Interpretations in Cometary Emissions

In molecular astrophysics, green and red refer to the forbidden atomic oxygen lines at 5577 Å ("green") and 6300 + 6364 Å ("red-doublet"). The green-to-red intensity ratio ($G/R$) serves as a compositional diagnostic of cometary comae. "Green enrichment" refers to $G/R \gg 0.1$, indicating increased O($^1$S) production—typically due to enhanced CO$_2$ abundance or sampling the inner, collisionally dominated coma. "Red depletion" ($G/R \ll 0.1$) occurs for H$_2$O-dominated comae with low O($^1$S) yields and large projected observing apertures [1203.0723][1405.0375].

The coupled chemistry-emission models specify balance equations for metastable oxygen densities and emission intensities, allowing analytic or numerical computation of $G/R$ under varying physical parameters:
\[
G/R = \frac{I_{5577}}{I_{6300} + I_{6364}}
\]
Model results show that moderate CO$_2$/H$_2$O ratios (≳5–10%) can increase $G/R$ well above 0.1, while pure H$_2$O cases saturate at $G/R$ ≈ 0.03–0.06 [1405.0375].

## 7. Green-Enrichment and Red-Depletion in Oscillator Networks

In the blue-green-red Kuramoto–Sakaguchi oscillator model, "green-enrichment" and "red-depletion" quantify lead–lag relationships between phase centroids of agent networks. The phase difference $\alpha_{BG}$ (Blue minus Green) and $\alpha_{BR}$ (Blue minus Red) encode these phenomena:
- $\alpha_{BG} < 0$: Green phase advanced relative to Blue ("Green-enrichment").
- $\alpha_{BR} > 0$: Blue leads Red ("Red-depletion").

Critical thresholds for these transitions are derived from the steady-state solutions and stability analysis of the reduced centroid dynamics. Nonlinear mixing induces regions where, due to cross-population frustration, Green can move ahead of Blue as Blue attempts to stay ahead of Red—a three-way emergent effect [2011.09759].

---

In conclusion, green-enrichment and red-depletion provide a statistically rigorous framework for interpreting over-representation (enrichment) and under-representation (depletion) in a variety of scientific domains. The specific realization—whether through analytic z-scores, classical urn-based hypergeometric models, saddlepoint approximations, or physical emission ratios—depends on domain-specific data structure and inferential aims. Analytical advances have enabled rigorous, scalable computation and interpretation in settings ranging from spatial omics to network dynamics and astrophysical spectroscopy.

Source: https://www.emergentmind.com/topics/green-enrichment-and-red-depletion-statistics