べんきのにっき

いろいろと垂れ流します。

両側っぽい指数分布で最尤法

内容

次の確率密度を持つ大きさnの標本について、最尤推定量の漸近分布とかを計算する。

密度関数

 \displaystyle
f(x | \theta _{1} , \theta _{2}) =
\frac{1}{ \theta _{1} + \theta _{2}} \exp \left( - \frac{x}{ \theta _{1}} I(x>0) \right) \exp \left(  \frac{x}{ \theta _{2}} I(x>0) \right)

ただし \theta _{1} > 0かつ \theta _{2} > 0

尤度関数

尤度をLとする

 \displaystyle
L = \prod f( x _{i} | \theta _{1} , \theta _{2})
 = \prod \frac{1}{ \theta _{1} + \theta _{2}} \exp \left( - \frac{x _{i} }{ \theta _{1}} I( x _{i} >0) \right) \exp \left(  \frac{x _{i} }{ \theta _{2}} I( x
 _{i} >0) \right)

 \displaystyle
= \frac{1}{ ( \theta _{1} + \theta _{2} ) ^{n} } \exp \left( - \sum \frac{x _{i} }{ \theta _{1}} I( x _{i} >0) \right) \exp \left( \sum \frac{x _{i} }{ \theta _{2}} I( x  _{i} >0) \right)

ここで \displaystyle S _{1} = \sum X _{i} I(X _{i} >0 ) \displaystyle S _{2} = - \sum X _{i} I(X _{i} >0 )とおき、さらに変形する

 \displaystyle
= \frac{1}{ ( \theta _{1} + \theta _{2} ) ^{n} } \exp \left( - \frac{ S _{1} }{ \theta _{1}} \right) \exp \left( - \frac{S _{2} }{ \theta _{2}} \right)

対数尤度関数

対数尤度をlとおく

 \displaystyle
l= \log L = -n \log  ( \theta _{1} + \theta _{2} )  - \frac{ S _{1} }{ \theta _{1}} -  \frac{S _{2} }{ \theta _{2}}

 \displaystyle P(X>0)= \frac{ \theta _{1}}{ \theta _{1} + \theta _{2}}であるから、 \displaystyle  \left( \frac{ \theta _{1}}{ \theta _{1} + \theta _{2}} \right) ^{n} くらいの確率で S _{2}=0になる可能性がある。

最尤推定

次の尤度方程式の解がそれぞれのパラメータの最尤推定

 \displaystyle
\frac{ \partial l}{ \partial \theta _{1} } = - \frac{n}{ \theta _{1} + \theta _{2} }  + \frac{ S _{1} }{ \theta _{1} ^{2}}

 \displaystyle
\frac{ \partial l}{\partial \theta _{2}} = - \frac{n}{   \theta _{1} + \theta _{2} }  + \frac{ S _{2} }{ \theta _{2} ^{2}}

頑張って解くと、最尤推定量が求められる。

 \displaystyle
\hat{ \theta} _{1} =  \frac{ S _{1} + \sqrt{ S _{1} S _{2}}  }{n}

 \displaystyle
\hat{ \theta} _{2} =  \frac{ S _{2} +  \sqrt{ S _{1} S _{2}}  }{n}

情報行列

最尤推定量のところの式を使って、二回微分行列Dを計算する。 それぞれの要素を計算する。

1,1要素は

 \displaystyle
 D _{1,1} = \frac{ \partial ^{2} }{ \partial \theta _{1} ^{2} } \log f( x | \theta _{1} , \theta _{2}) = \frac{1}{ ( \theta _{1} + \theta _{2} ) ^{2} } - \frac{ 2 x }{ \theta _{1} ^{3}} I ( x > 0)

1,2要素は

 \displaystyle
D _{1,2} = \frac{ \partial ^{2} }{\partial \theta _{1} \partial _{2} } \log f( x | \theta _{1} , \theta _{2})=  \frac{1}{  ( \theta _{1} + \theta _{2} ) ^{2} }

2,2要素は

 \displaystyle
