1 Transformation of Random Variables

We concern ourselves with the problem of finding the probability distributions or densities of functions of one or more random variables. Given a set of random variables \(X_1, X_2, \ldots, X_n\) and their joint probability or density, we are interested in finding the joint probability distribution of some random variable:

\[Y = u(X_1, X_2, \ldots, X_n)\]

This means the values of \(Y\) are related to those of the \(X\)’s by the equation \(y = u(x_1, x_2, \ldots, x_n)\).

Several methods are available for solving this kind of problem. The ones we discuss are:

  1. The Distribution Function Technique
  2. The Transformation Technique
  3. The Moment-Generating Function Technique

1.1 The Distribution Function Technique

A straightforward method of obtaining the probability density of a function of continuous random variables consists of:

  1. First finding its distribution function, then
  2. Finding its probability density by differentiation.

Thus, if \(X_1, X_2, \ldots, X_n\) are continuous random variables with a given joint probability density, the probability density of \(Y = u(X_1, X_2, \ldots, X_n)\) is obtained by first determining:

\[F_Y(y) = \Pr(Y \leq y) = \Pr\!\left[u(X_1, X_2, \ldots, X_n) \leq y\right]\]

and then differentiating to get:

\[f(y) = \frac{d}{dy} F(y)\]

1.1.1 Example 1

Problem: The probability density of \(X\) is given by:

\[f(x) = \begin{cases} 6x(1 - x), & 0 < x < 1 \\ 0, & \text{elsewhere} \end{cases}\]

Find the probability density of \(Y = X^3\).

Solution:

Letting \(G(y)\) denote the distribution function of \(Y\):

\[G(y) = \Pr(Y \leq y) = \Pr(X^3 \leq y) = \Pr\!\left(X \leq y^{1/3}\right)\]

\[= \int_0^{y^{1/3}} 6x(1-x)\, dx = 3y^{2/3} - 2y\]

Differentiating:

\[g(y) = \frac{d}{dy} G(y) = 2y^{-1/3} - 2 = \frac{2}{3}\left(y^{-1/3} - 1\right) \cdot 3 = 2\left(y^{-1/3} - 1\right)\]

More precisely:

\[g(y) = \frac{1}{3}\left(2y^{-1/3} - 2\right)\]

\[\boxed{g(y) = \begin{cases} \frac{1}{3}(2y^{-1/3} - 2), & 0 < y < 1 \\ 0, & \text{elsewhere} \end{cases}}\]

1.1.2 Example 2

Problem: If \(Y = |X|\), show that:

\[g(y) = \begin{cases} f(y) + f(-y), & y > 0 \\ 0, & \text{elsewhere} \end{cases}\]

where \(f(x)\) is the probability density of \(X\).

Solution:

For \(y > 0\):

\[G(y) = \Pr(Y \leq y) = \Pr(|X| \leq y) = \Pr(-y \leq X \leq y) = F(y) - F(-y)\]

Differentiating:

\[g(y) = \frac{d}{dy}\left[F(y) - F(-y)\right] = f(y) \cdot 1 - f(-y) \cdot (-1) = f(y) + f(-y)\]

Since \(X\) cannot be negative, \(g(y) = 0\) for \(y < 0\). Letting \(g(0) = 0\):

\[\boxed{g(y) = \begin{cases} f(y) + f(-y), & y > 0 \\ 0, & \text{elsewhere} \end{cases}}\]

1.1.3 Example 3

Problem: Given the joint density of \(X_1\) and \(X_2\):

\[f(x_1, x_2) = \begin{cases} 6e^{-x_1 - 2x_2}, & x_1 > 0,\ x_2 > 0 \\ 0, & \text{elsewhere} \end{cases}\]

Find the probability density of \(Y = X_1 + X_2\).

Solution:

Integrating the joint density over the region where \(x_1 + x_2 \leq y\):

\[F(y) = \int_0^y \int_0^{y - x_1} 6e^{-x_1 - 2x_2}\, dx_2\, dx_1\]

After integration:

\[F(y) = 1 - 2e^{-y} + 3e^{-2y} - 2e^{-3y} \quad \text{(after simplification)}\]

Differentiating gives the density:

\[\boxed{f(y) = \begin{cases} 6e^{-2y} - 6e^{-3y}, & y > 0 \\ 0, & \text{elsewhere} \end{cases}}\]


