基于Wolfgang解答:给观测均值加相同常数后对数响应比的方差
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