D _{2,2} = \frac{ \partial ^{2} }{ \partial \theta _{2} ^{2} } \log f( x | \theta _{1} , \theta _{2})
= \frac{1}{ ( \theta _{1} + \theta _{2} ) ^{2} } + \frac{ 2 x }{ \theta _{2} ^{3}} I ( x \lt 0)

-1かけて積分すれば、情報行列 \mathscr{I}になる。それぞれの要素は以下。

1,1要素

 \displaystyle
\mathscr{I} _{1,1} = \int _{ - \infty} ^{ \infty} -D_{1,1} f(x | \theta _{1} ,\theta _{2}) dx
= \int _{ - \infty} ^{ \infty}  \left( - \frac{1}{  ( \theta _{1} + \theta _{2} ) ^{2} }  + \frac{ 2x }{ \theta _{1} ^{3}} I(x > 0) \right) dF(x)

 \displaystyle
= - \frac{1}{  ( \theta _{1} + \theta _{2} ) ^{2} }  + \frac{ 2 }{ \theta _{1} ^{3}}  \int _{ - \infty} ^{ \infty} x I(x > 0) dF(x)

2項目は、指数分布の期待値を求める感じの計算になる。

 \displaystyle
= - \frac{1}{  ( \theta _{1} + \theta _{2} ) ^{2} } +\frac{2}{ \theta _{1} ( \theta _{1} + \theta _{2}) }

 \displaystyle
= \frac{ \theta _{1} + 2 \theta _{2} }{ \theta _{1} ( \theta _{1} + \theta _{2}) ^{2} }

1,2要素

 \displaystyle
\mathscr{I} _{1,2} = \int _{ - \infty} ^{ \infty} -D_{1,2} f(x | \theta _{1} ,\theta _{2}) dx
= \int _{ - \infty} ^{ \infty}  - \frac{1}{  ( \theta _{1} + \theta _{2} ) ^{2} } dF(x)

 \displaystyle
= - \frac{ 1 }{ ( \theta _{1} + \theta _{2}) ^{2} }

2,2要素

 \displaystyle
\mathscr{I} _{2,2} = \int _{ - \infty} ^{ \infty} -D_{2,2} f(x | \theta _{1} ,\theta _{2}) dx
= \int _{ - \infty} ^{ \infty}  \left( - \frac{1}{  ( \theta _{1} + \theta _{2} ) ^{2} }  + \frac{ 2x }{ \theta _{2} ^{3}} I(x \lt 0) \right) dF(x)

 \displaystyle
= - \frac{1}{  ( \theta _{1} + \theta _{2} ) ^{2} }  + \frac{ 2 }{ \theta _{2} ^{3}}  \int _{ - \infty} ^{ \infty} x I(x \lt 0) dF(x)

1,1の時と同様の計算になる。

 \displaystyle
= - \frac{1}{  ( \theta _{1} + \theta _{2} ) ^{2} } +\frac{2}{ \theta _{2} ( \theta _{1} + \theta _{2}) }

 \displaystyle
= \frac{ 2 \theta _{1} + \theta _{1} }{ \theta _{2} ( \theta _{1} + \theta _{2}) ^{2} }

最尤推定量の漸近分布

フィッシャー情報行列 \mathscr{I} を用いて、漸近分布は次のように表される。

 \displaystyle
\sqrt{n} ( \hat{ \theta} _{n} - \theta )  \xrightarrow{ \mathscr{L}} N \left( 0, \mathscr{I} ( \theta _{1} \theta _{2}) ^{-1} \right)

ただし、

$$ \mathscr{I}= \frac{1}{2} \begin{pmatrix} \theta _{1} ( 2 \theta _{1} + \theta _{2}) & \theta _{1} \theta _{2} \\ \theta _{1} \theta _{2} & \theta _{2} ( \theta _{1} + 2 \theta _{2}) \\ \end{pmatrix} $$

である。

へたくそだから行列が書きにくい。

texじゃなくて$で囲むタイプでしか書けないのかな?