Post · 8 min read· pp. 241–247

4.2.3 Normal (Gaussian) Distribution


Video Available Video Available

The normal distribution is by far the most important probability distribution. One of the main reasons for that is the Central Limit Theorem (CLT) that we will discuss later in the book. To give you an idea, the CLT states that if you add a large number of random variables, the distribution of the sum will be approximately normal under certain conditions. The importance of this result comes from the fact that many random variables in real life can be expressed as the sum of a large number of random variables and, by the CLT, we can argue that distribution of the sum should be normal. The CLT is one of the most important results in probability and we will discuss it later on. Here, we will introduce normal random variables.

We first define the standard normal random variable. We will then see that we can obtain other normal random variables by scaling and shifting a standard normal random variable.

A continuous random variable ZZ is said to be a standard normal (standard Gaussian) random variable, shown as Z∼N(0,1)Z \sim N(0,1), if its PDF is given by

fZ(z)=12πexp⁡{−z22},for all z∈R.f_Z(z) = \frac{1}{\sqrt{2 \pi}} \exp\left\{-\frac{z^2}{2}\right\}, \hspace{20pt} \textrm{for all } z \in \mathbb{R}.

The 12π\frac{1}{\sqrt{2 \pi}} is there to make sure that the area under the PDF is equal to one. We will verify that this holds in the solved problems section. Figure 4.6 shows the PDF of the standard normal random variable.

Figure

Fig.4.6 - PDF of the standard normal random variable.

Let us find the mean and variance of the standard normal distribution. To do that, we will use a simple useful fact. Consider a function g(u):R→Rg(u):\mathbb{R}\rightarrow\mathbb{R}. If g(u)g(u) is an odd function, i.e., g(−u)=−g(u)g(-u)=-g(u), and ∣∫0∞g(u)du∣<∞|\int_{0}^{\infty} g(u) du| < \infty, then

∫−∞∞g(u)du=0.\int_{-\infty}^{\infty} g(u) du=0.
For our purpose, let
g(u)=u2k+1exp⁡{−u22},g(u)= u^{2k+1}\exp\left\{-\frac{u^2}{2}\right\},
where k=0,1,2,...k=0,1,2,.... Then g(u)g(u) is an odd function. Also ∣∫0∞g(u)du∣<∞|\int_{0}^{\infty} g(u) du| < \infty. One way to see this is to note that g(u)g(u) decays faster than the function exp⁡{−u}\exp\left\{-u\right\} and since ∣∫0∞exp⁡{−u}du∣<∞|\int_{0}^{\infty} \exp\left\{-u\right\} du| < \infty, we conclude that ∣∫0∞g(u)du∣<∞|\int_{0}^{\infty} g(u) du| < \infty. Now, let ZZ be a standard normal random variable. Then, we have
EZ2k+1=12π∫−∞∞u2k+1exp⁡{−u22}du=0,EZ^{2k+1} = \frac{1}{\sqrt{2 \pi}} \int_{-\infty}^{\infty} u^{2k+1}\exp\left\{-\frac{u^2}{2}\right\} du=0,
for all k∈{0,1,2,..,}k \in \{0,1,2,..,\}. Thus, we have shown that for a standard normal random variable ZZ, we have
EZ=EZ3=EZ5=....=0.EZ=EZ^3=EZ^5=....=0.
In particular, the standard normal distribution has zero mean. This is not surprising as we can see from Figure 4.6 that the PDF is symmetric around the origin, so we expect that EZ=0EZ=0. Next, let's find EZ2EZ^2.

EZ2EZ^2=12π∫−∞∞u2exp⁡{−u22}du= \frac{1}{\sqrt{2 \pi}} \int_{-\infty}^{\infty} u^2\exp\left\{-\frac{u^2}{2}\right\} du
=12π[−uexp⁡{−u22}]−∞∞+= \frac{1}{\sqrt{2 \pi}}\bigg[ -u\exp\left\{-\frac{u^2}{2}\right\}\bigg]_{-\infty}^{\infty} +
+12π∫_−∞∞exp⁡{−u22}du(integration by parts)+\frac{1}{\sqrt{2 \pi}} \int\_{-\infty}^{\infty} \exp\left\{-\frac{u^2}{2}\right\} du \hspace{20pt} (\textrm{integration by parts})\\
=∫−∞∞12πexp⁡{−u22}du= \int_{-\infty}^{\infty} \frac{1}{\sqrt{2 \pi}} \exp\left\{-\frac{u^2}{2}\right\} du
=1.=1.

The last equality holds because we are integrating the standard normal PDF from −∞-\infty to ∞\infty. Thus, we conclude that for a standard normal random variable ZZ, we have

Var(Z)=1.\textrm{Var}(Z)=1.
So far we have shown the following:

If Z∼N(0,1)Z \sim N(0,1), then EZ=0EZ=0 and Var(Z)=1(Z)=1.

CDF of the standard normal

To find the CDF of the standard normal distribution, we need to integrate the PDF function. In particular, we have

