As usual, we start with a random experiment with probability measure \(\P\) on an underlying sample space \( \Omega \). Suppose that we have a random variable \(X\) for the experiment, taking values in a set \(S\), and a function \(r\) from \( S \) into another set \( T \). Then \(Y = r(X)\) is a new random variable taking values in \(T\). Recall that technically, \( X \) is a function from the sample space \( \Omega \) into \( S \), so \( Y \) is acutally the composition \( Y = r \circ X \). However, as is often the case in probability, we use the more natural notation \( r(X) \) rather than the mathematically explicit \( r \circ X \). If the distribution of \(X\) is known, how do we find the distribution of \(Y\)? This is a very basic and important question, and in a superficial sense, the solution is easy. But first recall that for \( B \subseteq T \), \(r^{-1}(B) = \{x \in S: r(x) \in B\}\) is the inverse image of \(B\) under \(r\).
\(\P(Y \in B) = \P\left[X \in r^{-1}(B)\right]\) for \(B \subseteq T\).
\( \P(Y \in B) = \P\left[r(X) \in B\right] = \P\left[X \in r^{-1}(B)\right] \) for \( B \subseteq T \).
However, frequently the distribution of \(X\) is known either through its distribution function \(F\) or its probability density function \(f\), and we would similarly like to find the distribution function or probability density function of \(Y\). This is a difficult problem in general, because as we will see, even simple transformations of variables with simple distributions can lead to variables with complex distributions. We will solve the problem in various special cases.
When the transformed variable \(Y\) has a discrete distribution, the probability density function of \(Y\) can be computed using basic rules of probability.
Suppose that \(X\) has a discrete distribution with probability density function \(f\) (so that \(S\) is countable). Then \(Y\) has a discrete distribution with probability density function \(g\) given by \[ g(y) = \sum_{x \in r^{-1}\{y\}} f(x), \quad y \in T \]
For \( y \in T \), \[ g(y) = \P(Y = y) = \P\left[X \in r^{-1}\{y\}\right] = \sum_{x \in r^{-1}\{y\}} f(x) \]
Suppose that \(X\) has a continuous distribution on a subset \(S \subseteq \R^n\) with probability density function \(f\), and that \(T\) is countable. Then \(Y\) has a discrete distribution with probability density function \(g\) given by \[ g(y) = \int_{r^{-1}\{y\}} f(x) \, dx, \quad y \in T \]
For \( y \in T \), \[ g(y) = \P(Y = y) = \P\left[X \in r^{-1}\{y\}\right] = \int_{r^{-1}\{y\}} f(x) \, dx \]
So the main problem is often computing the inverse images \(r^{-1}\{y\}\) for \(y \in T\). The formulas above for the discrete-discrete and continuous-discrete transformations are not worth memorizing explicitly; it's usually better to just work each problem from scratch. The main step is to write the event \(\{Y = y\}\) in terms of \(X\), and then find the probability of this event using the probability density function of \( X \).
Suppose that \(X\) has a continuous distribution on a subset \(S \subseteq \R^n\) and that \(Y = r(X)\) has a continuous distributions on a subset \(T \subseteq \R^m\). Suppose also that \(X\) has a known probability density function \(f\). In many cases, the probability density function of \(Y\) can be found by first finding the distribution function of \(Y\) (using basic rules of probability) and then computing the appropriate derivatives of the distribution function. This general method is referred to, appropriately enough, as the distribution function method.
Suppose that \(Y\) is real valued. The distribution function \(G\) of \(Y\) is given by
\[ G(y) = \int_{r^{-1}(-\infty, y]} f(x) \, dx, \quad y \in \R \]For \( y \in \R \), \[ G(y) = \P(Y \le y) = \P\left[r(X) \in (-\infty, y]\right] = \P\left[X \in r^{-1}(-\infty, y]\right] = \int_{r^{-1}(-\infty, y]} f(x) \, dx \]
As before, the formula is not much help, and it's usually better to work each problem from scratch. The main step is to write the event \(\{Y \le y\}\) in terms of \(X\), and then find the probability of this event using the probability density function of \( X \).
When the transformation \(r\) is one-to-one and smooth, there is a formula for the probability density function of \(Y\) directly in terms of the probability density function of \(X\). This is known as the change of variables formula. Note that since \(r\) is one-to-one, it has an inverse function \(r^{-1}\).
We will explore the one-dimensional case first, where the concepts and formulas are simplest. Thus, suppose that random variable \(X\) has a continuous distribution on an interval \(S \subseteq \R\), with distribution function \(F\) and probability density function \(f\). Suppose that \(Y = r(X)\) where \(r\) is a differentiable function from \(S\) onto an interval \(T\). As usual, we will let \(G\) denote the distribution function of \(Y\) and \(g\) the probability density function of \(Y\).
Suppose that \(r\) is strictly increasing on \(S\). For \(y \in T\),
For part (a), \( G(y) = \P(Y \le y) = \P[r(X) \le y] = \P\left[X \le r^{-1}(y)\right] = F\left[r^{-1}(y)\right] \) for \( y \in T \). Note that the inquality is preserved since \( r \) is increasing. Part (b) follows from part (a) by taking derivatives. with respect to \( y \) and using the chain rule. Recall that \( F^\prime = f \).
Suppose that \(r\) is strictly decreasing on \(S\). For \(y \in T\),
For part (a), \( G(y) = \P(Y \le y) = \P[r(X) \le y] = \P\left[X \ge r^{-1}(y)\right] = 1 - F\left[r^{-1}(y)\right] \) for \( y \in T \). Note that the inquality is reversed since \( r \) is decreasing. Part (b) follows from part (a) by taking derivatives. with respect to \( y \) and using the chain rule. Recall again that \( F^\prime = f \).
The formulas above for the probability density functions in the increasing and decreasing cases can be combined:
If \(r\) is a strictly increasing or strictly decreasing on \(S\) then the probability density function \(g\) of \(Y\) is given by \[ g(y) = f\left[ r^{-1}(y) \right] \left| \frac{d}{dy} r^{-1}(y) \right| \]
Letting \(x = r^{-1}(y)\), the change of variables formula can be written more compactly as \[ g(y) = f(x) \left| \frac{dx}{dy} \right| \] Although succinct and easy to remember, the formula is a bit less clear. It must be understood that \(x\) on the right should be written in terms of \(y\) via the inverse function. The images below give a graphical interpretation of the formula in the two cases where \(r\) is increasing and where \(r\) is decreasing.
The generalization of this result from \( \R \) to \( \R^n \) is basically a theorem in multivariate calculus. First we need some notation. Suppose that \( r \) is a one-to-one differentiable function from \( S \subseteq \R^n \) onto \( T \subseteq \R^n \). The first derivative of the inverse function \(\bs{x} = r^{-1}(\bs{y})\) is the \(n \times n\) matrix of first partial derivatives: \[ \left( \frac{d \bs{x}}{d \bs{y}} \right)_{i j} = \frac{\partial x_i}{\partial y_j} \] The Jacobian (named in honor of Karl Gustav Jacobi) of the inverse function is the determinant of the first derivative matrix \[ \det \left( \frac{d \bs{x}}{d \bs{y}} \right) \] With this compact notation, the multivariate change of variables formula is easy to state.
Suppose that \(\bs{X}\) is a random variable taking values in \(S \subseteq \R^n\), and that \(\bs{X}\) has a continuous distribution with probability density function \(f\). Suppose also \( Y = r(X) \) where \( r \) is a differentiable function from \( S \) onto \( T \subseteq \R^n \). Then the probability density function \(g\) of \(\bs{Y}\) is given by \[ g(\bs{y}) = f(\bs{x}) \left| \det \left( \frac{d \bs{x}}{d \bs{y}} \right) \right|, \quad y \in T \]
Linear transformations (or more technically affine transformations) are among the most common and important transformations. Moreover, this type of transformation leads to a simple application of the change of variable theorem. Suppose that \(X\) is a random variable taking values in an interval \(S \subseteq \R\) and that \(X\) has a continuous distribution on \(S\) with probability density function \(f\). Let \(Y = a + b \, X\) where \(a \in \R\) and \(b \in \R \setminus\{0\}\). Note that \(Y\) takes values in \(T = \{y = a + b x: x \in S\}\), which is also an interval.
\(Y\) has probability density function \( g \) given by \[ g(y) = \frac{1}{\left|b\right|} f\left(\frac{y - a}{b}\right), \quad y \in T \]
The transformation is \( y = a + b \, x \). Hence the inverse transformation is \( x = (y - a) / b \) and \( dx / dy = 1 / b \). The result now follows from the change of variables theorem.
When \(b \gt 0\) (which is often the case in applications), this transformation is known as a location-scale transformation; \(a\) is the location parameter and \(b\) is the scale parameter. Scale transformations arise naturally when physical units are changed (from feet to meters, for example). Location transformations arise naturally when the physical reference point is changed (measuring time relative to 9:00 AM as opposed to 8:00 AM, for example). The change of temperature measurement from Fahrenheit to Celsius is a location and scale transformation. Location-scale transformations are studied in more detail in the chapter on Special Distributions.
The multivariate version of this result has a simple and elegant form when the linear transformation is expressed in matrix-vector form. Thus suppose that \(\bs{X}\) is a random variable taking values in \(S \subseteq \R^n\) and that \(\bs{X}\) has a continuous distribution on \(S\) with probability density function \(f\). Let \(\bs{Y} = \bs{a} + \bs{B} \bs{X}\) where \(\bs{a} \in \R^n\) and \(\bs{B}\) is an invertible \(n \times n\) matrix. Note that \(\bs{Y}\) takes values in \(T = \{\bs{a} + \bs{B} \bs{x}: \bs{x} \in S\}\).
\(\bs{Y}\) has probability density function \[ g(\bs{y}) = \frac{1}{\left| \det(\bs{B})\right|} f\left[ B^{-1}(\bs{y} - \bs{a}) \right], \quad \bs{y} \in T \]
The transformation \(\bs{y} = \bs{a} + \bs{B} \bs{x}\) maps \(\R^n\) one-to-one and onto \(\R^n\). The inverse transformation is \(\bs{x} = \bs{B}^{-1}(\bs{y} - \bs{a})\). The Jacobian of the inverse transformation is the constant function \(\det (\bs{B}^{-1}) = 1 / \det(\bs{B})\). The result now follows from the change of variables theorem.
Simple addition of random variables is perhaps the most important of all transformations. Suppose that \(X\) and \(Y\) are random variables for an experiment, taking values in \( R \subseteq \R\) and \( S \subseteq \R \), respectively, so that \( (X, Y) \) takes values in a subset of \( R \times S \). Our goal is to find the distribution of \(Z = X + Y\). Note that \( Z \) takes values in \( T = \{z \in \R: z = x + y \text{ for some } x \in R, y \in S\} \). For \( z \in T \), let \( D_z = \{x \in R: z - x \in S\} \)
Suppose that \((X, Y)\) has a discrete distribution with probability density function \(f\) (so that \( R \) and \( S \) are countable). Then \(Z\) has a discrete distribution with probability density function \(u\) given by \[ u(z) = \sum_{x \in D_z} f(x, z - x), \quad z \in T \]
\( \P(Z = z) = \P\left(X = x, Y = z - x \text{ for some } x \in D_z\right) = \sum_{x \in D_z} f(x, z - x) \)
Suppose that \((X, Y)\) has a continuous distribution with probability density function \(f\). Then \(Z\) has a continuous distribution with probability density function \(u\) given by \[ u(z) = \int_{D_z} f(x, z - x) \, dx, \quad z \in T \]
For \( A \subseteq T \), let \( C = \{(u, v) \in S \times T: u + v \in A\} \). Then \[ \P(Z \in A) = \P(X + Y \in A) = \int_C f(u, v) \, d(u, v) \] Now use the change of variables \( x = u, \; z = u + v \). Then the inverse transformation is \( u = x, \; v = z - x \) and the Jacobian is 1. Using the change of variables theorem we have \[ \P(Z \in A) = \int_{D_z \times A} f(x, z - x) \, d(x, z) = \int_A \int_{D_z} f(x, z - x) \, dx \, dz \] It follows that \( Z \) has probability density function \( z \mapsto \int_{D_z} f(x, z - x) \, dx \).
By far the most important special case occurs when \(X\) and \(Y\) are independent.
Suppose that \(X\) and \(Y\) are independent and have discrete distributions with probability density functions \(g\) and \(h\) respectively. Then \(Z\) has a probability density function \[ (g * h)(z) = \sum_{x \in D_z} g(x) h(z - x), \quad z \in T \]
This follows from the general result above for the sum of discrete variable, since \( f(x, y) = g(x) h(y) \) is the probability density function of \( (X, Y) \).
The probability density function \(g * h\) is called the discrete convolution of \(g\) and \(h\).
Suppose that \(X\) and \(Y\) are independent and have continuous distributions with probability density functions \(g\) and \(h\) respectively. Then \(Z\) has a probability density function given by \[ (g * h)(z) = \int_{D_z} g(x) h(z - x) \, dx, \quad z \in T \]
This follows from the general result above for the sum of continuous variables, since \( f(x, y) = g(x) h(y) \) is a probability density function of \( (X, Y) \).
In both the discrete and continuous cases, the probability density function \(g * h\) is called the continuous convolution of \(f\) and \(g\). In Theorems 9-12, determining this set \( D_z \) is often the most challenging step in finding the probability density function of \(Z\). However, there is one case where the computations simplify significantly.
Suppose again that \( X \) and \( Y \) are independent random variables with probability density functions \( g \) and \( h \), respectively.
Convolution (either discrete or continuous) satisfies the following properties (where \(f\), \(g\), and \(h\) are probability density functions).
An analytic proof is possible, based on the definition of convolution, but a probabilistic proof, based on sums of independent random variables is much better. Thus, suppose that \( X \), \( Y \), and \( Z \) are independent random variables with PDFs \( f \), \( g \), and \( h \), respectively.
Thus, in part (b) we can write \(f * g * h\) without ambiguity. Of course, the constant 0 is the additive identity so \( X + 0 = 0 + X = 0 \) for every random variable \( X \). Also, a constant is independent of every other random variable. It follows that the probability density function \( \delta \) of 0 (given by \( \delta(0) = 1 \)) is the identity with respect to convolution (at least for discrete PDFs). That is, \( f * \delta = \delta * f = f \). Next, suppose that \(\bs{X} = (X_1, X_2, \ldots)\) is a sequence of independent and identically distributed random variables, with common probability density function \(f\). In statistical terms, \( \bs{X} \) corresponds to sampling from the common distribution. For \( n \in \N_+ \) \[ Y_n = \sum_{i=1}^n X_i \] has probability density function \(f^{*n} = f * f * \cdots * f \), the \(n\)-fold convolution power of \(f\). By convention, \( Y_0 = 0 \), so naturally we take \( f^{*0} = \delta \). When appropriately scaled and centered, the distribution of \(Y_n\) converges to the standard normal distribution as \(n \to \infty\). The precise statement of this result is the central limit theorem, one of the fundamental theorems of probability. The central limit theorem is studied in detail in the chapter on Random Samples. Clearly convolution power satisfies the law of exponents: \( f^{*n} * f^{*m} = f^{*(n + m)} \) for \( m, \; n \in \N \).
Convolution can be generalized to sums of independent variables that are not of the same type, but this generalization is usually done in terms of distribution functions rather than probability density functions.
Suppose that \((X_1, X_2, \ldots, X_n)\) is a sequence of independent real-valued random variables. The minimum and maximum transformations are very important in a number of applications. \begin{align} U & = \min\{X_1, X_2, \ldots, X_n\} \\ V & = \max\{X_1, X_2, \ldots, X_n\} \end{align} For example, recall that in the standard model of structural reliability, a system consists of \(n\) components that operate independently. Suppose that \(X_i\) represents the lifetime of component \(i\). Then \(U\) is the lifetime of the series system which operates if and only if each component is operating. Similarly, \(V\) is the lifetime of the parallel system which operates if and only if at least one component is operating.
A particularly important special case occurs when the random variables are identically distributed, in addition to being independent. In this case, the sequence of variables is a random sample of size \(n\) from the common distribution. We usually think of the random variables as independent copies of an underlying random variable. The minimum and maximum variables are the extreme examples of order statistics. Order statistics are studied in detail in the chapter on Random Samples.
Let \(F_i\) denote the distribution function of \(X_i\) for each \(i \in \{1, 2, \ldots, n\}\), and let \(G\) and \(H\) denote the distribution functions of \(U\) and \(V\) respectively.
For \(x \in \R\),
For \(x \in \R\),
From the result above for the maximum, note that the product of \(n\) distribution functions is another distribution function. From the previous result for theminimum, the product of \(n\) right-tail distribution functions is a right-tail distribution function. In the reliability setting, where the random variables are nonnegative, the last statement means that the product of \(n\) reliability functions is another reliability function. If \(X_i\) has a continuous distribution with probability density function \(f_i\) for each \(i \in \{1, 2, \ldots, n\}\) then \(U\) and \(V\) also have continuous distributions, and their probability density functions can be obtained by differentiating the distribution functions in the maximum and minimum cases.
The formulas are particularly nice when the random variables \(X_i\) are identically distributed, in addition to being independent. Suppose that this is the case, and let \(F\) be the common distribution function.
For \(x \in \R\),
In particular, it follows that a positive integer power of a distribution function is a distribution function. More generally, it's easy to see that every positive power of a distribution function is a distribution function. How could we construct a non-integer power of a distribution function in a probabilistic way? Now, in addition to the independent and identically distributed assumptions, suppose that the common distribution of the variables \(X_i\) is continuous, with probability density function \(f\). Let \(g\) and \(h\) denote the probability density functions of \(U\) and \(V\), respectively.
For \(x \in \R\),
Suppose that \(X\) has a continuous distribution on \(\R\) with distribution function \(F\) and probability density function \(f\).
Recall that the sign function on \( \R \) (not to be confused, of course, with the sine function) is defined as follows:
\[ \sgn(x) = \begin{cases} -1, & x \lt 0 \\ 0, & x = 0 \\ 1, & x \gt 0 \end{cases} \]Suppose again that \( X \) has a continuous distribution on \( \R \) with distribution function \( F \) and probability density function \( f \), and suppose in addition that the distribution of \( X \) is symmetric about 0. Then
This subsection contains computational exercises, many of which involve special parametric families of distributions. It is always interesting when a random variable from one parametric family can be transformed into a variable from another family. It is also interesting when a parametric family is closed or invariant under some transformation on the variables in the family. Often, such properties are what make the parametric families special in the first place. Please note these properties when they occur.
Recall that a standard die is an ordinary 6-sided die. A fair die is one in which the faces are equally likely. An ace six flat die is a standard die in which faces 1 and 6 occur with probability \(\frac{1}{4}\) each and the other faces with probability \(\frac{1}{8}\) each.
Suppose that two standard dice are rolled and the sequence of scores \((X_1, X_2)\) is recorded. Find the probability density function of \(Y = X_1 + X_2\), the sum of the scores, in each of the following cases:
Let \(Y = X_1 + X_2\) denote the sum of the scores.
\(y\) | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
---|---|---|---|---|---|---|---|---|---|---|---|
\(\P(Y = y)\) | \(\frac{1}{36}\) | \(\frac{2}{36}\) | \(\frac{3}{36}\) | \(\frac{4}{36}\) | \(\frac{5}{36}\) | \(\frac{6}{36}\) | \(\frac{5}{36}\) | \(\frac{4}{36}\) | \(\frac{3}{36}\) | \(\frac{2}{36}\) | \(\frac{1}{36}\) |
\(y\) | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
---|---|---|---|---|---|---|---|---|---|---|---|
\(\P(Y = y)\) | \(\frac{1}{16}\) | \(\frac{1}{16}\) | \(\frac{5}{64}\) | \(\frac{3}{32}\) | \(\frac{7}{64}\) | \(\frac{3}{16}\) | \(\frac{7}{64}\) | \(\frac{3}{32}\) | \(\frac{3}{32}\) | \(\frac{1}{16}\) | \(\frac{1}{16}\) |
In the dice experiment, select two dice and select the sum random variable. Run the simulation 1000 times and note the agreement between the empirical density function and the probability density function for each of the following cases:
A fair die and an ace-six flat die are rolled. Find the probability density function of the sum of the scores.
Let \(Y = X_1 + X_2\) denote the sum of the scores.
\(y\) | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
---|---|---|---|---|---|---|---|---|---|---|---|
\(\P(Y = y)\) | \(\frac{2}{48}\) | \(\frac{3}{48}\) | \(\frac{4}{48}\) | \(\frac{5}{48}\) | \(\frac{6}{48}\) | \(\frac{8}{48}\) | \(\frac{6}{48}\) | \(\frac{5}{48}\) | \(\frac{4}{48}\) | \(\frac{3}{48}\) | \(\frac{2}{48}\) |
Suppose that \(n\) standard, fair dice are rolled. Find the probability density function of the following variables:
Let \(U\) denote the minimum score and \(V\) the maximum score.
In the dice experiment, select fair dice and select each of the following random variables. Vary \(n\) with the scroll bar and note the shape of the density function. With \(n = 4\), run the simulation 1000 times and note the agreement between the empirical density function and the probability density function.
Recall that for \( n \in \N_+ \), the standard measure of the size of a set \( A \subseteq \R^n \) is \[ \lambda_n(A) = \int_A 1 \, dx \] In particular, \( \lambda_1(A) \) is the length of \( A \subseteq \R \), \( \lambda_2(A) \) is the area of \( A \subseteq \R^2 \), and \( \lambda_3(A) \) is the volume of \( A \subseteq \R^3 \). More technically, \( \lambda_n \) is \( n \)-dimensional Lebesgue measure, named for Henri Lebesgue. If you are interested in the details, see the advanced sections in the chapter on Foundations, the chapter on Probability Measures, and this chapter.
Now if \( S \subseteq \R^n \) with \( 0 \lt \lambda_n(S) \lt \infty \), recall that the uniform distribution on \( S \) is the continuous distribution with constant probability density function \( f(x) = 1 \big/ \lambda_n(S) \) for \( x \in S \). Uniform distributions are studied in more detail in the chapter on Special Distributions.
Let \(Y = X^2\). Find the probability density function of \(Y\) and sketch the graph in each of the following cases:
Compare the distributions in the last exercise. In part (c), note that even a simple transformation of a simple distribution can produce a complicated distribution. In this particular case, the complexity is caused by the fact that \(x \mapsto x^2\) is one-to-one on part of the domain \(\{0\} \cup (1, 3]\) and two-to-one on the other part \([-1, 1] \setminus \{0\}\).
On the other hand, the uniform distribution is preserved under a linear transformation of the random variable.
Suppose that \(\bs{X}\) has the continuous uniform distribution on \(S \subseteq \R^n\). Let \(\bs{Y} = \bs{a} + \bs{B} \bs{X}\), where \(\bs{a} \in \R^n\) and \(\bs{B}\) is an invertible \(n \times n\) matrix. Then \(\bs{Y}\) is uniformly distributed on \(T = \{\bs{a} + \bs{B} \bs{x}: \bs{x} \in S\}\).
This follows directly from the general result above for linear transformations. Note that the PDF \( g \) of \( \bs{Y} \) is constant on \( T \).
For the following three exercises, recall that the standard uniform distribution is the uniform distribution on the interval \( [0, 1] \).
Suppose that \(X\) and \(Y\) are independent and that each has the standard uniform distribution. Let \(U = X +Y\) and \(V = X - Y\).
Suppose that \(X\), \(Y\), and \(Z\) are independent, and that each has the standard uniform distribution. Find the probability density function of \((U, V, W) = (X + Y, Y + Z, X + Z)\).
\(g(u, v, w) = \frac{1}{2}\) for \((u, v, w)\) in the rectangular region of \(\R^3\) with vertices \(\{(0,0,0), (1,0,1), (1,1,0), (0,1,1), (2,1,1), (1,1,2), (1,2,1), (2,2,2)\}\)
Suppose that \((X_1, X_2, \ldots, X_n)\) is a sequence of independent random variables, each with the standard uniform distribution. Find the distribution function and probability density function of the following variables.
Both distributions in the last exercise are beta distributions. More generally, all of the order statistics from a random sample of standard uniform variables have beta distributions, one of the reasons for the importance of this family of distributions. Beta distributions are studied in more detail in the chapter on Special Distributions.
In the order statistic experiment, select the uniform distribution.
Let \(f\) denote the probability density function of the standard uniform distribution.
In the last exercise, you can see the behavior predicted by the central limit theorem beginning to emerge. Recall that if \((X_1, X_2, X_3)\) is a sequence of independent random variables, each with the standard uniform distribution, then \(f\), \(f^{*2}\), and \(f^{*3}\) are the probability density functions of \(X_1\), \(X_1 + X_2\), and \(X_1 + X_2 + X_3\), respectively. More generally, if \((X_1, X_2, \ldots, X_n)\) is a sequence of independent random variables, each with the standard uniform distribution, then the distribution of \(\sum_{i=1}^n X_i\) (which has probability density function \(f^{*n}\)) is known as the Irwin-Hall distribution with parameter \(n\). The Irwin-Hall distributions are studied in more detail in the chapter on Special Distributions.
A remarkable fact is that the standard uniform distribution can be transformed into almost any other distribution on \(\R\). This is particularly important for simulations, since many computer languages have an algorithm for generating random numbers, which are simulations of independent variables, each with the standard uniform distribution. Conversely, any continuous distribution supported on an interval of \(\R\) can be transformed into the standard uniform distribution.
Suppose first that \(F\) is a distribution function for a distribution on \(\R\) (which may be discrete, continuous, or mixed), and let \(F^{-1}\) denote the quantile function.
Suppose that \(U\) has the standard uniform distribution. Then \(X = F^{-1}(U)\) has distribution function \(F\).
The critical property satisfied by the quantile function (regardless of the type of distribution) is \( F^{-1}(p) \le x \) if and only if \( p \le F(x) \) for \( p \in (0, 1) \) and \( x \in \R \). Hence for \(x \in \R\), \(\P(X \le x) = \P\left[F^{-1}(U) \le x\right] = \P[U \le F(x)] = F(x)\).
Assuming that we can compute \(F^{-1}\), the previous exercise shows how we can simulate a distribution with distribution function \(F\). To rephrase the result, we can simulate a variable with distribution function \(F\) by simply computing a random quantile. Most of the apps in this project use this method of simulation. The first image below shows the graph of the distribution function of a rather complicated mixed distribution. In the second image, note how the uniform distribution on \([0, 1]\), represented by the thick red line, is transformed, via the quantile function, into the given distribution.
There is a partial converse to the previous result for a random variable with support on an interval.
Suppose that \(X\) has a continuous distribution on an interval \(S \subseteq \R\) and that the distribution function \(F\) is strictly increasing on \(S\). Then \(U = F(X)\) has the standard uniform distribution.
For \(u \in (0, 1)\), \(\P(U \le u) = \P[F(X) \le u] = \P\left[X \le F^{-1}(u)\right] = F\left[F^{-1}(u)\right] = u\).
Show how to simulate the uniform distribution on the interval \([a, b]\) with a random number. Using your calculator, simulate 5 values from the uniform distribution on the interval \([2, 10]\).
\(X = a + U(b - a)\) where \(U\) is a random number.
Suppose that \(X\) has the probability density function \(f(x) = 3 x^2\) for \(0 \le x \le 1\). Find the probability density function of each of the following:
Random variables \(X\), \(U\), and \(V\) in the previous exercise have beta distributions, the same family of distributions that we saw earlier for the minimum and maximum of independent standard uniform variables. In general, beta distributions are widely used to model random proportions and probabilities, as well as physical quantities that take values in closed bounded intervals (which after a change of units can be taken to be \( [0, 1] \)). On the other hand, \(W\) has a Pareto distribution, named for Vilfredo Pareto. The family of beta distributions and the family of Pareto distributions are studied in more detail in the chapter on Special Distributions.
Suppose that the radius \(R\) of a sphere has a beta distribution probability density function \(f\) given by \(f(r) = 12 r^2 (1 - r)\) for \(0 \le r \le 1\). Find the probability density function of each of the following:
Recall that a Bernoulli trials sequence is a sequence \((X_1, X_2, \ldots)\) of independent, identically distributed indicator random variables. In the usual terminology of reliability theory, \(X_i = 0\) means failure on trial \(i\), while \(X_i = 1\) means success on trial \(i\). The basic parameter of the process is the probability of success \(p = \P(X_i = 1)\). The random process is named for Jacob Bernoulli and is studied in detail in the chapter on Bernoulli trials.
The common probability density function of the trial variables \(X_i\) is \(f(x) = p^x (1 - p)^{1 - x}\) for \(x \in \{0, 1\}\).
By definition, \( f(0) = 1 - p \) and \( f(1) = p \). These can be combined succinctly with the formula \( f(x) = p^x (1 - p)^{1 - x} \) for \( x \in \{0, 1\} \).
Now let \(Y_n\) denote the number of successes in the first \(n\) trials.
\(Y_n\) has the probability density function \(f_n\) given by \[ f_n(y) = \binom{n}{y} p^y (1 - p)^{n - y}, \quad y \in \{0, 1, \ldots, n\}\]
We have seen this derivation before. The number of bit strings of length \( n \) with 1 occurring exactly \( y \) times is \( \binom{n}{y} \). By the Bernoulli trials assumptions, the probability of each such bit string is \( p^n (1 - p)^{n-y} \).
The distribution of \( Y_n \) is the binomial distribution with parameters \(n\) and \(p\). The binomial distribution is stuided in more detail in the chapter on Bernoulli trials
For \( m, \, n \in \N_+ \)
Part (a) can be proved directly from the definition of convolution, but the result also follows simply from the fact that \( Y_n = X_1 + X_2 + \cdots + X_n \).
From part (b) it follows that if \(Y\) and \(Z\) are independent variables, and that \(Y\) has the binomial distribution with parameters \(n\) and \(p\) while \(Z\) has the binomial distribution with parameter \(m\) and \(p\), then \(Y + Z\) has the binomial distribution with parameter \(m + n\) and \(p\).
Find the probability density function of the difference between the number of successes and the number of failures in \(n\) Bernoulli trials.
\(f(k) = \binom{n}{(n+k)/2} p^{(n+k)/2} (1 - p)^{(n-k)/2}\) for \(k \in \{-n, 2 - n, \ldots, n - 2, n\}\)
Recall that the Poisson distribution with parameter \(t \gt 0\) has probability density function \[ f_t(n) = e^{-t} \frac{t^n}{n!}, \quad n \in \N \] This distribution is named for Simeon Poisson and is widely used to model the number of random points in a region of time or space; the parameter \(t\) is proportional to the size of the regtion. The Poisson distribution is studied in detail in the chapter on The Poisson Process.
If \( a, \, b \in [0, \infty) \) then \(f_a * f_b = f_{a+b}\).
Let \( z \in \N \). Using the binomial theorem we have \begin{align} (f_a * f_b)(z) & = \sum_{x = 0}^z f_a(x) f_b(z - x) = \sum_{x = 0}^z e^{-a} \frac{a^x}{x!} e^{-b} \frac{b^{z - x}}{(z - x)!} = e^{-(a + b)} \frac{1}{z!} \sum_{x=0}^z \frac{z!}{x!(z - x)!} a^{x} b^{z - x} \\ & = e^{-(a+b)} \frac{1}{z!} \sum_{x=0}^z \binom{z}{x} a^x b^{n-x} = e^{-(a + b)} \frac{(a + b)^z}{z!} = f_{a+b}(z) \end{align}
The last result means that if \(X\) and \(Y\) are independent variables, and \(X\) has the Poisson distribution with parameter \(a \gt 0\) while \(Y\) has the Poisson distribution with parameter \(b \gt 0\), then \(X + Y\) has the Poisson distribution with parameter \(a + b\). In terms of the Poisson model, \( X \) could represent the number of points in a region \( A \) and \( Y \) the number of points in a region \( B \) (of the appropriate sizes so that the parameters are \( a \) and \( b \) respectively). The independence of \( X \) and \( Y \) corresponds to the regions \( A \) and \( B \) being disjoint. Then \( X + Y \) is the number of points in \( A \cup B \).
Recall that the exponential distribution with rate parameter \(r \gt 0\) has probability density function \(f(t) = r e^{-r t}\) for \(0 \le t \lt \infty\). This distribution is often used to model random times such as failure times and lifetimes. In particular, the times between arrivals in the Poisson model of random points in time have independent, identically distributed exponential distributions. The Exponential distribution is studied in more detail in the chapter on Poisson Processes.
Show how to simulate, with a random number, the exponential distribution with rate parameter \(r\). Using your calculator, simulate 5 values from the exponential distribution with parameter \(r = 3\).
\(X = -\frac{1}{r} \ln(1 - U)\) where \(U\) is a random number.
Suppose that \(T\) has the exponential distribution with rate parameter \(r\). Find the probability density function of each of the following random variables:
Let \(Y = \lfloor T \rfloor\) and \(Z = \lceil T \rceil\).
Note that the distributions in the previous exercise are geometric distributions on \(\N\) and on \(\N_+\), respectively. In many respects, the geometric distribution is a discrete version of the exponential distribution.
Suppose that \(T\) has the exponential distribution with rate parameter \(r\). Find the probability density function of each of the following random variables:
In the previous exercise, \(Y\) has a Pareto distribution while \(Z\) has an extreme value distribution. Both of these are studied in more detail in the chapter on Special Distributions.
Suppose that \(X\) and \(Y\) are independent random variables, each having the exponential distribution with parameter 1. Let \(Z = \frac{Y}{X}\).
Suppose that \(X\) has the exponential distribution with rate parameter \(a \gt 0\), \(Y\) has the exponential distribution with rate parameter \(b \gt 0\), and that \(X\) and \(Y\) are independent. Find the probability density function of \(Z = X + Y\) in each of the following cases.
Suppose that \((T_1, T_2, \ldots, T_n)\) is a sequence of independent random variables, and that \(T_i\) has the exponential distribution with rate parameter \(r_i \gt 0\) for each \(i \in \{1, 2, \ldots, n\}\).
Note that the minimum \(U\) in part (a) has the exponential distribution with parameter \(r_1 + r_2 + \cdots + r_n\). In particular, suppose that a series system has independent components, each with an exponentially distributed lifetime. Then the lifetime of the system is also exponentially distributed, and the failure rate of the system is the sum of the component failure rates.
In the order statistic experiment, select the exponential distribution.
Suppose again that \((T_1, T_2, \ldots, T_n)\) is a sequence of independent random variables, and that \(T_i\) has the exponential distribution with rate parameter \(r_i \gt 0\) for each \(i \in \{1, 2, \ldots, n\}\). Then \[ \P\left(T_i \lt T_j \text{ for all } j \ne i\right) = \frac{r_i}{\sum_{j=1}^n r_j} \]
When \(n = 2\), the result was shown in the section on joint distributions. Returning to the case of general \(n\), note that \(T_i \lt T_j\) for all \(j \ne i\) if and only if \(T_i \lt \min\left\{T_j: j \ne i\right\}\). Note that he minimum on the right is independent of \(T_i\) and by the result above for minimums, has an exponential distribution with parameter \(\sum_{j \ne i} r_j\).
The result in the previous exercise is very important in the theory of continuous-time Markov chains.
Recall that the (standard) gamma distribution with shape parameter \(n \in \N_+\) has probability density function \[ g_n(t) = e^{-t} \frac{t^{n-1}}{(n - 1)!}, \quad 0 \le t \lt \infty \] With a positive integer shape parameter, as we have here, it is also referred to as the Erlang distribution, named for Agner Erlang. This distribution is widely used to model random times under certain basic assumptions. In particular, the \( n \)th arrival times in the Poisson model of random points in time has the gamma distribution with parameter \( n \). The gamma/Erlang distribution is studied in more detail in the chapter on the Poisson Process, and in greater generality, the gamma distribution is studied in the chapter on Special Distributions.
Let \( g = g_1 \), and note that this is the probability density function of the exponential distribution with parameter 1, which we just considered in the last subsection.
If \( m, \, n \in \N_+ \) then
Part (a) hold trivially when \( n = 1 \). Also, for \( t \in [0, \infty) \), \[ g_n * g(t) = \int_0^t g_n(s) g(t - s) \, ds = \int_0^t e^{-s} \frac{s^{n-1}}{(n - 1)!} e^{t-s} \, ds = e^{-t} \int_0^t \frac{s^{n-1}}{(n - 1)!} \, ds = e^{-t} \frac{t^n}{n!} = g_{n+1}(t) \] Part (b) follows from (a).
Part (b) means that if \(X\) has the gamma distribution with shape parameter \(m\) and \(Y\) has the gamma distribution with shape parameter \(n\), and if \(X\) and \(Y\) are independent, then \(X + Y\) has the gamma distribution with shape parameter \(m + n\). In the context of the Poisson model, part (a) means that the \( n \)th arrival time is the sum of the \( n \) independent interarrival times, which have a common exponential distribution.
Suppose that \(T\) has the gamma distribution with shape parameter \(n\). Find the probability density function of \(X = \ln(T)\).
\(h(x) = \frac{1}{(n-1)!} \exp\left(-e^x\right) e^{n x}\) for \(x \in \R\)
Recall that the Pareto distribution with shape parameter \(a \gt 0\) has probability density function \[ f(x) = \frac{a}{x^{a+1}}, \quad 1 \le x \lt \infty\] Members of this family have already come up in several of the previous exercises. The Pareto distribution is named for Vilfredo Pareto. It is a heavy-tailed distribution often used for modeling income and other financial variables. The Pareto distribution is studied in more detail in the chapter on Special Distributions.
Suppose that \(X\) has the Pareto distribution with shape parameter \(a\). Find the probability density function of each of the following random variables:
In the previous exercise, \(V\) also has a Pareto distribution but with parameter \(\frac{a}{2}\); \(Y\) has the beta distribution with parameters \(a\) and \(b = 1\); and \(Z\) has the exponential distribution with rate parameter \(a\).
Show how to simulate, with a random number, the Pareto distribution with shape parameter \(a\). Using your calculator, simulate 5 values from the Pareto distribution with shape parameter \(a = 2\).
\(X = \frac{1}{(1 - U)^{1/a}}\) where \(U\) is a random number
Recall that the standard normal distribution has probability density function \[ \phi(z) = \frac{1}{\sqrt{2 \pi}} e^{-\frac{1}{2} z^2}, \quad z \in \R\]
Suppose that \(Z\) has the standard normal distribution, and that \(\mu \in (-\infty, \infty)\) and \(\sigma \in (0, \infty)\).
Random variable \(X\) has the normal distribution with location parameter \(\mu\) and scale parameter \(\sigma\). The normal distribution is perhaps the most important distribution in probability and mathematical statistics, primarily because of the central limit theorem, one of the fundamental theorems. It is widely used to model physical measurements of all types that are subject to small, random errors. The normal distribution is studied in detail in the chapter on Special Distributions.
Suppose that \(Z\) has the standard normal distribution. Find the probability density function of \(Z^2\) and sketch the graph.
\(g(v) = \frac{1}{\sqrt{2 \pi v}} e^{-\frac{1}{2} v}\) for \( 0 \lt v \lt \infty\)
Random variable \(V\) has the chi-square distribution with 1 degree of freedom. Chi-square distributions are studied in detail in the chapter on Special Distributions.
Suppose that \( X \) and \( Y \) are independent random variables, each with the standard normal distribution. Let \( (R, \Theta) \) be the polar coordinates corresponding to the Cartesian coordinates \( (X, Y) \), so that \( R \) takes values in \( [0, \infty) \) and \( \Theta \) takes values in \( [0, 2 \pi) \). Find the probability density function of
Note that the joint PDF of \( (X, Y) \) is \[ f(x, y) = \phi(x) \phi(y) = \frac{1}{2 \pi} e^{-\frac{1}{2}\left(x^2 + y^2\right)}, \quad (x, y) \in \R^2 \] The inverse transformation is \( (x, y) = (r \cos(\theta), r \sin(\theta)) \) and the Jacobian is \( r \). Hence the PDF of \( (R, \theta) \) is \[ g(r, \theta) = f\left[r \cos(\theta), r \sin(\theta)\right] r = \frac{1}{2 \pi} r e^{-\frac{1}{2} r^2}, \quad (r, \theta) \in [0, \infty) \times [0, 2 \pi) \] From the factorization theorem for joint PDFs, it follows that \( R \) has probability density function \( h(r) = r e^{-\frac{1}{2} r^2} \) for \( 0 \le r \lt \infty \), \( \Theta \) is uniformly distributed on \( [0, 2 \pi) \), and that \( R \) and \( \Theta \) are independent.
The distribution of \( R \) is the (standard) Rayleigh distribution, and is named for John William Strutt, Lord Rayleigh. The Rayleigh distribution is studied in more detail in the chapter on Special Distributions.
The standard normal distribution does not have a simple, closed form quantile function, so the random quantile method of simulation does not work well. However, the last exercise points the way to an alternative method of simulation.
Show how to simulate a pair of independent, standard normal variables with a pair of random numbers. Using your calculator, simulate 6 values from the standard normal distribution.
The Rayleigh distribution in the last exercise has CDF \( H(r) = 1 - e^{-\frac{1}{2} r^2} \) for \( 0 \le r \lt \infty \), and hence quantle function \( H^{-1}(p) = \sqrt{-2 \ln(1 - p)} \) for \( 0 \le p \lt 1 \). Thus we can simulate the polar radius \( R \) with a random number \( U \) by \( R = \sqrt{-2 \ln(1 - U)} \). We can simulate the polar angle \( \Theta \) with a random number \( V \) by \( \Theta = 2 \pi V \). Then, a pair of independent, standard normal variables can be simulated by \( X = R \cos(\Theta) \), \( Y = R \sin(\Theta) \).
Suppose that \(X\) and \(Y\) are independent random variables, each with the standard normal distribution. Find the probability density function of \(T = X / Y\) \
Note that the joint PDF of \( (X, Y) \) is \[ f(x, y) = \phi(x) \phi(y) = \frac{1}{2 \pi} e^{-\frac{1}{2}\left(x^2 + y^2\right)}, \quad (x, y) \in \R^2 \] Now let \( U = Y \), so that we have the transformation \( (t, u) = (x / y, y)\). The inverse is \( (x, y) = (t u, u) \) and the Jacobian is \( u \). Hence by the change of variables formula, the PDF of \( (T, U) \) is
\[ g(t, u) = f(t u, u) \left|u\right| = \frac{1}{2 \pi} \left|u\right| e^{-\frac{1}{2}\left[(t u)^2 + u^2\right]} = \frac{1}{2 \pi} \left|u\right| e^{-\frac{1}{2} u^2\left(t^2 + 1\right)}, \quad (t, u) \in \R^2 \] Note that \( g \) is an even function of \( u \). Using this fact and a simple substitution, the PDF of \( T \) is \[ h(t) = \int_{-\infty}^\infty g(t, u) \, du = 2 \int_0^\infty g(t, u) \, du = \frac{1}{\pi(1 + t^2)}, \quad t \in \R \]Random variable \(T\) has the (standard) Cauchy distribution, named after Augustin Cauchy. The Cauchy distribtuion is studied in detail in the chapter on Special Distributions.
Suppose that a light source is 1 unit away from position 0 on an infinite straight wall. We shine the light at the wall an angle \( Theta \) to the perpendicular, where \( \Theta \) is uniformly distributed on \( \left(-\frac{\pi}{2}, \frac{\pi}{2}\right) \). Find the probability density function of the position of the light beam \( X = \tan(\Theta) \) on the wall.
The PDF of \( \Theta \) is \( f(\theta) = \frac{1}{\pi} \) for \( -\frac{\pi}{2} \le \theta \le \frac{\pi}{2} \). The transformation is \( x = \tan(\theta) \) with inverse \( \theta = \arctan(x) \). Recall that \( \frac{d\theta}{dx} = \frac{1}{1 + x^2} \), so by the change of variables formula \( X \) has PDF \[ g(x) = \frac{1}{\pi \left(1 + x^2\right)}, \quad x \in \R \]
Thus, \( X \) also has the standard Cauchy distribution. Clearly we can simulate a value of the Cauchy distribution by \( X = \tan\left(-\frac{\pi}{2} + \pi U\right) \) where \( U \) is a random number. This is the random quantile method.
Open the Cauchy experiment, which is a simulation of the light problem in the previous exercise. Keep the default parameter values and run the experiment in single step mode a few times. Then run the experiment 1000 times, noting the agreement between the empirical density function and the probability density function.