Math Home
Probability

Definition

The expected value of a continuous random variable is the average value of the random variable.

Let \(X\) be a continuous random variable and let \(f(x)\) be the pdf of \(X.\) The expected value of \(X\) is \[E[X] = \int_{-\infty}^\infty x f(x) dx\]



The definition for the expected value of a continuous random variable is closely related to the definition for a discrete random variable. For a discrete random variable \(X,\) the expectation is \[E[X] = \sum_{x \in S} x p(x)\] The integral is replaced with a sum and the pdf is replaced with the pmf.




Example: Let \(X\) be the continuous random variable with pdf \(f(x) = \frac{3}{7}x^2\) if \(1 < x < 2\) and \(0\) otherwise. Then the expected value of \(X\) is \begin{align} E[X] & = \int_{-\infty}^\infty xf(x)dx \\ & = \int_1^2 x \cdot \frac{3}{7}x^2 dx \\ & = \int_1^2 \frac{3}{7}x^3 dx\\ & = \left. \frac{3}{28}x^4 dx \right|_1^2 \\ & = \frac{48}{28} - \frac{3}{28} \\ & = \frac{45}{28} \end{align} The range of the integral changes in the first line because \[\int_{-\infty}^1 xf(x) dx = \int_{-\infty}^1 0 dx = 0\] and \[\int_2^{\infty} xf(x) dx = \int_2^\infty 0 dx = 0\]

Alternate Definition For Positive \(X\)

If \(X\) is a continuous random variable such that \(X \geq 0\) and \(F(x)\) is the cdf of \(X,\) then the expected value of \(X\) is \[\int_0^\infty (1-F(x)) dx\]

Proof: The equation follows from direct computation. \begin{align} \int_0^\infty (1-F(x))dx & = \int_0^\infty P(X \geq x) \\ & = \int_0^\infty \int_x^\infty f(t) dt dx \\ & = \int_0^\infty \int_0^t f(t) dx dt \\ & = \int_0^\infty tf(t)dt \\ & = \int_0^\infty xf(x)dx \\ & = E[X] \end{align}

Pull Out Contants

Claim: For any continuous random variable \(X\) and any constand \(c,\) \[E[cX] = cE[X]\]

Proof:
Let \(X\) have pdf \(f(x).\) Then \begin{align} E[cX] & = \int_{-\infty}^\infty cxf(x)dx \\ & = c\int_{-\infty}^\infty xf(x)dx \\ & = cE[X] \end{align}

Sums of Random Variables

Claim: For any two continuous random variables \(X\) and \(Y,\) \[E[X+Y] = E[X]+E[Y]\]

Proof:
The result is shown by manipulating the integral. \begin{align} E[X+Y] & = \int_{-\infty}^\infty \int_{-\infty}^\infty (x+y)f(x,y)dxdy \\ & = \left(\int_{-\infty}^\infty \int_{-\infty}^\infty xf(x,y)dxdy\right) + \left(\int_{-\infty}^\infty \int_{-\infty}^\infty yf(x,y)dxdy\right)\\ & = \left(\int_{-\infty}^\infty x\int_{-\infty}^\infty f(x,y)dydx\right) + \left(\int_{-\infty}^\infty y\int_{-\infty}^\infty f(x,y)dxdy\right)\\ & = \left(\int_{-\infty}^\infty xf_X(x)dx\right) + \left(\int_{-\infty}^\infty yf_Y(y)dy\right)\\ & = E[X]+E[Y] \end{align}

Linearity of Random Variables

Corollary: Given two random variables \(X\) and \(Y\) and constants \(a, b,\) and \(c,\) \[E[aX + bY + c] = aE[X] + bE[Y] + c\]

Products of Independent Random Variables

Claim: If \(X\) and \(Y\) are independent continuous random variables, then \[E[XY] = E[X]E[Y]\]

Proof:
Since \(X\) and \(Y\) are independent, there is a set of coordinates over which \(f(x,y)=f_X(x)f_Y(y)\) over a rectangular region \(R.\) Let \(R = [a,b] \times [c,d]\) where the endpoints may be \(\pm \infty.\) Then \begin{align} E[XY] & = \int_{-\infty}^\infty \int_{-\infty}^\infty xyf(x,y) dxdy \\ & = \int_a^b \int_c^d xyf(x)f(y) dxdy\\ & = \left(\int_a^b xf(x)dx\right)\left(\int_c^d yf(y)dy\right)\\ & = E[X]E[Y] \\ \end{align}

Expected Value of a Function of \(X\)

Let \(g(x)\) be a function. We can compose \(g\) with \(X\) to get a new random variable. The expected value of \(g(X)\) is \[E[g(X)] = \int_{-\infty}^\infty g(x)f(x)dx\]

Example: Let \(X\) be the random variable with pdf \(f(x) =\frac{1}{x}\) when \(1 < x < e.\) Find \(E[X^3+1].\)

Solution:
First, by the linearity of expectation we have \(E[X^3+1] = E[X^3]+1.\)

Next, we can use the formula for the expected value of a function of \(X.\) \begin{align} E[X^3] & = \int_1^e x^3 \cdot \frac{1}{x} dx \\ & = \int_1^e x^2 dx\\ & = \left. \frac{x^3}{3} \right|_1^e \\ & = \frac{e^3 - 1}{3} \end{align} Combining the two, we get \[E[X^3+1] = \frac{e^3 - 1}{3}+1 = \frac{e^3 + 2}{3}.\]

Check your understanding:

1. Find \(E[X]\) if the pdf of \(X\) is \(10x^9\) for \(0 < x < 1.\)




Unanswered

2. Find \(E[X]\) if the pdf of \(X\) is \(f(x) = \frac{2}{3}\) for \(1 \leq x < 2,\) and \(f(x) = \frac{6-2x}{3}\) for \(2 \leq x < 3.\)




Unanswered

3. Find \(E[X]\) if \(X\) has pdf \(ln(x)\) for \(1 < x < e.\)




Unanswered

4. Find \(E[X]\) if \(X\) has the pdf \(f(x) = 2e^{-2x}\) for \(x > 0.\)




Unanswered