FZ(z)=12π∫−∞zexp⁡{−u22}du.F_Z(z)=\frac{1}{\sqrt{2 \pi}} \int_{-\infty}^{z}\exp\left\{-\frac{u^2}{2}\right\} du.
This integral does not have a closed form solution. Nevertheless, because of the importance of the normal distribution, the values of FZ(z)F_Z(z) have been tabulated and many calculators and software packages have this function. We usually denote the standard normal CDF by Φ\Phi.

The CDF of the standard normal distribution is denoted by the Φ\Phi function:

Φ(x)=P(Z≤x)=12π∫−∞xexp⁡{−u22}du.\Phi(x)=P(Z \leq x)= \frac{1}{\sqrt{2 \pi}} \int_{-\infty}^{x}\exp\left\{-\frac{u^2}{2}\right\} du.

As we will see in a moment, the CDF of any normal random variable can be written in terms of the Φ\Phi function, so the Φ\Phi function is widely used in probability. Figure 4.7 shows the Φ\Phi function.

Figure

Fig.4.7 - The Φ\Phi function (CDF of standard normal).

Here are some properties of the Φ\Phi function that can be shown from its definition.

  1. lim⁡x→∞Φ(x)=1,lim⁡x→−∞Φ(x)=0\lim \limits_{x\rightarrow \infty} \Phi(x)=1, \hspace{5pt} \lim \limits_{x\rightarrow -\infty} \Phi(x)=0;
  2. Φ(0)=12\Phi(0)=\frac{1}{2};
  3. Φ(−x)=1−Φ(x)\Phi(-x)=1-\Phi(x), for all x∈Rx \in \mathbb{R}.

Also, since the Φ\Phi function does not have a closed form, it is sometimes useful to use upper or lower bounds. In particular we can state the following bounds (see Problem 7 in the Solved Problems section). For all x≥0x \geq 0,

12πxx2+1exp⁡{−x22}≤1−Φ(x)≤12π1xexp⁡{−x22}(4.7)\hspace{50pt} \frac{1}{\sqrt{2\pi}} \frac{x}{x^2+1} \exp\left\{-\frac{x^2}{2}\right\} \leq 1-\Phi(x) \leq \frac{1}{\sqrt{2\pi}} \frac{1}{x} \exp\left\{-\frac{x^2}{2}\right\} \hspace{50pt} (4.7)


As we mentioned earlier, because of the importance of the normal distribution, the values of the Φ\Phi function have been tabulated and many calculators and software packages have this function. For example, you can use the normcdf command in MATLAB to compute Φ(x)\Phi(x) for a given number xx. More specifically, normcdf(x)normcdf(x) returns Φ(x)\Phi(x). Also, the function norminvnorminv returns Φ−1(x)\Phi^{−1}(x). That is, if you run x=norminv(y)x=norminv(y), then xx will be the real number for which Φ(x)=y\Phi(x) = y.


Normal random variables

Now that we have seen the standard normal random variable, we can obtain any normal random variable by shifting and scaling a standard normal random variable. In particular, define

X=σZ+μ,where σ>0.X=\sigma Z+\mu, \hspace{20pt} \textrm{where }\sigma > 0.
Then
EX=σEZ+μ=μ,EX=\sigma EZ+\mu=\mu,
Var(X)=σ2Var(Z)=σ2.\textrm{Var}(X)=\sigma^2 \textrm{Var}(Z)=\sigma^2.
We say that XX is a normal random variable with mean μ\mu and variance σ2\sigma^2. We write X∼N(μ,σ2)X \sim N(\mu, \sigma^2).

If ZZ is a standard normal random variable and X=σZ+μX=\sigma Z+\mu, then XX is a normal random variable with mean μ\mu and variance σ2\sigma^2, i.e,

X∼N(μ,σ2).X \sim N(\mu, \sigma^2).

Conversely, if X∼N(μ,σ2)X \sim N(\mu, \sigma^2), the random variable defined by Z=X−μσZ=\frac{X-\mu}{\sigma} is a standard normal random variable, i.e., Z∼N(0,1)Z \sim N(0,1). To find the CDF of X∼N(μ,σ2)X \sim N(\mu, \sigma^2), we can write

FX(x)F_X(x)=P(X≤x)=P(X \leq x)
=P(σZ+μ≤x)(where Z∼N(0,1))=P( \sigma Z+\mu \leq x) \hspace{20pt} \big(\textrm{where }Z \sim N(0,1)\big)
=P(Z≤x−μσ)=P\left(Z \leq \frac{x-\mu}{\sigma}\right)
=Φ(x−μσ).=\Phi\left(\frac{x-\mu}{\sigma}\right).

To find the PDF, we can take the derivative of FXF_X,

