Date: January 24, 2021

Topic: The normal random variable

Recall

What is the probability density function for a normal random variable?

At what value is the maximum in the probability density function?

What are the values of the parameters for a standard normal random variable?

What is the cumulative probability distribution function for a normal random variable?

What is the error function?

What is the expectation of a normal random variable equal to?

What is the variance of a normal random variable equal to?

Probability density function

A continuous random variable with the following probability density function is known as a normal random variable:

<aside> 💡 $f(x) = \frac{1}{\sigma \sqrt{2\pi}} \exp\left( -\frac{(x-\mu)^2}{2\sigma^2} \right)$

</aside>

where $\mu$ and $\sigma$ are parameters. The expression above is the equation for the famous bell curve. As illustrated in the figure below $\mu$ gives the location of the maximum in the curve and $\sigma$ is connected to the width of the bell.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/cd53c923-26b6-4762-83ee-7f65d245ac58/normal_pdf.png

If $\mu=0$ and $\sigma=1$ then the distribution is said to be a standard normal distribution. The following video explains where the normal distribution comes from and why it is important. Before watching it is useful to revise the expressions for the expectation and variance of a sample mean

https://www.youtube.com/watch?v=DTw5W7mAupg&t=288s

Cumulative probability distribution function

The cumulative probability distribution function for the normal random variable, $X$, is given by:

$$ P(X\le x) = \int_{-\infty}^x f(y)\textrm{d}y $$

where $f(y)$ is the probability density function given above. The cumulative probability distribution function for a standard normal distribution is sometimes referred to as the error function.

Expectation

The expectation of the normal random variable, $X$, with parameters $\mu$ and $\sigma$ is:

<aside> 💡 $\mathbb{E}(X) = \mu$

</aside>

Variance

The variance of the normal random variable, X, with parameters $\mu$ and $\sigma$ is:

<aside> 💡 $\textrm{var}(X) = \sigma^2$

</aside>

Generating normal random variables

You can generate a standard normal random by running the following python script:

import numpy as np

snormal = np.random.normal(0,1)

If you have generated a standard normal random variable, $X$, you can generate a normal random variable, $N(\mu,\sigma)$, with parameters $\mu$ and $\sigma$ by performing the following transformation:

$$ N(\mu,\sigma) = \sigma X + \mu $$

Maximum likelihood

As explained in the video below, the maximum likelihood estimator for the $\mu$ parameter of a normal random variable is equal to the sample mean.

https://www.youtube.com/watch?v=zORKEc7lEuY

<aside> 📌 SUMMARY: Random variables sampled from the bell curve are normal random variable. This type of random variable has two parameters $\mu$ and $\sigma$. $\mu$ gives the position of the maximum in the probability density, while $\sigma$ gives the width of the bell.

</aside>