The probability density of a normal random variable with mean μ and variance σ2 is p(x)=1√2πσ2e−(x−μ)22σ2
One way to show that the probability density integrates to one is to consider the following integral and switch to polar co-oridinates.
∫∞−∞e−x22∫∞−∞e−y22dxdy∫∞−∞∫∞−∞e−x2+y22dxdy
switching to polar co-ordinates x=rcosθ, y=rsinθ
We calculate the Jacobian to change integration variables.
|∂(x,y)∂(r,θ)|=|∂x∂r∂y∂r∂x∂θ∂y∂θ|=|cosθsinθ−rsinθrcosθ|=rcos2θ+rsin2θ=r
∫∞−∞∫∞−∞e−x2+y22dxdy=∫∞0∫2π0|∂(x,y)∂(r,θ)|e−r22drdθ=∫∞0∫2π0re−r22drdθ=2π[−e−r22]∞0=2π
so that
∫∞−∞e−x22=√2π
i.e.
1√2π∫∞−∞e−x22dx=1
Moments of a Normal Distribution.
E[X]=1√2π∫∞−∞xe−x22dx=1√2π[−e−x22]∞−∞=0
This is also obvious by symmetry. p(x) is a symmetric function i.e. p(x)=p(−x) so multiplying p(x) by an odd function f(x) i.e. f(x)=−f(−x) and calculating ∫∞−∞p(x)f(x)dx=0.
Since ∫0−∞p(x)f(x)dx=−∫∞0p(x)f(x)dx. Substitute y=−x to see this.
E[X2]=1√2π∫∞−∞x2e−x22dx=1√2π([−xe−x22]∞−∞+∫∞−∞e−x22dx)=1