1.2 Exercises — Week 4

  1. If \(f(x) = 2xe^{-x^2}\) for \(x > 0\) (0 elsewhere) and \(Y = X^2\), find:

      1. The distribution function of \(Y\): \(G(y) = 1 - e^{-y}\), \(y > 0\)
      1. The probability density of \(Y\): \(g(y) = e^{-y}\), \(y > 0\)
  2. If \(X\) has an exponential distribution with parameter \(\lambda\), use the distribution function technique to find the p.d.f. of \(Y = \ln X\).

  3. If \(X\) has the uniform density with \(\alpha = 0\) and \(\beta = 1\), find the p.d.f. of \(Y = \sqrt{X}\): \[g(y) = \begin{cases} 2y, & 0 < y < 1 \\ 0, & \text{elsewhere} \end{cases}\]

  4. If the joint p.d.f. of \(X\) and \(Y\) is \(f(x,y) = 4xye^{-(x^2+y^2)}\) for \(x,y > 0\) (0 elsewhere) and \(Z = X^2 + Y^2\), find:

      1. The distribution function of \(Z\)
      1. The probability density of \(Z\)
  5. If \(X_1\) and \(X_2\) are independent exponential random variables with parameters \(\lambda_1\) and \(\lambda_2\), find the p.d.f. of \(Y = X_1 + X_2\) when:

      1. \(\lambda_1 \neq \lambda_2\): \(f(y) = \dfrac{\lambda_1\lambda_2}{\lambda_1 - \lambda_2}\left(e^{-\lambda_2 y} - e^{-\lambda_1 y}\right)\), \(y > 0\)
      1. \(\lambda_1 = \lambda_2 = \lambda\): \(f(y) = \lambda^2 y e^{-\lambda y}\), \(y > 0\)
  6. With reference to Exercise 5 (when \(\lambda_1 \neq \lambda_2\)), show that \(Z = \dfrac{X_1}{X_1 + X_2}\) has a uniform density with \(\alpha = 0\), \(\beta = 1\).

  7. If the joint density of \(X\) and \(Y\) is \(f(x,y) = e^{-(x+y)}\) for \(x,y > 0\) (0 elsewhere) and \(Z = \dfrac{X+Y}{2}\), find the p.d.f. of \(Z\) using the distribution function technique.

  8. The percentages of copper and iron in a certain ore are \(X_1\) and \(X_2\) respectively. Their joint density is: \[f(x_1, x_2) = \begin{cases} 5, & 0 \leq x_1 \leq 1,\ 0 \leq x_2 \leq \frac{2-x_1}{2} \\ 0, & \text{elsewhere} \end{cases}\] Find the p.d.f. of \(Y = X_1 + X_2\) and \(E(Y)\).

\[g(y) = \begin{cases} \tfrac{11}{9}\cdot\tfrac{y}{2}, & 0 \leq y < 1 \\ \tfrac{3(2-y)(7-4y)}{22}, & 1 \leq y \leq 2 \\ 0, & \text{elsewhere} \end{cases}\]


2 Transformation Technique

2.1 One Variable

We can determine the probability distribution or density of a function of a random variable without first finding its distribution function.

2.1.1 Discrete Case

In the discrete case, when the relationship between the values of \(X\) and \(Y = u(X)\) is one-to-one, we simply make the appropriate substitution.

2.1.2 Example 4

Problem: If \(X\) is the number of heads in four tosses of a fair coin, find the probability distribution of:

\[Y = \frac{1}{X + 1}\]

Solution:

Using the binomial distribution with \(n = 4\), \(p = \frac{1}{2}\):

\(x\) 0 1 2 3 4
\(f(x)\) \(\frac{1}{16}\) \(\frac{4}{16}\) \(\frac{6}{16}\) \(\frac{4}{16}\) \(\frac{1}{16}\)

Applying \(y = \frac{1}{x+1}\):

\(y\) 1 \(\frac{1}{2}\) \(\frac{1}{3}\) \(\frac{1}{4}\) \(\frac{1}{5}\)
\(g(y)\) \(\frac{1}{16}\) \(\frac{4}{16}\) \(\frac{6}{16}\) \(\frac{4}{16}\) \(\frac{1}{16}\)

Substituting \(x = \frac{1}{y} - 1\) into the binomial formula directly:

