Variance

從指數分佈的矩生成函數計算方差

  • October 29, 2020

我想知道如何獲得exp的方差。使用矩生成函數計算的原始方差的分佈。這是我的推理路線:

指數分佈的 PDF 是

$$ p_X(x) = \lambda \cdot e^{-\lambda x} $$

為了 $ x > 0 $ , 和 $ 0 $ 為了 $ x \leq 0 $ .

推導 MGF:

$$ \begin{aligned} M_X(t) &= \mathbb{E}\left[e^{t X}\right] && \text{definition} \ &= \int_{- \infty}^{\infty} x \cdot p_X(x) dx&& \text{just definition of expectation} \ &= \int_{- \infty}^{\infty} e^{t x} \cdot \lambda e^{-\lambda x} dx&& \text{LOTUS} \ &= \int_{0}^{\infty} e^{t x} \cdot \lambda e^{-\lambda x} dx&& \text{since } x > 0 \ &= \lambda \int_{0}^{\infty} e^{t x} \cdot e^{-\lambda x} dx&& \text{the constant multiple rule} \ &= \lambda \int_{0}^{\infty} e^{t x -\lambda x} dx \ &= \lambda \int_{0}^{\infty} e^{x (t -\lambda )} dx \ &= \lambda \cdot \frac{1}{\lambda - t} && \text{closed form solution for } t < \lambda \ &= \frac{\lambda}{\lambda - t} \qquad \boxed{\checkmark} \text{ Wikipedia check} \end{aligned} $$

通過推導 MGF 獲得指數分佈的矩 $$ M_X(t) = \frac{\lambda}{\lambda - t} $$

第一時刻(期待)

$$ M_X^{(1)}(t) = \frac{\partial}{\partial t} \left( \frac{\lambda}{\lambda - t} \right) = \frac{\lambda}{(\lambda - t)^2} $$

  • 並評估為 $ t = 0 $ :

$$ \frac{\lambda}{(\lambda - t)^2} \bigg\vert_{t=0} = \frac{\lambda}{\lambda^2} = \frac{1}{\lambda} \qquad \boxed{\checkmark} \text{ Wikipedia check} $$

第二時刻

$$ M_X^{(2)}(t) = \frac{\partial^2}{\partial^2 t} \left( \frac{\lambda}{\lambda - t} \right) = \frac{2 \lambda}{(\lambda - t)^3} $$

$$ \frac{2 \lambda}{(\lambda - t)^3} \bigg\vert_{t=0} = \frac{2}{\lambda^2} $$

所以這是原始方差,而不是實際方差 $ \frac{1}{\lambda^2} $ … 如何到那?

$ M_X^{(2)}(0) $ 不是方差,而是 $ E(X^2) $ . 所以方差可以通過 $$ Var(X) = E(X^2) - E(X)^2 = M_X^{(2)}(0) - [M_X^{(1)}(0)]^2 = \frac{1}{\lambda^2} $$

引用自:https://stats.stackexchange.com/questions/494173

comments powered by Disqus