Let X is distributed according to the probability density function
f(x)=2πσ1e−2σ2(x−μ)2Then it's moment generation function
MX(λ)=E(eλX)=−∞∫+∞f(x)eλxdx
Let's evaluate this integral
−∞∫+∞f(x)eλxdx=2πσ1−∞∫+∞e−2σ2(x−μ)2+λxdxAt the first, complete the square in the power of the exponent
−2σ2(x−μ)2+tx=−2σ21(x−(μ+λσ2))2+μλ+2λ2σ2Then change the variable x−(μ+λσ2)=ξ , then dx=dξ , limits do not change
MX(λ)=2πσ1eμλ+2λ2σ2−∞∫+∞e−2σ21ξ2dξWe need only to evaluate I=−∞∫+∞e−2σ21ξ2dξ . Let rewrite it's square as a double integral at the whole R2 plane
I2=−∞∫+∞e−2σ21ξ2dξ⋅−∞∫+∞e−2σ21η2dη=R2∬e−2σ21(ξ2+η2)dξdηAnd choose polar coordinates ξ=rcosφ , η=rsinφ and dξdη=rdrdφ .
Then
I2=R2∬e−2σ2r2rdrdφ=0∫2πdφ0∫+∞re−2σ2r2drand
I2=2π0∫+∞re−2σ2r2dr=2πσ20∫+∞e−2σ2r2d(2σ2r2)=−2πσ2e−2σ2r2∣∣0+∞=2πσ2
We get
−∞∫+∞e−2σ21ξ2dξ=2πσand thus
MX(λ)=eμλ+2λ2σ2Now, using that
To calculate expected value and variance we can use that
E(Xn)=MX(n)(0)Let's calculate the expected value (mean value)
EX=dλdMX∣∣λ=0=(μ+λσ2)eμλ+2λ2σ2∣∣λ=0=μTo calculate variance, let's calculate the second moment at first
EX2=dλ2d2MX∣∣λ=0=[σ2eμλ+2λ2σ2+(μ+λσ2)2eμλ+2λ2σ2]∣∣λ=0=μ2+σ2Now calculate the variance
VarX=EX2−E2X=σ2
Comments