Question #208888

Find the mean and variance of normal distribution using density function


1
Expert's answer
2021-06-22T05:03:07-0400

Let XX is distributed according to the probability density function



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

Then it's moment generation function



MX(λ)=E(eλX)=+f(x)eλxdx{M_X}(\lambda ) = \mathbb{E}({e^{\lambda X}}) = \int\limits_{ - \infty }^{ + \infty } {f(x){e^{\lambda x}}dx}


Let's evaluate this integral


+f(x)eλxdx=12πσ+e(xμ)22σ2+λxdx\int\limits_{ - \infty }^{ + \infty } {f(x){e^{\lambda x}}dx} = \frac{1}{{\sqrt {2\pi } \sigma }}\int\limits_{ - \infty }^{ + \infty } {{e^{ - \frac{{{{(x - \mu )}^2}}}{{2{\sigma ^2}}} + \lambda x}}dx}

At the first, complete the square in the power of the exponent



(xμ)22σ2+tx=12σ2(x(μ+λσ2))2+μλ+λ2σ22- \frac{{{{(x - \mu )}^2}}}{{2{\sigma ^2}}} + tx = - \frac{1}{{2{\sigma ^2}}}{(x - (\mu + \lambda {\sigma ^2}))^2} + \mu \lambda + \frac{{{\lambda ^2}{\sigma ^2}}}{2}

Then change the variable x(μ+λσ2)=ξx - (\mu + \lambda {\sigma ^2}) = \xi , then dx=dξdx = d\xi , limits do not change



MX(λ)=12πσeμλ+λ2σ22+e12σ2ξ2dξ{M_X}(\lambda ) = \frac{1}{{\sqrt {2\pi } \sigma }}{e^{\mu \lambda + \frac{{{\lambda ^2}{\sigma ^2}}}{2}}}\int\limits_{ - \infty }^{ + \infty } {{e^{ - \frac{1}{{2{\sigma ^2}}}{\xi ^2}}}d\xi }

We need only to evaluate I=+e12σ2ξ2dξI = \int\limits_{ - \infty }^{ + \infty } {{e^{ - \frac{1}{{2{\sigma ^2}}}{\xi ^2}}}d\xi } . Let rewrite it's square as a double integral at the whole R2{\mathbb{R}^2} plane



I2=+e12σ2ξ2dξ+e12σ2η2dη=R2e12σ2(ξ2+η2)dξdη{I^2} = \int\limits_{ - \infty }^{ + \infty } {{e^{ - \frac{1}{{2{\sigma ^2}}}{\xi ^2}}}d\xi } \cdot \int\limits_{ - \infty }^{ + \infty } {{e^{ - \frac{1}{{2{\sigma ^2}}}{\eta ^2}}}d\eta } = \iint\limits_{{R^2}} {{e^{ - \frac{1}{{2{\sigma ^2}}}({\xi ^2} + {\eta ^2})}}d\xi d\eta }

And choose polar coordinates ξ=rcosφ\xi = r\cos \varphi , η=rsinφ\eta = r\sin \varphi and dξdη=rdrdφd\xi d\eta = rdrd\varphi .

Then



I2=R2er22σ2rdrdφ=02πdφ0+rer22σ2dr{I^2} = \iint\limits_{{\mathbb{R}^2}} {{e^{ - \frac{{{r^2}}}{{2{\sigma ^2}}}}}rdrd\varphi } = \int\limits_0^{2\pi } {d\varphi } \int\limits_0^{ + \infty } {r{e^{ - \frac{{{r^2}}}{{2{\sigma ^2}}}}}dr}

and



I2=2π0+rer22σ2dr=2πσ20+er22σ2d(r22σ2)=2πσ2er22σ20+=2πσ2{I^2} = 2\pi \int\limits_0^{ + \infty } {r{e^{ - \frac{{{r^2}}}{{2{\sigma ^2}}}}}dr} = 2\pi {\sigma ^2}\int\limits_0^{ + \infty } {{e^{ - \frac{{{r^2}}}{{2{\sigma ^2}}}}}d} (\frac{{{r^2}}}{{2{\sigma ^2}}}) = - 2\pi {\sigma ^2}\left. {{e^{ - \frac{{{r^2}}}{{2{\sigma ^2}}}}}} \right|_0^{ + \infty } = 2\pi {\sigma ^2}


We get


+e12σ2ξ2dξ=2πσ\int\limits_{ - \infty }^{ + \infty } {{e^{ - \frac{1}{{2{\sigma ^2}}}{\xi ^2}}}d\xi } = \sqrt {2\pi } \sigma

and thus



MX(λ)=eμλ+λ2σ22{M_X}(\lambda ) = {e^{\mu \lambda + \frac{{{\lambda ^2}{\sigma ^2}}}{2}}}

Now, using that

To calculate expected value and variance we can use that


E(Xn)=MX(n)(0)\mathbb{E}({X^n}) = M_X^{(n)}(0)

Let's calculate the expected value (mean value)



EX=dMXdλλ=0=(μ+λσ2)eμλ+λ2σ22λ=0=μ\mathbb{E}X = {\left. {\frac{{dM_X}}{{d\lambda }}} \right|_{\lambda = 0}} = {\left. {(\mu + \lambda {\sigma ^2}){e^{\mu \lambda + \frac{{{\lambda ^2}{\sigma ^2}}}{2}}}} \right|_{\lambda = 0}} = \mu

To calculate variance, let's calculate the second moment at first




EX2=d2MXdλ2λ=0=[σ2eμλ+λ2σ22+(μ+λσ2)2eμλ+λ2σ22]λ=0=μ2+σ2\mathbb{E}{X^2} = {\left. {\frac{{{d^2}M_X}}{{d{\lambda ^2}}}} \right|_{\lambda = 0}} = [{\left. {{\sigma ^2}{e^{\mu \lambda + \frac{{{\lambda ^2}{\sigma ^2}}}{2}}} + {{(\mu + \lambda {\sigma ^2})}^2}{e^{\mu \lambda + \frac{{{\lambda ^2}{\sigma ^2}}}{2}}}]} \right|_{\lambda = 0}} = {\mu ^2} + {\sigma ^2}

Now calculate the variance



VarX=EX2E2X=σ2\operatorname{Var} X = E{X^2} - {E^2}X = {\sigma ^2}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!
LATEST TUTORIALS
APPROVED BY CLIENTS