跳到主要内容

東京大学 情報理工学系研究科 コンピュータ科学専攻 2019年8月実施 専門科目II 問題6

Author

祭音Myyura (co-authored with GPT 5.6 SOL)

Description

The probability density function of the normal distribution N(μ,σ2)N(\mu, \sigma^2) with mean μR\mu \in \mathbb{R} and variance σ2>0\sigma^2 > 0 is given by

f(x)=12πσ2exp((xμ)22σ2).f(x) = \frac{1}{\sqrt{2\pi\sigma^2}} \exp\left(-\frac{(x - \mu)^2}{2\sigma^2}\right).

Let XX and ZZ be random variables that independently follow N(μ,1)N(\mu, 1) and N(0,1)N(0, 1), respectively, and define Y=θX+ZY = \theta X + Z for some constant θR\theta \in \mathbb{R}. For an integer n>1n > 1, let (X1,Y1),(X2,Y2),,(Xn,Yn)(X_1, Y_1), (X_2, Y_2), \ldots, (X_n, Y_n) be two-dimensional random variables that independently follow the same distribution as (X,Y)(X, Y), for which we write X(n)=(X1,X2,,Xn)X^{(n)} = (X_1, X_2, \ldots, X_n) and Y(n)=(Y1,Y2,,Yn)Y^{(n)} = (Y_1, Y_2, \ldots, Y_n).

Answer the following questions.

(1) Express the expectation E[Y]\mathbb{E}[Y] and variance V[Y]\mathbb{V}[Y] of YY using μ\mu and θ\theta.

(2) Show that the conditional distribution of XX given YY is a normal distribution, and express its expectation E[XY]\mathbb{E}[X|Y] and variance V[XY]\mathbb{V}[X|Y] using μ\mu, θ\theta, and YY.

(3) Let (x(n),y(n))(x^{(n)}, y^{(n)}) denote a realization of (X(n),Y(n))(X^{(n)}, Y^{(n)}). Express the joint probability density function pμ,θ(x(n),y(n))p_{\mu, \theta}(x^{(n)}, y^{(n)}) of (X(n),Y(n))(X^{(n)}, Y^{(n)}) using μ,θ,x(n)=(x1,x2,,xn)\mu, \theta, x^{(n)} = (x_1, x_2, \ldots, x_n) and y(n)=(y1,y2,,yn)y^{(n)} = (y_1, y_2, \ldots, y_n).

(4) Consider maximum-likelihood estimation of (μ,θ)(\mu, \theta) by the EM algorithm for the case where the observation of XnX_n is missing from (X(n),Y(n))(X^{(n)},Y^{(n)}), that is, the case where (X(n1),Y(n))(X^{(n-1)},Y^{(n)}) is observed. Then the update rule of estimators of (μ,θ)(\mu, \theta) by the EM algorithm for some initial value (μ0,θ0)R2(\mu_0, \theta_0) \in \mathbb{R}^2 is given by

(μt+1,θt+1)=argmax(μ,θ)R2EXnN(μˉ,σˉ2)[logpμ,θ(X(n),Y(n))],t=0,1,,(\mu_{t+1}, \theta_{t+1}) = \mathop{\arg\max}\limits_{(\mu, \theta) \in \mathbb{R}^2} \mathbb{E}_{X_n \sim N(\bar{\mu}, \bar{\sigma}^2)}[\log p_{\mu, \theta}(X^{(n)},Y^{(n)})], \quad t = 0, 1, \ldots,