fX(x)f_X(x)=ddxFX(x)=\frac{d}{dx} F_X(x)
=ddxΦ(x−μσ)=\frac{d}{dx} \Phi\left(\frac{x-\mu}{\sigma}\right)
=1σΦ′(x−μσ)(chain rule for derivative)=\frac{1}{\sigma} \Phi'\left(\frac{x-\mu}{\sigma}\right) \hspace{20pt} \textrm{(chain rule for derivative)}
=1σfZ(x−μσ)=\frac{1}{\sigma} f_Z\left(\frac{x-\mu}{\sigma}\right)
=1σ2πexp⁡{−(x−μ)22σ2}.=\frac{1}{\sigma\sqrt{2 \pi} } \exp\left\{-\frac{(x-\mu)^2}{2\sigma^2}\right\}.

If XX is a normal random variable with mean μ\mu and variance σ2\sigma^2, i.e, X∼N(μ,σ2)X \sim N(\mu, \sigma^2), then

fX(x)=1σ2πexp⁡{−(x−μ)22σ2},f_X(x)=\frac{1}{ \sigma\sqrt{2 \pi}} \exp\left\{-\frac{(x-\mu)^2}{2\sigma^2}\right\},
FX(x)=P(X≤x)=Φ(x−μσ),F_X(x)=P(X \leq x)=\Phi\left(\frac{x-\mu}{\sigma}\right),
P(a<X≤b)=Φ(b−μσ)−Φ(a−μσ).P(a < X \leq b)= \Phi\left(\frac{b-\mu}{\sigma}\right)-\Phi\left(\frac{a-\mu}{\sigma}\right).

Figure 4.8 shows the PDF of the normal distribution for several values of μ\mu and σ\sigma.

Figure

Fig.4.8 - PDF for normal distribution.


Example Let X∼N(−5,4)X \sim N(-5,4).

  1. Find P(X<0)P(X < 0).
  2. Find P(−7<X<−3)P(-7 < X < -3).
  3. Find P(X>−3∣X>−5)P(X > -3 | X >-5).
  • Solution
    • XX is a normal random variable with μ=−5\mu=-5 and σ=4=2\sigma=\sqrt{4}=2, thus we have

      1. Find P(X<0)P(X < 0):

        P(X<0)P(X < 0)=FX(0)=F_X(0)
        =Φ(0−(−5)2)=\Phi\bigg(\frac{0-(-5)}{2}\bigg)
        =Φ(2.5)≈0.99=\Phi(2.5)\approx 0.99
      2. Find P(−7<X<−3)P(-7 < X < -3):

        P(−7<X<−3)P(-7 < X < -3)=FX(−3)−FX(−7)=F_X(-3)-F_X(-7)
        =Φ((−3)−(−5)2)−Φ((−7)−(−5)2)=\Phi\bigg(\frac{(-3)-(-5)}{2}\bigg)-\Phi\bigg(\frac{(-7)-(-5)}{2}\bigg)
        =Φ(1)−Φ(−1)=\Phi(1)-\Phi(-1)
        =2Φ(1)−1(since Φ(−x)=1−Φ(x))=2\Phi(1)-1 \hspace{20pt} \big(\textrm{since }\Phi(-x)=1-\Phi(x)\big)
        ≈0.68\approx 0.68
      3. Find P(X>−3∣X>−5)P(X > -3 | X > -5):

        P(X>−3∣X>−5)P(X > -3 | X > -5)=P(X>−3,X>−5)P(X>−5)=\frac{P(X > -3,X > -5)}{P(X > -5)}
        =P(X>−3)P(X>−5)=\frac{P(X > -3)}{P(X > -5)}
        =1−Φ((−3)−(−5)2)1−Φ((−5)−(−5)2)=\frac{1-\Phi\bigg(\frac{(-3)-(-5)}{2}\bigg)}{1-\Phi\bigg(\frac{(-5)-(-5)}{2}\bigg)}
        =1−Φ(1)1−Φ(0)=\frac{1-\Phi(1)}{1-\Phi(0)}
        ≈0.15870.5≈0.32\approx \frac{0.1587}{0.5} \approx 0.32

An important and useful property of the normal distribution is that a linear transformation of a normal random variable is itself a normal random variable. In particular, we have the following theorem:

Theorem If X∼N(μX,σX2)X \sim N(\mu_X, \sigma_X^2), and Y=aX+bY=aX+b, where a,b∈Ra,b \in \mathbb{R}, then Y∼N(μY,σY2)Y \sim N(\mu_Y, \sigma_Y^2) where

μY=aμX+b,σY2=a2σX2.\mu_Y=a\mu_X+b, \hspace{10pt} \sigma^2_Y=a^2 \sigma_X^2.

Proof

We can write

X=σXZ+μXwhere Z∼N(0,1).X =\sigma_X Z+ \mu_X \hspace{20pt} \textrm{where } Z \sim N(0,1).
Thus,

YY=aX+b=aX+b
=a(σXZ+μX)+b=a(\sigma_X Z+ \mu_X)+b
=(aσX)Z+(aμX+b).=(a \sigma_X) Z+ (a\mu_X+b).

Therefore,

Y∼N(aμX+b,a2σX2).Y \sim N(a\mu_X+b, a^2 \sigma^2_X).