Expected Value and Variance

STAT 20: Introduction to Probability and Statistics

Adapted by Gaston Sanchez

Agenda

  • Concept review
  • Concept questions
  • Worksheet

Recap

Summary

  • Data
  • Variables
    • Categorical
    • Numerical
  • Histogram
  • Mean
  • Standard Deviation
  • Variance = \(SD^2\)

Probability

  • Chance processes
  • Random Variables
    • Discrete
    • Continuous
  • Probability Histogram
  • Expected Value
  • Standard Deviation
  • Variance

Expected Value of a Discrete RV

\[ E(X) = \sum_x x \times P(X=x) = \mu \]

EV is the long-term average: the value that you would expected to get if you were to repeat the chance process a very large number of times.

Variance of a Discrete RV

\[ \text{Var}(X) = \sum_x (x - \mu)^2 \times P(X=x) \]

Var is the average squared deviation from the mean (measures the typical spread around EV)

Example: Expected Value

Let \(X\) be the spots when we roll a fair six-sided die.

\[ \Omega = \left \{ 1, 2, 3, 4, 5, 6 \right \} \]

\[ P(X = x) = 1/6, \quad \text{for all } x \]

\[ \begin{align*} EV(X) &= \sum_x x \times P(X=x) \\ &= 1(1/6) + 2(1/6) + 3(1/6) + 4(1/6) + 5(1/6) + 6(1/6) \\ &= \frac{1 + 2 + 3 + 4 + 5 + 6}{6} \\ &= 3.5 \end{align*} \]

Example: Variance

Let \(X\) be the spots when we roll a fair six-sided die.

\[ \Omega = \left \{ 1, 2, 3, 4, 5, 6 \right \} \]

\[ \begin{align*} \text{Var}(X) &= \sum_x (x - \mu)^2 \times P(X=x) \\ &= (1 - 3.5)^2 (1/6) + (2 - 3.5)^2 (1/6) + \dots + (6 - 3.5)^2 (1/6) \\ &= \frac{(1 - 3.5)^2 + (2 - 3.5)^2 + (6 - 3.5)^2}{6} \\ & \approx 2.916 \end{align*} \]

Properties of EV

\(E(c) = c\)


\(E(cX) = c \cdot E(X)\)


\(E(X + Y) = E(X) + E(Y)\)


\(E(aX + bY) = a \cdot E(X) + b \cdot E(Y)\)


\(Y = g(X) \ \rightarrow \ E(Y) = E(g(X)) = \sum_x g(x) \times P(X=x)\)

Properties of Variance

\(\textit{Var}(c) = 0\)


\(\textit{Var}(cX) = c^2 \cdot \textit{Var}(X)\)


\(\textit{Var}(X + c) = \textit{Var}(X)\)


\(\textit{Var}(X + Y) = \textit{Var}(X) + \textit{Var}(Y) \quad \text{ for } X, Y \text{ indep}\)


\(\textit{Var}(X - Y) = \textit{Var}(X) + \textit{Var}(Y) \quad \text{ for } X, Y \text{ indep}\)

Concept Review

Let \(X\) be a random variable such that \[ X = \begin{cases} -1, & \text{ with probability } 1/3\\ 0, & \text{ with probability } 1/6\\ 1, & \text{ with probability } 4/15 \\ 2, & \text{ with probability } 7/30 \\ \end{cases} \]

  1. Draw the graph of the CDF of \(X\)

Let \(X\) be a random variable such that \[ X = \begin{cases} -1, & \text{ with probability } 1/3\\ 0, & \text{ with probability } 1/6\\ 1, & \text{ with probability } 4/15 \\ 2, & \text{ with probability } 7/30 \\ \end{cases} \]

  1. Compute the expected value and variance of \(X\)

Concept Questions

\(X\) is a random variable with the distribution shown below: \[ X = \begin{cases} 3, \; \text{ with prob } 1/3\\ 4, \; \text{ with prob } 1/4\\ 5, \; \text{ with prob } 5/12 \end{cases} \]


Consider the box with tickets: \(\fbox{3}\, \fbox{3}\, \fbox{3} \,\fbox{4} \,\fbox{4} \,\fbox{4} \,\fbox{4} \,\fbox{5} \,\fbox{5}\, \fbox{5} \,\fbox{5} \,\fbox{5}\)

Suppose we draw once from this box and let \(Y\) be the value of the ticket drawn.

Which random variable has a higher expectation?

Prof. Stoyanov’s Zoom office hours are not too crowded this spring. She observes that number of Stat 20 students coming to her Thursday office hours have a Poisson(2) distribution. There is one Data 88 student from a previous semester who is always there (they want a letter of recommendation).

What is the expected value (EV) and variance (V) of the number of students in her Zoom office hours?

Let \(X\) be a discrete uniform random variable on the set \(\{-1, 0, 1\}\).

If \(Y=X^2\), what is \(E(Y)\)?

Let \(X\) be a discrete uniform random variable on the set \(\{-1, 0, 1\}\).

If \(W = \min(X, 0.5)\), what is \(E(W)\)?

Worksheet

40:00