Expected Value
PDF and CDF
Learning Objectives:
- Understand relation between Probability Density Function (PDF) and Cumulative Distribution Function (CDF).
Solved Example: 9-1-01
Let X denotes the time a person waits for a bus to arrive as shown below. Calculate the probability that a person waits 90 seconds for the bus to arrive.
A. 37.5%
B. 57.5%
C. 71.9%
D. 78.8%
90 seconds is 1.5 minutes.
\[P(X \leq 1.5) = 0.5 \times 1 + \dfrac{1}{2} \times 0.5 \times (0.5 + 0.375)= 0.719\ \mathrm{or\ } 71.9\%\]Correct Answer: C
Solved Example: 9-1-02
X is a random variable with a uniform probability density function in the interval [-2, 10]. For Y = 2X - 6, the conditional probability P(Y ≤ 7 | X ≥ 5):
A. 0.3
B. 0.4
C. 0.5
D. 0.6
The area under the curve must be 1, \[p=\dfrac{1}{12}\] \[{{f}_{x}}\left( x \right)=\left\{ \begin{matrix} \dfrac{1}{12}~~~-2\le x\le 10 \\ 0~~~~\mathrm{otherwise} \\ \end{matrix} \right\}\] Similarly, \[{{f}_{y}}\left( y \right)=\left\{ \begin{matrix} ~~~\frac{1}{24}~~~-10\le x\le 14 \\ 0~~~~~~~~\mathrm{otherwise} \\ \end{matrix} \right.\] \begin{align*} P\left( y\le 7\text{ }\!\!|\!\!\text{ }x\ge 5 \right)&=\dfrac{P\left( 4\le y\le 7 \right)}{P\left( 4\le y\le 14 \right)}\\ &=\dfrac{3}{10}\\ &= 0.3 \end{align*}
Correct Answer: A
Solved Example: 9-1-03
Probability density function of a random variable X is given below
\(f\left( x \right) = \left\{ {\begin{array}{*{20}{c}} {0.25}&{\mathrm{if}\;1 \le x \le 5}\\ 0&{\mathrm{otherwise}} \end{array}} \right.\)
P (X ≤ 4) is:
A. $\dfrac{3}{4}$
B. $\dfrac{1}{2}$
C. $\dfrac{1}{4}$
D. $\dfrac{1}{8}$
Since the value of the function is constant, it is difficult to figure it out whether the function is discrete or continuous.
Correct Answer: A
Solved Example: 9-1-04
Consider a random variable X that takes values +1 and -1 with probability 0.5 each. The values of the cumulative distribution function F(x) at x = -1 and +1 are:
A. 0 and 0.5
B. 0 and 1
C. 0.5 and 1
D. 0.25 and 0.75
Correct Answer: C
Expected Value
Learning Objectives:
- Understand conditions for discrete vs. continuous probability distribution function.
- Calculate the expected value of a discrete function.
- Calculate the expected value of a continuous function.
Expected Value of a Discrete Function:
Expected Value of a Continuous Function:
Solved Example: 9-2-01
You pick 3 different numbers between 1 and 9. If you pick all the numbers correctly you win \$50. What are your expected earnings if it costs \$1 to play?
A. -\$0.241
B. -\$0.279
C. -\$0.334
D. -\$0.405
Let X = your earnings
X = 50 - 1 = 49, when you are winning (Prize money minus cost of playing)
X = -1, when you are losing (Cost of playing)
Probability of winning, $P(\mathrm{Winning\ \$49}) = \dfrac{1}{({}^{9}C_{3})} = \dfrac{1}{84}$
Probability of losing, $P(\mathrm{Losing\ \$1}) = 1- \dfrac{1}{84} = \dfrac{83}{84}$
Expected Earnings, $E(X) = 49 * \dfrac{1}{84} + (-1)* \dfrac{83}{84} = - \dfrac{34}{84} = -\$0.405$
Correct Answer: D
Solved Example: 9-2-02
A fair die is rolled two times independently. Given that the outcome on the first roll is 1, the expected value of the sum of the two outcomes is:
A. 4
B. 4.5
C. 3
D. 5.5
The sample space for the outcome at second rolling is: $S_2 = \{1,2,3,4,5,6\}$ Given that we have already got 1 in the first rolling, \begin{align*} S &= \{(1,1), (1,2), (1,3), (1,4), (1,5), (1,6)\} \\ &= \{2,3,4,5,6,7\} \end{align*} Each of the above outcome is equally likely, which is $\dfrac{1}{6}^{\mathrm{th}}$ times. \begin{align*} E &= \sum_{i=1}^{n} P_i x_i \\&= \left(\dfrac{1}{6} \times 2\right) + \left(\dfrac{1}{6} \times 3\right) + \left(\dfrac{1}{6} \times 4\right) \\ &+ \left(\dfrac{1}{6} \times 5\right) + \left(\dfrac{1}{6} \times 6\right) + \left(\dfrac{1}{6} \times 7\right)\\ &= \dfrac{1}{6} \left(2+3+4+5+6+7\right)\\ &= \dfrac{1}{6} (27) = 4.5 \end{align*}
Correct Answer: B
Solved Example: 9-3-01
Let the random variable X denotes the time a person waits for a bus to arrive. X varies according to the graph shown below. What is the expected value of waiting, in minutes, for a person on this bus stop?
A. 0.577
B. 1.083
C. 1.235
D. 1.502
Method I: Using fundamental definition of expected value. Let us find the equation of declining line.
$\mathrm{Slope} = m = \dfrac{y_2 - y_1}{x_2 - x_1} = \dfrac{0-0.5}{3 - 1} = \dfrac{-1}{4}$ and the line passes through ($x_1$, $y_1$) = (3,0).
Using, $y - y_1 = m (x- x_1) \mathrm{\ We\ get\ } y = -0.25x + 0.75$
\[P(x) = \begin{cases} \text{0.5,} &\quad 0 \leq x \leq 1\\ \text{-0.25x + 0.75} &\quad 1 \leq x \leq 3 \\ \end{cases} \] \begin{align*} E(X) &= \int_0^3 x P(x) dx\\ &= \int_0^1 0.5x dx + \int_1^3 x (-0.25x + 0.75) dx\\ &= 0.5 \left[\dfrac{x^2}{2}\right]_0^1 + (-0.25)\left[\dfrac{x^3}{3}\right]_1^3 + 0.75\left[\dfrac{x^2}{2}\right]_1^3\\ &= 0.25 - (0.25)(8.67) + 0.75(4)\\ &= 0.25 - 2.167 + 3 = 1.083 \end{align*}Method II: Using concept of Centroid.
We will calculate the x coordinate of the centroid of the combined shape.
\begin{align*} \mathrm{Rectangle}: \\A_1 &= 0.5,\\ x_1 &= 0.5\\ \mathrm{Triangle}: \\A_2&= 0.5 \times 2 \times 0.5 = 0.5,\\ x_2 &= 1 + \dfrac{1}{3} (2) = 1.67 \end{align*} \begin{align*} \bar{x} &= \dfrac{A_1 x_1 + A_2 x_2}{A_1 + A_2}\\ &= \dfrac{(0.5)(0.5)+(0.5)(1.667)}{(0.5)+(0.5)}\\ &= 1.083 \end{align*}Correct Answer: B
Solved Example: 9-3-02
If x is a random variable with the expected value of 5 and the variance of 1, then the expected value of x$^2$ is:
A. 24
B. 25
C. 26
D. 36
\begin{align*} Var(X) &= E(X^2) - [E(X)]^2\\ 1 &= E(X^2) - 5^2\\ E(X^2) &= 1 + 25\\ &= 26 \end{align*}
Correct Answer: C