Calculating Expected Values Dennis Sun Expected Value Formula We typically write the p.m.f. of a random variable as a formula: n x p[x] = p (1 − p)n−x x p[x] = (1 − p)x−1 p So to calculate the expected value of a random variable X with p.m.f. p[x], we just have to evaluate the sum X E[X] = x · p[x]. x Expected Value of a Binomial Random Variable Let’s find the expected value of a Binomial(n, p) random variable X. E[X] = np Expected Value of Functions of R.V.s How do you calculate the expected value of a function of a random variable, g(X)? There are two ways: 1 Find the PMF of Y = g(X) and calculate X E[Y ] = y · pY [y]. y 2 Use the Law of the Unconscious Statistician (LotUS). X E[g(X)] = g(x) · pX [x]. x Example You roll a die. If it lands , you win $1. # lose $1. "If it lands , you 2 amount . Otherwise, nothing happens. Find E you win Notice that E " amount you win 2 # amount 6 E = you win 2 . Many students make the mistake of thinking that E[g(X)] is equal to g(E[X]). This is only true when g is a linear function, i.e., g(X) = aX + b. In this case, E[aX + b] = aE[X] + b.
© Copyright 2026 Paperzz