返回题库

高斯积分与正态密度归一化

Easy integration question 4

专题
General / 综合
难度
L4

题目详情

量化面试题:高斯积分与正态密度归一化。

英文原题

  1. What is the value of ex2dx\int_{-\infty}^{\infty}e^{-x^{2}}d x ?

  2. Show that the normal density integrates to one.

解析

(1) 令 I=ex2dxI=\int_{-\infty}^{\infty}e^{-x^2}dx,按极坐标计算可得 I2=πI^2=\pi,因此 I=π\boxed{I=\sqrt\pi}

(2) 标准正态密度为

φ(x)=12πex2/2.\varphi(x)=\frac{1}{\sqrt{2\pi}}e^{-x^2/2}.

u=x/2u=x/\sqrt2,则

φ(x)dx=12πex2/2dx=12π2eu2du=12π2π=1.\int_{-\infty}^{\infty}\varphi(x)dx=\frac{1}{\sqrt{2\pi}}\int_{-\infty}^{\infty}e^{-x^2/2}dx =\frac{1}{\sqrt{2\pi}}\cdot\sqrt2\int_{-\infty}^{\infty}e^{-u^2}du =\frac{1}{\sqrt{2\pi}}\cdot\sqrt2\cdot\sqrt\pi=1.

一般 N(μ,σ2)N(\mu,\sigma^2) 密度用代换 z=(xμ)/σz=(x-\mu)/\sigma 同理可证积分为 1。


英文解析

(1) Let I=ex2dxI=\int_{-\infty}^{\infty}e^{-x^2}dx. Computing via polar coordinates yields I2=πI^2=\pi, therefore I=π\boxed{I=\sqrt\pi}.

(2) The standard normal density is

φ(x)=12πex2/2.\varphi(x)=\frac{1}{\sqrt{2\pi}}e^{-x^2/2}.

Let u=x/2u=x/\sqrt2, then

φ(x)dx=12πex2/2dx=12π2eu2du=12π2π=1.\int_{-\infty}^{\infty}\varphi(x)dx=\frac{1}{\sqrt{2\pi}}\int_{-\infty}^{\infty}e^{-x^2/2}dx =\frac{1}{\sqrt{2\pi}}\cdot\sqrt2\int_{-\infty}^{\infty}e^{-u^2}du =\frac{1}{\sqrt{2\pi}}\cdot\sqrt2\cdot\sqrt\pi=1.

Generally, for N(μ,σ2)N(\mu,\sigma^2), the density integrates to 1 by the same substitution z=(xμ)/σz=(x-\mu)/\sigma.