Section 2.4

Continuous Distributions and Random Variables

Part 1

Question 2.4.1

Establish for which constants \(c\) the following functions are densities.

  1. \(f(x) = cx\) on \((0,1)\) and \(0\) otherwise.

  2. \(f(x) = cx^{1/2}\) on \((0,2)\) and \(0\) otherwise.

\[ 1 = \int_0^1 cx \, dx = c/2 \] so \(c = 2\).

\[ 1 = \int_0^2 cx^{1/2} \, dx = c(2/3)x^{3/2}\Big|_0^2 = c(2/3)2^{3/2} \] so \(c = (3/2)2^{-3/2} = 3/(4\sqrt{2})\).

2.4.2

Let \(f_X(x) = 3/(4\sqrt{2})x^{1/2}I_{[0,2]}(x)\). What is the probability that \(X\) is greater than 1.5?

\[ \begin{aligned} P(X > 1.5) &= \int_{1.5}^{2} \frac{3}{4\sqrt{2}}\, x^{1/2}\, dx \\ &= \frac{3}{4\sqrt{2}} \cdot \frac{2}{3}\, x^{3/2} \Big|_{3/2}^{2} \\ &= \frac{1}{2\sqrt{2}} \left( 2^{3/2} - \left(\tfrac{3}{2}\right)^{3/2} \right) \\ &= 1 - \frac{(3/2)^{3/2}}{2^{3/2}} \\ &= 1 - \left(\frac{3}{4}\right)^{3/2} \\ &= 1 - \frac{3\sqrt{3}}{8} \\ &\approx 0.3505. \end{aligned} \]

Important

Midterm content ends here!

Part 2

Question 2.4.3

Let \(W \sim \text{Uniform}[1,4]\). Compute each of the following.

  1. \(\mathbb{P}(W \geq 5)\)

  2. \(\mathbb{P}(W \geq 2)\)

  3. \(\mathbb{P}(W^2 \leq 9)\) (Hint: If \(W^2 \leq 9\), what must \(W\) be?)

  4. \(\mathbb{P}(W^2 \leq 2)\)

\[ \mathbb{P}(W \geq 5) = 0 \]

\[ \mathbb{P}(W \geq 2) = 2/3 \]

\[ \mathbb{P}(W^2 \leq 9) = \mathbb{P}(-3 \le W \leq 3) = \mathbb{P}(1 \le W \leq 3) = 2/3 \]

\[ \begin{aligned} \mathbb{P}(W^2 \leq 2) &= \mathbb{P}(-\sqrt{2} \le W \leq \sqrt{2}) \\ &= \mathbb{P}(1 \le W \leq \sqrt{2})\\ &= (\sqrt{2} - 1)/3\\ \end{aligned} \]

Question 2.4.4

Let \(X \sim \text{Exponential}(3)\). Compute each of the following.

  1. \(\mathbb{P}(0 < X < 1)\)

  2. \(\mathbb{P}(0 < X < 3)\)

  3. \(\mathbb{P}(2 < X < 5)\)

  4. \(\mathbb{P}(X > 2)\)

\[ \mathbb{P}(0 < X < 1) = \int_0^1 3e^{-3t} \, dt= 1 - e^{-3} = 0.95021 \]

\[ \mathbb{P}(0 < X < 3) = \int_0^3 3e^{-3t} \, dt = 1 - e^{-9} = 0.99988 \]

\[ \begin{aligned} \mathbb{P}(2 < X < 5) &= \int_2^5 3e^{-3t} \, dt \\ &= - e^{-15} - (- e^{-6}) \\ &\approx 0.002 \end{aligned} \]

\[ \begin{aligned} \mathbb{P}(X > 2) &= \int_2^{\infty} 3e^{-3t} \, dt \\ &= e^{-6} \\ &\approx 0.002 \end{aligned} \]

Could also solve for \(1 - \mathbb{P}(0 < X \leq 2)\).

Question: 2.4.5

A customer service call center receives on average, 4 calls per hour.

  1. What is the probability that the time until the next call is less than 15 minutes?

  2. What is the probability that the time until the next call is more than 30 minutes (i.e., 0.5 hours)?

Let \(T\) be the time (in hours) until the next call. Then \(T \sim \text{Exponential}(\lambda = 4)\). 15 minutes = 0.25 hours.

We want \(\mathbb{P}(T < 0.25)\): \[ \begin{aligned} \mathbb{P}(T < 0.25) &= \int_0^{0.25} 4e^{-4t} dt \\ &= 1 - e^{-1} \\ &\approx 0.6321 \end{aligned} \] Therefore, the probability that the next call arrives within 15 minutes is \(\boldsymbol{\approx 0.6321}\).

We want \(\mathbb{P}(T > 0.5)\): \[ \begin{aligned} \mathbb{P}(T > 0.5) &= 1 - \mathbb{P}(T \leq 0.5) \\ &= 1 - \int_0^{0.5} 4e^{-4t} dt \\ &= 1 - ( 1 - e^{-2}) \\ &\approx 0.1353 \end{aligned} \] Therefore, the probability that no call arrives in the next 30 minutes is \(\boldsymbol{\approx 0.1353}\).

Question 2.4.6

Suppose that the time (in hours) it takes to complete a customer’s order at a tailor follows a Gamma distribution parameters \(\alpha = 3\) and rate parameter \(\lambda = 2\).

What is the probability that the tailor’s next order will take less than 2 hours to complete?

HINT: Since \(\alpha = 3\) is a positive integer, for any \(t\) we can express: \[ \mathbb{P}(T \leq t) = 1 - \sum_{n=0}^{\alpha - 1} \frac{(\lambda t)^n e^{-\lambda t}}{n!} \]

