Random Variables

A continuous random variable \(X\) takes a range of values, which may be finite or infinite in extent (e.g. \([0, 1]\), \([0, \infty)\), \((−\infty, \infty)\)), whereby the probability of \(X\) falling between two values a and b is:

\[P(a<X<b)=\int_a^b f(x)dx\] For a special given function called a probability distribution function.

Probability Distribution Functions

A probability distribution function (PDF) is a function \(f(x)\) that satisfies the two properties:

  • \(f(x) \geq0\) for all \(x\), and
  • \(\int_{-\infty}^\infty f(x)dx=1\).
  1. Show the following function is a probability distribution function. \[ \begin{equation*} g(x)=\begin{cases} 0 \quad &\text{if} \, x < 0 \\ 4x^3 \quad &\text{if } \, 0 \leq x \leq 1 \\ 0 \quad &\text{if } \, x > 1 \\ \end{cases} \end{equation*} \]

  2. Show the following function is a probability distribution function. \[ \begin{equation*} g(x)=\begin{cases} 0 \quad &\text{if } \, x < 0 \\ ke^{-kx} \quad &\text{if } \, x \geq 0 \\ \end{cases} \end{equation*} \]

The distribution in (2) is called the exponential distribution.

The normal distribution is one of the most famous distributions:

\[f(x) = \frac{1}{\sigma\sqrt{2\pi}}e^{-\frac{1}{2}(\frac{x-\mu}{\sigma})^2}\]

The parameters \(\mu\) and \(\sigma\) are parameters mean and standard deviation respectively. In this case we represent this as \(X \sim N(\mu,\sigma)\).

If \(Z \sim N(0,1)\), we say that \(Z\) is standard normal. In this case, plugging in \(\mu=0\) and \(\sigma=1\) gives:

\[f(z) = \frac{1}{\sqrt{2\pi}}e^{-\frac{1}{2}z^2}\]

  1. If \(X \sim N(\mu,\sigma)\), show that \(Z = \frac{X-\mu}{\sigma}\) is standard normal. Hint: show \[\int_{-\infty}^x f(x)dx = \int_{-\infty}^z f(z)dz\].

Expected value

The expected value of a random variable \(X\) with probability distribution \(f(x)\) is:

\[E(X)=\int_{-\infty}^\infty xf(x)dx\]

  1. Let \(Z \sim N(0,1)\). Show \(E(Z)=0\).

Properties of Expected Value

If X is a continuous random variable,

  • \(E(X+Y) = E(X)+E(Y)\)
  • \(E(aX+b) = aE(X) + b\)
  1. Use the properties of expected value to show that if \(X \sim N(\mu,\sigma)\), \(E(X)=\mu\).

(Hint: Let \(Z = \frac{X-\mu}{\sigma}\), take expected value of both sides, and reduce.)

Variance

If \(X\) is a continuous random variable with mean \(\mu\), the variance \(X\) is:

\[Var(X)=E\big((X-\mu)^2\big)\]

  1. Let \(Z \sim N(0,1)\). Show \(Var(Z)=1\).

(Hint: use integration by parts with \(u=z\) and \(dv=ze^{-z^2}/2dz\)).

Properties of Variance

If X and Y are independent random variables, then:

  • \(Var(X+Y)=Var(X)+Var(Y)\)
  • \(Var(aX+b)=a^2 Var(X)\)
  1. Use the properties of variance to show that if \(X \sim N(\mu,\sigma)\), \(Var(X)=\sigma^2\).

Bonus

Find the mean and variance of the exponential distribution defined in problem 2.