\[g(y) = \binom{4}{\frac{1}{y}-1}\left(\frac{1}{2}\right)^4, \quad y = 1, \tfrac{1}{2}, \tfrac{1}{3}, \tfrac{1}{4}, \tfrac{1}{5}\]

Note: The probabilities remain unchanged — only the variable changes from \(X\) to \(Y\).

2.1.3 Example 5 — Non One-to-One Case

Problem: Find the probability distribution of \(Z = (X - 2)^2\) where \(X\) is as in Example 4.

Solution:

\(x\) 0 1 2 3 4
\((x-2)^2 = z\) 4 1 0 1 4

Solving \(x = 2 \pm \sqrt{z}\) and summing probabilities for each \(z\):

\[h(0) = f(2) = \frac{6}{16} = \frac{3}{8}\]

\[h(1) = f(1) + f(3) = \frac{4}{16} + \frac{4}{16} = \frac{8}{16} = \frac{1}{2}\]

\[h(4) = f(0) + f(4) = \frac{1}{16} + \frac{1}{16} = \frac{2}{16} = \frac{1}{8}\]

\(z\) 0 1 4
\(h(z)\) \(\frac{3}{8}\) \(\frac{1}{2}\) \(\frac{1}{8}\)

2.1.4 Continuous Case — Theorem 1

Theorem 1: Let \(f(x)\) be the probability density of the continuous random variable \(X\). If \(y = u(x)\) is differentiable and either strictly increasing or strictly decreasing for all values where \(f(x) > 0\), then the equation \(y = u(x)\) can be uniquely solved for \(x = w(y)\), and the probability density of \(Y = u(X)\) is:

\[g(y) = f[w(y)] \cdot \left|w'(y)\right|, \quad \text{provided } u'(x) \neq 0\]

and \(g(y) = 0\) elsewhere.

Proof sketch: For the increasing case, \(\Pr(a < Y < b) = \Pr(w(a) < X < w(b))\). Changing variables \(x = w(y)\), \(dx = w'(y)\,dy\) in the integral yields \(g(y) = f[w(y)] \cdot |w'(y)|\). The decreasing case follows similarly, with the absolute value ensuring positivity. \(\square\)

2.1.5 Example 6

Problem: If \(X\) has the exponential distribution \(f(x) = e^{-x}\) for \(x > 0\) (0 elsewhere), find the p.d.f. of \(Y = \sqrt{X}\).

Solution:

