You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

基于Wolfgang解答:给观测均值加相同常数后对数响应比的方差

Log Response Ratio Variance When Adding a Constant to Both Means

Great question—let’s break this down step by step, building on the Delta method framework Wolfgang referenced in his earlier answer.

First, let’s recap the original log response ratio (LRR) and its variance. For two groups with sample means $\bar{y}_1$, $\bar{y}_2$, sample variances $s_1^2$, $s_2^2$, and sample sizes $n_1$, $n_2$, the standard LRR is:

LRR₀ = ln(ȳ₁ / ȳ₂) = ln(ȳ₁) - ln(ȳ₂)

Using the Delta method (the go-to for approximating variances of transformed statistics), its variance is:

Var(LRR₀) = (s₁²)/(n₁ȳ₁²) + (s₂²)/(n₂ȳ₂²)

What happens when we add the same constant $k$ to both means?

When we shift both means by $k$ (we need $\bar{y}_1 + k > 0$ and $\bar{y}_2 + k > 0$ to keep the logarithm valid), the new LRR becomes:

LRRₖ = ln[(ȳ₁ + k)/(ȳ₂ + k)] = ln(ȳ₁ + k) - ln(ȳ₂ + k)

To find its variance, we apply the Delta method again. For the function $g(a,b) = ln(a) - ln(b)$ where $a = \bar{y}_1 + k$ and $b = \bar{y}_2 + k$, we calculate the partial derivatives:

  • $\partial g/\partial a = 1/a = 1/(\bar{y}_1 + k)$
  • $\partial g/\partial b = -1/b = -1/(\bar{y}_2 + k)$

Squaring these derivatives and multiplying by the variances of $\bar{y}_1$ and $\bar{y}_2$ (which are $s_1^2/n_1$ and $s_2^2/n_2$ respectively), we get the variance of the shifted LRR:

Var(LRRₖ) = (s₁²)/(n₁(ȳ₁ + k)²) + (s₂²)/(n₂(ȳ₂ + k)²)

Key takeaways about the variance change

  • If $k > 0$: The denominators in both terms of the variance formula increase, so $Var(LRRₖ)$ will be smaller than $Var(LRR₀)$
  • If $k < 0$ (and we still have $\bar{y}_1 + k > 0$, $\bar{y}_2 + k > 0$): The denominators decrease, so $Var(LRRₖ)$ will be larger than $Var(LRR₀)$
  • If $k = 0$: We’re back to the original variance—no change at all

The core idea here is that shifting both means by the same constant doesn’t affect the relative difference in a linear way, but the logarithmic transformation’s sensitivity to the absolute value of the means changes the variance.

内容的提问来源于stack exchange,提问作者Valentin_Ștefan

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.19 04:09:33