做毕设时的一个中间定理时,刚好要对一个正态随机变量的 cos X \cos X cosX 的均值、方差进行估计。其概率密度函数并不好求,但意外地发现 n n n 阶矩好估计。想了下,这个问题还挺有实际价值的,特此记录一下,以便节省后人头发。
设 X ∼ N ( 0 , σ 2 ) X\sim \mathrm{N}\left( 0,\ \sigma ^2 \right) X∼N(0, σ2) ,令 U = cos X U=\cos X U=cosX , Y = X 2 n Y=X^{2n} Y=X2n ,根据概率的换元公式:
f Y ( y ) = f X ( y 1 / 2 n ) 1 n y 1 2 n − 1 = y 1 2 n − 1 2 π n σ exp [ − y 1 / n 2 σ 2 ] (1.1) f_Y\left( y \right) =f_X\left( y^{1/{2n}} \right) \frac{1}{n}y^{\frac{1}{2n}-1}=\frac{y^{\frac{1}{2n}-1}}{\sqrt{2\pi}n\sigma}\exp \left[ -\frac{y^{1/n}}{2\sigma ^2} \right] \tag{1.1} fY(y)=fX(y1/2n)n1y2n1−1=2πnσy2n1−1exp[−2σ2y1/n](1.1)
为啥这里是 1 n y 1 2 n − 1 \frac{1}{n}y^{\frac{1}{2n}-1} n1y2n1−1 而不是 1 2 n y 1 2 n − 1 \frac{1}{2n}y^{\frac{1}{2n}-1} 2n1y2n1−1 呢?是因为偶函数要乘以2
由泰勒级数 U = cos X = ∑ n = 0 ∞ ( − 1 ) n X 2 n ( 2 n ) ! U=\cos X=\sum_{n=0}^{\infty}{\frac{\left( -1 \right) ^nX^{2n}}{\left( 2n \right) !}} U=cosX=∑n=0∞(2n)!(−1)nX2n ,所以
E [ U ] = ∑ n = 0 ∞ ( − 1 ) n ( 2 n ) ! μ Y n = ∑ n = 0 ∞ ( − 1 ) n ( 2 n ) ! ∫ 0 ∞ y f Y n ( y ) d y = ∑ n = 0 ∞ ( − 1 ) n ( 2 n ) ! ∫ 0 ∞ y 1 2 n 2 π n σ exp [ − y 1 / n 2 σ 2 ] d y = ∑ n = 0 ∞ ( − 1 ) n ( 2 n ) ! ( 2 n ) ! ( n ! ) 2 n σ 2 n = ∑ n = 0 ∞ ( − 1 ) n ( n ! ) 2 n σ 2 n = exp ( − σ 2 2 ) (1.2) \begin{aligned} \mathrm{E}\left[ U \right] &=\sum_{n=0}^{\infty}{\frac{\left( -1 \right) ^n}{\left( 2n \right) !}\mu _{Y_n}}\\ &=\sum_{n=0}^{\infty}{\frac{\left( -1 \right) ^n}{\left( 2n \right) !}\int_0^{\infty}{yf_{Y_n}\left( y \right) \mathrm{d}y}}\\ &=\sum_{n=0}^{\infty}{\frac{\left( -1 \right) ^n}{\left( 2n \right) !}\int_0^{\infty}{\frac{y^{\frac{1}{2n}}}{\sqrt{2\pi}n\sigma}\exp \left[ -\frac{y^{1/n}}{2\sigma ^2} \right] \mathrm{d}y}}\\ &=\sum_{n=0}^{\infty}{\frac{\left( -1 \right) ^n}{\left( 2n \right) !}\frac{\left( 2n \right) !}{\left( n! \right) 2^n}\sigma ^{2n}}\\ &=\sum_{n=0}^{\infty}{\frac{\left( -1 \right) ^n}{\left( n! \right) 2^n}\sigma ^{2n}}\\ &=\exp \left( -\frac{\sigma ^2}{2} \right)\\ \end{aligned} \tag{1.2} E[U]=n=0∑∞(2n)!(−1)nμYn=n=0∑∞(2n)!(−1)n∫0∞yfYn(y)dy=n=0∑∞(2n)!(−1)n∫0∞2πnσy2n1exp[−2σ2y1/n]dy=n=0∑∞(2n)!(−1)n(n!)2n(2n)!σ2n=n=0∑∞(n!)2n(−1)nσ2n=exp(−2σ2)(1.2)
E [ U n ] = 1 2 n ∑ k = 0 n ( n k ) E [ cos [ ( n − 2 k ) x ] ] = 1 2 n ∑ k = 0 n ( n k ) exp ( − ( n − 2 k ) 2 σ 2 2 ) (1.3) \begin{aligned} \mathrm{E}\left[ U^n \right] &=\frac{1}{2^n}\sum_{k=0}^n{\binom{n}{k} \mathrm{E}\left[ \cos \left[ \left( n-2k \right) x \right] \right]}\\ &=\frac{1}{2^n}\sum_{k=0}^n{\binom{n}{k} \exp \left( -\frac{\left( n-2k \right) ^2\sigma ^2}{2} \right)}\\ \end{aligned}\tag{1.3} E[Un]=2n1k=0∑n(kn)E[cos[(n−2k)x]]=2n1k=0∑n(kn)exp(−2(n−2k)2σ2)(1.3)
方差按照 E [ U 2 ] − E [ U ] 2 \mathrm{E}\left[ U^2 \right]-\mathrm{E}\left[ U \right]^2 E[U2]−E[U]2 算就行,形式还挺妙的。
转化为零均值即可,若均值非 0 0 0 ,按照 cos ( x + μ ) = cos x cos μ − sin x sin μ \cos(x+\mu)=\cos x\cos \mu-\sin x\sin \mu cos(x+μ)=cosxcosμ−sinxsinμ ,其中 x x x 是零均值, sin x \sin x sinx 期望为令,那么期望就是 cos μ ⋅ exp ( − σ 2 2 ) \cos\mu\cdot\exp \left( -\frac{\sigma ^2}{2} \right) cosμ⋅exp(−2σ2) 。