Books Probability and Statistical Inference

Random Variables of the Continuous Type

Let 𝑋𝑋 denote the outcome when a point is selected at random from an interval [𝑎,𝑏][𝑎,𝑏], −∞<𝑎<𝑏<∞-\infty <𝑎<𝑏<\infty . If the experiment is performed in a fair manner, it is reasonable to assume that the probability that the point is selected from the interval [𝑎,𝑥][𝑎,𝑥], 𝑎≤𝑥≤𝑏𝑎\leq 𝑥\leq 𝑏, is 𝑥−𝑎𝑏−𝑎\frac{𝑥-𝑎}{𝑏-𝑎}. That is, the probability is proportional to the length of the interval. So, the CDF (cumulative distribution function), with the same meaning borrowed from the case for discrete random variables, of 𝑋𝑋 is

𝐹(𝑥)=P(𝑋≤𝑥)={0,𝑥<𝑎𝑥−𝑎𝑏−𝑎,𝑎≤𝑥<𝑏1,𝑥≥𝑏𝐹(𝑥)=ℙ(𝑋\leq 𝑥)=\begin{cases}0, & 𝑥<𝑎 \\ \frac{𝑥-𝑎}{𝑏-𝑎}, & 𝑎\leq 𝑥<𝑏 \\ 1, & 𝑥\geq 𝑏\end{cases}

Note that 𝐹(𝑥)𝐹(𝑥) can be written as

𝐹(𝑥)=∫−∞𝑥𝑓(𝑡) d𝑡.𝐹(𝑥)={\int }_{-\infty }^{𝑥}𝑓(𝑡)\, \mathrm{d}𝑡.

where

𝑓(𝑡)=1𝑏−𝑎,𝑡∈[𝑎,𝑏]𝑓(𝑡)=\frac{1}{𝑏-𝑎},\quad 𝑡\in [𝑎,𝑏]

and 𝑓𝑓 assumes the value 0 outside the interval [𝑎,𝑏][𝑎,𝑏]. On (𝑎,𝑏)(𝑎,𝑏) we have 𝐹′(𝑥)=𝑓(𝑥){𝐹}^{\prime }(𝑥)=𝑓(𝑥), and 𝑓𝑓 is called the probability density function (PDF) of 𝑋𝑋. The random variable 𝑋𝑋 like this is said to have a uniform distribution if its probability density function is constant on an interval.

For a continuous random variable 𝑋𝑋, it is not natural to assign probability to the event {𝑋=𝑥}\{𝑋=𝑥\} for an isolated point 𝑥∈𝑆𝑥\in 𝑆 in the same way as in the discrete case. As an analogy, consider a rod of total mass 11: one does not speak of the mass at a single point; instead one works with density (mass per unit length). Probability for continuous outcomes is analogous, which motivates the name probability density function.

We say a probability density function (PDF) of a random variable 𝑋𝑋 of the continuous type, with space 𝑆𝑆 that is an interval or union of intervals, is an integrable function 𝑓(𝑥)𝑓(𝑥) on 𝑆𝑆 satisfying the following conditions:

  1. 𝑓(𝑥)≥0𝑓(𝑥)\geq 0 for all 𝑥∈𝑆𝑥\in 𝑆.
  2. ∫𝑆𝑓(𝑥) d𝑥=1{\int }_{𝑆}𝑓(𝑥)\, \mathrm{d}𝑥=1.
  3. If (𝑎,𝑏)⊆𝑆(𝑎,𝑏)\subseteq 𝑆, then the probability of the event {𝑎<𝑋<𝑏}\{𝑎<𝑋<𝑏\} is

    P(𝑎<𝑋<𝑏)=∫𝑎𝑏𝑓(𝑥) d𝑥.ℙ(𝑎<𝑋<𝑏)={\int }_{𝑎}^{𝑏}𝑓(𝑥)\, \mathrm{d}𝑥.

The cumulative distribution function (CDF) or distribution function of 𝑋𝑋 defined in terms of the PDF is then given by

𝐹(𝑥)=P(𝑋≤𝑥)=∫−∞𝑥𝑓(𝑡) d𝑡,−∞<𝑥<∞.𝐹(𝑥)=ℙ(𝑋\leq 𝑥)={\int }_{-\infty }^{𝑥}𝑓(𝑡)\, \mathrm{d}𝑡,\quad -\infty <𝑥<\infty .

The expected value of 𝑋𝑋, or the mean of 𝑋𝑋, is defined as

μ=E[𝑋]=∫−∞∞𝑥𝑓(𝑥) d𝑥,\mu =\mathbb{E}[𝑋]={\int }_{-\infty }^{\infty }𝑥𝑓(𝑥)\, \mathrm{d}𝑥,

the variance of 𝑋𝑋 is

σ2=Var⁡(𝑋)=∫−∞∞(𝑥−μ)2𝑓(𝑥) d𝑥,{\sigma }^{2}=\operatorname{Var}(𝑋)={\int }_{-\infty }^{\infty }{(𝑥-\mu )}^{2}𝑓(𝑥)\, \mathrm{d}𝑥,

and the moment-generating function of 𝑋𝑋 is

𝑀(𝑡)=E[𝑒𝑡𝑋]=∫−∞∞𝑒𝑡𝑥𝑓(𝑥) d𝑥.𝑀(𝑡)=\mathbb{E}[{𝑒}^{𝑡𝑋}]={\int }_{-\infty }^{\infty }{𝑒}^{𝑡𝑥}𝑓(𝑥)\, \mathrm{d}𝑥.

This is not the first place the moment-generating function appears: we already introduced 𝑀𝑀 for discrete random variables and related it to moments there. That earlier discussion will be completed when we typeset the discrete chapter; here we only spell out the integral form for the continuous case and recall the same hypotheses.

The algebraic identity σ2=E[𝑋2]−μ2{\sigma }^{2}=\mathbb{E}[{𝑋}^{2}]-{\mu }^{2} holds whenever the second moment is finite: if E[𝑋2]<∞\mathbb{E}[{𝑋}^{2}]<\infty , then E[𝑋]\mathbb{E}[𝑋] and Var⁡(𝑋)\operatorname{Var}(𝑋) are finite and the formula follows.

Suppose 𝑀(𝑡)=E[𝑒𝑡𝑋]𝑀(𝑡)=\mathbb{E}[{𝑒}^{𝑡𝑋}] is finite for all 𝑡𝑡 in some open interval (−h,h)(-h,h) with h>0h>0. Then 𝑀𝑀 is infinitely differentiable on (−h,h)(-h,h), and for every nonnegative integer 𝑟𝑟,

𝑀(𝑟)(0)=E[𝑋𝑟].{𝑀}^{(𝑟)}(0)=\mathbb{E}[{𝑋}^{𝑟}].

Casella and Berger Casella and Berger (2002) give a standard statement and proof of this identity. In particular, μ=𝑀′(0)\mu ={𝑀}^{\prime }(0) and σ2=𝑀′′(0)−[𝑀′(0)]2{\sigma }^{2}={𝑀}^{\prime\prime }(0)-{[{𝑀}^{\prime }(0)]}^{2}. Under these hypotheses, the conclusions agree with those already recorded for discrete random variables.

The CDF also answers percentile (or quantile) questions. Fix 𝑝∈(0,1)𝑝\in (0,1). A value π𝑝{\pi }_{𝑝} is called a 100p-th percentile of the distribution of 𝑋𝑋 if

𝐹(π𝑝)=P(𝑋≤π𝑝)=𝑝.𝐹({\pi }_{𝑝})=ℙ(𝑋\leq {\pi }_{𝑝})=𝑝.

Equivalently, π𝑝{\pi }_{𝑝} is a p-quantile of 𝑋𝑋. The median is the 50th percentile, i.e. any 𝑚𝑚 with 𝐹(𝑚)=1/2𝐹(𝑚)=1/2; when the solution is unique, 𝑚=π1/2𝑚={\pi }_{1/2}. When 𝐹𝐹 is continuous and strictly increasing on an interval, there is a unique π𝑝{\pi }_{𝑝} for each 𝑝𝑝, and the map 𝑝↦π𝑝𝑝\mapsto {\pi }_{𝑝} coincides with the inverse function 𝐹−1{𝐹}^{-1}. More generally, when 𝐹𝐹 has flat pieces, one uses the generalized inverse 𝐹−1(𝑝)=inf⁡{𝑥:𝐹(𝑥)≥𝑝}{𝐹}^{-1}(𝑝)=\inf \{𝑥:𝐹(𝑥)\geq 𝑝\} to define the quantile in a unique way; we will not need that refinement here.