Lesson 38 LOTUS for Continuous Random Variables

Theory

Theorem 38.1 (LOTUS for a Continuous Random Variable) Let \(X\) be a continuous random variable with p.d.f. \(f(x)\). Then, the expected value of \(g(X)\) is \[\begin{equation} E[g(X)] = \int_{-\infty}^\infty g(x) \cdot f(x)\,dx. \tag{38.1} \end{equation}\]

Compare this definition with LOTUS for a discrete random variable (24.1). We simply replaced the p.m.f. by the p.d.f. and the sum by an integral.

Example 38.1 (Expected Value of the Square of a Uniform) Suppose the current (in Amperes) flowing through a 1-ohm resistor is a \(\text{Uniform}(a, b)\) random variable \(I\) for \(a, b > 0\). The power dissipated by this resistor is \(X = I^2\). What is the expected power dissipated by the resistor?

There are two ways to calculate this.

Method 1 (The Long Way) We can first derive the p.d.f. of the power, \(X = I^2\), using the methods of Lesson 36. \[\begin{align*} F_X(x) &= P(X \leq x) \\ &= P(I^2 \leq x) \\ &= P(I \leq \sqrt{x}) & (\text{if $x \geq 0$, since $a, b > 0$})\\ &= \begin{cases} 0 & x < a^2 \\ \frac{\sqrt{x} - a}{b - a} & a^2 \leq x \leq b^2 \\ 1 & x > b^2 \end{cases} \\ f_X(x) &= \frac{d}{dx} F_X(x) \\ &= \begin{cases} \frac{1}{2(b-a)\sqrt{x}} & a^2 \leq x \leq b^2 \\ 0 & \text{otherwise} \end{cases} \end{align*}\] Now that we have the p.d.f., we calculate the expected value using the definition (37.1). Note the limits of integration: \[ E[X] = \int_{a^2}^{b^2} x \cdot \frac{1}{2(b-a)\sqrt{x}}\,dx = \frac{b^3 - a^3}{3(b-a)}. \]

Method 2 (Using LOTUS) LOTUS allows us to calculate the expected value of \(X\) without working out the p.d.f. of \(X\). All we need is the p.d.f. of \(I\), which we already have and is simple. \[ E[X] = E[I^2] = \int_a^b i^2 \cdot \frac{1}{b-a}\,di = \frac{i^{3}}{3} \frac{1}{b-a} \Big|_a^b = \frac{b^3 - a^3}{3(b-a)}. \] In fact, we did not use the fact that \(a, b > 0\) at all in this calculation, so this formula is valid for all uniform distributions, not just uniform distributions on positive values.

Example 38.2 (Expected Value of the Square of an Exponential) Continuing with the previous example, suppose that the current \(I\) instead follows an \(\text{Exponential}(\lambda)\) distribution. What is the expected power dissipated by the resistor?

Again, we will use LOTUS. This is an unpleasant exercise in integration by parts. We simply set up the integral and use software to evaluate the integral. \[ E[I^2] = \int_0^\infty i^2 \cdot \lambda e^{-\lambda i}\,di = \frac{2}{\lambda^2}. \]
Example 38.3 (Expected Value of a Cosine) Let \(\Theta\) be a random angle, from a \(\text{Uniform}(-\pi, \pi)\) distribution. Then, the p.d.f. of \(\Theta\) is \[ f(\theta) = \begin{cases} \frac{1}{\pi - (-\pi)} & -\pi \leq x \leq \pi \\ 0 & \text{otherwise} \end{cases}, \] and the expected value of the cosine is: \[\begin{align*} E[\cos(\Theta)] &= \int_{-\pi}^\pi \cos(\theta)\cdot \frac{1}{\pi - (-\pi)}\,d\theta \\ &= \frac{1}{2\pi} \sin\theta \Big|_{-\pi}^\pi \\ &= \frac{1}{2\pi} (0 - 0) \\ &= 0. \end{align*}\]

Essential Practice

  1. You inflate a spherical balloon in a single breath. If the volume of air you exhale in a single breath (in cubic inches) is \(\text{Uniform}(a=36\pi, b=288\pi)\) random variable, what is the expected radius of the balloon (in inches)?

    (Use LOTUS, but feel free to check your answer using the p.d.f. you derived in Lesson 36.)

  2. The distance (in hundreds of miles) driven by a trucker in one day is a continuous random variable \(X\) whose cumulative distribution function (c.d.f.) is given by: \[ F(x) = \begin{cases} 0 & x < 0 \\ x^3 / 216 & 0 \leq x \leq 6 \\ 1 & x > 6 \end{cases}. \]

    Let the random variable \(D\) represent the time (in days) required for the trucker to make a 1500-mile trip, so \(D = 15 / X\). Calculate the expected value of \(D\).