Random Variables and Expectation
Videos (~0 mins)
Reading (~30 mins)
- Discrete Mathematics and Its Applications
- Section 7.2, pages 460-461 (“Random Variables”)
- Section 7.4, pages 477-481
Warmup (~60 mins)
Problem 1
Suppose that I have a biased coin which comes up heads with probability \(p\). I flip it \(n\) times. Let the random variable \(X\) describe the number of heads I observe.
Part A
Let \(n = 3\) and \(p = 0.7\).
- Enumerate the entire sample space of possible outcomes. You should have 8 total.
- Compute the probability of each of the 8 outcomes, as well as the number of heads.
- Compute the expected value of \(X\) in this case.
Part B
Suppose now that we flip \(n\) coins with probability \(p\). Use the linearity property of expectation to prove that \(E(X) = np\).
Note: You may have seen a formula for how to solve this problem in a previous class. You shouldn’t cite this formula to solve this problem – I am asking you to prove the formula.
Problem 2
Your friend offers to play a “game” with you. They have two coins. Coin \(A\) has probability of heads equal to \(\frac{1}{2}\) and coin \(B\) has probability of heads equal to \(q\). In this game,
- First, your friend picks one of the two coins. Each coin has probability \(\frac{1}{2}\) of being chosen.
- Then, your friend flips the coin. If heads, your friend owes you a coffee. If tails, you owe your friend a coffee.
Part A
You and your friend play this game 10 times. What is the expected number of coffees that your friend owes you after 10 plays?
Hints:
- Use linearity of expectation.
- \(p(H) = p(H|A)p(A) + p(H|B)p(B)\). This formula is sometimes called “the law of total probability,” but it is just an instance of the definition of conditional probability and the addition principle for disjoint events.
Part B
What is the smallest value of \(q\) for which you would be willing to play this game?
© Phil Chodrow, 2023