where μˉ\bar{\mu} and σˉ2\bar{\sigma}^2 are the values obtained by the substitution (μ,θ,Y):=(μt,θt,Yn)(\mu, \theta, Y) := (\mu_t, \theta_t, Y_n) in the expressions of E[XY]\mathbb{E}[X|Y] and V[XY]\mathbb{V}[X|Y] obtained in question (2), respectively, and EXnN(μˉ,σˉ2)\mathbb{E}_{X_n \sim N(\bar{\mu}, \bar{\sigma}^2)} denotes the expectation when XnX_n follows N(μˉ,σˉ2)N(\bar{\mu}, \bar{\sigma}^2) and (X(n1),Y(n))(X^{(n-1)},Y^{(n)}) is fixed.

  • (i) Express EXnN(μˉ,σˉ2)[logpμ,θ(X(n),Y(n))]\mathbb{E}_{X_n \sim N(\bar{\mu}, \bar{\sigma}^2)}[\log p_{\mu, \theta}(X^{(n)},Y^{(n)})] using n,μ,θ,μˉ,σˉ2,X(n1)n, \mu, \theta, \bar{\mu}, \bar{\sigma}^2, X^{(n-1)} and Y(n)Y^{(n)}.
  • (ii) Express (μt+1,θt+1)(\mu_{t+1}, \theta_{t+1}) using n,μˉ,σˉ2,X(n1)n, \bar{\mu}, \bar{\sigma}^2, X^{(n-1)} and Y(n)Y^{(n)}.

题目描述

均值为 μR\mu\in\mathbb R、方差为 σ2>0\sigma^2>0 的正态分布 N(μ,σ2)N(\mu,\sigma^2) 的密度为

f(x)=12πσ2exp((xμ)22σ2).f(x)=\frac1{\sqrt{2\pi\sigma^2}} \exp\left(-\frac{(x-\mu)^2}{2\sigma^2}\right).

设随机变量 X,ZX,Z 相互独立,分别服从 N(μ,1)N(\mu,1)N(0,1)N(0,1),并令 Y=θX+ZY=\theta X+Z,其中 θR\theta\in\mathbb R。对整数 n>1n>1,令 (Xi,Yi) (i=1,,n)(X_i,Y_i)\ (i=1,\ldots,n) 独立同分布于 (X,Y)(X,Y),记 X(n)=(X1,,Xn)X^{(n)}=(X_1,\ldots,X_n)Y(n)=(Y1,,Yn)Y^{(n)}=(Y_1,\ldots,Y_n)。回答下列问题。

(1)用 μ,θ\mu,\theta 表示 E[Y]\mathbb E[Y]V[Y]\mathbb V[Y]

(2)证明给定 YYXX 的条件分布仍为正态分布,并用 μ,θ,Y\mu,\theta,Y 表示 E[XY]\mathbb E[X\mid Y]V[XY]\mathbb V[X\mid Y]

(3)设 (x(n),y(n))(x^{(n)},y^{(n)})(X(n),Y(n))(X^{(n)},Y^{(n)}) 的一个实现。用 μ,θ,x(n),y(n)\mu,\theta,x^{(n)},y^{(n)} 写出其联合密度 pμ,θ(x(n),y(n))p_{\mu,\theta}(x^{(n)},y^{(n)})

(4)现在 XnX_n 缺失,仅观测到 (X(n1),Y(n))(X^{(n-1)},Y^{(n)}),用 EM 算法进行 (μ,θ)(\mu,\theta) 的最大似然估计。从任意初值 (μ0,θ0)R2(\mu_0,\theta_0)\in\mathbb R^2 出发,更新规则为

(μt+1,θt+1)=argmax(μ,θ)R2EXnN(μˉ,σˉ2)[logpμ,θ(X(n),Y(n))],t=0,1,,(\mu_{t+1},\theta_{t+1}) =\mathop{\arg\max}_{(\mu,\theta)\in\mathbb R^2} \mathbb E_{X_n\sim N(\bar\mu,\bar\sigma^2)} [\log p_{\mu,\theta}(X^{(n)},Y^{(n)})],\qquad t=0,1,\ldots,

其中 μˉ,σˉ2\bar\mu,\bar\sigma^2 分别是在第(2)问的条件均值、条件方差表达式中代入 (μ,θ,Y)=(μt,θt,Yn)(\mu,\theta,Y)=(\mu_t,\theta_t,Y_n) 所得;取期望时固定 (X(n1),Y(n))(X^{(n-1)},Y^{(n)})

  • (i)用 n,μ,θ,μˉ,σˉ2,X(n1),Y(n)n,\mu,\theta,\bar\mu,\bar\sigma^2,X^{(n-1)},Y^{(n)} 表示上述期望对数似然。
  • (ii)用 n,μˉ,σˉ2,X(n1),Y(n)n,\bar\mu,\bar\sigma^2,X^{(n-1)},Y^{(n)} 表示更新后的 (μt+1,θt+1)(\mu_{t+1},\theta_{t+1})