Let \(T\) be the time (in hours) to complete an order. Then \(T \sim \text{Gamma}(\alpha = 3, \lambda = 2)\).

We want \(\mathbb{P}(T < 2)\), so with \(\lambda t = (2)(2) = 4\): \[ \begin{aligned} \mathbb{P}(T < 2) &= 1 - \sum_{n=0}^{2} \frac{(4)^n e^{-4}}{n!} \\ &= 1 - e^{-4}\left(1 + 4 + \frac{4^2}{2}\right) \\ &= 1 - e^{-4}(1 + 4 + 8) \\ &= 1 - 13e^{-4} \\ &= 1 - 13(0.018316) \\ &\approx 1 - 0.2381 \\ &\approx 0.7619 \end{aligned} \] Therefore, the probability that the tailor’s next order takes less than 2 hours to complete is \(\boldsymbol{\approx 0.7619}\).

Question 2.4.7

Let \(X\) be a continuous random variable with density \[ f_X(x) = c\,x\,e^{-x^2/2}I_{(0, \infty)}(x) \]

  1. Find the constant \(c\) that makes \(f_X\) a valid density.

  2. Find the median of \(X\), that is, the value \(m\) such that \(\mathbb{P}(X \leq m) = 1/2\).

Use the substitution \(u = x^2/2\), so \(du = x\,dx\): \[ 1 = \int_0^\infty c\,x\,e^{-x^2/2}\,dx = c\left[-e^{-x^2/2}\right]_0^\infty = c(0 - (-1)) = c \] so \(c = 1\).

The median \(m\) satisfies \(\mathbb{P}(X \leq m) = 1/2\). Integrating the density from \(0\) to \(m\) (with \(m > 0\)): \[ \int_0^m x\,e^{-x^2/2}\,dx = \tfrac{1}{2} \] Using the substitution \(u = x^2/2\), so \(du = x\,dx\), the integral becomes \[ \int_0^m x\,e^{-x^2/2}\,dx = \left[-e^{-x^2/2}\right]_0^m = 1 - e^{-m^2/2} \] Setting this equal to \(1/2\): \[ 1 - e^{-m^2/2} = \tfrac{1}{2} \implies e^{-m^2/2} = \tfrac{1}{2} \implies m^2 = 2\ln 2 \] so \(m = \sqrt{2\ln 2} \approx 1.1774\).

Question 2.4.8

Recall that if \(Z \sim \text{Gamma}(\alpha, \lambda)\), then \[ f_Z(z;\alpha,\lambda) = \frac{\lambda^\alpha}{\Gamma(\alpha)}\, z^{\alpha-1} e^{-\lambda z}\, I_{[0,\infty)}(z). \] Use kernel matching to evaluate each of the following integrals.

  1. \(\displaystyle\int_0^\infty z^2 e^{-4z}\, dz\)

  2. \(\displaystyle\int_0^\infty z^2 \cdot \frac{3^2}{\Gamma(2)}\, z\, e^{-3z}\, dz\)

  3. \(\displaystyle\int_0^\infty z^{1/2} e^{-2z}\, dz\)

(Hint: \(\Gamma(n) = (n-1)!\) for \(n \in \{1,2,\dots\}\), \(\Gamma(\alpha+1) = \alpha\,\Gamma(\alpha)\), and \(\Gamma(1/2) = \sqrt{\pi}\).)

The kernel \(z^2 e^{-4z}\) matches a \(\text{Gamma}(\alpha = 3, \lambda = 4)\) density, whose normalizing constant is \(\lambda^\alpha/\Gamma(\alpha) = 4^3/\Gamma(3)\). Multiply and divide by this constant: \[ \int_0^\infty z^2 e^{-4z}\, dz = \frac{\Gamma(3)}{4^3}\int_0^\infty \frac{4^3}{\Gamma(3)}\, z^2 e^{-4z}\, dz = \frac{\Gamma(3)}{4^3}\cdot 1 = \frac{2!}{64} = \frac{1}{32}. \]

Combine the powers of \(z\) to get \(z^3 e^{-3z}\). This is the kernel of a \(\text{Gamma}(\alpha = 4, \lambda = 3)\) density, so we need the constant \(3^4/\Gamma(4)\). Since \(\Gamma(2) = 1\), \[ \int_0^\infty \frac{3^2}{\Gamma(2)}\, z^3 e^{-3z}\, dz = 9\int_0^\infty z^3 e^{-3z}\, dz = 9\cdot\frac{\Gamma(4)}{3^4}\int_0^\infty \frac{3^4}{\Gamma(4)}\, z^3 e^{-3z}\, dz = 9\cdot\frac{3!}{81} = \frac{2}{3}. \]

The kernel \(z^{1/2}e^{-2z}\) matches a \(\text{Gamma}(\alpha = 3/2, \lambda = 2)\) density, since \(\alpha - 1 = 1/2\). Therefore \[ \int_0^\infty z^{1/2} e^{-2z}\, dz = \frac{\Gamma(3/2)}{2^{3/2}}\int_0^\infty \frac{2^{3/2}}{\Gamma(3/2)}\, z^{1/2} e^{-2z}\, dz = \frac{\Gamma(3/2)}{2^{3/2}}. \] Using \(\Gamma(3/2) = \tfrac{1}{2}\Gamma(1/2) = \tfrac{\sqrt{\pi}}{2}\), \[ \frac{\Gamma(3/2)}{2^{3/2}} = \frac{\sqrt{\pi}}{2\cdot 2\sqrt{2}} = \frac{\sqrt{\pi}}{4\sqrt{2}} \approx 0.3133. \]