Mathematical-Statistics

如何計算對數賠率的標準差?

  • March 8, 2017

我在筆記中指出,對數賠率的標準差由

sqrt(1/a + 1/b + 1/c + 1/d)

我知道它的推導需要 Delta 方法,但我不熟悉這種方法。有人介意把這個拼出來嗎?

本質上,Delta 方法是一種使用泰勒級數展開“線性化”非線性函數的方法,這樣您就可以找到方差,從而找到標準誤差。例如,假設您有一個函數 $ f(X) = Y $ 具有一階和二階導數。然後以一階泰勒級數展開為中心 $ \mu $ 是(誰)給的:

$$ \begin{eqnarray*} \newcommand{\Var}{{\rm Var}} Y=f(X) \approx f(\mu)+f^{\prime}\left(\mu\right)(X-\mu)] \end{eqnarray*} $$ 二階近似由下式給出:

$$ \begin{eqnarray*} f(X) \approx f(\mu) + f^\prime({\mu})(X-\mu)+ {1 \over{2}}f^{\prime\prime}(\mu)(X-\mu)^2 \end{eqnarray*} $$

所以,假設 $ E(X)=\mu $ 和 $ Var(X)=\sigma^2 $ 找到非線性函數的近似期望值 $ Y $ , 我們有:

$$ \begin{eqnarray*} E(Y)\approx E[f(X)] & = & E[f(\mu)]+E\big[f^{\prime}\left(\mu\right)(X-\mu)\big]+\frac{1}{2}E\big[f^{\prime\prime}\left(\mu\right)(X-\mu)^{2}\big]\ & = & f(\mu)+f^{\prime}\left(\mu\right)(\mu-\mu)+\frac{1}{2}f^{\prime\prime}\left(\mu\right)E[(X-\mu)^{2}]\ & = & f(\mu)+\frac{1}{2}f^{\prime\prime}\left(\mu\right)\sigma^{2} \end{eqnarray*} $$

其對應的方差可以通過以下方式估計:

$$ \begin{array}{} \Var(Y)=\Var\left[f(X)\right]=E\left{ [f(x)-E(f(x))]^{2}\right} & \approx & E\left[f(\mu)+f^{\prime}(\mu)(X-\mu)-f(\mu))\right] \ & &\mbox{(Substituting 1st order polynomial)} \ & = & \left[f^{\prime}(\mu)^{2}\right]E\left[(X-\mu)^{2}\right]\ & = & \left[f^{\prime}(\mu)^{2}\right]\Var(X) \end{array} $$

所以,在對數賠率的情況下, $ \log(\hat{OR)} $ , 讓 $ Y = \log(\hat{OR)} $ . 然後,因為組 $ n_1 $ 和 $ n_2 $ 是獨立的,我們有:

$$ \begin{eqnarray*} \Var\left[\log(\hat{OR})\right] & = & \Var\left[\log\left(\frac{\frac{\hat{p}1}{1-\hat{p}1}}{\frac{\hat{p}2}{1-\hat{p}2}}\right)\right]\[5pt] & = & \Var\left[\log\left(\frac{\hat{p}1}{1-\hat{p}1}\right)\right]+ \Var\left[\log\left(\frac{\hat{p}2}{1-\hat{p}2}\right)\right]\[5pt] & = & \left(\frac{1}{\hat{p}{1}\left(1-\hat{p}{1}\right)}\right)^{2}\frac{\hat{p}{1}(1-\hat{p}{1})}{n{1}}+\left(\frac{1}{\hat{p}{2}\left(1-\hat{p}{2}\right)}\right)^{2}\frac{\hat{p}{2}(1-\hat{p}{2})}{n{2}}\[5pt] & = & \frac{1}{n_{1}\hat{p}{1}(1-\hat{p}{1})}+\frac{1}{n_{2}\hat{p}{2}(1-\hat{p}{2})}\[5pt] & = & \frac{1}{n_{1}\hat{p}{1}}+\frac{1}{n{1}(1-\hat{p}{1})}+\frac{1}{n{2}\hat{p}{2}}+\frac{1}{n{2}(1-\hat{p}_{2})}\[5pt] & = & \frac{1}{a}+\frac{1}{b}+\frac{1}{c}+\frac{1}{d} \end{eqnarray*} $$

要獲得標準誤差,我們只需取平方根,然後您就可以從筆記中獲得結果:

$$ \begin{eqnarray*} SE[\log(\hat{OR})] = \sqrt{\Var\left[\log(\hat{OR})\right]}= \sqrt{\frac{1}{a}+\frac{1}{b}+\frac{1}{c}+\frac{1}{d}} \end{eqnarray*} $$

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

comments powered by Disqus