1.7. Continuous Random Variables¶
1.7.1. Continuous Distributions and Probability Density Functions¶
Definition 1.7.1 : Continuous random variables
We say a random variable is a continuous random variable if its cumulative distribution function \(F_{X}(x)\) is a continuous function for all \(x \in \mathbb{R}\).
Concept 1.7.2 : No points of discrete mass
Recall from Theorem 1.5.8 that \(P(X=x)=F_{X}(x)-F_{X}(x-)\) for any random variable \(X\). Hence, a continuous random variable \(X\) has no points of discrete mass: \(P(X=x)=0\) for all \(x \in \mathbb{R}\).
Definition 1.7.3 : Absolute continuity and probability density function
A random variable \(X\) is absolutely continuous when its cdf can be written as
The function \(f_X\) is called a probability density function (pdf) of \(X\). If \(f_X\) is continuous at \(x\), the Fundamental Theorem of Calculus gives
Definition 1.7.4 : Support of a continuous random variable
Let \(X\) be a continuous random variable with pdf \(f_X\). Its support consists of the points where the pdf is positive:
As in the discrete case, the support is often denoted by \(\mathcal{S}\).
Concept 1.7.5 : Interval probabilities for continuous random variables
For a random variable \(X\) with pdf \(f_X\), probabilities over intervals are obtained by integration:
Since a continuous random variable has no points of positive probability, including or excluding the endpoints does not change the probability:
Concept 1.7.6 : Properties of a pdf
A probability density function \(f_X\) satisfies the two properties
- (i) \(f_X(x)\geq0\).
- (ii) \(\int_{-\infty}^{\infty}f_X(t)\,dt=1\).
Proof
-
(i) Nonnegativity is part of the definition of a pdf.
-
(ii) The integral representation of the cdf and its upper limit give
\[ \int_{-\infty}^{\infty}f_X(t)\,dt =\lim_{x\to\infty}F_X(x)=1. \]
Conversely, a function satisfying these two properties is a pdf for a continuous random variable. This converse is used without proof.
Example 1.7.7 : Point chosen at random within the unit circle
Suppose a point is selected at random in the interior of a circle of radius \(1\), and let \(X\) be its distance from the origin. The sample space is \(\mathcal{C}=\{(w,y):w^{2}+y^{2}<1\}\). Subsets of \(\mathcal{C}\) with equal area are equilikely, so the probability that the selected point lies in a set \(A\subset\mathcal{C}\) is
For \(0<x<1\), the event \(\{X\leq x\}\) means that the point lies in a circle of radius \(x\). Thus \(P(X\leq x)=\pi x^{2}/\pi=x^{2}\), and the cdf of \(X\) is
Differentiating \(F_X(x)\) gives the pdf
For example, the probability that the selected point falls in the ring with radii \(1/4\) and \(1/2\) is
1.7.2. Quantiles¶
Definition 1.7.8 : Quantiles and quartiles
Let \(0<p<1\). A quantile of order \(p\) is a value \(\xi_p\) such that
It is also called the \((100p)\)th percentile. The median, or second quartile, is a quantile \(\xi_{1/2}\). The first, second, and third quartiles are denoted by \(q_1=\xi_{1/4}\), \(q_2=\xi_{1/2}\), and \(q_3=\xi_{3/4}\). Their interquartile range is \(\mathrm{iq}=q_3-q_1\), a measure of spread or dispersion. For a distribution with a pdf, a median divides the probability mass into equal halves.
Concept 1.7.9 : Quantiles need not be unique
Quantiles need not be unique even for distributions with pdfs. For example, consider
Each of the two nonzero pieces has integral \(1/2\). The cdf is therefore equal to \(1/2\) throughout \([2,3]\), and every point of that closed interval is a median according to Definition 1.7.8.
A sufficient condition for a unique quantile is that \(F_X\) be continuous and strictly increasing on an interval containing that quantile in its interior. For example, this holds when \(f_X\) is continuous and strictly positive on a neighborhood of the quantile.
When the cdf is invertible at the quantile, the usual inverse gives
1.7.3. Transformations¶
Theorem 1.7.10 : Cumulative distribution function technique
Let \(X\) be a continuous random variable with pdf \(f_X(x)\) and support \(\mathcal{S}_X\). Let \(Y=g(X)\), where \(g\) is a one-to-one differentiable function on \(\mathcal{S}_X\). Write \(x=g^{-1}(y)\) and \(dx/dy=d[g^{-1}(y)]/dy\). Then the pdf of \(Y\) is
where \(\mathcal{S}_Y=\{y=g(x):x\in\mathcal{S}_X\}\) is the support of \(Y\).
Proof
Since \(g\) is one-to-one and continuous, it is either strictly monotonically increasing or strictly monotonically decreasing.
Suppose first that \(g\) is strictly increasing. The cdf of \(Y\) is
Differentiating gives
Because \(g\) is increasing, \(dx/dy>0\), so \(dx/dy=|dx/dy|\).
Suppose instead that \(g\) is strictly decreasing. The cdf is then
and differentiation gives
Because \(g\) is decreasing, \(dx/dy<0\), so \(-dx/dy=|dx/dy|\). Thus the stated density formula holds in both cases.
Concept 1.7.11 : Jacobian
The Jacobian of the transformation, denoted by \(J\), is \(d x / d y=(d / d y) g^{-1}(y)\). In most mathematical areas, \(J=d x / d y\) is called the Jacobian of the inverse transformation \(x=g^{-1}(y)\), but this book calls it the Jacobian of the transformation for convenience.
Concept 1.7.12 : Algorithm for a one-to-one transformation
The following algorithm summarizes Theorem 1.7.10 for finding the pdf of \(Y=g(X)\) when the transformation is one-to-one.
- Find the support of \(Y\).
- Solve \(y=g(x)\) for \(x\) in terms of \(y\) to obtain the inverse \(x=g^{-1}(y)\).
- Obtain \(\frac{dx}{dy}\).
-
The pdf of \(Y\) is
\[ f_Y(y)=f_X\left(g^{-1}(y)\right)\left|\frac{dx}{dy}\right|. \]
Example 1.7.13 : Logarithmic transformation
Let \(X\) have the pdf
Consider the random variable \(Y=-\log X\). Its pdf is obtained as follows:
- The support of \(Y=-\log X\) is \((0,\infty)\).
- Solving \(y=-\log x\) for \(x\) gives \(x=e^{-y}\).
- The derivative is \(\frac{dx}{dy}=-e^{-y}\).
-
Thus, for \(y>0\), the pdf of \(Y\) is
\[ f_Y(y)=f_X\left(e^{-y}\right)\left|-e^{-y}\right|=4\left(e^{-y}\right)^3e^{-y}=4e^{-4y}. \]
1.7.4. Mixtures of Discrete and Continuous Type Distributions¶
Example 1.7.14 : A mixture of discrete and continuous types
Let a distribution function be given by

Figure 1.7.1.
Then, for instance,
and
The distribution function \(F(x)\) is not always continuous, nor is it a step function. Accordingly, the corresponding distribution is neither of the continuous type nor of the discrete type. It may be described as a mixture of those types.
Concept 1.7.15 : Censoring
Distributions that mix continuous and discrete types occur frequently in practice. In life testing, censoring occurs when the lifetime \(X\) is known to exceed \(b\), but its exact value is unknown.
For example, a subject in a cancer study may disappear after having lived a known number of months, leaving the exact lifetime unknown. Similarly, an investigator may not have enough time to observe the deaths of all the rats in a study. In insurance, censoring can occur under a limited-pay policy when a loss exceeds the policy's upper limit, but the amount by which it exceeds that limit is unknown.
Example 1.7.16 : Censored wind losses
Reinsurance companies are concerned with large losses because they might agree to cover wind losses between $2,000,000 and $10,000,000. Let \(X\) be the size of a wind loss in millions of dollars, with cdf
If losses beyond $10,000,000 are reported only as \(10\), the resulting censored distribution has cdf
This cdf has a jump of \([10/(10+10)]^3=\frac{1}{8}\) at \(y=10\).