14 Expected Values of Continuous Random Variables
Example 14.1 Recall Example 12.1 and Example 12.2 where office arrival times, measured in minutes after 8am, followed this pdf \[ f_X(x) = \begin{cases} (2/3600)x, & 0<x<60,\\ 0 & \text{otherwise.} \end{cases} \]
- Explain how you could use simulation to approximate \(\text{E}(X)\).
- Explain how you could approximate \(\text{E}(X)\) as a sum (as if \(X\) were a discrete random variable). Hint: recall Example 12.2.
- How could you obtain a better approximation than the sum in the previous part? What happens in the limit?
- Compute \(\text{E}(X)\) as an integral. Compare to the approximations.
- Interpret \(\text{E}(X)=40\) in context.
- Compute and interpret \(\text{P}(X \le \text{E}(X))\).
- The expected value (a.k.a. expectation a.k.a. mean), of a random variable \(X\) is a number denoted \(\text{E}(X)\) representing the probability-weighted average value of \(X\).
- The expected value of a continuous random variable with pdf \(f_X\) is defined as \[ \text{E}(X) = \int_{-\infty}^\infty x f_X(x) dx \]
- Replace the generic bounds \((-\infty, \infty)\) with the possible values of the random variable
- Note well that \(\text{E}(X)\) represents a single number.
- The expected value is the “balance point” (center of gravity) of a distribution.
- The expected value of a random variable \(X\) is defined by the probability-weighted average according to the underlying probability measure. But the expected value can also be interpreted as the long-run average value, and so can be approximated via simulation.
- Read the symbol \(\text{E}(\cdot)\) as
- Simulate lots of values of what’s inside \((\cdot)\)
- Compute the average. This is a “usual” average, regardless of whether the variable is discrete or continuous; just sum all the simulated values and divide by the number of simulated values.
Example 14.2 Continuing Example 14.1 where \(X\) has pdf \[ f_X(x) = \begin{cases} (2/3600)x, & 0<x<60,\\ 0 & \text{otherwise.} \end{cases} \]
Now we want to compute variance and standard deviation.
- What is the formula for computing variance?
- Explain how you could use simulation to approximate \(\text{E}(X^2)\).
- Explain how you could approximate \(\text{E}(X^2)\) as a sum (like a discrete random variable).
- How could you obtain a better approximation than the sum in the previous part? What happens in the limit?
- Compute \(\text{E}(X^2)\) as an integral. (You should get 1800.)
- Compute \(\text{Var}(X)\).
- Compute and interpret \(\text{SD}(X)\).
- The “law of the unconscious statistician” (LOTUS) says that the expected value of a transformed random variable can be found without finding the distribution of the transformed random variable, simply by applying the probability weights of the original random variable to the transformed values. \[\begin{align*} & \text{Discrete $X$ with pmf $p_X$:} & \text{E}[g(X)] & = \sum_x g(x) p_X(x)\\ & \text{Continuous $X$ with pdf $f_X$:} & \text{E}[g(X)] & =\int_{-\infty}^\infty g(x) f_X(x) dx \end{align*}\]
- LOTUS says we don’t have to first find the distribution of \(Y=g(X)\) to find \(\text{E}[g(X)]\); rather, we just simply apply the transformation \(g\) to each possible value \(x\) of \(X\) and then apply the corresponding weight for \(x\) to \(g(x)\).
- Whether in the short run or the long run, in general \[\begin{align*} \text{Average of $g(X)$} & \neq g(\text{Average of $X$}) \end{align*}\]
- In terms of expected values, in general \[\begin{align*} \text{E}(g(X)) & \neq g(\text{E}(X)) \end{align*}\] The left side \(\text{E}(g(X))\) represents first transforming the \(X\) values and then averaging the transformed values. The right side \(g(\text{E}(X))\) represents first averaging the \(X\) values and then plugging the average (a single number) into the transformation formula.
Example 14.3 Continuing Example 12.3. Suppose that \(X\) is a claim amount in excess of the decuctible for a car insurance policy that incurs a claim, measured in thousands of dollars. Assume that \(X\) has pdf \[ f_X(x) = (1/4.3) e^{-x/4.3}, \qquad x >0 \]
- Explain how you could use simulation to approximate \(\text{E}(X)\).
- Donny Dont says \(\text{E}(X) = \int_0^\infty (1/4.3)e^{-x/4.3}dx = 1\). Do you agree?
- Compute and interpret \(\text{E}(X)\).
- Compute and interpret \(\text{P}(X \le \text{E}(X))\).
- Explain how you could use simulation to approximate \(\text{E}(X^2)\).
- Donny Dont says: “I can just use LOTUS and replace \(x\) with \(x^2\), so \(\text{E}(X^2)\) is \(\int_{-\infty}^{\infty} (1/4.3)x^2 e^{-x^2/4.3} dx\)”. Do you agree?
- Compute \(\text{E}(X^2)\).
- Compute \(\text{Var}(X)\).
- Compute and interpret \(\text{SD}(X)\).
14.1 Exercises
Exercise 14.1 Continuous Exercise 12.1. In a certain population, household income \(X\) ($ thousands) follows the pdf \[ f_X(x) = c x^{-2.5}, \quad x \ge 30 \] for an appropriate constant \(c\). Note that the measurement units are $ thousands, so 1 represents 1 thousand dollars. (This is not a super realistic example, but just go with it.)
- Compute \(\text{E}(X)\).
- Interpret \(\text{E}(X)\) in context.
- Compute and interpret \(\text{P}(X \le \text{E}(X))\).
- Compute \(\text{Var}(X)\).
- Compute and interpret \(\text{SD}(X)\).