Kai

(1)

X,ZX,Z 独立,

E[Y]=θμ,V[Y]=1+θ2.\boxed{\mathbb E[Y]=\theta\mu,\qquad\mathbb V[Y]=1+\theta^2.}

(2)

固定 Y=yY=y,联合密度中与 xx 有关的指数为

12[(xμ)2+(yθx)2]=1+θ22(xμ+θy1+θ2)2+C(y).-\frac12\big[(x-\mu)^2+(y-\theta x)^2\big] =-\frac{1+\theta^2}{2} \left(x-\frac{\mu+\theta y}{1+\theta^2}\right)^2+C(y).

归一化后可知

XY=yN(μ+θy1+θ2,11+θ2).\boxed{X\mid Y=y\sim N\left(\frac{\mu+\theta y}{1+\theta^2},\frac1{1+\theta^2}\right).}

因此条件均值为 (μ+θY)/(1+θ2)(\mu+\theta Y)/(1+\theta^2),条件方差为 1/(1+θ2)1/(1+\theta^2)

(3)

XiN(μ,1)X_i\sim N(\mu,1),且 YiXi=xiN(θxi,1)Y_i\mid X_i=x_i\sim N(\theta x_i,1)。各样本独立,故

pμ,θ(x(n),y(n))=(2π)nexp{12i=1n[(xiμ)2+(yiθxi)2]}.\boxed{p_{\mu,\theta}(x^{(n)},y^{(n)}) =(2\pi)^{-n}\exp\left\{-\frac12\sum_{i=1}^n \big[(x_i-\mu)^2+(y_i-\theta x_i)^2\big]\right\}.}

(4)

μˉ=μt+θtYn1+θt2,σˉ2=11+θt2.\bar\mu=\frac{\mu_t+\theta_tY_n}{1+\theta_t^2},\qquad \bar\sigma^2=\frac1{1+\theta_t^2}.

(i) 利用 E[Xn]=μˉ\mathbb E[X_n]=\bar\muE[Xn2]=μˉ2+σˉ2\mathbb E[X_n^2]=\bar\mu^2+\bar\sigma^2,有

Q(μ,θ)=nlog(2π)12{i=1n1[(Xiμ)2+(YiθXi)2]+(μˉμ)2+σˉ2+(Ynθμˉ)2+θ2σˉ2}.\begin{aligned} Q(\mu,\theta) ={}&-n\log(2\pi)\\ &-\frac12\left\{ \sum_{i=1}^{n-1}\big[(X_i-\mu)^2+(Y_i-\theta X_i)^2\big] +(\bar\mu-\mu)^2+\bar\sigma^2 +(Y_n-\theta\bar\mu)^2+\theta^2\bar\sigma^2 \right\}. \end{aligned}

(ii) 分别令对 μ,θ\mu,\theta 的偏导为零,得

μt+1=i=1n1Xi+μˉn,θt+1=i=1n1XiYi+μˉYni=1n1Xi2+μˉ2+σˉ2.\boxed{\mu_{t+1}=\frac{\sum_{i=1}^{n-1}X_i+\bar\mu}{n},\qquad \theta_{t+1}=\frac{\sum_{i=1}^{n-1}X_iY_i+\bar\mu Y_n} {\sum_{i=1}^{n-1}X_i^2+\bar\mu^2+\bar\sigma^2}.}

QQ 的 Hessian 为对角矩阵,对角元分别为 n-n(i=1n1Xi2+μˉ2+σˉ2)-(\sum_{i=1}^{n-1}X_i^2+\bar\mu^2+\bar\sigma^2),均严格为负,因此以上是唯一最大值点。