The inverse is \(x = y^2\), so \(w(y) = y^2\) and \(w'(y) = 2y\).

\[g(y) = f(y^2) \cdot |2y| = e^{-y^2} \cdot 2y = 2ye^{-y^2}\]

\[\boxed{g(y) = \begin{cases} 2ye^{-y^2}, & y > 0 \\ 0, & \text{elsewhere} \end{cases}}\]

2.1.6 Example 7 — Cauchy Distribution

Problem: A spinner gives angle \(\Theta\) with uniform density \(f(\theta) = \frac{1}{2\pi}\) for \(-\frac{\pi}{2} < \theta < \frac{\pi}{2}\) (0 elsewhere). Find the density of \(X = a\tan\Theta\), the abscissa on the \(x\)-axis.

Solution:

The inverse is \(\theta = \arctan(x/a)\), so:

\[\frac{d\theta}{dx} = \frac{a}{a^2 + x^2}\]

\[g(x) = \frac{1}{2\pi} \cdot \frac{a}{a^2 + x^2} \cdot 2\pi = \frac{a}{\pi(a^2 + x^2)} \quad \text{for } -\infty < x < \infty\]

This is the Cauchy distribution.


2.2 Several Variables

2.2.1 Motivation

Given the joint distribution of \(X_1\) and \(X_2\), we want the distribution of \(Y = u(X_1, X_2)\).

Strategy: Introduce an auxiliary variable \(Z\) (e.g., \(Z = X_2\)), find the joint density of \((Y, Z)\), then integrate out \(Z\) to obtain the marginal density of \(Y\).

2.2.2 Theorem 2 — Jacobian Transformation

Theorem 2: Let \(f(x_1, x_2)\) be the joint probability density of the continuous random variables \(X_1\) and \(X_2\). If:

\[y_1 = u_1(x_1, x_2) \quad \text{and} \quad y_2 = u_2(x_1, x_2)\]

are partially differentiable and define a one-to-one transformation, with inverse \(x_i = w_i(y_1, y_2)\), then the joint density of \(Y_1 = u_1(X_1, X_2)\) and \(Y_2 = u_2(X_1, X_2)\) is:

\[g(y_1, y_2) = f[w_1(y_1, y_2),\ w_2(y_1, y_2)] \cdot |J|\]

where the Jacobian is:

\[J = \begin{vmatrix} \dfrac{\partial x_1}{\partial y_1} & \dfrac{\partial x_1}{\partial y_2} \\[8pt] \dfrac{\partial x_2}{\partial y_1} & \dfrac{\partial x_2}{\partial y_2} \end{vmatrix}\]

2.2.3 Example 8 — Poisson Sum

Problem: \(X_1\) and \(X_2\) are independent Poisson random variables with parameters \(\lambda_1\) and \(\lambda_2\). Find the distribution of \(Y = X_1 + X_2\).

Solution:

Their joint distribution is:

\[f(x_1, x_2) = \frac{e^{-\lambda_1}\lambda_1^{x_1}}{x_1!} \cdot \frac{e^{-\lambda_2}\lambda_2^{x_2}}{x_2!}\]

Setting \(y = x_1 + x_2\) (so \(x_1 = y - x_2\)) and summing over \(x_2 = 0, 1, \ldots, y\):

\[h(y) = \sum_{x_2=0}^{y} \frac{e^{-(\lambda_1+\lambda_2)}\lambda_1^{y-x_2}\lambda_2^{x_2}}{(y-x_2)!\, x_2!} = \frac{e^{-(\lambda_1+\lambda_2)}(\lambda_1+\lambda_2)^y}{y!}\]

using the binomial expansion \((\lambda_1 + \lambda_2)^y = \sum_{x_2=0}^{y}\binom{y}{x_2}\lambda_1^{y-x_2}\lambda_2^{x_2}\).

Conclusion: The sum of two independent Poisson random variables with parameters \(\lambda_1\) and \(\lambda_2\) is Poisson with parameter \(\lambda_1 + \lambda_2\).

2.2.4 Example 9 — Exponential to Beta/Gamma

Problem: Given joint density \(f(x_1, x_2) = e^{-(x_1+x_2)}\) for \(x_1, x_2 > 0\) (0 elsewhere), find:

    1. The joint density of \(Y_1 = X_1 + X_2\) and \(Y_2 = \dfrac{X_1}{X_1 + X_2}\)
    1. The marginal density of \(Y_2\)

Solution (a):

Solving: \(x_1 = y_1 y_2\) and \(x_2 = y_1(1 - y_2)\).

\[J = \begin{vmatrix} y_2 & y_1 \\ 1-y_2 & -y_1 \end{vmatrix} = -y_1 y_2 - y_1(1-y_2) = -y_1\]

\[|J| = y_1\]

\[g(y_1, y_2) = e^{-y_1 y_2 - y_1(1-y_2)} \cdot y_1 = y_1 e^{-y_1}\]

\[\boxed{g(y_1, y_2) = \begin{cases} y_1 e^{-y_1}, & y_1 > 0,\ 0 < y_2 < 1 \\ 0, & \text{elsewhere} \end{cases}}\]

Solution (b):

\[h(y_2) = \int_0^\infty y_1 e^{-y_1}\, dy_1 = \Gamma(2) = 1! = 1\]

\[\boxed{h(y_2) = \begin{cases} 1, & 0 < y_2 < 1 \\ 0, & \text{elsewhere} \end{cases}}\]

This is the uniform distribution on \((0, 1)\).

2.2.5 Example 10 — Triangular Distribution

Problem: \(f(x_1, x_2) = 1\) for \(0 < x_1 < 1\), \(0 < x_2 < 1\) (0 elsewhere). Find the marginal density of \(Y = X_1 + X_2\).

Solution:

Let \(Y = X_1 + X_2\) and \(Z = X_2\). Then \(x_1 = y - z\), \(x_2 = z\), \(|J| = 1\).

The region maps to \(z < y < z+1\), \(0 < z < 1\), i.e., \(z < y < z+1\).

Integrating out \(z\):

\[h(y) = \begin{cases} \int_0^y dz = y, & 0 \leq y < 1 \\[4pt] \int_{y-1}^{1} dz = 2 - y, & 1 \leq y \leq 2 \\[4pt] 0, & \text{elsewhere} \end{cases}\]

This is the triangular distribution.

2.2.6 Example 11 — Three Variables

Problem: \(f(x_1, x_2, x_3) = e^{-(x_1+x_2+x_3)}\) for \(x_i > 0\) (0 elsewhere). Find the marginal density of \(Y_1 = X_1 + X_2 + X_3\).

Solution:

Let \(Y_2 = X_2\) and \(Y_3 = X_3\). Then \(x_1 = y_1 - y_2 - y_3\), \(x_2 = y_2\), \(x_3 = y_3\). The \(3\times 3\) Jacobian equals 1.

\[g(y_1, y_2, y_3) = e^{-y_1}, \quad y_1 > y_2 + y_3,\ y_2, y_3 > 0\]

Integrating out \(y_2\) and \(y_3\):

\[h(y_1) = \int_0^{y_1}\int_0^{y_1 - y_3} e^{-y_1}\, dy_2\, dy_3 = \frac{1}{2}y_1^2 e^{-y_1}\]

\[\boxed{h(y_1) = \begin{cases} \dfrac{1}{2}y_1^2 e^{-y_1}, & y_1 > 0 \\ 0, & \text{elsewhere} \end{cases}}\]

This is a Gamma distribution with \(\alpha = 3\) and \(\beta = 1\).


2.3 Exercises — Week 5

  1. If \(X\) has a hypergeometric distribution with \(m=3\), \(N=6\), \(n=2\), find the p.d. of \(Z = (X-1)^2\). \[h(0) = \frac{3}{5}, \quad h(1) = \frac{2}{5}\]

  2. If \(X\) has a binomial distribution with \(n=3\), \(p=\frac{1}{3}\), find the p.d. of:

      1. \(Y = \dfrac{X}{X+1}\): \(g(0) = \frac{8}{27}\), \(g(\frac{1}{2}) = \frac{12}{27}\), \(g(\frac{2}{3}) = \frac{6}{27}\), \(g(\frac{3}{4}) = \frac{1}{27}\)
      1. \(U = (X-1)^4\): \(g(0) = \frac{12}{27}\), \(g(1) = \frac{14}{27}\), \(g(16) = \frac{1}{27}\)
  3. If \(X = \ln(Y)\) has a normal distribution with mean \(\mu\) and std dev \(\sigma\), find the p.d.f. of \(Y\) (the log-normal distribution): \[g(y) = \frac{1}{\sqrt{2\pi}\,\sigma y} \exp\!\left(-\frac{(\ln y - \mu)^2}{2\sigma^2}\right), \quad y > 0\]

  4. If \(f(x) = kx^3(1-x^2)^6\) for \(0 < x < 1\) (0 elsewhere), find the p.d.f. of \(Y = X^2\). Show it is a Beta distribution and find \(k\).

    The distribution is Beta with \(\alpha = 4\), \(\beta = 2\); \(k = 320\).

  5. If \(X\) has a uniform density with \(\alpha=0\), \(\beta=1\), show that \(Y = -2\ln X\) has a gamma distribution. Find its parameters.

  6. If \(X\) has a uniform density with \(\alpha=0\), \(\beta=1\), show that \(Y = X^{-1/\alpha}\) (for \(\alpha > 0\)) has the Pareto distribution.

  7. Consider \(X \sim \text{Uniform}(-1, 3)\):

      1. Find the p.d.f. of \(Y = |X|\): \(g(y) = \frac{1}{4}\) for \(0 \leq y < 1\); \(g(y) = \frac{1}{4}\) for \(1 \leq y < 3\)
      1. Find the p.d.f. of \(Z = (X-Y)^2 = (X - |X|)^2\).
  8. If \(f(x_1, x_2) = \dfrac{x_1 x_2}{36}\) for \(x_1, x_2 = 1, 2, 3\), find the p.d. of:

      1. \(X_1 X_2\)
      1. \(X_1 / X_2\)
  9. With the same joint distribution as in Exercise 8, find:

      1. The joint distribution of \(Y_1 = X_1 + X_2\) and \(Y_2 = X_1 - X_2\)
      1. The marginal distribution of \(Y_1\): \(g(2) = \frac{1}{36}\), \(g(3) = \frac{4}{36}\), \(g(4) = \frac{10}{36}\), \(g(5) = \frac{12}{36}\), \(g(6) = \frac{9}{36}\)
  10. If \(X_1\), \(X_2\), \(X_3\) have the multinomial distribution with \(n=2\), \(\theta_1=\frac{1}{4}\), \(\theta_2=\frac{1}{2}\), \(\theta_3=\frac{5}{12}\), find the joint p.d. of \(Y_1 = X_1 + X_2\), \(Y_2 = X_1 - X_2\), \(Y_3 = X_3\).

  11. If \(X_1\) and \(X_2\) are independent binomial with parameters \((n_1, \theta)\) and \((n_2, \theta)\), show that \(Y = X_1 + X_2\) is binomial with parameters \((n_1 + n_2, \theta)\).

  12. If \(X\) and \(Y\) are independent standard normal, show that \(Z = X + Y\) is normally distributed. Find the mean and variance. \(\mu = 0\), \(\sigma^2 = 2\)

  13. Given \(f(x, y) = 12y(1-x-y)\) for \(0 < x < 1\), \(0 < y < 1-x\) (0 elsewhere):

      1. Find the joint density of \(Z = XY\) and \(U = Y\)
      1. Find the marginal density of \(Z\): \(h(z) = 6z - 6z^2 - 12z^2\) for \(0 < z < 1\)
  14. Two independent Cauchy random variables \(X_1\) and \(X_2\) with density \(f(x) = \dfrac{1}{\pi(1+x^2)}\):

      1. Find the joint density of \(Y_1 = X_1 + X_2\) and \(Y_2 = X_1 - X_2\)
      1. Find the marginal density of \(Y_1\): \(g(y_1) = \dfrac{1}{\pi(4 + y_1^2)} \cdot 4\)
  15. Given \(f(x,y) = 24xy\) for \(0 < x < 1\), \(0 < y < 1\), \(x + y < 1\), find the joint density of \(Z = X+Y\) and \(W = X\).

  16. Let \(X\) and \(Y\) be independent gamma random variables. Find the joint density of \(U = \dfrac{X}{X+Y}\) and \(V = X+Y\), and identify the marginal density of \(U\).

  17. The Maxwell–Boltzmann velocity distribution is \(f(v) = kv^2 e^{-\beta v^2}\) for \(v > 0\). Show that kinetic energy \(E = \frac{1}{2}mV^2\) has a gamma distribution.


3 Moment-Generating Function Technique

3.1 Overview

Moment-generating functions provide an elegant tool for finding the distribution of linear combinations of independent random variables.

The method is based on the uniqueness of the MGF: if \(M_Y(t) = M_Z(t)\) for all \(t\) in some interval, then \(Y\) and \(Z\) have the same distribution.

3.2 Theorem 3 — MGF of a Sum

Theorem 3: If \(X_1, X_2, \ldots, X_n\) are independent random variables and \(Y = X_1 + X_2 + \cdots + X_n\), then:

\[M_Y(t) = \prod_{i=1}^{n} M_{X_i}(t)\]

Proof:

\[M_Y(t) = E\!\left[e^{tY}\right] = E\!\left[e^{t(X_1 + \cdots + X_n)}\right] = E\!\left[e^{tX_1}\right] \cdots E\!\left[e^{tX_n}\right] = \prod_{i=1}^{n} M_{X_i}(t)\]

(using independence). \(\square\)

3.3 Example 12 — Sum of Poisson Variables

Problem: \(X_1, \ldots, X_n\) are independent Poisson with parameters \(\lambda_1, \ldots, \lambda_n\). Find the distribution of \(Y = X_1 + \cdots + X_n\).

Solution:

The MGF of a Poisson\((\lambda_i)\) is \(M_{X_i}(t) = e^{\lambda_i(e^t - 1)}\). By Theorem 3:

\[M_Y(t) = \prod_{i=1}^n e^{\lambda_i(e^t-1)} = e^{(\lambda_1 + \cdots + \lambda_n)(e^t - 1)}\]

Conclusion: \(Y \sim \text{Poisson}(\lambda_1 + \lambda_2 + \cdots + \lambda_n)\).

3.4 Example 13 — Sum of Exponential Variables

Problem: \(X_1, \ldots, X_n\) are i.i.d. Exponential\((\lambda)\) (equivalently Gamma\((1, \lambda)\)). Find the distribution of \(Y = \sum X_i\).

Solution:

The MGF of Gamma\((\alpha, \beta)\) is \(M_X(t) = \left(1 - \frac{t}{\beta}\right)^{-\alpha}\). For Exponential\((\lambda)\):

\[M_{X_i}(t) = \left(1 - \frac{t}{\lambda}\right)^{-1}\]

\[M_Y(t) = \left(1 - \frac{t}{\lambda}\right)^{-n}\]

Conclusion: \(Y \sim \text{Gamma}(n, \lambda)\) with p.d.f.:

\[g(y) = \frac{\lambda^n}{\Gamma(n)} y^{n-1} e^{-\lambda y}, \quad y > 0\]

3.5 Applied Example — Lake Victoria Fish

Setup: The number of fish caught per hour at Lake Victoria follows \(\text{Poisson}(\lambda = 1.6)\).

(a) Four fish in two hours

Let \(Y = X_1 + X_2 \sim \text{Poisson}(3.2)\):

\[P(Y = 4) = \frac{e^{-3.2}(3.2)^4}{4!} = \frac{0.04076 \times 104.86}{24} \approx \mathbf{0.1781}\]

(b) At least two fish in three hours

Let \(Y = X_1 + X_2 + X_3 \sim \text{Poisson}(4.8)\):

\[P(Y \geq 2) = 1 - P(Y = 0) - P(Y = 1)\]

\[P(Y = 0) = e^{-4.8} \approx 0.00823, \quad P(Y = 1) = 4.8e^{-4.8} \approx 0.03950\]

\[P(Y \geq 2) = 1 - 0.04773 \approx \mathbf{0.9523}\]

(c) At most three fish in four hours

Let \(Y = X_1 + X_2 + X_3 + X_4 \sim \text{Poisson}(6.4)\):

\[P(Y \leq 3) = \sum_{y=0}^{3} \frac{e^{-6.4}(6.4)^y}{y!}\]

\[= 0.00166 + 0.01063 + 0.03403 + 0.07253 \approx \mathbf{0.1189}\]


3.6 Chebyshev’s Theorem

3.6.1 Statement

Chebyshev’s Theorem: If \(\mu\) and \(\sigma\) are the mean and standard deviation of a random variable \(X\), then for any \(k > 0\):

\[\Pr(|X - \mu| < k\sigma) \geq 1 - \frac{1}{k^2}\]

Equivalently: \(\Pr(\mu - k\sigma < X < \mu + k\sigma) \geq 1 - \dfrac{1}{k^2}\).

This provides a universal lower bound on the probability that \(X\) lies within \(k\) standard deviations of its mean, valid for any distribution.

3.6.2 Proof

By definition:

\[\sigma^2 = E[(X - \mu)^2] = \int_{-\infty}^{\infty}(x-\mu)^2 f(x)\,dx\]

Split the integral into three regions:

\[\sigma^2 \geq \int_{-\infty}^{\mu - k\sigma}(x-\mu)^2 f(x)\,dx + \int_{\mu + k\sigma}^{\infty}(x-\mu)^2 f(x)\,dx\]

Since \((x - \mu)^2 \geq k^2\sigma^2\) in the outer regions:

\[\sigma^2 \geq k^2\sigma^2 \cdot \Pr(|X - \mu| \geq k\sigma)\]

\[\Pr(|X - \mu| \geq k\sigma) \leq \frac{1}{k^2}\]

\[\Pr(|X - \mu| < k\sigma) \geq 1 - \frac{1}{k^2} \quad \square\]

3.6.3 Example 1 — Beta Distribution

Problem: \(X\) has p.d.f. \(f(x) = 630x^4(1-x)^4\) for \(0 < x < 1\). Compare the exact probability within two standard deviations of the mean to Chebyshev’s bound.

Solution:

Comparing to the Beta\((\alpha, \beta)\) density, we identify \(\alpha = 5\), \(\beta = 5\).

\[\mu = E(X) = \frac{\alpha}{\alpha + \beta} = \frac{5}{10} = 0.5\]

\[\sigma^2 = \text{Var}(X) = \frac{\alpha\beta}{(\alpha+\beta)^2(\alpha+\beta+1)} = \frac{25}{100 \times 11} = \frac{1}{44}\]

\[\sigma = \frac{1}{\sqrt{44}} \approx 0.1508\]

The interval within 2 standard deviations: \([0.5 - 2(0.1508),\ 0.5 + 2(0.1508)] = [0.20, 0.80]\).

Exact probability:

\[P(0.20 < X < 0.80) = 630\int_{0.20}^{0.80} x^4(1-x)^4\, dx \approx \mathbf{0.96}\]

Chebyshev bound (with \(k = 2\)):

\[1 - \frac{1}{k^2} = 1 - \frac{1}{4} = 0.75\]

The exact probability \(0.96\) is much stronger than Chebyshev’s lower bound \(0.75\).

3.6.4 Example 2 — Uniform Distribution

Problem: \(X \sim \text{Uniform}(-3, 3)\). With \(k = \frac{3}{2}\), find:

    1. The exact probability
    1. The Chebyshev bound

Solution:

\[\mu = \frac{-3 + 3}{2} = 0, \qquad \sigma^2 = \frac{(3 - (-3))^2}{12} = \frac{36}{12} = 3, \qquad \sigma = \sqrt{3}\]

With \(k = \frac{3}{2}\): \(k\sigma = \frac{3}{2}\sqrt{3}\)

Exact probability:

\[P\!\left(|X| < \frac{3\sqrt{3}}{2}\right) = P\!\left(-\frac{3\sqrt{3}}{2} < X < \frac{3\sqrt{3}}{2}\right) = \frac{1}{6} \cdot 3\sqrt{3} \approx 0.866\]

Actually, since \(\frac{3\sqrt{3}}{2} \approx 2.598 < 3\):

\[P = \frac{2 \cdot 2.598}{6} = \frac{5.196}{6} \approx \mathbf{0.866}\]

Chebyshev bound:

\[1 - \frac{1}{(3/2)^2} = 1 - \frac{4}{9} = \frac{5}{9} \approx 0.556\]


3.7 Exercises — Week 6

  1. MGF Technique: If \(X_1\) and \(X_2\) are independent binomial with parameters \((n_1, \theta)\) and \((n_2, \theta)\), show using MGFs that \(Y = X_1 + X_2 \sim \text{Binomial}(n_1 + n_2, \theta)\).

  2. If \(n\) independent random variables each have Gamma\((\alpha, \beta)\) distributions, find the MGF of their sum and identify the distribution. Answer: Gamma\((n\alpha, \beta)\).

  3. If \(X_i \sim N(\mu_i, \sigma_i^2)\) independently, find the MGF of \(Y = \sum X_i\) and identify the distribution. \[Y \sim N\!\left(\sum_{i=1}^n \mu_i,\ \sum_{i=1}^n \sigma_i^2\right)\]

  4. Prove the generalization of Theorem 3: if \(Y = a_1 X_1 + \cdots + a_n X_n\) with \(X_i\) independent, then \(M_Y(t) = \prod_{i=1}^n M_{X_i}(a_i t)\).

  5. A lawyer receives calls on an unlisted number at rate \(2.1\)/half-hour and on a listed number at rate \(10.9\)/half-hour (independent Poisson). Find the probabilities that in half an hour she receives:

      1. 14 calls: 0.1021
      1. At most 6 calls: 0.0259
  6. (Repeat of fish problem — see Section @ref(ex-fish) above.)

  7. If the time a doctor spends per patient is Exponential\((\lambda = \frac{1}{9})\) (minutes), find the probability the doctor spends at least 20 minutes with:

      1. One patient: \(P(X_1 \geq 20) = e^{-20/9} \approx \mathbf{0.1084}\)
      1. Two patients: \(P(Y \geq 20)\) where \(Y \sim \text{Gamma}(2, 1/9)\): 0.3492
      1. Three patients: \(P(Y \geq 20)\) where \(Y \sim \text{Gamma}(3, 1/9)\): 0.6168
  8. Chebyshev: Find the smallest \(k\) such that \(P(|X - \mu| < k\sigma) \geq\):

      1. 0.95: \(k = \sqrt{20} \approx 4.47\)
      1. 0.99: \(k = \sqrt{100} = 10\)
  9. The thiamine content in a bread slice has \(\mu = 0.260\) mg, \(\sigma = 0.005\) mg. By Chebyshev’s theorem, between what values must the thiamine content lie for:

      1. At least \(\frac{35}{36}\) of all slices: \([0.230,\ 0.290]\) mg
      1. At least \(\frac{143}{144}\) of all slices: \([0.200,\ 0.320]\) mg
  10. If \(E(X) = 3\) and \(E(X^2) = \frac{13}{2}\), use Chebyshev’s theorem to find a lower bound for \(P(2 < X < 8)\). Answer: 0.84


End of STA227 Weeks 4–6 Notes