LoginSignup
0
0

More than 1 year has passed since last update.

RRML 演習問題 2.5 解答

Last updated at Posted at 2021-12-03

はじめに

本記事は, 機械学習の教科書の決定版ともいえる, Dr. Christopher Bishopによる『Pattern Recognition and Machine Learning (パターン認識と機械学習)』, 通称PRMLの演習問題のうち, 私が解いた問題の解答を記したものです. これは, 私の所属する生物測定学研究室の輪読会でPRMLを取り扱っており, その勉強の一環として演習問題を解いたときのものです. なお, 他の演習問題の解答例に関する記事については, PRML 演習問題 解答集 まとめをご覧ください.

問題

この演習問題では$\mathrm{Beta\left(\mu|a,b\right)} = \frac{\Gamma\left(\mathrm{a+b}\right)}{\Gamma\left(\mathrm{a}\right)\Gamma\left(\mathrm{b}\right)}\mu^{\mathrm{a-1}}\left(1-\mu\right)^{\mathrm{b}-1}$ (2.13)のベータ分布が, $\int^1_0\mathrm{Beta\left(\mu|a,b\right)}\mathrm{d}\mu = 1$ (2.14)が成立するように正しく正規化されていることを証明する. これは
$$
\int^1_0\mu^{\mathrm{a-1}}\left(1-\mu\right)^{\mathrm{b}-1} \mathrm{d}\mu
=\frac{\Gamma\left(\mathrm{a}\right)\Gamma\left(\mathrm{b}\right)}{\Gamma\left(\mathrm{a + b}\right)} \tag{2.265}
$$
を示すことと等価である. ガンマ関数の定義$\Gamma(x)\equiv \int_0^\infty \mathrm{u}^{x - 1} \mathrm{e}^{-u}\mathrm{d}u$ (1.141)より,
$$
\Gamma\left(\mathrm{a}\right)\Gamma\left(\mathrm{b}\right) = \int_0^\infty\mathrm{exp}(-x)\,x^{\mathrm{a}-1}
\mathrm{d}x \int_0^\infty\mathrm{exp}(-y)\,y^{\mathrm{b}-1}
\mathrm{d}y \tag{2.266}
$$
を得る. この式を用いて, 次のようにして(2.265)を証明せよ. まず, $y$についての積分を, $x$についての積分の被積分関数の中に移す. 次に, $x$を固定して$t=x+y$と置換し, $x$と$t$の積分の順序を交換する. 最後に, $t$を固定して$x = t\mu$と置換する.

解答

まず(2.265)の$y$についての積分を$x$についての被積分関数の中に移す.

\begin{align}
\Gamma\left(\mathrm{a}\right)\Gamma\left(\mathrm{b}\right) 
&= 
\int_0^\infty\mathrm{exp}(-x)\,x^{\mathrm{a}-1} \mathrm{d}x \int_0^\infty\mathrm{exp}(-y)\,y^{\mathrm{b}-1}
\mathrm{d}y \\
&= 
\int_0^\infty \int_0^\infty \mathrm{exp}(-x-y)\,x^{\mathrm{a}-1}y^{\mathrm{b}-1} \mathrm{d}y \mathrm{d}x 
\end{align}

次に, $x$を固定して$t = x + y$と置換する. $\frac{\mathrm{d}t}{\mathrm{d}y} = 1$で, $y$が$\left[0,\infty\right)$のとき$t$は$\left[x,\infty\right)$であるので

\begin{align}
\Gamma\left(\mathrm{a}\right)\Gamma\left(\mathrm{b}\right) 
&=
\int_0^\infty \int_0^\infty \mathrm{exp}(-x-y)\,x^{\mathrm{a}-1}y^{\mathrm{b}-1} \mathrm{d}y \mathrm{d}x \\
&= \int_0^\infty \int_x^\infty \mathrm{exp}(-t) x^{\mathrm{a}-1}\left(t-x\right)^{\mathrm{b}-1} \mathrm{d}t \mathrm{d}x
\end{align}

を得る. そして, $x$と$t$の積分の順番を入れ替える. この時, はじめに$x$で積分を行う際は, $t$を固定して$\left[0,t\right]$で積分し, その後に$t$を$\left[0,\infty\right]$で動かす. よって

\begin{align}
\Gamma\left(\mathrm{a}\right)\Gamma\left(\mathrm{b}\right) 
&= 
\int_0^\infty \int_x^\infty \mathrm{exp}(-t) x^{\mathrm{a}-1}\left(t-x\right)^{\mathrm{b}-1} \mathrm{d}t \mathrm{d}x \\
&=
\int_0^\infty \int_0^t \mathrm{exp}(-t) x^{\mathrm{a}-1}\left(t-x\right)^{\mathrm{b}-1} \mathrm{d}x \mathrm{d}t
\end{align}

を得る. 最後に$x = t\mu$と置換する. $\frac{\mathrm{d}\mu}{\mathrm{d}x} = t$で$x$が$\left[0,t\right]$をとるとき, $\mu$は$\left[0,1\right]$をとる. よって

\begin{align}
\Gamma\left(\mathrm{a}\right)\Gamma\left(\mathrm{b}\right) 
&=
\int_0^\infty \int_0^t \mathrm{exp}(-t) x^{\mathrm{a}-1}\left(t-x\right)^{\mathrm{b}-1} \mathrm{d}x\mathrm{d}t \\
&= 
\int_0^\infty \int_0^1 \mathrm{exp}(-t) \left(t\mu\right)^{\mathrm{a}-1}\left(t-t\mu\right)^{\mathrm{b}-1}t \mathrm{d}\mu\mathrm{d}t \\
&=
\int_0^\infty \mathrm{exp}(-t)t^{\mathrm{a + b -1}}\mathrm{d}t \cdot \int_0^1 \mu^{\mathrm{a - 1}} (1 - \mu)^{\mathrm{b - 1}} \mathrm{d}\mu
\end{align}

ガンマ関数の定義式 $\Gamma(x)\equiv \int_0^\infty \mathrm{u}^{x - 1} \mathrm{e}^{-u}\mathrm{d}u$ (1.141)より

\begin{align}
\Gamma\left(\mathrm{a}\right)\Gamma\left(\mathrm{b}\right) 
&=
\int_0^\infty \mathrm{exp}(-t)t^{\mathrm{a + b -1}}\mathrm{d}t \cdot \int_0^1 \mu^{\mathrm{a - 1}} (1 - \mu)^{\mathrm{b - 1}} \mathrm{d}\mu \\
&=
\Gamma\left(\mathrm{a + b}\right) \int_0^1 \mu^{\mathrm{a - 1}} (1 - \mu)^{\mathrm{b - 1}} \mathrm{d}\mu
\end{align}

を得る. 上式の辺々を$\Gamma\left(\mathrm{a + b}\right)$で割ると(2.265)を得ることができる.

よって(2.265)は示された。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0